signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SARLEclipsePlugin { /** * Logs an internal error with the specified message . * @ param message the error message to log */ public void logErrorMessage ( String message ) { } }
getILog ( ) . log ( new Status ( IStatus . ERROR , PLUGIN_ID , message , null ) ) ;
public class Value { /** * Load some or all of completely persisted Values */ byte [ ] loadPersist ( ) { } }
// 00 assert : not written yet // 01 assert : load - after - delete // 10 expected ; read // 11 assert : load - after - delete assert isPersisted ( ) ; try { byte [ ] res = H2O . getPM ( ) . load ( backend ( ) , this ) ; assert ! isDeleted ( ) ; // Race in user - land : load - after - delete return res ; } catch ( IOEx...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcSectionTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class Predicates { /** * Create a predicate which is a logical or of two existing predicate . * @ param first first predicate . * @ param second second predicate . * @ param < T > type of the predicates * @ return resultant predicate * @ since 1.5 */ public static < T > Predicate < T > or ( final Predi...
// NOPMD return new Predicate < T > ( ) { @ Override public boolean test ( final T testValue ) { return first . test ( testValue ) || second . test ( testValue ) ; } } ;
public class RmiEndpointUtils { /** * Extract host name from resource path . * @ param resourcePath * @ return */ public static String getHost ( String resourcePath ) { } }
String hostSpec ; if ( resourcePath . contains ( ":" ) ) { hostSpec = resourcePath . split ( ":" ) [ 0 ] ; } else { hostSpec = resourcePath ; } if ( hostSpec . contains ( "/" ) ) { hostSpec = hostSpec . substring ( 0 , hostSpec . indexOf ( '/' ) ) ; } return hostSpec ;
public class HttpContextImpl { /** * This method is called when the template outputs data . This * implementation calls this . toString ( Object ) on the object and then * appends the result to the internal CharToByteBuffer . * @ param obj the object to output * @ hidden */ public final void print ( Object obj ...
if ( ( mOutputOverridePermitted || mBuffer == null ) && mOutputReceiver != null ) { mOutputReceiver . print ( obj ) ; } else if ( mBuffer != null ) { mBuffer . append ( toString ( obj ) ) ; }
public class SessionForRequest { /** * Creates a session and stores it in the request attributes . * @ param sessionStore the session store * @ param request the Http Request * @ return A new session stored in the request attributes */ public static Session create ( SessionStore sessionStore , HttpRequest < ? > r...
Session session = sessionStore . newSession ( ) ; request . getAttributes ( ) . put ( HttpSessionFilter . SESSION_ATTRIBUTE , session ) ; return session ;
public class FlowTypeCheck { public void checkDeclaration ( Decl decl ) { } }
if ( decl instanceof Decl . Unit ) { checkUnit ( ( Decl . Unit ) decl ) ; } else if ( decl instanceof Decl . Import ) { // Can ignore } else if ( decl instanceof Decl . StaticVariable ) { checkStaticVariableDeclaration ( ( Decl . StaticVariable ) decl ) ; } else if ( decl instanceof Decl . Type ) { checkTypeDeclaration...
public class CacheKey { /** * region Overrides */ @ Override public byte [ ] serialize ( ) { } }
byte [ ] result = new byte [ SERIALIZATION_LENGTH ] ; BitConverter . writeLong ( result , 0 , this . segmentId ) ; BitConverter . writeLong ( result , Long . BYTES , this . offset ) ; return result ;
public class AuditManager { /** * Gets the single instance of AuditHelper . * @ return single instance of AuditHelper */ public static IAuditManager getInstance ( ) { } }
IAuditManager result = auditManager ; if ( result == null ) { synchronized ( AuditManager . class ) { result = auditManager ; if ( result == null ) { Context . init ( ) ; auditManager = result = new AuditManager ( ) ; } } } return result ;
public class Analyser { /** * Get a suffix from the children which exists in staticSuffixList . An * option is provided to check recursively . Note that the immediate children * are always checked first before further recursive check is done . * @ paramnode the node used to obtain the suffix * @ paramperformRec...
String resultSuffix = "" ; String suffix = null ; StructuralNode child = null ; try { for ( int i = 0 ; i < staticSuffixList . length ; i ++ ) { suffix = staticSuffixList [ i ] ; Iterator < StructuralNode > iter = node . getChildIterator ( ) ; while ( iter . hasNext ( ) ) { child = iter . next ( ) ; try { if ( child . ...
public class DeploymentJBossASClient { /** * Uploads the content to the app server ' s content repository and then deploys the content . * If this is to be used for app servers in " domain " mode you have to pass in one or more * server groups . If this is to be used to deploy an app in a standalone server , the ...
if ( serverGroups == null ) { serverGroups = Collections . emptySet ( ) ; } DeploymentResult result = null ; try { DeploymentManager dm = DeploymentManager . Factory . create ( getModelControllerClient ( ) ) ; Deployment deployment = Deployment . of ( content , deploymentName ) . addServerGroups ( serverGroups ) . setE...
public class CalculateDateExtensions { /** * Adds months to the given Date object and returns it . Note : you can add negative values too * for get date in past . * @ param date * The Date object to add the years . * @ param addMonths * The months to add . * @ return The resulted Date object . */ public sta...
final Calendar dateOnCalendar = Calendar . getInstance ( ) ; dateOnCalendar . setTime ( date ) ; dateOnCalendar . add ( Calendar . MONTH , addMonths ) ; return dateOnCalendar . getTime ( ) ;
public class QuerySyntaxExceptionMapper { /** * { @ inheritDoc } */ @ Override public Response toResponse ( QuerySyntaxException exception ) { } }
return providers . getExceptionMapper ( Throwable . class ) . toResponse ( new UnprocessableEntityException ( exception . getMessage ( ) , exception ) ) ;
public class HttpResponseDecoderSpec { /** * Build a { @ link Function } that applies the http response decoder configuration to a * { @ link TcpClient } by enriching its attributes . */ Function < TcpClient , TcpClient > build ( ) { } }
HttpResponseDecoderSpec decoder = new HttpResponseDecoderSpec ( ) ; decoder . initialBufferSize = initialBufferSize ; decoder . maxChunkSize = maxChunkSize ; decoder . maxHeaderSize = maxHeaderSize ; decoder . maxInitialLineLength = maxInitialLineLength ; decoder . validateHeaders = validateHeaders ; decoder . failOnMi...
public class URLDecoder { /** * Decodes a { @ code application / x - www - form - urlencoded } string using a specific * encoding scheme . * The supplied encoding is used to determine * what characters are represented by any consecutive sequences of the * form " < i > { @ code % xy } < / i > " . * < em > < st...
boolean needToChange = false ; int numChars = s . length ( ) ; StringBuffer sb = new StringBuffer ( numChars > 500 ? numChars / 2 : numChars ) ; int i = 0 ; if ( enc . length ( ) == 0 ) { throw new UnsupportedEncodingException ( "URLDecoder: empty string enc parameter" ) ; } char c ; byte [ ] bytes = null ; while ( i <...
public class Strings { /** * Unquotes text and unescapes non surrounding quotes . { @ code String . replace ( ) } is a bit too * inefficient ( see JAVA - 67 , JAVA - 1262 ) . * @ param text The text * @ param quoteChar The character to use as a quote . * @ return The text with surrounding quotes removed and non...
if ( ! isQuoted ( text , quoteChar ) ) return text ; if ( text . length ( ) == 2 ) return "" ; String search = emptyQuoted ( quoteChar ) ; int nbMatch = 0 ; int start = - 1 ; do { start = text . indexOf ( search , start + 2 ) ; // ignore the second to last character occurrence , as the last character is a quote . if ( ...
public class UNode { /** * Create a new MAP node with the given name and tag name add it as a child of this * node . This node must be a MAP or ARRAY . This is a convenience method that calls * { @ link UNode # createMapNode ( String , String ) } and then { @ link # addChildNode ( UNode ) } . * @ param name Name ...
return addChildNode ( UNode . createMapNode ( name , tagName ) ) ;
public class ItemStream { /** * Find the item that has been known to the stream for longest . The item returned * may be in any of the states defined in the state model . The caller should not * assume that the item can be used for any particular purpose . * @ return Item may be null . * @ throws { @ link Messa...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findOldestItem" ) ; ItemCollection ic = ( ( ItemCollection ) _getMembership ( ) ) ; if ( null == ic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "findOldes...
public class WebSecurityScannerClient { /** * Deletes an existing ScanConfig and its child resources . * < p > Sample code : * < pre > < code > * try ( WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient . create ( ) ) { * ScanConfigName name = ScanConfigName . of ( " [ PROJECT ] " , " ...
DeleteScanConfigRequest request = DeleteScanConfigRequest . newBuilder ( ) . setName ( name ) . build ( ) ; deleteScanConfig ( request ) ;
public class StreamGraph { /** * Adds a new virtual node that is used to connect a downstream vertex to an input with a * certain partitioning . * < p > When adding an edge from the virtual node to a downstream node the connection will be made * to the original node , but with the partitioning given here . * @ ...
if ( virtualPartitionNodes . containsKey ( virtualId ) ) { throw new IllegalStateException ( "Already has virtual partition node with id " + virtualId ) ; } virtualPartitionNodes . put ( virtualId , new Tuple2 < Integer , StreamPartitioner < ? > > ( originalId , partitioner ) ) ;
public class HostAccessManager { /** * Update the access mode for a user or group . * If the host is in lockdown mode , this operation is allowed only on users in the exceptions list - see * { @ link com . vmware . vim25 . mo . HostAccessManager # queryLockdownExceptions QueryLockdownExceptions } , and trying to ...
getVimService ( ) . changeAccessMode ( getMOR ( ) , principal , isGroup , accessMode ) ;
public class PerformanceTarget { /** * Gets the volumeGoalType value for this PerformanceTarget . * @ return volumeGoalType * The volume goal of the performance target . This property defines * the way stats data will be * reported for the time period specified . * < span class = " constraint Selectable " > Thi...
return volumeGoalType ;
public class MvcGraph { /** * Register { @ link Provider . DereferenceListener } which will be called when the provider * @ param onProviderFreedListener The listener */ public void registerDereferencedListener ( final Provider . DereferenceListener onProviderFreedListener ) { } }
if ( uiThreadRunner . isOnUiThread ( ) ) { graph . registerDereferencedListener ( onProviderFreedListener ) ; } else { uiThreadRunner . post ( new Runnable ( ) { @ Override public void run ( ) { graph . registerDereferencedListener ( onProviderFreedListener ) ; } } ) ; }
public class ScriptPattern { /** * Returns whether this script is using OP _ RETURN to store arbitrary data . */ public static boolean isOpReturn ( Script script ) { } }
List < ScriptChunk > chunks = script . chunks ; return chunks . size ( ) > 0 && chunks . get ( 0 ) . equalsOpCode ( ScriptOpCodes . OP_RETURN ) ;
public class ListDeploymentInstancesRequest { /** * The set of instances in a blue / green deployment , either those in the original environment ( " BLUE " ) or those in * the replacement environment ( " GREEN " ) , for which you want to view instance information . * @ param instanceTypeFilter * The set of instan...
if ( instanceTypeFilter == null ) { this . instanceTypeFilter = null ; return ; } this . instanceTypeFilter = new com . amazonaws . internal . SdkInternalList < String > ( instanceTypeFilter ) ;
public class HttpSessionsParam { /** * Sets the default tokens . * @ param tokens the new default tokens */ public void setDefaultTokens ( final List < HttpSessionToken > tokens ) { } }
this . defaultTokens = tokens ; saveDefaultTokens ( ) ; this . defaultTokensEnabled = defaultTokens . stream ( ) . filter ( HttpSessionToken :: isEnabled ) . map ( HttpSessionToken :: getName ) . collect ( Collectors . toList ( ) ) ;
public class AtomicMapLookup { /** * Removes the atomic map associated with the given key from the underlying cache . * @ param cache underlying cache * @ param key key under which the atomic map exists * @ param < MK > key param of the cache */ public static < MK > void removeAtomicMap ( Cache < MK , ? > cache ,...
// This removes any entry from the cache but includes special handling for fine - grained maps FineGrainedAtomicMapProxyImpl . removeMap ( ( Cache < Object , Object > ) cache , key ) ;
public class PropertyTypeRegistry { /** * Add built - in property types . */ private void init ( ) { } }
add ( "text" , PropertySerializer . STRING , PropertyEditorText . class ) ; add ( "color" , PropertySerializer . STRING , PropertyEditorColor . class ) ; add ( "choice" , PropertySerializer . STRING , PropertyEditorChoiceList . class ) ; add ( "action" , PropertySerializer . STRING , PropertyEditorAction . class ) ; ad...
public class mps_ssl_certkey { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString ssl_certificate_validator = new MPSString ( ) ; ssl_certificate_validator . setConstraintMaxStrLen ( MPSConstants . GENERIC_CONSTRAINT , 128 ) ; ssl_certificate_validator . setConstraintMinStrLen ( MPSConstants . GENERIC_CONSTRAINT , 1 ) ; ssl_certificate_validator . setCo...
public class CacheableWorkspaceDataManager { /** * { @ inheritDoc } */ @ Override public List < PropertyData > listChildPropertiesData ( NodeData nodeData ) throws RepositoryException { } }
return listChildPropertiesData ( nodeData , false ) ;
public class EmailExtensions { /** * Creates an Address from the given the address and personal name . * @ param address * The address in RFC822 format . * @ param personal * The personal name . * @ param charset * MIME charset to be used to encode the name as per RFC 2047. * @ return The created Internet...
if ( personal . isNullOrEmpty ( ) ) { personal = address ; } final InternetAddress internetAdress = new InternetAddress ( address ) ; if ( charset . isNullOrEmpty ( ) ) { internetAdress . setPersonal ( personal ) ; } else { internetAdress . setPersonal ( personal , charset ) ; } return internetAdress ;
public class FileUtils { /** * Copia el contenido de un fichero a otro en caso de error lanza una excepcion . * @ param source * @ param dest * @ throws IOException */ public static void append ( File source , File dest ) throws IOException { } }
try { FileInputStream in = new FileInputStream ( source ) ; RandomAccessFile out = new RandomAccessFile ( dest , "rwd" ) ; try { FileChannel canalFuente = in . getChannel ( ) ; FileChannel canalDestino = out . getChannel ( ) ; long count = canalDestino . transferFrom ( canalFuente , canalDestino . size ( ) , canalFuent...
public class Environment { /** * Replaces any previously set module directories with the collection of module directories . * The default module directory will < i > NOT < / i > be used if this method is invoked . * @ param moduleDirs the collection of module directories to use * @ throws java . lang . IllegalArg...
this . modulesDirs . clear ( ) ; // Process each module directory for ( String path : moduleDirs ) { addModuleDir ( path ) ; } addDefaultModuleDir = false ;
public class FieldProcessorRegistry { /** * アノテーションに対する { @ link FieldProcessor } を取得する 。 * @ param annoClass 取得対象のアノテーションのクラスタイプ 。 * @ return 見つからない場合はnullを返す 。 * @ throws NullPointerException { @ literal annoClass } */ @ SuppressWarnings ( "unchecked" ) public < A extends Annotation > FieldProcessor < A > getP...
ArgUtils . notNull ( annoClass , "annoClass" ) ; return ( FieldProcessor < A > ) pocessorMap . get ( annoClass ) ;
public class Uris { /** * Perform am URI query parameter ( name or value ) < strong > escape < / strong > operation * on a { @ code String } input . * This method simply calls the equivalent method in the { @ code UriEscape } class from the * < a href = " http : / / www . unbescape . org " > Unbescape < / a > lib...
return UriEscape . escapeUriQueryParam ( text , encoding ) ;
public class CathFactory { /** * Returns a CATH database of the specified version . * @ param version For example , " 3.5.0" */ public static CathDatabase getCathDatabase ( String version ) { } }
if ( version == null ) version = DEFAULT_VERSION ; CathDatabase cath = versions . get ( version ) ; if ( cath == null ) { CathInstallation newCath = new CathInstallation ( ) ; newCath . setCathVersion ( version ) ; cath = newCath ; } return cath ;
public class HelpCommand { /** * Get a format string for a help line . * This creates a string formattable to two columns , where the column * widths are dictated by the column width ( calculated above as max * command name / description sizes ) . The columns are separated by two tabs * with a colon in the midd...
return new StringBuilder ( ) . append ( "%1$-" ) . append ( nameColWidth ) . append ( "s\t:\t%2$-" ) . append ( descColWidth ) . append ( "s" ) . toString ( ) ;
public class RegionOperationClient { /** * Deletes the specified region - specific Operations resource . * < p > Sample code : * < pre > < code > * try ( RegionOperationClient regionOperationClient = RegionOperationClient . create ( ) ) { * ProjectRegionOperationName operation = ProjectRegionOperationName . of ...
DeleteRegionOperationHttpRequest request = DeleteRegionOperationHttpRequest . newBuilder ( ) . setOperation ( operation == null ? null : operation . toString ( ) ) . build ( ) ; deleteRegionOperation ( request ) ;
public class DVWordsiMain { /** * Adds { @ link DependencyFileDocumentIterator } s for each file name provided . */ protected void addDocIterators ( Collection < Iterator < Document > > docIters , String [ ] fileNames ) throws IOException { } }
// All the documents are listed in one file , with one document per line for ( String s : fileNames ) docIters . add ( new DependencyFileDocumentIterator ( s ) ) ;
public class SequenceMixin { /** * For the given { @ link Sequence } this will return a { @ link List } filled with * the Compounds of that { @ link Sequence } . */ public static < C extends Compound > List < C > toList ( Sequence < C > sequence ) { } }
List < C > list = new ArrayList < C > ( sequence . getLength ( ) ) ; for ( C compound : sequence ) { list . add ( compound ) ; } return list ;
public class FNCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setFNNDCnt ( Integer newFNNDCnt ) { } }
Integer oldFNNDCnt = fnndCnt ; fnndCnt = newFNNDCnt ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . FNC__FNND_CNT , oldFNNDCnt , fnndCnt ) ) ;
public class Capacitor { /** * Put an array of data into Capacitor * @ param array * @ param offset * @ param length */ public void put ( byte [ ] array , int offset , int length ) { } }
if ( curr == null || curr . remaining ( ) == 0 ) { curr = ringGet ( ) ; bbs . add ( curr ) ; } int len ; while ( length > 0 ) { if ( ( len = curr . remaining ( ) ) > length ) { curr . put ( array , offset , length ) ; length = 0 ; } else { // System . out . println ( new String ( array ) ) ; curr . put ( array , offset...
public class JmsJcaManagedConnection { /** * Called by a session to indicate that it has been closed . Removes the * session from the set held by this managed connection and notifies the * connection event listeners ( which includes the connection manager ) . * @ param session * the session that has been closed...
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "sessionClosed" , session ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "Sending connection closed events to the " + _connectionListeners ...
public class QueryEngine { /** * inserts a record with a time to live . If the record exists , and exception will be thrown . * @ param namespace Namespace to store the record * @ param set Set to store the record * @ param key Key of the record * @ param bins A list of Bins to insert * @ param ttl The record...
this . client . put ( this . insertPolicy , key , bins . toArray ( new Bin [ 0 ] ) ) ;
public class Counters { /** * Removes all entries from c except for the top < code > num < / code > */ public static < E > void retainTop ( Counter < E > c , int num ) { } }
int numToPurge = c . size ( ) - num ; if ( numToPurge <= 0 ) { return ; } List < E > l = Counters . toSortedList ( c ) ; Collections . reverse ( l ) ; for ( int i = 0 ; i < numToPurge ; i ++ ) { c . remove ( l . get ( i ) ) ; }
public class HttpResponse { /** * Returns the CRC32 checksum calculated by the underlying CRC32ChecksumCalculatingInputStream . * @ return The CRC32 checksum . */ public long getCRC32Checksum ( ) { } }
if ( context == null ) { return 0L ; } CRC32ChecksumCalculatingInputStream crc32ChecksumInputStream = ( CRC32ChecksumCalculatingInputStream ) context . getAttribute ( CRC32ChecksumCalculatingInputStream . class . getName ( ) ) ; return crc32ChecksumInputStream == null ? 0L : crc32ChecksumInputStream . getCRC32Checksum ...
public class DescribeCacheClustersResult { /** * A list of clusters . Each item in the list contains detailed information about one cluster . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setCacheClusters ( java . util . Collection ) } or { @ link # withCac...
if ( this . cacheClusters == null ) { setCacheClusters ( new com . amazonaws . internal . SdkInternalList < CacheCluster > ( cacheClusters . length ) ) ; } for ( CacheCluster ele : cacheClusters ) { this . cacheClusters . add ( ele ) ; } return this ;
public class OrmElf { /** * Gets the column name defined for the given property for the given type . * @ param clazz The type . * @ param propertyName The object property name . * @ return The database column name . */ public static String getColumnFromProperty ( Class < ? > clazz , String propertyName ) { } }
return Introspector . getIntrospected ( clazz ) . getColumnNameForProperty ( propertyName ) ;
public class AdHocBase { /** * Call from derived class run ( ) method for implementation . * @ param ctx * @ param aggregatorFragments * @ param collectorFragments * @ param sqlStatements * @ param replicatedTableDMLFlags * @ return */ public VoltTable [ ] runAdHoc ( SystemProcedureExecutionContext ctx , by...
Pair < Object [ ] , AdHocPlannedStatement [ ] > data = decodeSerializedBatchData ( serializedBatchData ) ; Object [ ] userparams = data . getFirst ( ) ; AdHocPlannedStatement [ ] statements = data . getSecond ( ) ; if ( statements . length == 0 ) { return new VoltTable [ ] { } ; } for ( AdHocPlannedStatement statement ...
public class Cookies { /** * Adds all cookies by actually cloning them . */ public void addAllCloned ( List < Cookie > cookies ) { } }
for ( Cookie cookie : cookies ) { Cookie clone = new Cookie ( cookie ) ; getStore ( ) . addCookie ( clone . getHttpCookie ( ) ) ; }
public class Calendars { /** * Wraps a component in a calendar . * @ param component the component to wrap with a calendar * @ return a calendar containing the specified component */ public static Calendar wrap ( final CalendarComponent ... component ) { } }
final ComponentList < CalendarComponent > components = new ComponentList < > ( Arrays . asList ( component ) ) ; return new Calendar ( components ) ;
public class ConnectionFactory { /** * Cleans up resources and unloads any registered database drivers . This * needs to be called to ensure the driver is unregistered prior to the * finalize method being called as during shutdown the class loader used to * load the driver may be unloaded prior to the driver bein...
if ( driver != null ) { DriverLoader . cleanup ( driver ) ; driver = null ; } connectionString = null ; userName = null ; password = null ;
public class CRFClassifier { @ Override public synchronized List < Pair < String , Double > > predict ( SequenceTuple sequenceTuple ) { } }
if ( tagger == null ) { loadModel ( null ) ; } List < Pair < String , Double > > taggedSentences = new ArrayList < > ( ) ; tagger . set ( getXseqForOneSeqTuple ( sequenceTuple ) ) ; StringList labels = tagger . viterbi ( ) ; for ( int i = 0 ; i < labels . size ( ) ; i ++ ) { String label = labels . get ( i ) ; taggedSe...
public class BooleanParameterTypeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setValue ( boolean newValue ) { } }
boolean oldValue = value ; value = newValue ; boolean oldValueESet = valueESet ; valueESet = true ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , BpsimPackage . BOOLEAN_PARAMETER_TYPE__VALUE , oldValue , value , ! oldValueESet ) ) ;
public class CartItemUrl { /** * Get Resource Url for RemoveAllCartItems * @ return String Resource Url */ public static MozuUrl removeAllCartItemsUrl ( ) { } }
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/items" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ;
public class BitmapLruPool { /** * Return the byte usage per pixel of a bitmap based on its configuration . * @ param config The bitmap configuration . * @ return The byte usage per pixel . */ protected static int getBytesPerPixel ( Bitmap . Config config ) { } }
if ( config == Bitmap . Config . ARGB_8888 ) { return 4 ; } else if ( config == Bitmap . Config . RGB_565 ) { return 2 ; } else if ( config == Bitmap . Config . ARGB_4444 ) { return 2 ; } else if ( config == Bitmap . Config . ALPHA_8 ) { return 1 ; } return 1 ;
public class DeviceSelectionConfigurationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeviceSelectionConfiguration deviceSelectionConfiguration , ProtocolMarshaller protocolMarshaller ) { } }
if ( deviceSelectionConfiguration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deviceSelectionConfiguration . getFilters ( ) , FILTERS_BINDING ) ; protocolMarshaller . marshall ( deviceSelectionConfiguration . getMaxDevices ( ) , MAXDE...
public class DOMDifferenceEngine { /** * Matches nodes of two node lists and invokes compareNode on each pair . * < p > Also performs CHILD _ LOOKUP comparisons for each node that * couldn ' t be matched to one of the " other " list . < / p > */ private ComparisonState compareNodeLists ( Iterable < Node > controlSe...
ComparisonState chain = new OngoingComparisonState ( ) ; Iterable < Map . Entry < Node , Node > > matches = getNodeMatcher ( ) . match ( controlSeq , testSeq ) ; List < Node > controlList = Linqy . asList ( controlSeq ) ; List < Node > testList = Linqy . asList ( testSeq ) ; Set < Node > seen = new HashSet < Node > ( )...
public class Cell { /** * Sets the minWidth , prefWidth , maxWidth , minHeight , prefHeight , and maxHeight to the specified value . */ public Cell < C , T > size ( Value < C , T > size ) { } }
minWidth = size ; minHeight = size ; prefWidth = size ; prefHeight = size ; maxWidth = size ; maxHeight = size ; return this ;
public class IPv6Address { /** * note this string is used by hashCode */ @ Override public String toNormalizedWildcardString ( ) { } }
String result ; if ( hasNoStringCache ( ) || ( result = stringCache . normalizedWildcardString ) == null ) { if ( hasZone ( ) ) { stringCache . normalizedWildcardString = result = toNormalizedString ( IPv6StringCache . wildcardNormalizedParams ) ; } else { result = getSection ( ) . toNormalizedWildcardString ( ) ; // t...
public class Predicate { /** * Returns true if this predicate evaluates to true with respect to the * specified record . * @ param rec * the record * @ return true if the predicate evaluates to true */ public boolean isSatisfied ( Record rec ) { } }
for ( Term t : terms ) if ( ! t . isSatisfied ( rec ) ) return false ; return true ;
public class Wills { /** * Creates chain from provided Wills * @ param wills Wills to be chained * @ param < A > Type of Wills * @ return Chained Will */ public static < A > Will < List < A > > when ( Will < ? extends A > ... wills ) { } }
return when ( asList ( wills ) ) ;
public class CharOperation { /** * Answers the concatenation of the given array parts using the given separator between each part and appending the * given name at the end . < br > * < br > * For example : < br > * < ol > * < li > * < pre > * name = { ' c ' } * array = { { ' a ' } , { ' b ' } } * sepa...
int nameLength = name == null ? 0 : name . length ; if ( nameLength == 0 ) { return concatWith ( array , separator ) ; } int length = array == null ? 0 : array . length ; if ( length == 0 ) { return name ; } int size = nameLength ; int index = length ; while ( -- index >= 0 ) { if ( array [ index ] . length > 0 ) { siz...
public class LineBox { /** * Updates the line box sizes according to a new inline box . * @ param box the new box */ public void considerBox ( Inline box ) { } }
if ( ( ( Box ) box ) . isDisplayed ( ) && ! box . collapsedCompletely ( ) ) { int a = box . getBaselineOffset ( ) ; int b = box . getBelowBaseline ( ) ; if ( box instanceof InlineElement ) { VerticalAlign va = ( ( InlineElement ) box ) . getVerticalAlign ( ) ; if ( va != VerticalAlign . TOP && va != VerticalAlign . BOT...
public class EscapedFunctions2 { /** * char to chr translation * @ param buf The buffer to append into * @ param parsedArgs arguments * @ throws SQLException if something wrong happens */ public static void sqlchar ( StringBuilder buf , List < ? extends CharSequence > parsedArgs ) throws SQLException { } }
singleArgumentFunctionCall ( buf , "chr(" , "char" , parsedArgs ) ;
public class PosixHelp { /** * Throws IllegalArgumentException if perms length ! = 10 or files type doesn ' t * match with permission . * @ param path * @ param perms */ public static final void checkFileType ( Path path , String perms ) { } }
if ( perms . length ( ) != 10 ) { throw new IllegalArgumentException ( perms + " not permission. E.g. -rwxr--r--" ) ; } switch ( perms . charAt ( 0 ) ) { case '-' : if ( ! Files . isRegularFile ( path ) ) { throw new IllegalArgumentException ( "file is not regular file" ) ; } break ; case 'd' : if ( ! Files . isDirecto...
public class ConfigurationAssert { /** * TODO a lot ! */ public static String uiModeTypeToString ( @ ConfigurationUiModeType int mode ) { } }
return buildNamedValueString ( mode ) . value ( UI_MODE_TYPE_NORMAL , "normal" ) . value ( UI_MODE_TYPE_APPLIANCE , "appliance" ) . value ( UI_MODE_TYPE_CAR , "car" ) . value ( UI_MODE_TYPE_DESK , "desk" ) . value ( UI_MODE_TYPE_TELEVISION , "television" ) . value ( UI_MODE_TYPE_UNDEFINED , "undefined" ) . value ( UI_M...
public class JPAGenericDAORulesBasedImpl { /** * Méthode d ' ajout de parametres à la requete * @ param queryRequete * @ param parametersMap des parametres */ protected void addQueryParameters ( Query query , Map < String , Object > parameters ) { } }
// Si la MAP est nulle if ( parameters == null || parameters . size ( ) == 0 ) return ; // Parcours for ( Entry < String , Object > entry : parameters . entrySet ( ) ) { // Ajout query . setParameter ( entry . getKey ( ) , entry . getValue ( ) ) ; }
public class SecurityFileMonitor { /** * Registers this file monitor to start monitoring the specified files either by mbean * notification or polling rate . * @ param id of the config element * @ param paths the paths of the files to monitor . * @ param pollingRate the rate to pole he file for a change . * @...
BundleContext bundleContext = actionable . getBundleContext ( ) ; final Hashtable < String , Object > fileMonitorProps = new Hashtable < String , Object > ( ) ; fileMonitorProps . put ( FileMonitor . MONITOR_FILES , paths ) ; // Adding INTERNAL parameter MONITOR _ IDENTIFICATION _ NAME to identify this monitor . fileMo...
public class DescribeConditionalForwardersRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeConditionalForwardersRequest describeConditionalForwardersRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeConditionalForwardersRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeConditionalForwardersRequest . getDirectoryId ( ) , DIRECTORYID_BINDING ) ; protocolMarshaller . marshall ( describeConditionalForwardersReq...
public class ResourceLoader { /** * Get the loaded resources . Can be called safely after { @ link # await ( ) } . Else ensure all resources has been loaded . * @ return The loaded resources as read only . * @ throws LionEngineException If resources are not fully loaded . */ public synchronized Map < T , Resource >...
if ( ! done . get ( ) ) { throw new LionEngineException ( ERROR_NOT_FINISHED ) ; } return Collections . unmodifiableMap ( resources ) ;
public class VisOdomQuadPnP { /** * Computes image features and stores the results in info */ private void describeImage ( T left , ImageInfo < TD > info ) { } }
detector . process ( left ) ; for ( int i = 0 ; i < detector . getNumberOfSets ( ) ; i ++ ) { PointDescSet < TD > set = detector . getFeatureSet ( i ) ; FastQueue < Point2D_F64 > l = info . location [ i ] ; FastQueue < TD > d = info . description [ i ] ; for ( int j = 0 ; j < set . getNumberOfFeatures ( ) ; j ++ ) { l ...
public class MDAG { /** * Determines if a child node object is accepting . * @ param nodeObj an Object * @ return if { @ code nodeObj } is either an MDAGNode or a SimplifiedMDAGNode , * true if the node is accepting , false otherwise * throws IllegalArgumentException if { @ code nodeObj } is not an MDAGNode or ...
if ( nodeObj != null ) { Class nodeObjClass = nodeObj . getClass ( ) ; if ( nodeObjClass . equals ( MDAGNode . class ) ) return ( ( MDAGNode ) nodeObj ) . isAcceptNode ( ) ; else if ( nodeObjClass . equals ( SimpleMDAGNode . class ) ) return ( ( SimpleMDAGNode ) nodeObj ) . isAcceptNode ( ) ; } throw new IllegalArgumen...
public class InsnList { /** * Replaces an instruction of this list with another instruction . * @ param location * an instruction < i > of this list < / i > . * @ param insn * another instruction , < i > which must not belong to any * { @ link InsnList } < / i > . */ public void set ( final AbstractInsnNode l...
AbstractInsnNode next = location . next ; insn . next = next ; if ( next != null ) { next . prev = insn ; } else { last = insn ; } AbstractInsnNode prev = location . prev ; insn . prev = prev ; if ( prev != null ) { prev . next = insn ; } else { first = insn ; } if ( cache != null ) { int index = location . index ; cac...
public class SVGPlot { /** * Create a SVG text element . * @ param x first point x * @ param y first point y * @ param text Content of text element . * @ return New text element . */ public Element svgText ( double x , double y , String text ) { } }
return SVGUtil . svgText ( document , x , y , text ) ;
public class MaskFormat { /** * ( non - Javadoc ) * @ see java . text . Format # parseObject ( java . lang . String ) */ public Object parseObject ( String source ) throws ParseException { } }
ParsePosition pos = new ParsePosition ( 0 ) ; Object result = parseObject ( source , pos ) ; if ( pos . getErrorIndex ( ) >= 0 ) { throw new ParseException ( "Format.parseObject(String) failed" , pos . getErrorIndex ( ) ) ; } return result ;
public class ClassUtil { /** * 设置方法为可访问 * @ param method 方法 * @ return 方法 */ public static Method setAccessible ( Method method ) { } }
if ( null != method && false == method . isAccessible ( ) ) { method . setAccessible ( true ) ; } return method ;
public class AnnotationFunctionImportFactory { /** * Returns fully qualified function import name by function import annotation and class . * @ param functionImportAnnotation function import annotation * @ param functionImportClass function import class * @ return fully qualified function import name */ public st...
String name = getTypeName ( functionImportAnnotation , functionImportClass ) ; String namespace = getNamespace ( functionImportAnnotation , functionImportClass ) ; return namespace + "." + name ;
public class SendEmail { /** * On load properties . * @ throws IOException * Signals that an I / O exception has occurred . */ private void loadPropertiesQueitly ( ) { } }
try { properties = PropertiesFileExtensions . loadProperties ( this , EmailConstants . PROPERTIES_FILENAME ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; }
public class AbstractSimpleDAO { /** * Call this method inside the constructor to read the file contents directly . * This method is write locked ! * @ throws DAOException * in case initialization or reading failed ! */ @ MustBeLocked ( ELockType . WRITE ) protected final void initialRead ( ) throws DAOException ...
File aFile = null ; final String sFilename = m_aFilenameProvider . get ( ) ; if ( sFilename == null ) { // required for testing if ( ! isSilentMode ( ) ) if ( LOGGER . isWarnEnabled ( ) ) LOGGER . warn ( "This DAO of class " + getClass ( ) . getName ( ) + " will not be able to read from a file" ) ; // do not return - r...
public class QrCode { /** * / * Adds format information to grid . */ private static void addFormatInfo ( byte [ ] grid , int size , EccLevel ecc_level , int pattern ) { } }
int format = pattern ; int seq ; int i ; switch ( ecc_level ) { case L : format += 0x08 ; break ; case Q : format += 0x18 ; break ; case H : format += 0x10 ; break ; } seq = QR_ANNEX_C [ format ] ; for ( i = 0 ; i < 6 ; i ++ ) { grid [ ( i * size ) + 8 ] += ( seq >> i ) & 0x01 ; } for ( i = 0 ; i < 8 ; i ++ ) { grid [ ...
public class RowMaskedMatrix { /** * { @ inheritDoc } */ public void setColumn ( int column , DoubleVector values ) { } }
if ( values . length ( ) != rows ) throw new IllegalArgumentException ( "cannot set a column " + "whose dimensions are different than the matrix" ) ; if ( values instanceof SparseVector ) { SparseVector sv = ( SparseVector ) values ; for ( int nz : sv . getNonZeroIndices ( ) ) backingMatrix . set ( getRealRow ( nz ) , ...
public class CmsCalendarWidget { /** * Creates the HTML JavaScript and stylesheet includes required by the calendar for the head of the page . < p > * @ param locale the locale to use for the calendar * @ param style the name of the used calendar style , e . g . " system " , " blue " * @ return the necessary HTML...
StringBuffer result = new StringBuffer ( 512 ) ; String calendarPath = CmsWorkplace . getSkinUri ( ) + "components/js_calendar/" ; if ( CmsStringUtil . isEmpty ( style ) ) { style = "system" ; } result . append ( "<link rel=\"stylesheet\" type=\"text/css\" href=\"" ) ; result . append ( calendarPath ) ; result . append...
public class QName { /** * # / string _ id _ map # */ @ Override protected String getInstanceIdName ( int id ) { } }
switch ( id - super . getMaxInstanceId ( ) ) { case Id_localName : return "localName" ; case Id_uri : return "uri" ; } return super . getInstanceIdName ( id ) ;
public class CustomTileSkin { /** * * * * * * Initialization * * * * * */ @ Override protected void initGraphics ( ) { } }
super . initGraphics ( ) ; graphicListener = ( o , ov , nv ) -> { if ( nv != null ) { graphicContainer . getChildren ( ) . setAll ( tile . getGraphic ( ) ) ; } } ; titleText = new Text ( ) ; titleText . setFill ( tile . getTitleColor ( ) ) ; Helper . enableNode ( titleText , ! tile . getTitle ( ) . isEmpty ( ) ) ; text...
public class SqlLoaderImpl { /** * ファイル読み込み < br > * 以下2種類に対応 * < ol > * < li > キャッシュ時のディレクトリからFileの読み込む場合 < / li > * < li > キャッシュなしで クラスパス内のリソース ( jarファイル内も含む ) を読み込む場合 < / li > * < / ol > * @ param reader リーダ * @ return SQL文を読み込み 文末のSQLコマンド分割文字 ( ; または / ) を除いた文字列を返す * @ throws IOException */ pri...
StringBuilder sqlBuilder = new StringBuilder ( ) ; try { for ( String line : reader . lines ( ) . toArray ( String [ ] :: new ) ) { sqlBuilder . append ( line ) . append ( System . lineSeparator ( ) ) ; } } finally { if ( reader != null ) { reader . close ( ) ; } } return sqlBuilder . toString ( ) ;
public class MapConverter { /** * sub . * @ param data a { @ link java . util . Map } object . * @ param prefix a { @ link java . lang . String } object . * @ return a { @ link java . util . Map } object . */ public Map < String , Object > sub ( Map < String , Object > data , String prefix ) { } }
return sub ( data , prefix , null , true ) ;
public class SibRaListener { /** * Stop the session if it has been requested . It ' s only valid to do this * if * you ' re a thread * which already has the processor AsynchConsumerBusy lock * @ throws SIException */ protected void stopIfRequired ( ) throws SIException { } }
final String methodName = "stopIfRequired" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { this } ) ; } if ( TRACE . isDebugEnabled ( ) ) { SibTr . debug ( TRACE , methodName , "sibPacingSessionStarted: " + sibPacingSessionSt...
public class CommitsApi { /** * Get a Pager of repository commits in a project . * < pre > < code > GitLab Endpoint : GET / projects / : id / repository / commits < / code > < / pre > * @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance * @ param ref the n...
return getCommits ( projectIdOrPath , ref , since , until , null , itemsPerPage ) ;
public class BeanUtils { /** * 将一个Bean的数据装换到另外一个 ( 需实现setter和getter ) * @ param object 一个Bean * @ param clazz 另外一个Bean类 * @ param another 另一个Bean对象 * @ param < T > 另外Bean类型 * @ return { @ link T } * @ throws IllegalAccessException 异常 * @ throws InvocationTargetException 异常 * @ since 1.1.1 */ private sta...
Method [ ] methods = object . getClass ( ) . getMethods ( ) ; Map < String , Method > clazzMethods = ReflectUtils . getMethodMap ( clazz , "set" ) ; for ( Method method : methods ) { String name = method . getName ( ) ; if ( name . startsWith ( "get" ) && ! "getClass" . equals ( name ) ) { String clazzMethod = "s" + na...
public class Waiter { /** * Waits for a view to be shown . * @ param viewClass the { @ code View } class to wait for * @ param index the index of the view that is expected to be shown . * @ param timeout the amount of time in milliseconds to wait * @ param scroll { @ code true } if scrolling should be performed...
Set < T > uniqueViews = new HashSet < T > ( ) ; final long endTime = SystemClock . uptimeMillis ( ) + timeout ; boolean foundMatchingView ; while ( SystemClock . uptimeMillis ( ) < endTime ) { sleeper . sleep ( ) ; foundMatchingView = searcher . searchFor ( uniqueViews , viewClass , index ) ; if ( foundMatchingView ) r...
public class NumberUtilities { /** * If the long integer string is null or empty , it returns the defaultLong otherwise it returns the long integer value ( see toLong ) * @ param longStr the long integer to convert * @ param defaultLong the default value if the longStr is null or the empty string * @ return the l...
return StringUtils . isNoneEmpty ( longStr ) ? toLong ( longStr ) : defaultLong ;
public class CPDisplayLayoutPersistenceImpl { /** * Returns the cp display layout where uuid = & # 63 ; and groupId = & # 63 ; or throws a { @ link NoSuchCPDisplayLayoutException } if it could not be found . * @ param uuid the uuid * @ param groupId the group ID * @ return the matching cp display layout * @ thr...
CPDisplayLayout cpDisplayLayout = fetchByUUID_G ( uuid , groupId ) ; if ( cpDisplayLayout == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( ", groupId=" ) ; msg . append ( groupId ) ; msg . append ( "}"...
public class TaskExecutionListEntryMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TaskExecutionListEntry taskExecutionListEntry , ProtocolMarshaller protocolMarshaller ) { } }
if ( taskExecutionListEntry == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( taskExecutionListEntry . getTaskExecutionArn ( ) , TASKEXECUTIONARN_BINDING ) ; protocolMarshaller . marshall ( taskExecutionListEntry . getStatus ( ) , STATUS_BI...
public class EnhancedDebugger { /** * Adds the sent stanza detail to the messages table . * @ param dateFormatter the SimpleDateFormat to use to format Dates * @ param packet the sent stanza to add to the table */ private void addSentPacketToTable ( final SimpleDateFormat dateFormatter , final TopLevelStreamElement...
SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { String messageType ; Jid to ; String stanzaId ; if ( packet instanceof Stanza ) { Stanza stanza = ( Stanza ) packet ; to = stanza . getTo ( ) ; stanzaId = stanza . getStanzaId ( ) ; } else { to = null ; stanzaId = "(Nonza)" ; } String ty...
public class SuffixArrays { /** * Create a suffix array and an LCP array for a given generic array and a * custom suffix array building strategy , using the given T object * comparator . */ public static < T > SuffixData createWithLCP ( T [ ] input , ISuffixArrayBuilder builder , Comparator < ? super T > comparator...
final GenericArrayAdapter adapter = new GenericArrayAdapter ( builder , comparator ) ; final int [ ] sa = adapter . buildSuffixArray ( input ) ; final int [ ] lcp = computeLCP ( adapter . input , 0 , input . length , sa ) ; return new SuffixData ( sa , lcp ) ;
public class FnMutableDateTime { /** * It converts a { @ link Calendar } into a { @ link MutableDateTime } in the given { @ link DateTimeZone } * @ param dateTimeZone the the time zone ( { @ link DateTimeZone } ) to be used * @ return the { @ link MutableDateTime } created from the input and arguments */ public sta...
return new CalendarToMutableDateTime < T > ( dateTimeZone ) ;
public class IpPermission { /** * [ VPC only ] The IPv6 ranges . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setIpv6Ranges ( java . util . Collection ) } or { @ link # withIpv6Ranges ( java . util . Collection ) } if you want to * override the existing ...
if ( this . ipv6Ranges == null ) { setIpv6Ranges ( new com . amazonaws . internal . SdkInternalList < Ipv6Range > ( ipv6Ranges . length ) ) ; } for ( Ipv6Range ele : ipv6Ranges ) { this . ipv6Ranges . add ( ele ) ; } return this ;
public class DefaultProperty { /** * Reads the value of this Property from the given object . It uses * reflection and looks for a method starting with " is " or " get " followed by * the capitalized Property name . * @ param object */ @ Override public void readFromObject ( Object object ) { } }
try { Method method = BeanUtils . getReadMethod ( object . getClass ( ) , getName ( ) ) ; if ( method != null ) { Object value = method . invoke ( object ) ; initializeValue ( value ) ; // avoid updating parent or firing property change if ( value != null ) { for ( Property subProperty : subProperties ) { subProperty ....