signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JsonPath { /** * Applies this JsonPath to the provided json file * @ param jsonFile file to read from * @ param < T > expected return type * @ return list of objects matched by the given path * @ throws IOException */ @ SuppressWarnings ( { } }
"unchecked" } ) public < T > T read ( File jsonFile ) throws IOException { return read ( jsonFile , Configuration . defaultConfiguration ( ) ) ;
public class HadoopOutputFormatBase { @ Override public void configure ( Configuration parameters ) { } }
// enforce sequential configure ( ) calls synchronized ( CONFIGURE_MUTEX ) { if ( this . mapreduceOutputFormat instanceof Configurable ) { ( ( Configurable ) this . mapreduceOutputFormat ) . setConf ( this . configuration ) ; } }
public class FileUtilities { /** * This method checks for the requirement for an update . * If a the target file exists and the modification time is greater than the * modification time of the source file , we do not need to analyze something . * @ param sourceFile * is the source file where it is intended to b...
if ( targetFile . exists ( ) ) { if ( targetFile . lastModified ( ) > sourceFile . lastModified ( ) ) { return false ; } } return true ;
public class ShiroRule { /** * { @ inheritDoc } */ @ Override public Statement apply ( final Statement base , FrameworkMethod method , Object target ) { } }
tearDownShiro ( ) ; // clean up whatever other tests might have left behind final SubjectAwareDescriptor desc = new SubjectAwareDescriptor ( ) ; SubjectAware subjectAware = SubjectAwares . find ( target ) ; if ( subjectAware != null ) { desc . merge ( subjectAware ) ; } subjectAware = SubjectAwares . find ( method . ge...
public class HtmlTree { /** * Generates a UL tag with the style class attribute and some content . * @ param styleClass style for the tag * @ param body content for the tag * @ return an HtmlTree object for the UL tag */ public static HtmlTree UL ( HtmlStyle styleClass , Content body ) { } }
HtmlTree htmltree = new HtmlTree ( HtmlTag . UL , nullCheck ( body ) ) ; htmltree . addStyle ( nullCheck ( styleClass ) ) ; return htmltree ;
public class RatePlanCreator { /** * Add the requested post parameters to the Request . * @ param request Request to add post params to */ private void addPostParams ( final Request request ) { } }
if ( uniqueName != null ) { request . addPostParam ( "UniqueName" , uniqueName ) ; } if ( friendlyName != null ) { request . addPostParam ( "FriendlyName" , friendlyName ) ; } if ( dataEnabled != null ) { request . addPostParam ( "DataEnabled" , dataEnabled . toString ( ) ) ; } if ( dataLimit != null ) { request . addP...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getEPM ( ) { } }
if ( epmEClass == null ) { epmEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 256 ) ; } return epmEClass ;
public class QueryRecord { /** * Add this table link to this query . * Creates a new tablelink and adds it to the link list . */ public void addRelationship ( int linkType , Record recLeft , Record recRight , int ifldLeft1 , int ifldRight1 , int ifldLeft2 , int ifldRight2 , int ifldLeft3 , int ifldRight3 ) { } }
String fldLeft1 = recLeft . getField ( ifldLeft1 ) . getFieldName ( ) ; String fldRight1 = recRight . getField ( ifldRight1 ) . getFieldName ( ) ; String fldLeft2 = ifldLeft2 != - 1 ? recLeft . getField ( ifldLeft2 ) . getFieldName ( ) : null ; String fldRight2 = ifldRight2 != - 1 ? recRight . getField ( ifldRight2 ) ....
public class HttpCarbonMessage { /** * Sends a push response message back to the client . * @ param httpCarbonMessage the push response message * @ param pushPromise the push promise associated with the push response message * @ return HttpResponseFuture which gives the status of the operation * @ throws Server...
httpOutboundRespFuture . notifyHttpListener ( httpCarbonMessage , pushPromise ) ; return httpOutboundRespStatusFuture ;
public class AbstractManagedType { /** * On check list attribute . * @ param < E > * the element type * @ param pluralAttribute * the plural attribute * @ param paramClass * the param class * @ return true , if successful */ private < E > boolean onCheckListAttribute ( PluralAttribute < ? super X , ? , ? ...
if ( pluralAttribute != null ) { if ( isListAttribute ( pluralAttribute ) && isBindable ( pluralAttribute , paramClass ) ) { return true ; } } return false ;
public class Fingerprint { /** * Returns true if the serialized fingerprint matches the fingerprint in the content part . * @ param fp a parsed fingerprint object * @ return true if the given fingerprint matches the current fingerprint ' s content */ public boolean matchContent ( Fingerprint fp ) { } }
for ( Tag tag : CONTENT_TAGS ) { if ( ! getTag ( tag ) . equals ( fp . getTag ( tag ) ) ) { return false ; } } return true ;
public class CoherenceCacheTarget { /** * { @ inheritDoc } */ public void beginImport ( ) { } }
if ( m_cache == null ) { m_cache = CacheFactory . getCache ( m_cacheName ) ; } m_batch = new HashMap ( m_batchSize ) ;
public class ServiceInfo { /** * Removes the given Attributes from the Attributes of this < code > ServiceInfo < / code > , returning a new instance of * ServiceInfo containing the difference of the Attributes ; the current instance of ServiceInfo is left unaltered . * The given Attributes may only contain the tags...
Attributes thisAttr = getAttributes ( ) ; Attributes mergedAttrs = null ; if ( thisAttr != null ) mergedAttrs = thisAttr . complement ( thatAttrs ) ; return clone ( getScopes ( ) , mergedAttrs ) ;
public class Solo { /** * Zooms in or out if startPoint1 and startPoint2 are larger or smaller then endPoint1 and endPoint2 . Requires API level > = 14. * @ param startPoint1 First " finger " down on the screen * @ param startPoint2 Second " finger " down on the screen * @ param endPoint1 Corresponding ending poi...
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "pinchToZoom(" + startPoint1 + ", " + startPoint2 + ", " + endPoint1 + ", " + endPoint2 + ")" ) ; } if ( android . os . Build . VERSION . SDK_INT < 14 ) { throw new RuntimeException ( "pinchToZoom() requires API level >= 14" ) ; } zoomer . generate...
public class ChannelAccess { /** * Handles a processed < tt > Buffer < / tt > . This method is invoked by the * asynchronous IO worker threads upon completion of the IO request with the * provided buffer and / or an exception that occurred while processing the request * for that buffer . * @ param buffer The bu...
if ( ex != null && this . exception == null ) { this . exception = ex ; } returnBuffer ( buffer ) ;
public class OperandStackStateGenerators { /** * Generates instructions to load the entire operand stack . Equivalent to calling * { @ code loadOperandStack ( markerType , storageVars , frame , 0 , 0 , frame . getStackSize ( ) ) } . * @ param markerType debug marker type * @ param storageVars variables to load op...
return loadOperandStack ( markerType , storageVars , frame , 0 , 0 , frame . getStackSize ( ) ) ;
public class ICalProperty { /** * Sets the property ' s parameters * @ param parameters the parameters ( cannot be null ) */ public void setParameters ( ICalParameters parameters ) { } }
if ( parameters == null ) { throw new NullPointerException ( Messages . INSTANCE . getExceptionMessage ( 16 ) ) ; } this . parameters = parameters ;
public class IOUtils { /** * Closing quietly any closeable object . Any exception will be caught ( but global error listeners will be notified ) * @ param closeable object to be closed quetly * @ return the same object provided in args * @ since 1.0 */ @ Weight ( Weight . Unit . LIGHT ) @ Nullable public static C...
if ( closeable != null ) { try { closeable . close ( ) ; } catch ( Exception ex ) { MetaErrorListeners . fireError ( "Exception in closeQuietly" , ex ) ; } } return closeable ;
public class AbstractHibernateCriteriaBuilder { /** * Creates a Criterion that contrains a collection property by size * @ param propertyName The property name * @ param size The size to constrain by * @ return A Criterion instance */ public org . grails . datastore . mapping . query . api . Criteria sizeEq ( Str...
if ( ! validateSimpleExpression ( ) ) { throwRuntimeException ( new IllegalArgumentException ( "Call to [sizeEq] with propertyName [" + propertyName + "] and size [" + size + "] not allowed here." ) ) ; } propertyName = calculatePropertyName ( propertyName ) ; addToCriteria ( Restrictions . sizeEq ( propertyName , size...
public class Ansi { /** * Prints formatted and colorized { @ code format } to { @ link System # out } * @ param format A format string whose output to be colorized * @ param args Arguments referenced by the format specifiers in the format */ public void outFormat ( String format , Object ... args ) { } }
format ( System . out , format , args ) ;
public class AbstractCaptcha { /** * 验证码写出到文件 * @ param file 文件 * @ throws IORuntimeException IO异常 */ public void write ( File file ) throws IORuntimeException { } }
try ( OutputStream out = FileUtil . getOutputStream ( file ) ) { this . write ( out ) ; } catch ( IOException e ) { throw new IORuntimeException ( e ) ; }
public class appfwfieldtype { /** * Use this API to update appfwfieldtype resources . */ public static base_responses update ( nitro_service client , appfwfieldtype resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { appfwfieldtype updateresources [ ] = new appfwfieldtype [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new appfwfieldtype ( ) ; updateresources [ i ] . name = resources [ i ] . name ...
public class DirectoryReader { /** * Recursively builds a tree of the specified rootFolder * TODO : ChrisS : Note that the URL stuff is completely wrong and should NOT be here - that is view , this is model */ public DirectoryEntries listEntries ( File rootFolder , String relativePath ) { } }
DirectoryEntries entries = new DirectoryEntries ( ) ; if ( rootFolder == null ) { return entries ; } File [ ] files = rootFolder . listFiles ( VISIBLE_NON_SERIALIZED_FILES ) ; if ( files == null ) { return entries ; } Arrays . sort ( files , new FileComparator ( ) ) ; for ( File file : files ) { String name = file . ge...
public class JvmAnnotationValueImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case TypesPackage . JVM_ANNOTATION_VALUE__OPERATION : setOperation ( ( JvmOperation ) null ) ; return ; } super . eUnset ( featureID ) ;
public class StreamingJobsInner { /** * Lists all of the streaming jobs in the specified resource group . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ throws IllegalArgumentException thrown i...
return listByResourceGroupWithServiceResponseAsync ( resourceGroupName ) . map ( new Func1 < ServiceResponse < Page < StreamingJobInner > > , Page < StreamingJobInner > > ( ) { @ Override public Page < StreamingJobInner > call ( ServiceResponse < Page < StreamingJobInner > > response ) { return response . body ( ) ; } ...
public class Emailer { /** * Send an email to the specified email list */ public void sendEmail ( final List < String > emailList , final String subject , final String body ) { } }
if ( emailList != null && ! emailList . isEmpty ( ) ) { final EmailMessage message = super . createEmailMessage ( subject , "text/html" , emailList ) ; message . setBody ( body ) ; sendEmail ( message , true , "email message " + body ) ; }
public class aaakcdaccount { /** * Use this API to delete aaakcdaccount resources of given names . */ public static base_responses delete ( nitro_service client , String kcdaccount [ ] ) throws Exception { } }
base_responses result = null ; if ( kcdaccount != null && kcdaccount . length > 0 ) { aaakcdaccount deleteresources [ ] = new aaakcdaccount [ kcdaccount . length ] ; for ( int i = 0 ; i < kcdaccount . length ; i ++ ) { deleteresources [ i ] = new aaakcdaccount ( ) ; deleteresources [ i ] . kcdaccount = kcdaccount [ i ]...
public class SQLExpressions { /** * As an aggregate function , DENSE _ RANK calculates the dense rank of a hypothetical row identified * by the arguments of the function with respect to a given sort specification . The arguments of * the function must all evaluate to constant expressions within each aggregate group...
return new WithinGroup < Long > ( Long . class , SQLOps . DENSERANK2 , args ) ;
public class Gauge { /** * Defines if the text of the sections should be drawn inside * the sections . This is currently only used in the SimpleSkin . * @ param VISIBLE */ public void setSectionTextVisible ( final boolean VISIBLE ) { } }
if ( null == sectionTextVisible ) { _sectionTextVisible = VISIBLE ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { sectionTextVisible . set ( VISIBLE ) ; }
public class CSVUtil { /** * Load the data from CSV . * @ param csvReader * @ param offset * @ param count * @ param filter * @ param columnTypeMap * @ return */ @ SuppressWarnings ( "rawtypes" ) public static < E extends Exception > DataSet loadCSV ( final Reader csvReader , long offset , long count , fina...
N . checkArgument ( offset >= 0 && count >= 0 , "'offset'=%s and 'count'=%s can't be negative" , offset , count ) ; if ( N . isNullOrEmpty ( columnTypeMap ) ) { throw new IllegalArgumentException ( "columnTypeMap can't be null or empty" ) ; } final BufferedReader br = csvReader instanceof BufferedReader ? ( BufferedRea...
public class PersistentExecutorImpl { /** * Invoked by a controller to notify a persistent executor that a task has been assigned to it . * @ param taskId unique identifier for the task . * @ param nextExecTime next execution time for the task . * @ param binaryFlags combination of bits for various binary values ...
final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; Boolean previous = inMemoryTaskIds . put ( taskId , Boolean . TRUE ) ; if ( previous == null ) { InvokerTask task = new InvokerTask ( this , taskId , nextExecTime , binaryFlags , transactionTimeout ) ; long delay = nextExecTime - new Date ( ) . getTime ( ...
public class AbstractModel { /** * { @ inheritDoc } */ @ Override protected void prepareView ( ) { } }
try { if ( view ( ) != null ) { view ( ) . prepare ( ) ; } } catch ( final CoreException ce ) { throw new CoreRuntimeException ( ce ) ; }
public class MemcachedConnection { /** * Sets the supported features from a HELLO command . * Note that the actual enabled features will be the ones supported by the mock * and also supported by the client . Currently the only supported feature is * MUTATION _ SEQNO . * @ param input The features requested by t...
if ( input . length != supportedFeatures . length ) { throw new IllegalArgumentException ( "Bad features length!" ) ; } // Scan through all other features and disable them unless they are supported for ( int i = 0 ; i < input . length ; i ++ ) { BinaryHelloCommand . Feature feature = BinaryHelloCommand . Feature . valu...
public class Equivalencer { /** * Finds all parameters equivalent to the < tt > sourceParameter < / tt > . * Note : The first time any method in { @ link Equivalencer } is called the * equivalencing engine is instantiated , but only once . The equivalencing * engine loads the BEL equivalence files associated with...
if ( sourceNamespace == null ) { throw new InvalidArgument ( "sourceNamespace" , sourceNamespace ) ; } if ( noLength ( sourceValue ) ) { throw new InvalidArgument ( "sourceValue" , sourceValue ) ; } loadEquivalencingEngine ( ) ; final Parameter sp = new Parameter ( sourceNamespace , sourceValue ) ; try { final List < P...
public class SensitiveFilter { /** * 是否有敏感字符 * @ param source * @ return */ @ SuppressWarnings ( "rawtypes" ) public boolean hasSensitiveWord ( String source ) { } }
char [ ] chars = source . toCharArray ( ) ; Map nowMap = pool ; for ( int i = 0 ; i < chars . length ; i ++ ) { char ch = Character . toUpperCase ( chars [ i ] ) ; nowMap = ( Map ) nowMap . get ( ch ) ; if ( nowMap != null ) { if ( "1" . equals ( nowMap . get ( "isEnd" ) ) ) { return true ; } } else { nowMap = pool ; n...
public class DubiousSetOfCollections { /** * implement the visitor to set up the opcode stack , and make sure that collection , set and map classes could be loaded . * @ param clsContext * the context object of the currently parsed class */ @ Override public void visitClassContext ( ClassContext clsContext ) { } }
try { if ( ( collectionCls == null ) || ( setCls == null ) || ( mapCls == null ) ) { return ; } stack = new OpcodeStack ( ) ; super . visitClassContext ( clsContext ) ; } finally { stack = null ; }
public class AbstractDocumentationMojo { /** * Convert a a package name for therelative file . * @ param packageName the name . * @ return the file . */ protected static File toPackageFolder ( String packageName ) { } }
File file = null ; for ( final String element : packageName . split ( "[.]" ) ) { // $ NON - NLS - 1 $ if ( file == null ) { file = new File ( element ) ; } else { file = new File ( file , element ) ; } } return file ;
public class AppUrlList { /** * Gets the appUrls value for this AppUrlList . * @ return appUrls * List of URLs . On SET operation , empty list indicates to clear * the list . * < span class = " constraint CollectionSize " > The maximum * size of this collection is 10 . < / span > */ public com . google . api . ...
return appUrls ;
public class druidGLexer { /** * $ ANTLR start " INSERT " */ public final void mINSERT ( ) throws RecognitionException { } }
try { int _type = INSERT ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 581:11 : ( ( ' INSERT ' | ' insert ' ) ) // druidG . g : 581:12 : ( ' INSERT ' | ' insert ' ) { // druidG . g : 581:12 : ( ' INSERT ' | ' insert ' ) int alt1 = 2 ; int LA1_0 = input . LA ( 1 ) ; if ( ( LA1_0 == 'I' ) ) { alt1 = 1 ; } else...
public class GetFindingsStatisticsRequest { /** * Types of finding statistics to retrieve . * @ param findingStatisticTypes * Types of finding statistics to retrieve . * @ see FindingStatisticType */ public void setFindingStatisticTypes ( java . util . Collection < String > findingStatisticTypes ) { } }
if ( findingStatisticTypes == null ) { this . findingStatisticTypes = null ; return ; } this . findingStatisticTypes = new java . util . ArrayList < String > ( findingStatisticTypes ) ;
public class CancelCapacityReservationRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < CancelCapacityReservationRequest > getDryRunRequest ( ) { } }
Request < CancelCapacityReservationRequest > request = new CancelCapacityReservationRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class AbstractObjectFactory { /** * Resolves the matching constructor for the specified Class type who ' s actual public constructor argument types * are assignment compatible with the expected parameter types . * @ param objectType the Class from which the constructor is resolved . * @ param parameterType...
for ( Constructor constructor : objectType . getConstructors ( ) ) { Class [ ] constructorParameterTypes = constructor . getParameterTypes ( ) ; if ( parameterTypes . length == constructorParameterTypes . length ) { boolean match = true ; for ( int index = 0 ; index < constructorParameterTypes . length ; index ++ ) { m...
public class XMLUtil { /** * Replies the color that corresponds to the specified attribute ' s path . * < p > The path is an ordered list of tag ' s names and ended by the name of * the attribute . * Be careful about the fact that the names are case sensitives . * @ param document is the XML document to explore...
assert document != null : AssertMessages . notNullParameter ( 0 ) ; return getAttributeColorWithDefault ( document , true , defaultValue , path ) ;
public class JarDiff { /** * Load all the classes from the specified URL and store information * about them in the specified map . * This currently only works for jar files , < b > not < / b > directories * which contain classes in subdirectories or in the current directory . * @ param infoMap the map to store ...
try { JarFile jar = new JarFile ( file ) ; Enumeration e = jar . entries ( ) ; while ( e . hasMoreElements ( ) ) { JarEntry entry = ( JarEntry ) e . nextElement ( ) ; String name = entry . getName ( ) ; if ( ! entry . isDirectory ( ) && name . endsWith ( ".class" ) ) { ClassReader reader = new ClassReader ( jar . getIn...
public class HelloSignClient { /** * Retrieves a Signature Request with the given ID . * @ param id String signature ID * @ return SignatureRequest * @ throws HelloSignException thrown if there ' s a problem processing the * HTTP request or the JSON response . */ public SignatureRequest getSignatureRequest ( St...
String url = BASE_URI + SIGNATURE_REQUEST_URI + "/" + id ; return new SignatureRequest ( httpClient . withAuth ( auth ) . get ( url ) . asJson ( ) ) ;
public class GoogleDriveUtils { /** * Downloads file from Google Drive * @ param drive drive client * @ param fileId file id for file to be downloaded * @ return file content * @ throws IOException an IOException */ public static DownloadResponse downloadFile ( Drive drive , String fileId ) throws IOException {...
Get request = drive . files ( ) . get ( fileId ) . setAlt ( "media" ) ; String contentType = request . executeUsingHead ( ) . getContentType ( ) ; if ( StringUtils . isNotBlank ( contentType ) ) { try ( InputStream inputStream = request . executeAsInputStream ( ) ) { return new DownloadResponse ( contentType , IOUtils ...
public class UITabPanel { /** * Just call component . setId ( component . getId ( ) ) to reset all client ids and ensure they will be calculated for the current row , but do not waste * time dealing with row state code . * @ param parent * @ param iterateFacets * @ param restoreChildFacets */ private void resto...
if ( iterateFacets && parent . getFacetCount ( ) > 0 ) { Iterator < UIComponent > childIterator = parent . getFacets ( ) . values ( ) . iterator ( ) ; while ( childIterator . hasNext ( ) ) { UIComponent component = childIterator . next ( ) ; // reset the client id ( see spec 3.1.6) component . setId ( component . getId...
public class JsonRpcBasicServer { /** * Determines whether or not the given { @ link JsonNode } matches * the given type . This method is limited to a few java types * only and shouldn ' t be used to determine with great accuracy * whether or not the types match . * @ param node the { @ link JsonNode } * @ pa...
if ( node . isNull ( ) ) { return true ; } if ( node . isTextual ( ) ) { return String . class . isAssignableFrom ( type ) ; } if ( node . isNumber ( ) ) { return isNumericAssignable ( type ) ; } if ( node . isArray ( ) && type . isArray ( ) ) { return node . size ( ) > 0 && isMatchingType ( node . get ( 0 ) , type . g...
public class TemplateTypeMap { /** * Returns a new TemplateTypeMap with the given template types removed . Keys will only be removed * if they are unmapped . */ TemplateTypeMap remove ( Set < TemplateType > toRemove ) { } }
ImmutableList . Builder < TemplateType > keys = ImmutableList . builder ( ) ; keys . addAll ( templateKeys . subList ( 0 , templateValues . size ( ) ) ) ; for ( int i = templateValues . size ( ) ; i < templateKeys . size ( ) ; i ++ ) { TemplateType key = templateKeys . get ( i ) ; if ( ! toRemove . contains ( key ) ) {...
public class GroovyPagesUriSupport { /** * Obtains the URI to a template using the controller name and template name * @ param controllerName The controller name * @ param templateName The template name * @ return The template URI */ public String getTemplateURI ( String controllerName , String templateName ) { }...
return getTemplateURI ( controllerName , templateName , true ) ;
public class ExtensionSetting { /** * Gets the extensions value for this ExtensionSetting . * @ return extensions * The list of feed items to add or modify . */ public com . google . api . ads . adwords . axis . v201809 . cm . ExtensionFeedItem [ ] getExtensions ( ) { } }
return extensions ;
public class ConsumerSessionProxy { /** * Common start code . This is called from the start ( ) method , and also the stop ( ) method . * In the latter case , this is done to avoid blocking the start ( ) method if it is invoked * concurrently with the stop ( ) method . * Note : this method must only be called whi...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "startInternal" ) ; state = StateEnum . STARTED ; // If there is a proxy queue registered , defer start // processing to it . Otherwise send the start // flow to our peer ourselves . if ( proxyQueue != null ) proxyQue...
public class OperationAnalyzer { /** * This method analyzes the fields , calculates the info and returns true if operation is undefined . * @ param destination destination field * @ param source source field * @ return returns true if an operation between fields exists * @ see InfoOperation */ public boolean is...
info = null ; for ( IOperationAnalyzer analyzer : analyzers ) if ( analyzer . verifyConditions ( destination , source ) ) info = analyzer . getInfoOperation ( destination , source ) ; // if the operation has not been identified if ( isNull ( info ) ) info = undefinedOperation ( ) ; boolean conversionMethodExists = conv...
public class MetadataStore { /** * Deletes a Segment and any associated information from the Metadata Store . * Notes : * - This method removes both the Segment and its Metadata Store entries . * - { @ link # clearSegmentInfo } only removes Metadata Store entries . * This operation is made of multiple steps and...
long traceId = LoggerHelpers . traceEnterWithContext ( log , traceObjectId , "deleteSegment" , segmentName ) ; TimeoutTimer timer = new TimeoutTimer ( timeout ) ; // Find the Segment ' s Id . long segmentId = this . connector . containerMetadata . getStreamSegmentId ( segmentName , true ) ; CompletableFuture < Void > d...
public class DolphinServlet { /** * TODO : should this method be final ? */ @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { } }
preProcessRequest ( request ) ; DefaultServerDolphin serverDolphin = resolveServerDolphin ( request ) ; String input = readInput ( request ) ; if ( LOG . isLoggable ( Level . FINEST ) ) { LOG . finest ( "received json: " + input ) ; } List < Command > commands = decodeInput ( serverDolphin . getServerConnector ( ) . ge...
public class HttpMessageConverter { /** * Message headers consist of standard HTTP message headers and custom headers . * This method assumes that all header entries that were not initially mapped * by header mapper implementations are custom headers . * @ param httpHeaders all message headers in their pre nature...
Map < String , String > customHeaders = new HashMap < > ( ) ; for ( Map . Entry < String , List < String > > header : httpHeaders . entrySet ( ) ) { if ( ! mappedHeaders . containsKey ( header . getKey ( ) ) ) { customHeaders . put ( header . getKey ( ) , StringUtils . collectionToCommaDelimitedString ( header . getVal...
public class RestClient { /** * Find assets based on the < code > searchString < / code > . * NOTE : TODO at the moment this only works when called against an unauthenticated Client * due to a problem with how the stores are defined ( the company values are defined * incorrectly ) . * @ param searchString The s...
String encodedSearchString = URLEncoder . encode ( searchString , "UTF-8" ) ; StringBuffer url = new StringBuffer ( "/assets?q=" + encodedSearchString ) ; if ( types != null && ! types . isEmpty ( ) ) { Collection < String > typeValues = new HashSet < String > ( ) ; for ( ResourceType type : types ) { typeValues . add ...
public class V2Wallet { /** * New transaction handler , incoming funds only based on BIP32 derived key * @ param tx - incoming funds transaction * @ param key - related V2Key * @ throws Exception */ public void newTransactionHandler ( PersistedTransaction tx , PersistedV2Key key ) throws Exception { } }
listenForUpdates ( tx ) ; tx . keyId = key . getId ( ) ; tx . walletId = this . descriptor . getKey ( ) ; tx . account = key . account ; System . out . println ( "Incoming transaction captured in API service: " + tx . toString ( ) ) ; transactionDAO . create ( tx ) ; WalletChange change = new WalletChange ( tx . value ...
public class Expression { /** * Creates a Collate expression with the given Collation specification . Commonly * the collate expression is used in the Order BY clause or the string comparison * expression ( e . g . equalTo or lessThan ) to specify how the two strings are compared . * @ param collation The collati...
if ( collation == null ) { throw new IllegalArgumentException ( "collation cannot be null." ) ; } return new CollationExpression ( this , collation ) ;
public class ExecutionItemFactory { /** * Create a workflow execution item for a plugin node step . */ public static StepExecutionItem createPluginNodeStepItem ( final String type , final Map configuration , final boolean keepgoingOnSuccess , final StepExecutionItem handler , final String label , final List < PluginCon...
return new PluginNodeStepExecutionItemImpl ( type , configuration , keepgoingOnSuccess , handler , label , filterConfigurations ) ;
public class array { /** * Randomize the { @ code array } using the given { @ link Random } object . The used * shuffling algorithm is from D . Knuth TAOCP , Seminumerical Algorithms , * Third edition , page 142 , Algorithm S ( Selection sampling technique ) . * @ param array the array to shuffle * @ param rand...
for ( int j = array . length - 1 ; j > 0 ; -- j ) { swap ( array , j , random . nextInt ( j + 1 ) ) ; } return array ;
public class AnnotationExtensions { /** * Checks if is annotation present through making a lookup if the given annotation class is * present in the given class or in one of the super classes . * @ param componentClass * the component class * @ param annotationClass * the annotation class * @ return true , i...
if ( componentClass . isAnnotationPresent ( annotationClass ) ) { return true ; } Class < ? > superClass = componentClass . getSuperclass ( ) ; while ( superClass != null ) { if ( superClass . isAnnotationPresent ( annotationClass ) ) { return true ; } superClass = superClass . getSuperclass ( ) ; } return false ;
public class ServerCommandClient { /** * Write a command to the server process . * @ param command the command to write * @ param notStartedRC the return code if the server could not be reached * @ param errorRC the return code if an error occurred while communicating * with the server * @ return { @ link Ret...
SocketChannel channel = null ; try { ServerCommandID commandID = createServerCommand ( command ) ; if ( commandID . getPort ( ) > 0 ) { channel = SelectorProvider . provider ( ) . openSocketChannel ( ) ; channel . connect ( new InetSocketAddress ( InetAddress . getByName ( null ) , commandID . getPort ( ) ) ) ; // Writ...
public class GcloudArgs { /** * Returns { @ code [ - - name , path . toString ( ) ] } or { @ code [ ] } if path is null , or its representation * is empty . */ public static List < String > get ( String name , @ Nullable Path path ) { } }
return Args . path ( name , path ) ;
public class CPDAvailabilityEstimatePersistenceImpl { /** * Clears the cache for all cpd availability estimates . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( ) { } }
entityCache . clearCache ( CPDAvailabilityEstimateImpl . class ) ; finderCache . clearCache ( FINDER_CLASS_NAME_ENTITY ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ;
public class AbstractGenericTreeNode { /** * Adds the child . * @ param child * the child */ @ Override public void addChild ( final ITreeNode < T > child ) { } }
if ( children != null ) { children . add ( child ) ; } else { children = new ArrayList < > ( ) ; children . add ( child ) ; }
public class Validate { /** * Validates the CPE URI against the CPE 2.2 specification . * @ param value the value to validate * @ return the validation status given value ; * @ see us . springett . parsers . cpe . util . Status # isValid ( ) */ public static Status cpeUri ( String value ) { } }
try { String [ ] parts = value . split ( ":" ) ; if ( parts . length > 8 || parts . length == 1 || ! "cpe" . equalsIgnoreCase ( parts [ 0 ] ) ) { LOG . warn ( "The CPE (" + value + ") is invalid as it is not in the CPE 2.2 URI format" ) ; return Status . INVALID ; } if ( parts . length >= 2 && parts [ 1 ] . length ( ) ...
public class DocxService { /** * Load and return an in - memory representation of a docx . * This is public API because building the in - memory structure can be * quite slow . Thus , clients can use this method to cache the in - memory * structure , and pass in to either * { @ link # merge ( String , Wordproce...
final WordprocessingMLPackage docxPkg ; try { docxPkg = WordprocessingMLPackage . load ( docxTemplate ) ; } catch ( final Docx4JException ex ) { throw new LoadTemplateException ( "Unable to load docx template from input stream" , ex ) ; } return docxPkg ;
public class SchemaSet { /** * Returns < tt > true < / tt > if this set contains the specified element . More * formally , only returns < tt > true < / tt > if this set contains an * element < code > e < / code > such that < code > ( o = = null ? e = = null : * o . equals ( e ) ) < / code > . * It is possible f...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "contains" , debugId ( o ) ) ; boolean result = false ; /* It should always be an Id so just cast it . If someone is using the */ /* class for the wrong purpose they will get a ClassCastException , which */ /* is perm...
public class ConfigurableGlobDatasetFinder { /** * Finds all directories satisfying the input glob pattern , and creates a { @ link org . apache . gobblin . data . management . retention . dataset . CleanableDataset } * for each one using { @ link # datasetAtPath } . * @ return List of { @ link org . apache . gobbl...
List < T > datasets = Lists . newArrayList ( ) ; LOG . info ( "Finding datasets for pattern " + this . datasetPattern ) ; FileStatus [ ] fileStatuss = this . getDatasetDirs ( ) ; if ( fileStatuss != null ) { for ( FileStatus fileStatus : fileStatuss ) { Path pathToMatch = PathUtils . getPathWithoutSchemeAndAuthority ( ...
public class StorageWriter { /** * Calculates the amount of time that should be used as a timeout for WriterDataSource reads . The following rules * are taken into consideration : * * If at least one SegmentAggregator needs to flush right away , the timeout returned is 0. * * The returned timeout is the amount of...
// Find the minimum expiration time among all SegmentAggregators . long maxTimeMillis = this . config . getMaxReadTimeout ( ) . toMillis ( ) ; long minTimeMillis = this . config . getMinReadTimeout ( ) . toMillis ( ) ; long timeMillis = maxTimeMillis ; for ( ProcessorCollection a : this . processors . values ( ) ) { if...
public class AnyOf { /** * Returns true if this condition is compatible with the given test case properties . * A condition is < em > " compatible " < / em > with these properties if it is already satisfied * or if it could be satisfied with the addition of more properties . */ public boolean compatible ( PropertyS...
boolean isCompatible ; Iterator < ICondition > conditions ; for ( conditions = getConditions ( ) , isCompatible = ! conditions . hasNext ( ) ; ! isCompatible && conditions . hasNext ( ) ; isCompatible = conditions . next ( ) . compatible ( properties ) ) ; return isCompatible ;
public class BaseFileCopier { /** * Return a remote destination temp dir path for the given node . If specified , the node attribute named { @ value * # FILE _ COPY _ DESTINATION _ DIR } is used , otherwise a temp directory appropriate for the os - family of the node is * returned . * @ param node the node entry ...
return util . getRemoteDirForNode ( node , project , framework ) ;
public class LessParser { /** * Parse a parameter list for a function . * @ return the operation */ @ Nonnull Operation parseParameterList ( ) { } }
Expression left = null ; char ch ; do { nesting ++ ; Expression expr = parseExpression ( ( char ) 0 ) ; nesting -- ; left = concat ( left , ';' , expr ) ; ch = read ( ) ; } while ( ch == ';' ) ; if ( ch != ')' ) { throw createException ( "Unrecognized input: '" + ch + "'" ) ; } if ( left == null ) { return new Operatio...
public class AWSApplicationDiscoveryClient { /** * Lists exports as specified by ID . All continuous exports associated with your user account can be listed if you * call < code > DescribeContinuousExports < / code > as is without passing any parameters . * @ param describeContinuousExportsRequest * @ return Resu...
request = beforeClientExecution ( request ) ; return executeDescribeContinuousExports ( request ) ;
public class GroupAdministrationHelper { /** * Delete a group from the group store * @ param key key of the group to be deleted * @ param user performing the delete operation */ public void deleteGroup ( String key , IPerson deleter ) { } }
if ( ! canDeleteGroup ( deleter , key ) ) { throw new RuntimeAuthorizationException ( deleter , IPermission . DELETE_GROUP_ACTIVITY , key ) ; } log . info ( "Deleting group with key " + key ) ; // find the current version of this group entity IEntityGroup group = GroupService . findGroup ( key ) ; // remove this group ...
public class AWSIotClient { /** * Describe a thing group . * @ param describeThingGroupRequest * @ return Result of the DescribeThingGroup operation returned by the service . * @ throws InvalidRequestException * The request is not valid . * @ throws ThrottlingException * The rate exceeds the limit . * @ t...
request = beforeClientExecution ( request ) ; return executeDescribeThingGroup ( request ) ;
public class Source { /** * Sets the rolloff factor for attenuation . */ public void setRolloffFactor ( float rolloff ) { } }
if ( _rolloffFactor != rolloff ) { AL10 . alSourcef ( _id , AL10 . AL_ROLLOFF_FACTOR , _rolloffFactor = rolloff ) ; }
public class SerializerObjectMarshallingStrategy { /** * { @ inheritDoc } */ @ Override public byte [ ] marshal ( Context context , ObjectOutputStream os , Object object ) throws IOException { } }
return _serializer . serialize ( object , Object . class ) ;
public class NilpotentMaximum { /** * Computes the nilpotent maximum of two membership function values * @ param a is a membership function value * @ param b is a membership function value * @ return ` \ begin { cases } \ max ( a , b ) & \ mbox { if $ a + b < 0 $ } \ cr 1 & * \ mbox { otherwise } \ end { cases ...
if ( Op . isLt ( a + b , 1.0 ) ) { return Op . max ( a , b ) ; } return 1.0 ;
public class RequestPatternTransformer { /** * Returns a RequestPatternBuilder matching a given Request */ @ Override public RequestPatternBuilder apply ( Request request ) { } }
final RequestPatternBuilder builder = new RequestPatternBuilder ( request . getMethod ( ) , urlEqualTo ( request . getUrl ( ) ) ) ; if ( headers != null && ! headers . isEmpty ( ) ) { for ( Map . Entry < String , CaptureHeadersSpec > header : headers . entrySet ( ) ) { String headerName = header . getKey ( ) ; if ( req...
public class AbstractAmazonSimpleEmailServiceAsync { /** * Simplified method form for invoking the GetSendQuota operation with an AsyncHandler . * @ see # getSendQuotaAsync ( GetSendQuotaRequest , com . amazonaws . handlers . AsyncHandler ) */ @ Override public java . util . concurrent . Future < GetSendQuotaResult >...
return getSendQuotaAsync ( new GetSendQuotaRequest ( ) , asyncHandler ) ;
public class CobolDataItem { /** * Pretty printing for a condition entry . * @ param sb the string builder */ private void toStringCondition ( final StringBuilder sb ) { } }
if ( getConditionLiterals ( ) . size ( ) > 0 ) { toStringList ( sb , getConditionLiterals ( ) , "conditionLiterals" ) ; } if ( getConditionRanges ( ) . size ( ) > 0 ) { toStringList ( sb , getConditionRanges ( ) , "conditionRanges" ) ; }
public class StyledNamingConvention { public void dispose ( ) { } }
for ( final Iterator < Resources [ ] > it = existCheckerArrays . values ( ) . iterator ( ) ; it . hasNext ( ) ; ) { final Resources [ ] array = it . next ( ) ; for ( int i = 0 ; i < array . length ; ++ i ) { array [ i ] . close ( ) ; } } existCheckerArrays . clear ( ) ; initialized = false ;
public class SoapParser { /** * A method to parse and valdate the response of a SOAP server . * @ param xml * the SOAP message to retrieve and validate . May be an * InputStream object or a Document object . * @ param instruction * the SOAP Parser CTL excerpt * @ param logger * the PrintWriter to log all ...
Document soapMessage = null ; String returnType = instruction . getAttribute ( "return" ) ; // envelope or // content ErrorHandlerImpl eh = new ErrorHandlerImpl ( "Parsing" , logger ) ; if ( xml instanceof InputStream ) { soapMessage = SoapUtils . getSOAPMessage ( ( InputStream ) xml ) ; } else if ( xml instanceof Docu...
public class ZKUtil { /** * Helper to produce a valid path from variadic strings . */ public static String path ( String ... components ) { } }
String path = components [ 0 ] ; for ( int i = 1 ; i < components . length ; i ++ ) { path = ZKUtil . joinZKPath ( path , components [ i ] ) ; } return path ;
public class WWindow { /** * Returns a dynamic URL that this wwindow component can be accessed from . * @ return the URL to access this wwindow component . */ public String getUrl ( ) { } }
Environment env = getEnvironment ( ) ; Map < String , String > parameters = env . getHiddenParameters ( ) ; parameters . put ( WWINDOW_REQUEST_PARAM_KEY , getId ( ) ) ; // Override the step count with WWindow step parameters . put ( Environment . STEP_VARIABLE , String . valueOf ( getStep ( ) ) ) ; String url = env . g...
public class AsyncTwitterImpl { /** * / * Suggested Users Resources */ @ Override public void getUserSuggestions ( final String categorySlug ) { } }
getDispatcher ( ) . invokeLater ( new AsyncTask ( USER_SUGGESTIONS , listeners ) { @ Override public void invoke ( List < TwitterListener > listeners ) throws TwitterException { ResponseList < User > users = twitter . getUserSuggestions ( categorySlug ) ; for ( TwitterListener listener : listeners ) { try { listener . ...
public class DataMaskingRulesInner { /** * Creates or updates a database data masking rule . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param...
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , dataMaskingRuleName , parameters ) , serviceCallback ) ;
public class CacheEntry { /** * Return an input stream to the layer . Has side effect of setting the * appropriate Content - Type , Content - Length and Content - Encoding headers * in the response . * @ param request * the request object * @ param sourceMapResult * ( Output ) mutable object reference to th...
// Check bytes before filename when reading and reverse order when setting . // The following local variables intentionally hide the instance variables . byte [ ] bytes = this . bytes ; byte [ ] sourceMap = this . sourceMap ; String filename = this . filename ; InputStream result = null ; if ( bytes != null ) { // Cach...
public class ReportServiceLogger { /** * Logs the specified request and response information . * < p > Note that in order to avoid any temptation to consume the contents of the response , this * does < em > not < / em > take an { @ link com . google . api . client . http . HttpResponse } object , but instead * ac...
boolean isSuccess = HttpStatusCodes . isSuccess ( statusCode ) ; if ( ! loggerDelegate . isSummaryLoggable ( isSuccess ) && ! loggerDelegate . isDetailsLoggable ( isSuccess ) ) { return ; } // Populate the RequestInfo builder from the request . RequestInfo requestInfo = buildRequestInfo ( request ) ; // Populate the Re...
public class DecimalFormat { /** * Appends the passed { @ code suffix } chars to given result * { @ code container } . Updates { @ code fastPathData . lastFreeIndex } * accordingly . * @ param suffix The suffix characters to append to result . * @ param len The number of chars to append . * @ param container ...
int startIndex = fastPathData . lastFreeIndex ; // If suffix to append is only 1 char long , just assigns this char . // If suffix is less or equal 4 , we use a dedicated algorithm that // has shown to run faster than System . arraycopy . // If more than 4 , we use System . arraycopy . if ( len == 1 ) container [ start...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcBuildingElement ( ) { } }
if ( ifcBuildingElementEClass == null ) { ifcBuildingElementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 58 ) ; } return ifcBuildingElementEClass ;
public class Humanize { /** * Computes both past and future relative dates . * E . g . ' one day ago ' , ' one day from now ' , ' 10 years ago ' , ' 3 minutes from * now ' , ' right now ' and so on . * @ param reference * The reference * @ param duration * The duration * @ return String representing the r...
return context . get ( ) . formatRelativeDate ( reference , duration ) ;
public class MaxConnectionIdleManager { /** * There are no outstanding RPCs on the transport . */ void onTransportIdle ( ) { } }
isActive = false ; if ( shutdownFuture == null ) { return ; } if ( shutdownFuture . isDone ( ) ) { shutdownDelayed = false ; shutdownFuture = scheduler . schedule ( shutdownTask , maxConnectionIdleInNanos , TimeUnit . NANOSECONDS ) ; } else { nextIdleMonitorTime = ticker . nanoTime ( ) + maxConnectionIdleInNanos ; }
public class JsonConvert { /** * 返回非null的值是由String 、 ArrayList 、 HashMap任意组合的对象 */ public < V > V convertFrom ( final InputStream in ) { } }
if ( in == null ) return null ; return ( V ) new AnyDecoder ( factory ) . convertFrom ( new JsonStreamReader ( in ) ) ;
public class Benchmark { /** * Sphere function with noise */ static public double sphere_noise ( double [ ] x ) { } }
double sum = 0.0 ; for ( int i = 0 ; i < x . length ; i ++ ) { sum += x [ i ] * x [ i ] ; } // NOISE // Comment the next line to remove the noise sum *= ( 1.0 + 0.1 * Math . abs ( random . nextGaussian ( ) ) ) ; return ( sum ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcClassification ( ) { } }
if ( ifcClassificationEClass == null ) { ifcClassificationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 79 ) ; } return ifcClassificationEClass ;
public class JobOperationsController { /** * Borrowed from CommandLineJobRunner . * @ param job * the job that we need to find the next parameters for * @ return the next job parameters if they can be located * @ throws JobParametersNotFoundException * if there is a problem */ private JobParameters getNextJob...
String jobIdentifier = job . getName ( ) ; JobParameters jobParameters ; List < JobInstance > lastInstances = jobExplorer . getJobInstances ( jobIdentifier , 0 , 1 ) ; JobParametersIncrementer incrementer = job . getJobParametersIncrementer ( ) ; if ( lastInstances . isEmpty ( ) ) { jobParameters = incrementer . getNex...
public class LineItemCreativeAssociationStats { /** * Sets the creativeSetStats value for this LineItemCreativeAssociationStats . * @ param creativeSetStats * A map containing { @ link Stats } objects for each creative belonging * to * a creative set , { @ code null } for non creative set * associations . */ pu...
this . creativeSetStats = creativeSetStats ;