signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class DateRangeChooser { /** * Returns the selected start date . This may be null if there is no active selection or if the
* selected date range has no start date .
* @ return Starting date of range , or null . */
public Date getStartDate ( ) { } } | DateRange range = getSelectedRange ( ) ; return range == null ? null : range . getStartDate ( ) ; |
public class ConnectionPartition { /** * This method is a replacement for finalize ( ) but avoids all its pitfalls ( see Joshua Bloch et . all ) .
* Keeps a handle on the connection . If the application called closed , then it means that the handle gets pushed back to the connection
* pool and thus we get a strong ... | if ( ! this . disableTracking ) { // assert ! connectionHandle . getPool ( ) . getFinalizableRefs ( ) . containsKey ( connectionHandle ) : " Already tracking this handle " ;
Connection con = connectionHandle . getInternalConnection ( ) ; if ( con != null && con instanceof Proxy && Proxy . getInvocationHandler ( con ) i... |
public class Matrix4x3f { /** * Apply a rotation transformation to this matrix to make < code > - z < / code > point along < code > dir < / code > .
* If < code > M < / code > is < code > this < / code > matrix and < code > L < / code > the lookalong rotation matrix ,
* then the new matrix will be < code > M * L < ... | return lookAlong ( dirX , dirY , dirZ , upX , upY , upZ , this ) ; |
public class OmsTrentoP { /** * Initializating the array .
* The array is the net . If there is a FeatureCollection extract values from
* it . The Array is order following the ID .
* oss : if the FeatureCillection is null a IllegalArgumentException is throw
* in { @ link OmsTrentoP # verifyParameter ( ) } .
*... | int length = inPipes . size ( ) ; networkPipes = new Pipe [ length ] ; SimpleFeatureIterator stationsIter = inPipes . features ( ) ; boolean existOut = false ; int tmpOutIndex = 0 ; try { int t = 0 ; while ( stationsIter . hasNext ( ) ) { SimpleFeature feature = stationsIter . next ( ) ; try { /* * extract the value of... |
public class LdapUtils { /** * Iterate through all the values of the specified Attribute calling back to
* the specified callbackHandler .
* @ param attribute the Attribute to work with ; not < code > null < / code > .
* @ param callbackHandler the callbackHandler ; not < code > null < / code > .
* @ since 1.3 ... | Assert . notNull ( attribute , "Attribute must not be null" ) ; Assert . notNull ( callbackHandler , "callbackHandler must not be null" ) ; if ( attribute instanceof Iterable ) { int i = 0 ; for ( Object obj : ( Iterable ) attribute ) { handleAttributeValue ( attribute . getID ( ) , obj , i , callbackHandler ) ; i ++ ;... |
public class BMPCProxy { /** * Creates a new HAR attached to the proxy .
* @ param initialPageRef Name of the first pageRef that should be used by
* the HAR . If " null " , default to " Page 1"
* @ param captureHeaders Enables capturing of HTTP Headers
* @ param captureContent Enables capturing of HTTP Response... | try { // Request BMP to create a new HAR for this Proxy
HttpPut request = new HttpPut ( requestURIBuilder ( ) . setPath ( proxyURIPath ( ) + "/har" ) . build ( ) ) ; // Add form parameters to the request
applyFormParamsToHttpRequest ( request , new BasicNameValuePair ( "initialPageRef" , initialPageRef ) , new BasicNam... |
public class AbstractAggregatorImpl { /** * Returns the name for this aggregator
* This method is called during aggregator intialization . Subclasses may
* override this method to initialize the aggregator using a different
* name . Use the public { @ link IAggregator # getName ( ) } method
* to get the name of... | // trim leading and trailing ' / '
String alias = ( String ) configMap . get ( "alias" ) ; // $ NON - NLS - 1 $
while ( alias . charAt ( 0 ) == '/' ) alias = alias . substring ( 1 ) ; while ( alias . charAt ( alias . length ( ) - 1 ) == '/' ) alias = alias . substring ( 0 , alias . length ( ) - 1 ) ; return alias ; |
public class AmazonEC2Client { /** * Enables a virtual private gateway ( VGW ) to propagate routes to the specified route table of a VPC .
* @ param enableVgwRoutePropagationRequest
* Contains the parameters for EnableVgwRoutePropagation .
* @ return Result of the EnableVgwRoutePropagation operation returned by t... | request = beforeClientExecution ( request ) ; return executeEnableVgwRoutePropagation ( request ) ; |
public class Update { /** * A key - value map that contains the parameters associated with the update .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setParams ( java . util . Collection ) } or { @ link # withParams ( java . util . Collection ) } if you wan... | if ( this . params == null ) { setParams ( new java . util . ArrayList < UpdateParam > ( params . length ) ) ; } for ( UpdateParam ele : params ) { this . params . add ( ele ) ; } return this ; |
public class ParameterImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public NotificationChain eInverseRemove ( InternalEObject otherEnd , int featureID , NotificationChain msgs ) { } } | switch ( featureID ) { case BpsimPackage . PARAMETER__PARAMETER_VALUE_GROUP : return ( ( InternalEList < ? > ) getParameterValueGroup ( ) ) . basicRemove ( otherEnd , msgs ) ; case BpsimPackage . PARAMETER__PARAMETER_VALUE : return ( ( InternalEList < ? > ) getParameterValue ( ) ) . basicRemove ( otherEnd , msgs ) ; } ... |
public class InMemoryDocumentSessionOperations { /** * Tracks the entity .
* @ param entityType Entity class
* @ param id Id of document
* @ param document raw entity
* @ param metadata raw document metadata
* @ param noTracking no tracking
* @ return entity */
public Object trackEntity ( Class entityType ,... | noTracking = this . noTracking || noTracking ; // if noTracking is session - wide then we want to override the passed argument
if ( StringUtils . isEmpty ( id ) ) { return deserializeFromTransformer ( entityType , null , document ) ; } DocumentInfo docInfo = documentsById . getValue ( id ) ; if ( docInfo != null ) { //... |
public class RepositoryUtils { /** * Converts method signature to human readable string .
* @ param type root type ( method may be called not from declaring class )
* @ param method method to print
* @ return string representation for method */
public static String methodToString ( final Class < ? > type , final ... | final StringBuilder res = new StringBuilder ( ) ; res . append ( type . getSimpleName ( ) ) . append ( '#' ) . append ( method . getName ( ) ) . append ( '(' ) ; int i = 0 ; for ( Class < ? > param : method . getParameterTypes ( ) ) { if ( i > 0 ) { res . append ( ", " ) ; } final Type generic = method . getGenericPara... |
public class Partitioner { /** * Get low water mark :
* ( 1 ) Use { @ link ConfigurationKeys # SOURCE _ QUERYBASED _ START _ VALUE } iff it is a full dump ( or watermark override is enabled )
* ( 2 ) Otherwise use previous watermark ( fallback to { @ link ConfigurationKeys # SOURCE _ QUERYBASED _ START _ VALUE } if... | long lowWatermark = ConfigurationKeys . DEFAULT_WATERMARK_VALUE ; if ( this . isFullDump ( ) || this . isWatermarkOverride ( ) ) { String timeZone = this . state . getProp ( ConfigurationKeys . SOURCE_TIMEZONE , ConfigurationKeys . DEFAULT_SOURCE_TIMEZONE ) ; /* * SOURCE _ QUERYBASED _ START _ VALUE could be :
* - a ... |
public class OldNgramExtractor { /** * This was the method found in the < i > com . cybozu . labs . langdetect . Detector < / i > class , it was used to extract
* grams from the to - analyze text .
* NOTE : although it adds the first ngram with space , it does not add the last n - gram with space . example : " foo ... | List < String > list = new ArrayList < > ( ) ; NGram ngram = new NGram ( ) ; for ( int i = 0 ; i < text . length ( ) ; ++ i ) { ngram . addChar ( text . charAt ( i ) ) ; for ( int n = 1 ; n <= NGram . N_GRAM ; ++ n ) { String w = ngram . get ( n ) ; if ( w != null ) { // TODO this null check is ugly
if ( filter == null... |
public class MembershipTypeHandlerImpl { /** * Gets membership type from cache . */
private MembershipType getFromCache ( String name ) { } } | return ( MembershipType ) cache . get ( name , CacheType . MEMBERSHIPTYPE ) ; |
public class UniformCrossover { /** * Has a probability < i > crossoverRate < / i > of performing the crossover where the operator will select randomly which parent donates the gene . < br >
* One of the parent may be favored if the bias is different than 0.5
* Otherwise , returns the genes of a random parent .
*... | // select the parents
double [ ] [ ] parents = parentSelection . selectParents ( ) ; double [ ] resultGenes = parents [ 0 ] ; boolean isModified = false ; if ( rng . nextDouble ( ) < crossoverRate ) { // Crossover
resultGenes = new double [ parents [ 0 ] . length ] ; for ( int i = 0 ; i < resultGenes . length ; ++ i ) ... |
public class ElementBase { /** * Returns true if parentClass can be a parent of childClass .
* @ param childClass The child class .
* @ param parentClass The parent class .
* @ return True if parentClass can be a parent of childClass . */
public static boolean canAcceptParent ( Class < ? extends ElementBase > chi... | return allowedParentClasses . isRelated ( childClass , parentClass ) ; |
public class InternalXbaseParser { /** * InternalXbase . g : 333:1 : entryRuleOpCompare : ruleOpCompare EOF ; */
public final void entryRuleOpCompare ( ) throws RecognitionException { } } | try { // InternalXbase . g : 334:1 : ( ruleOpCompare EOF )
// InternalXbase . g : 335:1 : ruleOpCompare EOF
{ if ( state . backtracking == 0 ) { before ( grammarAccess . getOpCompareRule ( ) ) ; } pushFollow ( FOLLOW_1 ) ; ruleOpCompare ( ) ; state . _fsp -- ; if ( state . failed ) return ; if ( state . backtracking ==... |
public class MemoryRemoteTable { /** * Do a remote action .
* Not implemented .
* @ param strCommand Command to perform remotely .
* @ param properties Properties for this command ( optional ) .
* @ return boolean success . */
public Object doRemoteAction ( String strCommand , Map < String , Object > properties... | return null ; // Not supported |
public class MutableArray { /** * Sets a Dictionary object at the given index .
* @ param index the index . This value must not exceed the bounds of the array .
* @ param value the Dictionary object
* @ return The self object */
@ NonNull @ Override public MutableArray setDictionary ( int index , Dictionary value... | return setValue ( index , value ) ; |
public class Util { /** * setEquals determines whether two string sets are identical .
* @ param a the first set .
* @ param b the second set .
* @ return whether a equals to b . */
public static boolean setEquals ( List < String > a , List < String > b ) { } } | if ( a == null ) { a = new ArrayList < > ( ) ; } if ( b == null ) { b = new ArrayList < > ( ) ; } if ( a . size ( ) != b . size ( ) ) { return false ; } Collections . sort ( a ) ; Collections . sort ( b ) ; for ( int i = 0 ; i < a . size ( ) ; i ++ ) { if ( ! a . get ( i ) . equals ( b . get ( i ) ) ) { return false ; ... |
public class OperatorContext { /** * Returns how much revocable memory will be revoked by the operator */
public long requestMemoryRevoking ( ) { } } | long revokedMemory = 0L ; Runnable listener = null ; synchronized ( this ) { if ( ! isMemoryRevokingRequested ( ) && operatorMemoryContext . getRevocableMemory ( ) > 0 ) { memoryRevokingRequested = true ; revokedMemory = operatorMemoryContext . getRevocableMemory ( ) ; listener = memoryRevocationRequestListener ; } } i... |
public class ReferenceParam { /** * Returns a new param containing the same value as this param , but with the type copnverted
* to { @ link QuantityParam } . This is useful if you are using reference parameters and want to handle
* chained parameters of different types in a single method .
* See < a href = " htt... | QuantityParam retVal = new QuantityParam ( ) ; retVal . setValueAsQueryToken ( theContext , null , null , getValueAsQueryToken ( theContext ) ) ; return retVal ; |
public class RedirectedReadResultEntry { /** * Handles an exception that was caught . If this is the first exception ever caught , and it is eligible for retries ,
* then this method will invoke the retryGetEntry that was passed through the constructor to get a new entry .
* If that succeeds , the new entry is then... | ex = Exceptions . unwrap ( ex ) ; if ( this . secondEntry == null && isRetryable ( ex ) ) { // This is the first attempt and we caught a retry - eligible exception ; issue the query for the new entry .
CompletableReadResultEntry newEntry = this . retryGetEntry . apply ( getStreamSegmentOffset ( ) , this . firstEntry . ... |
public class Rowtime { /** * Sets a built - in timestamp extractor that converts an existing { @ link Long } or
* { @ link Types # SQL _ TIMESTAMP } field into the rowtime attribute .
* @ param fieldName The field to convert into a rowtime attribute . */
public Rowtime timestampsFromField ( String fieldName ) { } } | internalProperties . putString ( ROWTIME_TIMESTAMPS_TYPE , ROWTIME_TIMESTAMPS_TYPE_VALUE_FROM_FIELD ) ; internalProperties . putString ( ROWTIME_TIMESTAMPS_FROM , fieldName ) ; return this ; |
public class UniversalProjectReader { /** * This could be a self - extracting archive . If we understand the format , expand
* it and check the content for files we can read .
* @ param stream schedule data
* @ return ProjectFile instance */
private ProjectFile handleDosExeFile ( InputStream stream ) throws Excep... | File file = InputStreamHelper . writeStreamToTempFile ( stream , ".tmp" ) ; InputStream is = null ; try { is = new FileInputStream ( file ) ; if ( is . available ( ) > 1350 ) { StreamHelper . skip ( is , 1024 ) ; // Bytes at offset 1024
byte [ ] data = new byte [ 2 ] ; is . read ( data ) ; if ( matchesFingerprint ( dat... |
public class JKFactory { /** * Dump beans names . */
public static void dumpBeansNames ( ) { } } | DefaultListableBeanFactory f = ( DefaultListableBeanFactory ) context . getBeanFactory ( ) ; String [ ] beanDefinitionNames = f . getBeanDefinitionNames ( ) ; for ( String name : beanDefinitionNames ) { JK . print ( name , " for class :" , f . getBean ( name ) . getClass ( ) . getName ( ) ) ; } |
public class DirectionUtil { /** * Returns which of the eight compass directions is associated with the specified angle theta .
* < em > Note : < / em > that the angle supplied is assumed to increase clockwise around the origin
* ( which screen angles do ) rather than counter - clockwise around the origin ( which c... | theta = ( ( theta + Math . PI ) * 4 ) / Math . PI ; return ( int ) ( Math . round ( theta ) + WEST ) % 8 ; |
public class EdmondsMaximumMatching { /** * Augment all ancestors in the tree of vertex ' v ' .
* @ param v the leaf to augment from */
private void augment ( int v ) { } } | int n = buildPath ( path , 0 , v , NIL ) ; for ( int i = 2 ; i < n ; i += 2 ) { matching . match ( path [ i ] , path [ i - 1 ] ) ; } |
public class Curies { /** * Resolves a link - relation type ( curied or full rel ) and returns the curied form , or
* the unchanged rel , if no matching CURI is registered .
* @ param rel link - relation type
* @ return curied link - relation type */
public String resolve ( final String rel ) { } } | final Optional < CuriTemplate > curiTemplate = matchingCuriTemplateFor ( curies , rel ) ; return curiTemplate . map ( t -> t . curiedRelFrom ( rel ) ) . orElse ( rel ) ; |
public class FairScheduler { /** * Update a job ' s locality level and locality wait variables given that that
* it has just launched a map task on a given task tracker . */
private void updateLastMapLocalityLevel ( JobInProgress job , Task mapTaskLaunched , TaskTrackerStatus tracker ) { } } | JobInfo info = infos . get ( job ) ; LocalityLevel localityLevel = localManager . taskToLocalityLevel ( job , mapTaskLaunched , tracker ) ; info . lastMapLocalityLevel = localityLevel ; info . timeWaitedForLocalMap = 0 ; |
public class MBeanServerService { /** * { @ inheritDoc } */
public synchronized void start ( final StartContext context ) throws StartException { } } | // If the platform MBeanServer was set up to be the PluggableMBeanServer , use that otherwise create a new one and delegate
MBeanServer platform = ManagementFactory . getPlatformMBeanServer ( ) ; PluggableMBeanServerImpl pluggable = platform instanceof PluggableMBeanServerImpl ? ( PluggableMBeanServerImpl ) platform : ... |
public class DefaultGroovyMethods { /** * Get runtime groovydoc
* @ param holder the groovydoc hold
* @ return runtime groovydoc
* @ since 2.6.0 */
public static groovy . lang . groovydoc . Groovydoc getGroovydoc ( AnnotatedElement holder ) { } } | Groovydoc groovydocAnnotation = holder . < Groovydoc > getAnnotation ( Groovydoc . class ) ; return null == groovydocAnnotation ? EMPTY_GROOVYDOC : new groovy . lang . groovydoc . Groovydoc ( groovydocAnnotation . value ( ) , holder ) ; |
public class PluralRanges { /** * { @ inheritDoc }
* @ deprecated This API is ICU internal only .
* @ hide draft / provisional / internal are hidden on Android */
@ Override @ Deprecated public PluralRanges cloneAsThawed ( ) { } } | PluralRanges result = new PluralRanges ( ) ; result . explicit = explicit . clone ( ) ; result . matrix = matrix . clone ( ) ; return result ; |
public class ServiceDirectoryImpl { /** * Get the ServiceDirectoryManagerFactory .
* It looks up the configuration " com . cisco . oss . foundation . directory . manager . factory . provider " .
* If the configuration is null or the provider instantiation fails , it will instantiate the DefaultServiceDirectoryManag... | if ( isShutdown ) { throw new ServiceException ( ErrorCode . SERVICE_DIRECTORY_IS_SHUTDOWN ) ; } if ( directoryManagerFactory == null ) { // should not allow to return a null
// TODO , make directoryManagerFactory is immutable .
// TODO . remove the initialize and reinit method in ServiceDirectoryManagerFactory and Ser... |
public class Node { /** * Return the number of free < code > Entry < / code > s in this node .
* @ return The number of free < code > Entry < / code > s in this node .
* @ see Entry */
protected int numFreeEntries ( ) { } } | int res = 0 ; for ( int i = 0 ; i < entries . length ; i ++ ) { Entry entry = entries [ i ] ; if ( entry . isEmpty ( ) ) { res ++ ; } } assert ( NUMBER_ENTRIES == entries . length ) ; return res ; |
public class logical_disk { /** * < pre >
* Use this operation to get logical disks .
* < / pre > */
public static logical_disk [ ] get ( nitro_service client ) throws Exception { } } | logical_disk resource = new logical_disk ( ) ; resource . validate ( "get" ) ; return ( logical_disk [ ] ) resource . get_resources ( client ) ; |
public class EventManger { /** * Perform an action and wait for an event .
* The event is signaled with { @ link # signalEvent ( Object , Object ) } .
* @ param eventKey the event key , must not be null .
* @ param timeout the timeout to wait for the event in milliseconds .
* @ param action the action to perfor... | final Reference < R > reference = new Reference < > ( ) ; events . put ( eventKey , reference ) ; try { synchronized ( reference ) { action . action ( ) ; reference . wait ( timeout ) ; } return reference . eventResult ; } finally { events . remove ( eventKey ) ; } |
public class Output { /** * Note : some algorithms MUST redefine this method to return other model categories */
public ModelCategory getModelCategory ( ) { } } | if ( isSupervised ( ) ) return ( isClassifier ( ) ? ( nclasses ( ) > 2 ? ModelCategory . Multinomial : ModelCategory . Binomial ) : ModelCategory . Regression ) ; return ModelCategory . Unknown ; |
public class ConBox { /** * Makes sure that the two interactions are members of the same pathway .
* @ return non - generative constraint */
public static Constraint inSamePathway ( ) { } } | String s1 = "Interaction/stepProcessOf/pathwayOrderOf" ; String s2 = "Interaction/pathwayComponentOf" ; return new OR ( new MappedConst ( new Field ( s1 , s1 , Field . Operation . INTERSECT ) , 0 , 1 ) , new MappedConst ( new Field ( s2 , s2 , Field . Operation . INTERSECT ) , 0 , 1 ) ) ; |
public class JDBC4CallableStatement { /** * Sets the designated parameter to the given java . sql . SQLXML object . */
@ Override public void setSQLXML ( String parameterName , SQLXML xmlObject ) throws SQLException { } } | checkClosed ( ) ; throw SQLError . noSupport ( ) ; |
public class ZipResourceLoader { /** * Get the main attributes for the jar file */
private static String [ ] listZipPath ( final File file , String path ) { } } | // debug ( " listJarPath : " + file + " , " + path ) ;
ArrayList < String > strings = new ArrayList < > ( ) ; try { try ( final JarInputStream jarInputStream = new JarInputStream ( new FileInputStream ( file ) ) ) { ZipEntry nextJarEntry = jarInputStream . getNextEntry ( ) ; while ( nextJarEntry != null ) { if ( nextJa... |
public class AbstractH2Connector { /** * Create a backup file . The file is a ZIP file .
* @ param fDestFile
* Destination filename . May not be < code > null < / code > .
* @ return { @ link ESuccess } */
@ Nonnull public final ESuccess createBackup ( @ Nonnull final File fDestFile ) { } } | ValueEnforcer . notNull ( fDestFile , "DestFile" ) ; LOGGER . info ( "Backing up database '" + getDatabaseName ( ) + "' to " + fDestFile ) ; final DBExecutor aExecutor = new DBExecutor ( this ) ; return aExecutor . executeStatement ( "BACKUP TO '" + fDestFile . getAbsolutePath ( ) + "'" ) ; |
public class CollectionUtil { /** * 获取Collection的最后一个元素 , 如果collection为空返回null . */
public static < T > T getLast ( Collection < T > collection ) { } } | if ( isEmpty ( collection ) ) { return null ; } // 当类型List时 , 直接取得最后一个元素 .
if ( collection instanceof List ) { List < T > list = ( List < T > ) collection ; return list . get ( list . size ( ) - 1 ) ; } return Iterators . getLast ( collection . iterator ( ) ) ; |
public class PutIntegrationResponseResult { /** * A key - value map specifying response parameters that are passed to the method response from the back end . The key
* is a method response header parameter name and the mapped value is an integration response header value , a static
* value enclosed within a pair of... | setResponseParameters ( responseParameters ) ; return this ; |
public class ScheduleTaskImpl { /** * translate a urlString and a port definition to a URL Object
* @ param url URL String
* @ param port URL Port Definition
* @ return returns a URL Object
* @ throws MalformedURLException */
private static URL toURL ( String url , int port ) throws MalformedURLException { } } | URL u = HTTPUtil . toURL ( url , true ) ; if ( port == - 1 ) return u ; return new URL ( u . getProtocol ( ) , u . getHost ( ) , port , u . getFile ( ) ) ; |
public class XmlConfigurationSource { /** * Creates an instance of { @ link XmlConfigurationSource } .
* @ throws ConfigurationException when fails to create the { @ link XMLConfiguration }
* @ throws IOException when fails to read from the { @ code reader }
* @ throws NullPointerException if the path to the xml ... | return new XmlConfigurationSource ( createConfiguration ( reader ) , DEFAULT_PRIORITY ) ; |
public class MercatorProjection { /** * Converts a latitude coordinate ( in degrees ) to a pixel Y coordinate at a certain scale .
* @ param latitude the latitude coordinate that should be converted .
* @ param scaleFactor the scale factor at which the coordinate should be converted .
* @ return the pixel Y coord... | double sinLatitude = Math . sin ( latitude * ( Math . PI / 180 ) ) ; long mapSize = getMapSizeWithScaleFactor ( scaleFactor , tileSize ) ; // FIXME improve this formula so that it works correctly without the clipping
double pixelY = ( 0.5 - Math . log ( ( 1 + sinLatitude ) / ( 1 - sinLatitude ) ) / ( 4 * Math . PI ) ) ... |
public class X509ProxyCertPathValidator { /** * Validates the specified certification path using the specified algorithm parameter set .
* The < code > CertPath < / code > specified must be of a type that is supported by the validation algorithm , otherwise
* an < code > InvalidAlgorithmParameterException < / code ... | if ( certPath == null ) { throw new IllegalArgumentException ( "Certificate path cannot be null" ) ; } List list = certPath . getCertificates ( ) ; if ( list . size ( ) < 1 ) { throw new IllegalArgumentException ( "Certificate path cannot be empty" ) ; } parseParameters ( params ) ; // find the root trust anchor . Vali... |
public class JPAIssues { /** * implements the visitor to find @ Entity classes that have both generated @ Ids and have implemented hashCode / equals . Also looks for eager one to many join
* fetches as that leads to 1 + n queries .
* @ param clsContext
* the context object of the currently parsed class */
@ Overr... | try { cls = clsContext . getJavaClass ( ) ; catalogClass ( cls ) ; if ( isEntity ) { if ( hasHCEquals && hasId && hasGeneratedValue ) { bugReporter . reportBug ( new BugInstance ( this , BugType . JPAI_HC_EQUALS_ON_MANAGED_ENTITY . name ( ) , LOW_PRIORITY ) . addClass ( cls ) ) ; } if ( hasEagerOneToMany && ! hasFetch ... |
public class ClasspathListingProvider { /** * JBoss returns URLs with the vfszip and vfsfile protocol for resources ,
* and the org . reflections library doesn ' t recognize them . This is more a
* bug inside the reflections library , but we can write a small workaround
* for a quick fix on our side . */
private ... | final Set < URL > results = new HashSet < URL > ( urls . size ( ) ) ; for ( final URL url : urls ) { String cleanURL = url . toString ( ) ; // Fix JBoss URLs
if ( url . getProtocol ( ) . startsWith ( "vfszip:" ) ) { cleanURL = cleanURL . replaceFirst ( "vfszip:" , "file:" ) ; } else if ( url . getProtocol ( ) . startsW... |
public class ConnectionFactory { /** * Updates the database schema by loading the upgrade script for the version
* specified . The intended use is that if the current schema version is 2.9
* then we would call updateSchema ( conn , " 2.9 " ) . This would load the
* upgrade _ 2.9 . sql file and execute it against ... | if ( connectionString . startsWith ( "jdbc:h2:file:" ) ) { LOGGER . debug ( "Updating database structure" ) ; final String updateFile = String . format ( DB_STRUCTURE_UPDATE_RESOURCE , currentDbVersion . toString ( ) ) ; try ( InputStream is = FileUtils . getResourceAsStream ( updateFile ) ) { if ( is == null ) { throw... |
public class LocalContentUriThumbnailFetchProducer { /** * stored thumbnails . */
private @ Nullable EncodedImage getThumbnail ( ResizeOptions resizeOptions , int imageId ) throws IOException { } } | int thumbnailKind = getThumbnailKind ( resizeOptions ) ; if ( thumbnailKind == NO_THUMBNAIL ) { return null ; } Cursor thumbnailCursor = null ; try { thumbnailCursor = MediaStore . Images . Thumbnails . queryMiniThumbnail ( mContentResolver , imageId , thumbnailKind , THUMBNAIL_PROJECTION ) ; if ( thumbnailCursor == nu... |
public class XmlConfigurationPersister { /** * { @ inheritDoc } */
@ Override public PersistenceResource store ( final ModelNode model , Set < PathAddress > affectedAddresses ) throws ConfigurationPersistenceException { } } | return new FilePersistenceResource ( model , fileName , this ) ; |
public class TxDistributionInterceptor { /** * If we are within one transaction we won ' t do any replication as replication would only be performed at commit
* time . If the operation didn ' t originate locally we won ' t do any replication either . */
private Object handleTxWriteCommand ( InvocationContext ctx , Ab... | try { if ( ! ctx . isOriginLocal ( ) ) { LocalizedCacheTopology cacheTopology = checkTopologyId ( command ) ; // Ignore any remote command when we aren ' t the owner
if ( ! cacheTopology . isSegmentWriteOwner ( command . getSegment ( ) ) ) { return null ; } } CacheEntry entry = ctx . lookupEntry ( command . getKey ( ) ... |
public class BoxException { /** * Gets the server response as a BoxError .
* @ return the response as a BoxError , or null if the response cannot be converted . */
public BoxError getAsBoxError ( ) { } } | try { BoxError error = new BoxError ( ) ; error . createFromJson ( getResponse ( ) ) ; return error ; } catch ( Exception e ) { return null ; } |
public class ShareResourcesImpl { /** * Delete a share .
* It mirrors to the following Smartsheet REST API method :
* DELETE / workspaces / { workspaceId } / shares / { shareId }
* DELETE / sheets / { sheetId } / shares / { shareId }
* DELETE / sights / { sheetId } / shares / { shareId }
* DELETE / reports / ... | this . deleteResource ( getMasterResourceType ( ) + "/" + objectId + "/shares/" + shareId , Share . class ) ; |
public class PropertiesEscape { /** * Perform a ( configurable ) Java Properties Key < strong > escape < / strong > operation on a < tt > String < / tt > input ,
* writing results to a < tt > Writer < / tt > .
* This method will perform an escape operation according to the specified
* { @ link org . unbescape . p... | if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( level == null ) { throw new IllegalArgumentException ( "The 'level' argument cannot be null" ) ; } PropertiesKeyEscapeUtil . escape ( new InternalStringReader ( text ) , writer , level ) ; |
public class Hermes { /** * For a given interface and locale , retrieves the GWT i18n interface as a
* dynamic proxy for use on the server - side . If no locale is given , the
* default properties file will be loaded . This method caches proxy classes
* that it has created so it is safe to call multiple times . L... | if ( clazz == null ) { throw new IllegalArgumentException ( "Class cannot be null." ) ; } ULocale locale = null ; if ( localeStr != null && ! localeStr . isEmpty ( ) ) { locale = ULocale . createCanonical ( localeStr ) ; } LocaleMapKey key = new LocaleMapKey ( clazz . getName ( ) , locale ) ; T proxy = ( T ) cache . ge... |
public class CommerceDiscountPersistenceImpl { /** * Returns the first commerce discount in the ordered set where uuid = & # 63 ; .
* @ param uuid the uuid
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matching commerce discount
* @ t... | CommerceDiscount commerceDiscount = fetchByUuid_First ( uuid , orderByComparator ) ; if ( commerceDiscount != null ) { return commerceDiscount ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( "}" ) ; throw new... |
public class SessionImpl { /** * This creates the first meta schema in an empty keyspace which has not been initialised yet
* @ param tx */
private void initialiseMetaConcepts ( TransactionOLTP tx ) { } } | VertexElement type = tx . addTypeVertex ( Schema . MetaSchema . THING . getId ( ) , Schema . MetaSchema . THING . getLabel ( ) , Schema . BaseType . TYPE ) ; VertexElement entityType = tx . addTypeVertex ( Schema . MetaSchema . ENTITY . getId ( ) , Schema . MetaSchema . ENTITY . getLabel ( ) , Schema . BaseType . ENTIT... |
public class ConfigElement { /** * Sometimes , the JACL representation of a null or empty value includes
* quotation marks . Calling this method will parse away the extra JACL
* syntax and return a real or null value
* @ param value
* an unchecked input value
* @ return the real value described by the input v... | if ( value == null ) { return null ; } String v = removeQuotes ( value . trim ( ) ) . trim ( ) ; if ( v . isEmpty ( ) ) { return null ; } return v ; |
public class LumberjackClient { /** * Creates a socket using TLS protocol and connects it
* to the specified host and port .
* @ throws IOException
* @ throws UnknownHostException */
public void connect ( String hostName , int port ) throws UnknownHostException , IOException { } } | if ( ! sslHelper . isSocketAvailable ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "creating/recreating socket connection to " + hostName + ":" + port ) ; SSLSocket socket = sslHelper . createSocket ( hostName , port ) ; in = new BufferedInputStream ( socket . getI... |
public class Description { /** * Returns a new builder for { @ link Description } s . */
public static Builder builder ( JCTree tree , String name , @ Nullable String link , SeverityLevel severity , String message ) { } } | return new Builder ( tree , name , link , severity , message ) ; |
public class Gradient { /** * Split a span into two by adding a knot in the middle .
* @ param n the span index */
public void splitSpan ( int n ) { } } | int x = ( xKnots [ n ] + xKnots [ n + 1 ] ) / 2 ; addKnot ( x , getColor ( x / 256.0f ) , knotTypes [ n ] ) ; rebuildGradient ( ) ; |
public class FutureImpl { /** * { @ inheritDoc } */
public R get ( long timeout , TimeUnit unit ) throws InterruptedException , ExecutionException , TimeoutException { } } | long startTime = System . currentTimeMillis ( ) ; long timeoutMillis = TimeUnit . MILLISECONDS . convert ( timeout , unit ) ; synchronized ( this . sync ) { for ( ; ; ) { if ( this . isDone ) { if ( this . isCancelled ) { throw new CancellationException ( ) ; } else if ( this . failure != null ) { throw new ExecutionEx... |
public class AnalyzedTokenReadings { /** * Used to configure the internal variable for lemma equality .
* @ return true if all { @ link AnalyzedToken } lemmas are the same .
* @ since 2.5 */
private boolean areLemmasSame ( ) { } } | String previousLemma = anTokReadings [ 0 ] . getLemma ( ) ; if ( previousLemma == null ) { for ( AnalyzedToken element : anTokReadings ) { if ( element . getLemma ( ) != null ) { return false ; } } return true ; } for ( AnalyzedToken element : anTokReadings ) { if ( ! previousLemma . equals ( element . getLemma ( ) ) )... |
public class ContinuousDistributions { /** * Returns the z score of a specific pvalue for Gaussian
* Partially ported from http : / / home . online . no / ~ pjacklam / notes / invnorm / impl / karimov / StatUtil . java
* Other implementations http : / / home . online . no / ~ pjacklam / notes / invnorm / index . ht... | final double P_LOW = 0.02425D ; final double P_HIGH = 1.0D - P_LOW ; final double ICDF_A [ ] = { - 3.969683028665376e+01 , 2.209460984245205e+02 , - 2.759285104469687e+02 , 1.383577518672690e+02 , - 3.066479806614716e+01 , 2.506628277459239e+00 } ; final double ICDF_B [ ] = { - 5.447609879822406e+01 , 1.615858368580409... |
public class TransformerHandlerImpl { /** * Report the end of a CDATA section .
* @ throws SAXException The application may raise an exception .
* @ see # startCDATA */
public void endCDATA ( ) throws SAXException { } } | if ( DEBUG ) System . out . println ( "TransformerHandlerImpl#endCDATA" ) ; if ( null != m_lexicalHandler ) { m_lexicalHandler . endCDATA ( ) ; } |
public class Config { /** * Returns the { @ link PNCounterConfig } for the given name , creating one
* if necessary and adding it to the collection of known configurations .
* The configuration is found by matching the configuration name
* pattern to the provided { @ code name } without the partition qualifier
... | return ConfigUtils . getConfig ( configPatternMatcher , pnCounterConfigs , name , PNCounterConfig . class ) ; |
public class UpdateDefaultBranchRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateDefaultBranchRequest updateDefaultBranchRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateDefaultBranchRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateDefaultBranchRequest . getRepositoryName ( ) , REPOSITORYNAME_BINDING ) ; protocolMarshaller . marshall ( updateDefaultBranchRequest . getDefaultBranchN... |
public class Hierarchy { /** * Find a method in given class .
* @ param javaClass
* the class
* @ param methodName
* the name of the method
* @ param methodSig
* the signature of the method
* @ return the JavaClassAndMethod , or null if no such method exists in the
* class */
@ Deprecated public static ... | if ( DEBUG_METHOD_LOOKUP ) { System . out . println ( "Check " + javaClass . getClassName ( ) ) ; } Method [ ] methodList = javaClass . getMethods ( ) ; for ( Method method : methodList ) { if ( method . getName ( ) . equals ( methodName ) && method . getSignature ( ) . equals ( methodSig ) && accessFlagsAreConcrete ( ... |
public class CmsStaticExportManager { /** * Returns < code > true < / code > if the given VFS resource that is located under the
* given site root should be transported through a secure channel . < p >
* @ param cms the current users OpenCms context
* @ param vfsName the VFS resource name to check
* @ param sit... | return isSecureLink ( cms , vfsName , siteRoot , false ) ; |
public class AppServiceEnvironmentsInner { /** * Get all multi - role pools .
* Get all multi - role pools .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param name Name of the App Service Environment .
* @ param serviceCallback the async ServiceCallback to handle s... | return AzureServiceFuture . fromPageResponse ( listMultiRolePoolsSinglePageAsync ( resourceGroupName , name ) , new Func1 < String , Observable < ServiceResponse < Page < WorkerPoolResourceInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < WorkerPoolResourceInner > > > call ( String nextPageLin... |
public class LabelService { /** * Deletes the label with the given key .
* @ param key The key of the label to delete
* @ return This object */
public LabelService delete ( String key ) { } } | HTTP . DELETE ( String . format ( "/v2/labels/%s.json" , encode ( key ) ) ) ; return this ; |
public class AndroidEventBuilderHelper { /** * Checks whether or not the device is currently plugged in and charging , or null if unknown .
* @ param ctx Android application context
* @ return whether or not the device is currently plugged in and charging , or null if unknown */
protected static Boolean isCharging ... | try { Intent intent = ctx . registerReceiver ( null , new IntentFilter ( Intent . ACTION_BATTERY_CHANGED ) ) ; if ( intent == null ) { return null ; } int plugged = intent . getIntExtra ( BatteryManager . EXTRA_PLUGGED , - 1 ) ; return plugged == BatteryManager . BATTERY_PLUGGED_AC || plugged == BatteryManager . BATTER... |
public class AuthorizationCodeHandler { /** * This method handle the authorization code ; it ' s validated the response
* state and call the server to get the tokens using the authorization code .
* @ param req
* @ param res
* @ param authzCode
* @ return */
public ProviderAuthenticationResult handleAuthoriza... | String clientId = clientConfig . getClientId ( ) ; OidcClientRequest oidcClientRequest = ( OidcClientRequest ) req . getAttribute ( ClientConstants . ATTRIB_OIDC_CLIENT_REQUEST ) ; ProviderAuthenticationResult oidcResult = null ; oidcResult = authenticatorUtil . verifyResponseState ( req , res , responseState , clientC... |
public class FixedRedirectCookieAuthenticator { /** * Processes the login request .
* @ param request
* The current request .
* @ param response
* The current response . */
protected void login ( final Request request , final Response response ) { } } | // Login detected
final Form form = new Form ( request . getEntity ( ) ) ; final Parameter identifier = form . getFirst ( this . getIdentifierFormName ( ) ) ; final Parameter secret = form . getFirst ( this . getSecretFormName ( ) ) ; // Set credentials
final ChallengeResponse cr = new ChallengeResponse ( this . getSch... |
public class BlockMasterInfo { /** * Creates a new instance of { @ link BlockMasterInfo } from a proto representation .
* @ param info the proto representation of a block master information
* @ return the instance */
public static BlockMasterInfo fromProto ( alluxio . grpc . BlockMasterInfo info ) { } } | return new BlockMasterInfo ( ) . setCapacityBytes ( info . getCapacityBytes ( ) ) . setCapacityBytesOnTiers ( info . getCapacityBytesOnTiersMap ( ) ) . setFreeBytes ( info . getFreeBytes ( ) ) . setLiveWorkerNum ( info . getLiveWorkerNum ( ) ) . setLostWorkerNum ( info . getLostWorkerNum ( ) ) . setUsedBytes ( info . g... |
public class AdminKeymatchAction { public static OptionalEntity < KeyMatch > getEntity ( final CreateForm form , final String username , final long currentTime ) { } } | switch ( form . crudMode ) { case CrudMode . CREATE : return OptionalEntity . of ( new KeyMatch ( ) ) . map ( entity -> { entity . setCreatedBy ( username ) ; entity . setCreatedTime ( currentTime ) ; return entity ; } ) ; case CrudMode . EDIT : if ( form instanceof EditForm ) { return ComponentUtil . getComponent ( Ke... |
public class CheckEJBAppConfigHelper { /** * Checks whether validation messages should be logged or not . < p >
* This is determined by checking the following :
* < ul >
* < li > checkEJBApplicationConfiguration system property
* < li > Metadata trace component is set to the debug or lower level
* < li > EJBC... | if ( svCheckEJBAppConfig || svDevelopmentMode || ( TraceComponent . isAnyTracingEnabled ( ) && ( metadataTc . isDebugEnabled ( ) || ejbTc . isDebugEnabled ( ) || injTc . isDebugEnabled ( ) ) ) ) { return true ; } return false ; |
public class CmsContentService { /** * Reads the content definition for the given resource and locale . < p >
* @ param file the resource file
* @ param content the XML content
* @ param entityId the entity id
* @ param clientId the container element client id if available
* @ param locale the content locale ... | long timer = 0 ; if ( LOG . isDebugEnabled ( ) ) { timer = System . currentTimeMillis ( ) ; } CmsObject cms = getCmsObject ( ) ; List < Locale > availableLocalesList = OpenCms . getLocaleManager ( ) . getAvailableLocales ( cms , file ) ; if ( ! availableLocalesList . contains ( locale ) ) { availableLocalesList . retai... |
public class CassandraExecutor { /** * Delete the specified properties if < code > propNames < / code > is not null or empty , otherwise , delete the whole record .
* @ param targetClass
* @ param deletingPropNames
* @ param id */
@ SafeVarargs public final ResultSet delete ( final Class < ? > targetClass , final... | return delete ( targetClass , deletingPropNames , ids2Cond ( targetClass , ids ) ) ; |
public class SlidingEventTimeWindows { /** * Creates a new { @ code SlidingEventTimeWindows } { @ link WindowAssigner } that assigns
* elements to sliding time windows based on the element timestamp .
* @ param size The size of the generated windows .
* @ param slide The slide interval of the generated windows . ... | return new SlidingEventTimeWindows ( size . toMilliseconds ( ) , slide . toMilliseconds ( ) , 0 ) ; |
public class CoreStatusResponse { /** * Returns the date the server ( core module ) was last reloaded . < p >
* If either the date or time property is < code > null < / code > ( e . g . on Asterisk prior to 1.6.3 ) this method
* returns < code > null < / code > .
* @ param tz the time zone of the Asterisk server ... | if ( coreReloadDate == null || coreReloadTime == null ) { return null ; } return DateUtil . parseDateTime ( coreReloadDate + " " + coreReloadTime , tz ) ; |
public class QueryObjectsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( QueryObjectsRequest queryObjectsRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( queryObjectsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( queryObjectsRequest . getPipelineId ( ) , PIPELINEID_BINDING ) ; protocolMarshaller . marshall ( queryObjectsRequest . getQuery ( ) , QUERY_BINDING ) ; protocolMarsh... |
public class RhythmicalContextConfig { @ Override protected void processAnnotations ( Set < WebXml > fragments , boolean handlesTypesOnly , Map < String , JavaClassCacheEntry > javaClassCache ) { } } | if ( isAnnotationHandlingDetect ( ) ) { super . processAnnotations ( fragments , handlesTypesOnly , javaClassCache ) ; } |
public class ControlBeanContextSupport { /** * Serialize all serializable children ( unless this BeanContext has a peer ) . Any
* children which are not serializable not be present upon deserialization . Also
* serialize any BeanContextMembership listeners which are serializable .
* @ param out ObjectOutputStream... | // todo : for multithreaded usage this block needs to be synchronized
out . defaultWriteObject ( ) ; // spec : only write children if not using a peer
if ( this . equals ( getPeer ( ) ) ) { writeChildren ( out ) ; } else { out . writeInt ( 0 ) ; } // write event handlers
int serializable = 0 ; for ( BeanContextMembersh... |
public class WAudioRenderer { /** * Paints the given WAudio .
* @ param component the WAudio to paint .
* @ param renderContext the RenderContext to paint to . */
@ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } } | WAudio audioComponent = ( WAudio ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; Audio [ ] audio = audioComponent . getAudio ( ) ; if ( audio == null || audio . length == 0 ) { return ; } WAudio . Controls controls = audioComponent . getControls ( ) ; int duration = audio [ 0 ] . getDuration ( ) ; ... |
public class DatabaseManager { /** * Used by in - process connections and by Servlet */
public static Session newSession ( String type , String path , String user , String password , HsqlProperties props , int timeZoneSeconds ) { } } | Database db = getDatabase ( type , path , props ) ; if ( db == null ) { return null ; } return db . connect ( user , password , timeZoneSeconds ) ; |
public class Http { /** * Executes a PATCH request .
* @ param url url of resource .
* @ param content content to be posted .
* @ param connectTimeout connection timeout in milliseconds .
* @ param readTimeout read timeout in milliseconds .
* @ return { @ link Patch } object . */
public static Patch patch ( S... | try { return new Patch ( url , content , connectTimeout , readTimeout ) ; } catch ( Exception e ) { throw new HttpException ( "Failed URL: " + url , e ) ; } |
public class AbstractConfig { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) @ Override public < T > Optional < T > getOptionalValue ( String propertyName , Class < T > propertyType ) { } } | assertNotClosed ( ) ; SourcedValue sourced = getSourcedValue ( propertyName , propertyType ) ; T value = null ; if ( sourced != null ) { value = ( T ) sourced . getValue ( ) ; } Optional < T > optional = Optional . ofNullable ( value ) ; return optional ; |
public class DAOValidatorHelper { /** * Methode qui teste si une chaine ne contient que des caracteres alphanumeriques
* @ param textChaine a tester
* @ returnStatut de contenance */
public static boolean isAlphaNumericString ( String text ) { } } | // Le Pattern representant une chaine AlphaNumerique
Pattern pattern = Pattern . compile ( "\\w+" ) ; // Test
return ( text != null ) && ( text . trim ( ) . length ( ) > 0 ) && ( pattern . matcher ( text ) . matches ( ) ) ; |
public class Range { /** * This method determines if the given { @ code value } is within this { @ link Range } from { @ link # getMin ( ) minimum } to
* { @ link # getMax ( ) maximum } .
* @ param value is the vale to check .
* @ return { @ code true } if contained ( { @ link # getMin ( ) minimum } & lt ; = { @ ... | NlsNullPointerException . checkNotNull ( "value" , value ) ; Comparator < ? super V > comparator = getComparator ( ) ; int delta ; if ( this . min != null ) { delta = comparator . compare ( value , this . min ) ; if ( delta < 0 ) { // value < min
return false ; } } if ( this . max != null ) { delta = comparator . compa... |
public class RequestMessage { /** * @ see javax . servlet . ServletRequest # getServerPort ( ) */
@ Override public int getServerPort ( ) { } } | int port = this . request . getVirtualPort ( ) ; if ( - 1 == port && null != this . request . getHeader ( "Host" ) ) { // if Host is present , default to scheme
if ( "HTTP" . equalsIgnoreCase ( this . request . getScheme ( ) ) ) { port = 80 ; } else { port = 443 ; } } // if still not found , use the socket information
... |
public class IndexAVL { /** * Return the first node equal to the rowdata object .
* The rowdata has the same column mapping as this table .
* @ param session session object
* @ param store store object
* @ param rowdata array containing table row data
* @ return iterator */
@ Override public RowIterator findF... | NodeAVL node = findNode ( session , store , rowdata , colIndex , colIndex . length ) ; return getIterator ( session , store , node ) ; |
public class AbstrCFMLScriptTransformer { /** * Liest ein switch Statment ein
* @ return switch Statement
* @ throws TemplateException */
private final Switch switchStatement ( Data data ) throws TemplateException { } } | if ( ! data . srcCode . forwardIfCurrent ( "switch" , '(' ) ) return null ; Position line = data . srcCode . getPosition ( ) ; comments ( data ) ; Expression expr = super . expression ( data ) ; comments ( data ) ; // end )
if ( ! data . srcCode . forwardIfCurrent ( ')' ) ) throw new TemplateException ( data . srcCode ... |
public class CmsContainerConfigurationParser { /** * Parses a single inheritance configuration from an XML content node . < p >
* @ param location the node from which to read the single configuration */
protected void parseSingleConfiguration ( I_CmsXmlContentValueLocation location ) { } } | I_CmsXmlContentValueLocation nameLoc = location . getSubValue ( N_NAME ) ; if ( nameLoc == null ) { return ; } String name = nameLoc . asString ( m_cms ) ; if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( name ) ) { return ; } List < String > ordering = null ; List < I_CmsXmlContentValueLocation > orderKeyLocs = location... |
public class IndyGuardsFiltersAndSignatures { /** * Guard to check if the provided Object has the same
* class as the provided Class . This method will
* return false if the Object is null . */
public static boolean sameClass ( Class c , Object o ) { } } | if ( o == null ) return false ; return o . getClass ( ) == c ; |
public class Pail { /** * returns if formats are same */
private boolean checkCombineValidity ( Pail p , CopyArgs args ) throws IOException { } } | if ( args . force ) return true ; PailSpec mine = getSpec ( ) ; PailSpec other = p . getSpec ( ) ; PailStructure structure = mine . getStructure ( ) ; boolean typesSame = structure . getType ( ) . equals ( other . getStructure ( ) . getType ( ) ) ; // can always append into a " raw " pail
if ( ! structure . getType ( )... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.