signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Randoms { /** * Pick a random element from the specified iterator , or return
* < code > ifEmpty < / code > if no element has a weight greater than < code > 0 < / code > .
* < p > < b > Implementation note : < / b > a random number is generated for every entry with a
* non - zero weight after the fir... | T pick = ifEmpty ; double total = 0.0 ; while ( values . hasNext ( ) ) { T val = values . next ( ) ; double weight = weigher . getWeight ( val ) ; if ( weight > 0.0 ) { total += weight ; if ( ( total == weight ) || ( ( _r . nextDouble ( ) * total ) < weight ) ) { pick = val ; } } else if ( weight < 0.0 ) { throw new Il... |
public class ApiOvhEmailexchange { /** * Create public folder permission
* REST : POST / email / exchange / { organizationName } / service / { exchangeService } / publicFolder / { path } / permission
* @ param allowedAccountId [ required ] Account id to have access to public folder
* @ param accessRights [ requir... | String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}/permission" ; StringBuilder sb = path ( qPath , organizationName , exchangeService , path ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "accessRights" , accessRights ) ; addBody ( o... |
public class EJBMDOrchestrator { /** * F743-25855 */
private Method getSessionSynchMethod ( BeanMetaData bmd , NamedMethod namedMethod , Class < ? > [ ] expectedParams , String xmlType ) throws EJBConfigurationException { } } | if ( namedMethod == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , xmlType + " not specified in XML" ) ; return null ; } String methodName = namedMethod . getMethodName ( ) . trim ( ) ; List < String > paramTypes = namedMethod . getMethodParamList ( ) ; if ( paramT... |
public class ConversationHistory { /** * Gets message sent at specified prompt
* @ param prompt Prompt identifier
* @ param conversation Conversation prompt is used in
* @ return message sent at specified prompt
* @ throws IndexOutOfBoundsException if there are no messages from that prompt */
public Message mes... | return messageAt ( conversation . getPrompts ( ) . indexOf ( prompt ) ) ; |
public class GregorianCalendar { /** * Sets the < code > GregorianCalendar < / code > change date . This is the point when the switch
* from Julian dates to Gregorian dates occurred . Default is October 15,
* 1582 ( Gregorian ) . Previous to this , dates will be in the Julian calendar .
* To obtain a pure Julian ... | long cutoverTime = date . getTime ( ) ; if ( cutoverTime == gregorianCutover ) { return ; } // Before changing the cutover date , make sure to have the
// time of this calendar .
complete ( ) ; setGregorianChange ( cutoverTime ) ; |
public class LowLevelAbstractionFinder { /** * Return the first segment of the given sequence to be searched by the
* given < code > PatternFinderUser < / code > . If the minimum and maximum
* pattern lengths of the < code > PatternFinderUser < / code > are unset , the
* first segment will be the entire sequence ... | int size = sequence . size ( ) ; int minPatternLength = minPatternLength ( algorithm , def ) ; if ( size > 0 && size >= minPatternLength ) { int x = 0 ; int y = minPatternLength < 1 ? size - 1 : minPatternLength - 1 ; if ( x <= y ) { return resetSegmentHelper ( def , sequence , x , y , new Segment < > ( sequence , x , ... |
public class Criteria { /** * The < code > matches < / code > operator checks that an object matches the given predicate .
* @ param p
* @ return the criteria */
public Criteria matches ( Predicate p ) { } } | this . criteriaType = RelationalOperator . MATCHES ; this . right = new PredicateNode ( p ) ; return this ; |
public class ResourceAddress { /** * For now , assume this type of location header structure .
* Generalize later : http : / / hl7connect . healthintersections . com . au / svc / fhir / 318 / _ history / 1
* @ param serviceBase
* @ param locationHeader */
public static ResourceAddress . ResourceVersionedIdentifie... | Pattern pattern = Pattern . compile ( REGEX_ID_WITH_HISTORY ) ; Matcher matcher = pattern . matcher ( locationResponseHeader ) ; ResourceVersionedIdentifier parsedHeader = null ; if ( matcher . matches ( ) ) { String serviceRoot = matcher . group ( 1 ) ; String resourceType = matcher . group ( 3 ) ; String id = matcher... |
public class ViewInstruction { /** * 优先获取大小写敏感的路径 , 如若找不到 , 则获取忽略大小写后的路径
* @ param tempHome
* @ param subDirPath */
private File searchDirectory ( File tempHome , String subDirPath ) { } } | String [ ] subDirs = StringUtils . split ( subDirPath , "/" ) ; for ( final String subDir : subDirs ) { File file = new File ( tempHome , subDir ) ; if ( ! file . exists ( ) ) { String [ ] candidates = tempHome . list ( new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { if ( name . e... |
public class MarketplaceService { /** * Handle the portal LoginEvent . If marketplace caching is enabled , will preload marketplace
* entries for the currently logged in user .
* @ param loginEvent the login event . */
@ Override public void onApplicationEvent ( LoginEvent loginEvent ) { } } | if ( enableMarketplacePreloading ) { final IPerson person = loginEvent . getPerson ( ) ; /* * Passing an empty collection pre - loads an unfiltered collection ;
* instances of PortletMarketplace that specify filtering will
* trigger a new collection to be loaded . */
final Set < PortletCategory > empty = Collection... |
public class DelegateView { /** * Determines the maximum span for this view along an axis .
* @ param axis
* may be either X _ AXIS or Y _ AXIS
* @ return the span the view would like to be rendered into . Typically the
* view is told to render into the span that is returned , although
* there is no guarantee... | if ( view != null ) { return view . getMaximumSpan ( axis ) ; } return Integer . MAX_VALUE ; |
public class Transform1D { /** * Replies if the transformation is the identity transformation .
* @ return { @ code true } if the transformation is identity . */
@ Pure public boolean isIdentity ( ) { } } | if ( this . isIdentity == null ) { this . isIdentity = MathUtil . isEpsilonZero ( this . curvilineTranslation ) && MathUtil . isEpsilonZero ( this . curvilineTranslation ) ; } return this . isIdentity . booleanValue ( ) ; |
public class ActivityChooserModel { /** * Prunes older excessive records to guarantee { @ link # mHistoryMaxSize } . */
private void pruneExcessiveHistoricalRecordsLocked ( ) { } } | List < HistoricalRecord > choiceRecords = mHistoricalRecords ; final int pruneCount = choiceRecords . size ( ) - mHistoryMaxSize ; if ( pruneCount <= 0 ) { return ; } mHistoricalRecordsChanged = true ; for ( int i = 0 ; i < pruneCount ; i ++ ) { HistoricalRecord prunedRecord = choiceRecords . remove ( 0 ) ; if ( DEBUG ... |
public class ParameterUtil { /** * Init parameter values map with the default values ( static or dynamic ) of a parameter
* @ param conn database connection
* @ param param parameter
* @ param parameterValues map of parameter values
* @ throws QueryException if could not get default parameter values */
public s... | List < Serializable > defValues ; if ( ( param . getDefaultValues ( ) != null ) && ( param . getDefaultValues ( ) . size ( ) > 0 ) ) { defValues = param . getDefaultValues ( ) ; } else { try { defValues = ParameterUtil . getDefaultSourceValues ( conn , param ) ; } catch ( Exception e ) { throw new QueryException ( e ) ... |
public class Restrictors { /** * 按照值匹配某个属性
* @ param property 属性名
* @ param value 熟悉值
* @ return Restrictor */
public static Restrictor eq ( String property , Object value ) { } } | return new SimpleRestrictor ( property , value , RestrictType . eq ) ; |
public class SqlParserImpl { /** * Parse the SQL . */
protected void parseSql ( ) { } } | String sql = tokenizer . getToken ( ) ; if ( isElseMode ( ) ) { sql = StringUtil . replace ( sql , "--" , "" ) ; } Node node = peek ( ) ; if ( ( node instanceof IfNode || node instanceof ElseNode ) && node . getChildSize ( ) == 0 ) { SqlTokenizer st = new SqlTokenizerImpl ( sql ) ; st . skipWhitespace ( ) ; String toke... |
public class PDTXMLConverter { /** * Get the passed object as { @ link XMLGregorianCalendar } time ( without a
* date ) .
* @ param aBase
* The source object . May be < code > null < / code > .
* @ return < code > null < / code > if the parameter is < code > null < / code > . */
@ Nullable public static XMLGreg... | if ( aBase == null ) return null ; return s_aDTFactory . newXMLGregorianCalendarTime ( aBase . getHour ( ) , aBase . getMinute ( ) , aBase . getSecond ( ) , aBase . get ( ChronoField . MILLI_OF_SECOND ) , DatatypeConstants . FIELD_UNDEFINED ) ; |
public class ExcelFunctions { /** * Calculates the number of days , months , or years between two dates . */
public static int datedif ( EvaluationContext ctx , Object startDate , Object endDate , Object unit ) { } } | LocalDate _startDate = Conversions . toDate ( startDate , ctx ) ; LocalDate _endDate = Conversions . toDate ( endDate , ctx ) ; String _unit = Conversions . toString ( unit , ctx ) . toLowerCase ( ) ; if ( _startDate . isAfter ( _endDate ) ) { throw new RuntimeException ( "Start date cannot be after end date" ) ; } swi... |
public class RuleImpl { /** * Retrieve a parameter < code > Declaration < / code > by identifier .
* @ param identifier
* The identifier .
* @ return The declaration or < code > null < / code > if no declaration matches
* the < code > identifier < / code > . */
@ SuppressWarnings ( "unchecked" ) public Declarat... | if ( this . dirty || ( this . declarations == null ) ) { this . declarations = this . getExtendedLhs ( this , null ) . getOuterDeclarations ( ) ; this . dirty = false ; } return this . declarations . get ( identifier ) ; |
public class Http { /** * Sends a GET request and returns the response .
* @ param endpoint The endpoint to send the request to .
* @ param headers Any additional headers to send with this request . You can use { @ link org . apache . http . HttpHeaders } constants for header names .
* @ return A { @ link Path } ... | // Create the request
HttpGet get = new HttpGet ( endpoint . url ( ) ) ; get . setHeaders ( combineHeaders ( headers ) ) ; Path tempFile = null ; // Send the request and process the response
try ( CloseableHttpResponse response = httpClient ( ) . execute ( get ) ) { // Request the content
HttpEntity entity = response .... |
public class AnnotationsClassLoader { /** * Validate a classname . As per SRV . 9.7.2 , we must restict loading of
* classes from J2SE ( java . * ) and classes of the servlet API
* ( javax . servlet . * ) . That should enhance robustness and prevent a number
* of user error ( where an older version of servlet . j... | if ( name == null ) return false ; if ( name . startsWith ( "java." ) ) return false ; return true ; |
public class ObjectUtils { /** * Check whether the given exception is compatible with the specified exception types , as declared
* in a throws clause .
* @ param ex the exception to check
* @ param declaredExceptions the exception types declared in the throws clause
* @ return whether the given exception is co... | if ( ! ObjectUtils . isCheckedException ( ex ) ) { return true ; } if ( declaredExceptions != null ) { for ( final Class < ? > declaredException : declaredExceptions ) { if ( declaredException . isInstance ( ex ) ) { return true ; } } } return false ; |
public class CouchDBClient { /** * ( non - Javadoc )
* @ see com . impetus . kundera . client . Client # deleteByColumn ( java . lang . String ,
* java . lang . String , java . lang . String , java . lang . Object ) */
@ Override public void deleteByColumn ( String schemaName , String tableName , String columnName ... | URI uri = null ; HttpResponse response = null ; try { String q = "key=" + CouchDBUtils . appendQuotes ( columnValue ) ; uri = new URI ( CouchDBConstants . PROTOCOL , null , httpHost . getHostName ( ) , httpHost . getPort ( ) , CouchDBConstants . URL_SEPARATOR + schemaName . toLowerCase ( ) + CouchDBConstants . URL_SEPA... |
public class ApiOvhIpLoadbalancing { /** * Get this object properties
* REST : GET / ipLoadbalancing / { serviceName } / http / route / { routeId }
* @ param serviceName [ required ] The internal name of your IP load balancing
* @ param routeId [ required ] Id of your route */
public OvhRouteHttp serviceName_http... | String qPath = "/ipLoadbalancing/{serviceName}/http/route/{routeId}" ; StringBuilder sb = path ( qPath , serviceName , routeId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhRouteHttp . class ) ; |
public class Coercions { /** * Returns true if the given class is of an integer type */
public static boolean isIntegerType ( Class pClass ) { } } | return pClass == Byte . class || pClass == Byte . TYPE || pClass == Short . class || pClass == Short . TYPE || pClass == Character . class || pClass == Character . TYPE || pClass == Integer . class || pClass == Integer . TYPE || pClass == Long . class || pClass == Long . TYPE ; |
public class FctConvertersToFromString { /** * < p > Get CnvTfsDouble ( create and put into map ) . < / p >
* @ return requested CnvTfsDouble
* @ throws Exception - an exception */
protected final CnvTfsDouble createPutCnvTfsDouble ( ) throws Exception { } } | CnvTfsDouble convrt = new CnvTfsDouble ( ) ; this . convertersMap . put ( CnvTfsDouble . class . getSimpleName ( ) , convrt ) ; return convrt ; |
public class SubtitleChatOverlay { /** * Helper function for informing glyphs of the scrolled view . */
protected void viewDidScroll ( List < ? extends ChatGlyph > glyphs , int dx , int dy ) { } } | for ( ChatGlyph glyph : glyphs ) { glyph . viewDidScroll ( dx , dy ) ; } |
public class Workflow { /** * Causes the engine to stop processing of this workflow instance and to enqueue it again .
* May be used in case of processor pool change or to create a ' savepoint ' .
* @ throws Interrupt
* for internal use of COPPER . After resubmit is called , an Interrupt is thrown , caught by COP... | final String cid = engine . createUUID ( ) ; engine . registerCallbacks ( this , WaitMode . ALL , 0 , cid ) ; Acknowledge ack = createCheckpointAcknowledge ( ) ; engine . notify ( new Response < Object > ( cid , null , null ) , ack ) ; registerCheckpointAcknowledge ( ack ) ; updateLastWaitStackTrace ( ) ; |
public class RSAUtils { /** * Sign a message with RSA private key .
* @ param key
* @ param message
* the message to sign
* @ param signAlgo
* signature algorithm to use . If empty , { @ link # DEFAULT _ SIGNATURE _ ALGORITHM } will be
* used .
* @ return the signature
* @ throws NoSuchAlgorithmExceptio... | if ( StringUtils . isBlank ( signAlgo ) ) { signAlgo = DEFAULT_SIGNATURE_ALGORITHM ; } Signature sign = Signature . getInstance ( signAlgo ) ; sign . initSign ( key , SECURE_RNG ) ; sign . update ( message ) ; return sign . sign ( ) ; |
public class MMCIFFileTools { /** * Produces a mmCIF loop header string for the given categoryName and className .
* className must be one of the beans in the { @ link org . biojava . nbio . structure . io . mmcif . model } package
* @ param categoryName
* @ param className
* @ return
* @ throws ClassNotFound... | StringBuilder str = new StringBuilder ( ) ; str . append ( SimpleMMcifParser . LOOP_START + newline ) ; Class < ? > c = Class . forName ( className ) ; for ( Field f : getFields ( c ) ) { str . append ( categoryName + "." + f . getName ( ) + newline ) ; } return str . toString ( ) ; |
public class Parser { /** * Parses { @ code source } and returns a { @ link ParseTree } corresponding to the syntactical
* structure of the input . Only { @ link # label labeled } parser nodes are represented in the parse
* tree .
* < p > If parsing failed , { @ link ParserException # getParseTree ( ) } can be in... | ScannerState state = new ScannerState ( source ) ; state . enableTrace ( "root" ) ; state . run ( this . followedBy ( Parsers . EOF ) ) ; return state . buildParseTree ( ) ; |
public class StartDataCollectionByAgentIdsRequest { /** * The IDs of the agents or connectors from which to start collecting data . If you send a request to an
* agent / connector ID that you do not have permission to contact , according to your AWS account , the service does
* not throw an exception . Instead , it... | if ( agentIds == null ) { this . agentIds = null ; return ; } this . agentIds = new java . util . ArrayList < String > ( agentIds ) ; |
public class UriMatchTemplate { /** * Match the given URI string .
* @ param uri The uRI
* @ return True if it matches */
@ Override public Optional < UriMatchInfo > match ( String uri ) { } } | if ( uri == null ) { throw new IllegalArgumentException ( "Argument 'uri' cannot be null" ) ; } if ( uri . length ( ) > 1 && uri . charAt ( uri . length ( ) - 1 ) == '/' ) { uri = uri . substring ( 0 , uri . length ( ) - 1 ) ; } int len = uri . length ( ) ; if ( isRoot && ( len == 0 || ( len == 1 && uri . charAt ( 0 ) ... |
public class AbstractUsernamePasswordAuthenticationHandler { /** * Transform username .
* @ param userPass the user pass
* @ throws AccountNotFoundException the account not found exception */
protected void transformUsername ( final UsernamePasswordCredential userPass ) throws AccountNotFoundException { } } | if ( StringUtils . isBlank ( userPass . getUsername ( ) ) ) { throw new AccountNotFoundException ( "Username is null." ) ; } LOGGER . debug ( "Transforming credential username via [{}]" , this . principalNameTransformer . getClass ( ) . getName ( ) ) ; val transformedUsername = this . principalNameTransformer . transfo... |
public class AbstractIndex { /** * Finalizes the query in the currently used buffer and creates a new one .
* The finalized query will be added to the list of queries . */
protected void storeBuffer ( ) { } } | if ( buffer != null && buffer . length ( ) > insertStatement . length ( ) ) { if ( ! insertStatement . isEmpty ( ) ) { // only do this in SQL / DATABASE MODE
this . buffer . append ( ";" ) ; } bufferList . add ( buffer ) ; } this . buffer = new StringBuilder ( ) ; this . buffer . append ( insertStatement ) ; |
public class GosuPathEntry { /** * Returns a String representation of this path entry suitable for use in debugging .
* @ return a debug String representation of this object */
public String toDebugString ( ) { } } | StringBuilder sb = new StringBuilder ( ) ; sb . append ( "GosuPathEntry:\n" ) ; sb . append ( " root: " ) . append ( _root . toJavaFile ( ) . getAbsolutePath ( ) ) . append ( "\n" ) ; for ( IDirectory src : _srcs ) { sb . append ( " src: " ) . append ( src . toJavaFile ( ) . getAbsolutePath ( ) ) . append ( "\n" ) ; ... |
public class OptionsMethodProcessor { /** * { @ inheritDoc } */
@ Override public ResourceModel processSubResource ( ResourceModel subResourceModel , Configuration configuration ) { } } | return ModelProcessorUtil . enhanceResourceModel ( subResourceModel , true , methodList , true ) . build ( ) ; |
public class QueuePlugin { /** * Show the number of functions to be executed on the first matched element
* in the named queue . */
public int queue ( String name ) { } } | Queue < ? > q = isEmpty ( ) ? null : queue ( get ( 0 ) , name , null ) ; return q == null ? 0 : q . size ( ) ; |
public class DataFormatHelper { /** * Return the given time formatted , based on the provided format structure
* @ param timestamp
* A timestamp as a long , e . g . what would be returned from
* < code > System . currentTimeMillis ( ) < / code >
* @ param useIsoDateFormat
* A boolean , if true , the given dat... | DateFormat df = dateformats . get ( ) ; if ( df == null ) { df = getDateFormat ( ) ; dateformats . set ( df ) ; } try { // Get and store the locale Date pattern that was retrieved from getDateTimeInstance , to be used later .
// This is to prevent creating multiple new instances of SimpleDateFormat , which is expensive... |
public class CPAttachmentFileEntryUtil { /** * Returns the cp attachment file entry where uuid = & # 63 ; and groupId = & # 63 ; or returns < code > null < / code > if it could not be found , optionally using the finder cache .
* @ param uuid the uuid
* @ param groupId the group ID
* @ param retrieveFromCache whe... | return getPersistence ( ) . fetchByUUID_G ( uuid , groupId , retrieveFromCache ) ; |
public class PreferenceActivity { /** * Handles the intent extra , which specifies the text of the next button .
* @ param extras
* The extras of the intent , which has been used to start the activity , as an instance
* of the class { @ link Bundle } . The bundle may not be null */
private void handleNextButtonTe... | CharSequence text = extras . getString ( EXTRA_NEXT_BUTTON_TEXT ) ; if ( ! TextUtils . isEmpty ( text ) ) { setNextButtonText ( text ) ; } |
public class NativeLoader { /** * Loads a native library .
* @ param pLibrary name of the library
* @ param pResource name of the resource
* @ param pLoader the class loader to use
* @ throws UnsatisfiedLinkError */
static void loadLibrary0 ( String pLibrary , String pResource , ClassLoader pLoader ) { } } | if ( pLibrary == null ) { throw new IllegalArgumentException ( "library == null" ) ; } // Try loading normal way
UnsatisfiedLinkError unsatisfied ; try { System . loadLibrary ( pLibrary ) ; return ; } catch ( UnsatisfiedLinkError err ) { // Ignore
unsatisfied = err ; } final ClassLoader loader = pLoader != null ? pLoad... |
public class CurrencyUnit { /** * Registers a currency and associated countries allowing it to be used , allowing replacement .
* This class only permits known currencies to be returned .
* To achieve this , all currencies have to be registered in advance .
* Since this method is public , it is possible to add cu... | MoneyUtils . checkNotNull ( currencyCode , "Currency code must not be null" ) ; if ( currencyCode . length ( ) != 3 ) { throw new IllegalArgumentException ( "Invalid string code, must be length 3" ) ; } if ( CODE . matcher ( currencyCode ) . matches ( ) == false ) { throw new IllegalArgumentException ( "Invalid string ... |
public class SVGParser { /** * < image > element */
private void image ( Attributes attributes ) throws SVGParseException { } } | debug ( "<image>" ) ; if ( currentElement == null ) throw new SVGParseException ( "Invalid document. Root element must be <svg>" ) ; SVG . Image obj = new SVG . Image ( ) ; obj . document = svgDocument ; obj . parent = currentElement ; parseAttributesCore ( obj , attributes ) ; parseAttributesStyle ( obj , attributes )... |
public class StringConvert { /** * Finds the conversion method .
* @ param cls the class to find a method for , not null
* @ param methodName the name of the method to find , not null
* @ return the method to call , null means use { @ code toString } */
private Method findToStringMethod ( Class < ? > cls , String... | Method m ; try { m = cls . getMethod ( methodName ) ; } catch ( NoSuchMethodException ex ) { throw new IllegalArgumentException ( ex ) ; } if ( Modifier . isStatic ( m . getModifiers ( ) ) ) { throw new IllegalArgumentException ( "Method must not be static: " + methodName ) ; } return m ; |
public class JobUtils { /** * Returns whichever specified worker stores the most blocks from the block info list .
* @ param workers a list of workers to consider
* @ param fileBlockInfos a list of file block information
* @ return a worker address storing the most blocks from the list */
public static BlockWorke... | // Index workers by their addresses .
IndexedSet < BlockWorkerInfo > addressIndexedWorkers = new IndexedSet < > ( WORKER_ADDRESS_INDEX ) ; addressIndexedWorkers . addAll ( workers ) ; // Use ConcurrentMap for putIfAbsent . A regular Map works in Java 8.
ConcurrentMap < BlockWorkerInfo , Integer > blocksPerWorker = Maps... |
public class FontData { /** * Get the bold italic version of the font
* @ param familyName The name of the font family
* @ return The bold italic version of the font or null if no bold italic version exists */
public static FontData getBoldItalic ( String familyName ) { } } | FontData data = ( FontData ) bolditalic . get ( familyName ) ; return data ; |
public class ValidationStampController { /** * Validation stamps */
@ RequestMapping ( value = "branches/{branchId}/validationStamps" , method = RequestMethod . GET ) public Resources < ValidationStamp > getValidationStampListForBranch ( @ PathVariable ID branchId ) { } } | Branch branch = structureService . getBranch ( branchId ) ; return Resources . of ( structureService . getValidationStampListForBranch ( branchId ) , uri ( on ( ValidationStampController . class ) . getValidationStampListForBranch ( branchId ) ) ) // Create
. with ( Link . CREATE , uri ( on ( ValidationStampController ... |
public class Tuple { /** * Takes a slice of the tuple from an inclusive start to an exclusive end index .
* @ param start Where to start the slice from ( inclusive )
* @ param end Where to end the slice at ( exclusive )
* @ return A new tuple of degree ( end - start ) with the elements of this tuple from start to... | Preconditions . checkArgument ( start >= 0 , "Start index must be >= 0" ) ; Preconditions . checkArgument ( start < end , "Start index must be < end index" ) ; if ( start >= degree ( ) ) { return Tuple0 . INSTANCE ; } return new NTuple ( Arrays . copyOfRange ( array ( ) , start , Math . min ( end , degree ( ) ) ) ) ; |
public class DateFunctions { /** * Returned expression results in statement time stamp as a string in a supported format ;
* does not vary during a query . */
public static Expression nowStr ( String format ) { } } | if ( format == null || format . isEmpty ( ) ) { return x ( "NOW_STR()" ) ; } return x ( "NOW_STR(\"" + format + "\")" ) ; |
public class Debug { /** * Print stack trace if not true . */
public static void print ( Exception ex , String strDebugType ) { } } | Debug . print ( ex , strDebugType , DBConstants . DEBUG_INFO ) ; |
public class XCPDInitiatingGatewayAuditor { /** * Get an instance of the XCPD Initiating Gateway Auditor from the
* global context
* @ return XCPD Initiating Gateway Auditor instance */
public static XCPDInitiatingGatewayAuditor getAuditor ( ) { } } | AuditorModuleContext ctx = AuditorModuleContext . getContext ( ) ; return ( XCPDInitiatingGatewayAuditor ) ctx . getAuditor ( XCPDInitiatingGatewayAuditor . class ) ; |
public class N { /** * Removes the element at the specified position from the specified array .
* All subsequent elements are shifted to the left ( subtracts one from their
* indices ) .
* This method returns a new array with the same elements of the input array
* except the element on the specified position . ... | final boolean [ ] result = new boolean [ a . length - 1 ] ; if ( index > 0 ) { copy ( a , 0 , result , 0 , index ) ; } if ( index + 1 < a . length ) { copy ( a , index + 1 , result , index , a . length - index - 1 ) ; } return result ; |
public class CallCenterApp { /** * Main routine creates an instance of this app and kicks off the run method .
* @ param args Command line arguments .
* @ throws Exception if anything goes wrong .
* @ see { @ link WindowingConfig } */
public static void main ( String [ ] args ) throws Exception { } } | // create a configuration from the arguments
CallCenterConfig config = new CallCenterConfig ( ) ; config . parse ( CallCenterApp . class . getName ( ) , args ) ; CallCenterApp app = new CallCenterApp ( config ) ; app . run ( ) ; |
public class MainActivity { /** * User clicked the " Upgrade to Premium " button . */
public void onUpgradeAppButtonClicked ( View arg0 ) { } } | Log . d ( TAG , "Upgrade button clicked; launching purchase flow for upgrade." ) ; if ( setupDone == null ) { complain ( "Billing Setup is not completed yet" ) ; return ; } if ( ! setupDone ) { complain ( "Billing Setup failed" ) ; return ; } setWaitScreen ( true ) ; /* TODO : for security , generate your payload here ... |
public class FTPClient { /** * implement GridFTP v2 CKSM command from
* < a href = " http : / / www . ogf . org / documents / GFD . 47 . pdf " > GridFTP v2 Protocol Description < / a >
* < pre >
* 5.1 CKSM
* This command is used by the client to request checksum calculation over a portion or
* whole file exis... | // check if we the cksum commands and specific algorithm are supported
checkCksumSupport ( algorithm ) ; // form CKSM command
String parameters = String . format ( "%s %d %d %s" , algorithm , offset , length , path ) ; Command cmd = new Command ( "CKSM" , parameters ) ; // transfer command , obtain reply
Reply cksumRep... |
public class InternalXbaseParser { /** * InternalXbase . g : 1392:1 : ruleXTypeLiteral : ( ( rule _ _ XTypeLiteral _ _ Group _ _ 0 ) ) ; */
public final void ruleXTypeLiteral ( ) throws RecognitionException { } } | int stackSize = keepStackSize ( ) ; try { // InternalXbase . g : 1396:2 : ( ( ( rule _ _ XTypeLiteral _ _ Group _ _ 0 ) ) )
// InternalXbase . g : 1397:2 : ( ( rule _ _ XTypeLiteral _ _ Group _ _ 0 ) )
{ // InternalXbase . g : 1397:2 : ( ( rule _ _ XTypeLiteral _ _ Group _ _ 0 ) )
// InternalXbase . g : 1398:3 : ( rule... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcDraughtingCalloutElement ( ) { } } | if ( ifcDraughtingCalloutElementEClass == null ) { ifcDraughtingCalloutElementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 953 ) ; } return ifcDraughtingCalloutElementEClass ; |
public class Matrix { /** * Parses { @ link Matrix } from the given CSV string .
* @ param csv the string in CSV format
* @ return a parsed matrix */
public static Matrix fromCSV ( String csv ) { } } | StringTokenizer lines = new StringTokenizer ( csv , "\n" ) ; Matrix result = DenseMatrix . zero ( 10 , 10 ) ; int rows = 0 ; int columns = 0 ; while ( lines . hasMoreTokens ( ) ) { if ( result . rows ( ) == rows ) { result = result . copyOfRows ( ( rows * 3 ) / 2 + 1 ) ; } StringTokenizer elements = new StringTokenizer... |
public class ActionType { /** * The configuration properties for the action type .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setActionConfigurationProperties ( java . util . Collection ) } or
* { @ link # withActionConfigurationProperties ( java . uti... | if ( this . actionConfigurationProperties == null ) { setActionConfigurationProperties ( new java . util . ArrayList < ActionConfigurationProperty > ( actionConfigurationProperties . length ) ) ; } for ( ActionConfigurationProperty ele : actionConfigurationProperties ) { this . actionConfigurationProperties . add ( ele... |
public class WwwFormTokenMaker { /** * Resumes scanning until the next regular expression is matched ,
* the end of input is encountered or an I / O - Error occurs .
* @ return the next token */
public org . fife . ui . rsyntaxtextarea . Token yylex ( ) { } } | int zzInput ; int zzAction ; // cached fields :
int zzCurrentPosL ; int zzMarkedPosL ; int zzEndReadL = zzEndRead ; char [ ] zzBufferL = zzBuffer ; char [ ] zzCMapL = ZZ_CMAP ; int [ ] zzTransL = ZZ_TRANS ; int [ ] zzRowMapL = ZZ_ROWMAP ; int [ ] zzAttrL = ZZ_ATTRIBUTE ; while ( true ) { zzMarkedPosL = zzMarkedPos ; zz... |
public class ImmutableRoaringBitmap { /** * Computes XOR between input bitmaps in the given range , from rangeStart ( inclusive ) to rangeEnd
* ( exclusive )
* @ param bitmaps input bitmaps , these are not modified
* @ param rangeStart inclusive beginning of range
* @ param rangeEnd exclusive ending of range
... | return xor ( bitmaps , ( long ) rangeStart , ( long ) rangeEnd ) ; |
public class NotQuery { /** * { @ inheritDoc } */
@ Override public Query rewrite ( IndexReader reader ) throws IOException { } } | Query cQuery = context . rewrite ( reader ) ; if ( cQuery == context ) // NOSONAR
{ return this ; } else { return new NotQuery ( cQuery ) ; } |
public class ApiErrorExtractor { /** * Get the first ErrorInfo from a GoogleJsonError , or null if
* there is not one . */
protected ErrorInfo getErrorInfo ( GoogleJsonError details ) { } } | if ( details == null ) { return null ; } List < ErrorInfo > errors = details . getErrors ( ) ; return errors . isEmpty ( ) ? null : errors . get ( 0 ) ; |
public class TypedProperties { /** * Equivalent to { @ link # getFloat ( String , float )
* getFloat } { @ code ( key . name ( ) , defaultValue ) } .
* If { @ code key } is null , { @ code defaultValue } is returned . */
public float getFloat ( Enum < ? > key , float defaultValue ) { } } | if ( key == null ) { return defaultValue ; } return getFloat ( key . name ( ) , defaultValue ) ; |
public class LabelPropertySource { /** * Label names must be prefixed with " @ msg . " to be recognized as such . */
@ Override public String getProperty ( String name ) { } } | return name . startsWith ( LABEL_PREFIX ) ? StrUtil . getLabel ( name . substring ( LABEL_PREFIX . length ( ) ) ) : null ; |
public class BELScriptWalker { /** * BELScriptWalker . g : 431:1 : argument returns [ String r ] : ( p = param | t = term ) ; */
public final BELScriptWalker . argument_return argument ( ) throws RecognitionException { } } | BELScriptWalker . argument_return retval = new BELScriptWalker . argument_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; CommonTree _first_0 = null ; CommonTree _last = null ; BELScriptWalker . param_return p = null ; BELScriptWalker . term_return t = null ; try { // BELScriptWalker . g : 4... |
public class AXUTagSupport { /** * override doTag method */
@ Override public void doTag ( ) throws JspException , IOException { } } | try { JspContext context = getJspContext ( ) ; JspFragment fragment = getJspBody ( ) ; PageContext pageContext = ( PageContext ) context ; // invoke before event
beforeDoTag ( context , fragment ) ; // 내장객체 추가
innerInstance . put ( "param" , TagUtils . getRequestParameterMap ( pageContext ) ) ; innerInstance . ... |
public class JMSConnectionFactoryDefinitionProcessor { /** * ( non - Javadoc )
* @ see com . ibm . wsspi . injectionengine . InjectionProcessor # processXML ( ) */
@ Override public void processXML ( ) throws InjectionException { } } | List < ? extends JMSConnectionFactory > jmsConnectionFactoryDefinitions = ivNameSpaceConfig . getJNDIEnvironmentRefs ( JMSConnectionFactory . class ) ; if ( jmsConnectionFactoryDefinitions != null ) { for ( JMSConnectionFactory jmsConnectionFactory : jmsConnectionFactoryDefinitions ) { String jndiName = jmsConnectionFa... |
public class WireFeedInput { /** * Creates and sets up a org . jdom2 . input . SAXBuilder for parsing .
* @ return a new org . jdom2 . input . SAXBuilder object */
protected SAXBuilder createSAXBuilder ( ) { } } | SAXBuilder saxBuilder ; if ( validate ) { saxBuilder = new SAXBuilder ( XMLReaders . DTDVALIDATING ) ; } else { saxBuilder = new SAXBuilder ( XMLReaders . NONVALIDATING ) ; } saxBuilder . setEntityResolver ( RESOLVER ) ; // This code is needed to fix the security problem outlined in
// http : / / www . securityfocus . ... |
public class UBLTRValidatorBuilder { /** * Create a new validation builder .
* @ param aClass
* The UBL class to be validated . May not be < code > null < / code > .
* @ return The new validation builder . Never < code > null < / code > .
* @ param < T >
* The UBLTR document implementation type */
@ Nonnull p... | return new UBLTRValidatorBuilder < > ( aClass ) ; |
public class SnappyCodec { /** * Create a new { @ link Decompressor } for use by this
* { @ link CompressionCodec } .
* @ return a new decompressor for use by this codec */
@ Override public Decompressor createDecompressor ( ) { } } | if ( ! isNativeSnappyLoaded ( conf ) ) { throw new RuntimeException ( "native snappy library not available" ) ; } int bufferSize = conf . getInt ( IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_KEY , IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_DEFAULT ) ; return new SnappyDecompressor ( bufferSize ) ; |
public class CommandExecutor { /** * Submit a command to the server .
* @ param command The CLI command
* @ return The DMR response as a ModelNode
* @ throws CommandFormatException
* @ throws IOException */
public synchronized ModelNode doCommand ( String command ) throws CommandFormatException , IOException { ... | ModelNode request = cmdCtx . buildRequest ( command ) ; return execute ( request , isSlowCommand ( command ) ) . getResponseNode ( ) ; |
public class XPathContext { /** * Gets DTMXRTreeFrag object if one has already been created .
* Creates new DTMXRTreeFrag object and adds to m _ DTMXRTreeFrags HashMap ,
* otherwise .
* @ param dtmIdentity
* @ return DTMXRTreeFrag */
public DTMXRTreeFrag getDTMXRTreeFrag ( int dtmIdentity ) { } } | if ( m_DTMXRTreeFrags == null ) { m_DTMXRTreeFrags = new HashMap ( ) ; } if ( m_DTMXRTreeFrags . containsKey ( new Integer ( dtmIdentity ) ) ) { return ( DTMXRTreeFrag ) m_DTMXRTreeFrags . get ( new Integer ( dtmIdentity ) ) ; } else { final DTMXRTreeFrag frag = new DTMXRTreeFrag ( dtmIdentity , this ) ; m_DTMXRTreeFra... |
public class ZoneInfoCompiler { /** * Launches the ZoneInfoCompiler tool .
* < pre >
* Usage : java org . joda . time . tz . ZoneInfoCompiler & lt ; options & gt ; & lt ; source files & gt ;
* where possible options include :
* - src & lt ; directory & gt ; Specify where to read source files
* - dst & lt ; di... | if ( args . length == 0 ) { printUsage ( ) ; return ; } File inputDir = null ; File outputDir = null ; boolean verbose = false ; int i ; for ( i = 0 ; i < args . length ; i ++ ) { try { if ( "-src" . equals ( args [ i ] ) ) { inputDir = new File ( args [ ++ i ] ) ; } else if ( "-dst" . equals ( args [ i ] ) ) { outputD... |
public class LineSearchMore94 { /** * stp has a higher value than stx . The minimum must be between these two values .
* Pick a point which is close to stx since it has a lower value .
* @ return The new step . */
private double handleCase1 ( ) { } } | double stpc = SearchInterpolate . cubic2 ( fx , gx , stx , fp , gp , stp ) ; double stpq = SearchInterpolate . quadratic ( fx , gx , stx , fp , stp ) ; // If the cubic step is closer to stx than the quadratic step take that
bracket = true ; if ( Math . abs ( stpc - stx ) < Math . abs ( stpq - stx ) ) { return stpc ; } ... |
public class TaskInstanceNotifierFactory { /** * Returns a list of notifier class name and template name pairs , delimited by colon
* @ param taskId
* @ param outcome
* @ return the registered notifier or null if not found */
public List < String > getNotifierSpecs ( Long taskId , String outcome ) throws Observer... | TaskTemplate taskVO = TaskTemplateCache . getTaskTemplate ( taskId ) ; if ( taskVO != null ) { String noticesAttr = taskVO . getAttribute ( TaskAttributeConstant . NOTICES ) ; if ( ! StringHelper . isEmpty ( noticesAttr ) && ! "$DefaultNotices" . equals ( noticesAttr ) ) { return parseNoticiesAttr ( noticesAttr , outco... |
public class RequestContext { /** * Returns the component corresponding to the specified { @ link Descriptor }
* from the current { @ code HttpServletRequest } .
* If the application is not running in Web environment , the component is
* got from { @ code ThreadContext } ' s component store .
* @ param < T > Th... | HttpServletRequest request = WebFilter . request ( ) ; if ( request == null ) { return super . get ( descriptor ) ; } Map < Descriptor < ? > , Object > components = ( Map < Descriptor < ? > , Object > ) request . getAttribute ( COMPONENTS ) ; return ( T ) components . get ( descriptor ) ; |
public class QuerySources { /** * Return an iterator over all nodes at or below the specified path in the named workspace , using the supplied filter .
* @ param workspaceName the name of the workspace
* @ param path the path of the root node of the subgraph , or null if all nodes in the workspace are to be include... | // Determine which filter we should use based upon the workspace name . For the system workspace ,
// all queryable nodes are included . For all other workspaces , all queryable nodes are included except
// for those that are actually stored in the system workspace ( e . g . , the " / jcr : system " nodes ) .
NodeFilte... |
public class JMFiles { /** * Create empty file boolean .
* @ param file the file
* @ return the boolean */
public static boolean createEmptyFile ( File file ) { } } | try { file . getParentFile ( ) . mkdirs ( ) ; return file . createNewFile ( ) ; } catch ( Exception e ) { return JMExceptionManager . handleExceptionAndReturnFalse ( log , e , "createEmptyFile" , file ) ; } |
public class LambdaFactoryConfiguration { /** * Adds imports that will be visible in the lambda code . To add an import with * wildcard
* please use { @ link # withImports ( String . . . ) } . */
public LambdaFactoryConfiguration withImports ( Class < ? > ... newImports ) { } } | String [ ] stringImports = Arrays . stream ( newImports ) . map ( Class :: getCanonicalName ) . toArray ( String [ ] :: new ) ; return withImports ( stringImports ) ; |
public class TextBuffer { /** * Method that needs to be called to configure given base64 decoder
* with textual contents collected by this buffer .
* @ param dec Decoder that will need data
* @ param firstChunk Whether this is the first segment fed or not ;
* if it is , state needs to be fullt reset ; if not , ... | if ( mInputStart < 0 ) { // non - shared
dec . init ( v , firstChunk , mCurrentSegment , 0 , mCurrentSize , mSegments ) ; } else { // shared
dec . init ( v , firstChunk , mInputBuffer , mInputStart , mInputLen , null ) ; } |
public class JesqueUtils { /** * Creates a Map . Entry out of the given key and value . Commonly used in
* conjunction with map ( Entry . . . )
* @ param < K > the key type
* @ param < V > the value type
* @ param key
* the key
* @ param value
* the value
* @ return a Map . Entry object with the given k... | return new SimpleImmutableEntry < K , V > ( key , value ) ; |
public class NumberFormatContext { /** * Convert the given value to a { @ link Double } . If the value is not in a
* valid numeric format , then a default value is returned .
* @ param value The value to convert
* @ return The converted numeric value
* @ see # isDouble ( String )
* @ see Double # valueOf ( St... | Double result ; try { result = Double . valueOf ( value ) ; } catch ( NumberFormatException e ) { result = DEFAULT_DOUBLE_VALUE ; } return result ; |
public class TypeDesc { /** * Acquire a TypeDesc from any class , including primitives and arrays . */
public synchronized static TypeDesc forClass ( Class < ? > clazz ) { } } | if ( clazz == null ) { return null ; } TypeDesc type = cClassesToInstances . get ( clazz ) ; if ( type != null ) { return type ; } if ( clazz . isArray ( ) ) { type = forClass ( clazz . getComponentType ( ) ) . toArrayType ( ) ; } else if ( clazz . isPrimitive ( ) ) { if ( clazz == int . class ) { type = INT ; } if ( c... |
public class Vectors { /** * Creates a mod function that calculates the modulus of it ' s argument and given { @ code value } .
* @ param arg a divisor value
* @ return a closure that does { @ code _ % _ } */
public static VectorFunction asModFunction ( final double arg ) { } } | return new VectorFunction ( ) { @ Override public double evaluate ( int i , double value ) { return value % arg ; } } ; |
public class Weighted { /** * High weights first , use val . hashCode to break ties */
public int compareTo ( Weighted < DirectedEdge > other ) { } } | return ComparisonChain . start ( ) . compare ( other . weight , weight ) . compare ( Objects . hashCode ( other . val ) , Objects . hashCode ( val ) ) . result ( ) ; |
public class MemoryLimiter { /** * This method attempts to claim ram to the provided request . This may block waiting for some to
* be available . Ultimately it is either granted memory or an exception is thrown .
* @ param toClaimMb The amount of memory the request wishes to claim . ( In Megabytes )
* @ return T... | Preconditions . checkArgument ( toClaimMb >= 0 ) ; if ( toClaimMb == 0 ) { return 0 ; } int neededForRequest = capRequestedSize ( toClaimMb ) ; boolean acquired = false ; try { acquired = amountRemaining . tryAcquire ( neededForRequest , TIME_TO_WAIT , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException e ) { Th... |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcCartesianPointList ( ) { } } | if ( ifcCartesianPointListEClass == null ) { ifcCartesianPointListEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 78 ) ; } return ifcCartesianPointListEClass ; |
public class GetConfKey { /** * Prints the help message .
* @ param message message before standard usage information */
public static void printHelp ( String message ) { } } | System . err . println ( message ) ; System . out . println ( USAGE ) ; |
public class FavoriteDatabase { /** * Inserts an Article object to this database .
* @ param article Object to save into database . */
public void add ( Article article ) { } } | // Get Write Access
SQLiteDatabase db = this . getWritableDatabase ( ) ; // Build Content Values
ContentValues values = new ContentValues ( ) ; values . put ( KEY_TAGS , TextUtils . join ( "_PCX_" , article . getTags ( ) ) ) ; values . put ( KEY_MEDIA_CONTENT , Article . MediaContent . toByteArray ( article . getMediaC... |
public class ObjectsApi { /** * Get permissions for a list of objects .
* Get permissions from Configuration Server for objects identified by their type and DBIDs .
* @ param objectType The type of object . Any type supported by the Config server ( folders , business - attributes etc ) . ( required )
* @ param db... | com . squareup . okhttp . Call call = getPermissionsValidateBeforeCall ( objectType , dbids , dnType , folderType , null , null ) ; Type localVarReturnType = new TypeToken < GetPermissionsSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class BindDataSourceBuilder { /** * Generate inner code for instance and build methods . Inspired by < a href =
* " https : / / www . journaldev . com / 171 / thread - safety - in - java - singleton - classes - with - example - code " > this
* link < < / a >
* @ param schema
* the schema
* @ param sche... | // instance
MethodSpec . Builder methodBuilder = MethodSpec . methodBuilder ( instance ? "getInstance" : "build" ) . addModifiers ( Modifier . PUBLIC , Modifier . STATIC ) . returns ( className ( schemaName ) ) ; if ( ! instance ) { methodBuilder . addParameter ( DataSourceOptions . class , "options" ) ; methodBuilder ... |
public class ProposalLineItem { /** * Gets the linkStatus value for this ProposalLineItem .
* @ return linkStatus * The status of the link between this { @ code ProposalLineItem }
* and its { link Product } .
* < span class = " constraint Applicable " > This attribute
* is applicable when : < ul > < li > using ... | return linkStatus ; |
public class EncryptedPrivateKeyWriter { /** * Encrypt the given { @ link PrivateKey } with the given password and return the resulted byte
* array .
* @ param privateKey
* the private key to encrypt
* @ param password
* the password
* @ return the byte [ ]
* @ throws NoSuchAlgorithmException
* is throw... | final byte [ ] privateKeyEncoded = privateKey . getEncoded ( ) ; final SecureRandom random = new SecureRandom ( ) ; final byte [ ] salt = new byte [ 8 ] ; random . nextBytes ( salt ) ; final AlgorithmParameterSpec algorithmParameterSpec = AlgorithmParameterSpecFactory . newPBEParameterSpec ( salt , 20 ) ; final SecretK... |
public class DefaultJobSpecScheduleImpl { /** * Creates a schedule denoting that the job is not to be executed */
public static DefaultJobSpecScheduleImpl createNoSchedule ( JobSpec jobSpec , Runnable jobRunnable ) { } } | return new DefaultJobSpecScheduleImpl ( jobSpec , jobRunnable , Optional . < Long > absent ( ) ) ; |
public class MultiUserChatManager { /** * Check if the provided domain bare JID provides a MUC service .
* @ param domainBareJid the domain bare JID to check .
* @ return < code > true < / code > if the provided JID provides a MUC service , < code > false < / code > otherwise .
* @ throws NoResponseException
* ... | return serviceDiscoveryManager . supportsFeature ( domainBareJid , MUCInitialPresence . NAMESPACE ) ; |
public class CmsDriverManager { /** * Deletes a resource . < p >
* The < code > siblingMode < / code > parameter controls how to handle siblings
* during the delete operation .
* Possible values for this parameter are :
* < ul >
* < li > < code > { @ link CmsResource # DELETE _ REMOVE _ SIBLINGS } < / code > ... | // upgrade a potential inherited , non - shared lock into a common lock
CmsLock currentLock = getLock ( dbc , resource ) ; if ( currentLock . getEditionLock ( ) . isDirectlyInherited ( ) ) { // upgrade the lock status if required
lockResource ( dbc , resource , CmsLockType . EXCLUSIVE ) ; } // check if siblings of the ... |
public class hqlParser { /** * hql . g : 262:1 : newExpression : ( NEW path ) op = OPEN selectedPropertiesList CLOSE - > ^ ( CONSTRUCTOR [ $ op ] path selectedPropertiesList ) ; */
public final hqlParser . newExpression_return newExpression ( ) throws RecognitionException { } } | hqlParser . newExpression_return retval = new hqlParser . newExpression_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token op = null ; Token NEW50 = null ; Token CLOSE53 = null ; ParserRuleReturnScope path51 = null ; ParserRuleReturnScope selectedPropertiesList52 = null ; CommonTree op_tr... |
public class DataStore { /** * Add a data row , consisting of one column , to the store at the current time .
* See { @ link # add ( long , Map ) } for more information .
* @ param column The column for a field to value mapping
* @ param value The value for a field to value mapping */
public void add ( String col... | add ( System . currentTimeMillis ( ) , column , value ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.