signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class V1InstanceGetter { /** * Get links filtered by the criteria specified in the passed in filter . * @ param filter Limit the items returned . If null , then all items returned . * @ return Collection of items as specified in the filter . */ public Collection < Link > links ( LinkFilter filter ) { } }
return get ( Link . class , ( filter != null ) ? filter : new LinkFilter ( ) ) ;
public class StyleCounter { /** * Obtains the most frequent style or styles when multiple of them have the maximal frequency . * @ return The list of styles with the maximal frequency . */ public List < T > getMostFrequentAll ( ) { } }
List < T > ret = new ArrayList < T > ( ) ; int maxfreq = getMaximalFrequency ( ) ; for ( Map . Entry < T , Integer > entry : styles . entrySet ( ) ) { if ( entry . getValue ( ) == maxfreq ) ret . add ( entry . getKey ( ) ) ; } return ret ;
public class ExpressRouteConnectionsInner { /** * Deletes a connection to a ExpressRoute circuit . * @ param resourceGroupName The name of the resource group . * @ param expressRouteGatewayName The name of the ExpressRoute gateway . * @ param connectionName The name of the connection subresource . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete ( String resourceGroupName , String expressRouteGatewayName , String connectionName ) { } }
beginDeleteWithServiceResponseAsync ( resourceGroupName , expressRouteGatewayName , connectionName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class BundlesHandlerFactory { /** * Returns a bundle from its name * @ param name * the bundle name * @ param bundles * the list of bundle * @ return a bundle from its name */ private JoinableResourceBundle getBundleFromName ( String name , List < JoinableResourceBundle > bundles ) { } }
JoinableResourceBundle bundle = null ; for ( JoinableResourceBundle aBundle : bundles ) { if ( aBundle . getName ( ) . equals ( name ) ) { bundle = aBundle ; break ; } } return bundle ;
public class StructuredQueryBuilder { /** * Matches documents that have a value in the specified axis that matches the specified * periods using the specified operator . * @ param axes the set of axes of document temporal values used to determine which documents have * values that match this query * @ param operator the operator used to determine if values in the axis match the specified period * @ param periods the periods considered using the operator . When multiple periods are specified , * the query matches if a value matches any period . * @ param options string options from the list for * < a href = " http : / / docs . marklogic . com / cts : period - range - query " > cts : period - range - query calls < / a > * @ return a query to filter by comparing a temporal axis to period values * @ see < a href = " http : / / docs . marklogic . com / cts : period - range - query " > cts : period - range - query < / a > * @ see < a href = " http : / / docs . marklogic . com / guide / search - dev / structured - query # id _ 91434 " > * Structured Queries : period - range - query < / a > */ public StructuredQueryDefinition temporalPeriodRange ( Axis [ ] axes , TemporalOperator operator , Period [ ] periods , String ... options ) { } }
if ( axes == null ) throw new IllegalArgumentException ( "axes cannot be null" ) ; if ( operator == null ) throw new IllegalArgumentException ( "operator cannot be null" ) ; if ( periods == null ) throw new IllegalArgumentException ( "periods cannot be null" ) ; return new TemporalPeriodRangeQuery ( axes , operator , periods , options ) ;
public class AsynchronousRequest { /** * For more info on raids API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / raids " > here < / a > < br / > * Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , Throwable ) } methods for custom interactions * @ param ids list of raid id ( s ) * @ param callback callback that is going to be used for { @ link Call # enqueue ( Callback ) } * @ throws GuildWars2Exception empty ID list * @ throws NullPointerException if given { @ link Callback } is empty * @ see Raid raid info */ public void getRaidInfo ( String [ ] ids , Callback < List < Raid > > callback ) throws GuildWars2Exception , NullPointerException { } }
isParamValid ( new ParamChecker ( ids ) ) ; gw2API . getRaidInfo ( processIds ( ids ) , GuildWars2 . lang . getValue ( ) ) . enqueue ( callback ) ;
public class ToSolidList { /** * Returns a method that can be used with { @ link solid . stream . Stream # collect ( Func1 ) } * to convert a stream into a { @ link List } . * Use this method instead of { @ link # toSolidList ( ) } for better performance on * streams that can have more than 12 items . * @ param < T > a type of { @ link List } items . * @ param initialCapacity initial capacity of the list . * @ return a method that converts an iterable into { @ link List } . */ public static < T > Func1 < Iterable < T > , SolidList < T > > toSolidList ( final int initialCapacity ) { } }
return new Func1 < Iterable < T > , SolidList < T > > ( ) { @ Override public SolidList < T > call ( Iterable < T > iterable ) { ArrayList < T > list = new ArrayList < > ( initialCapacity ) ; for ( T value : iterable ) list . add ( value ) ; return new SolidList < > ( list ) ; } } ;
public class Framework { /** * Gets the version for a class . * @ param clazz * Class for which the version should be determined * @ return Found version or { @ code null } */ private static String getVersion ( final Class < ? > clazz ) { } }
CodeSource source = clazz . getProtectionDomain ( ) . getCodeSource ( ) ; URL location = source . getLocation ( ) ; try { Path path = Paths . get ( location . toURI ( ) ) ; return Files . isRegularFile ( path ) ? getVersionFromJar ( path ) : getVersionFromPom ( path ) ; } catch ( URISyntaxException ex ) { Logger . error ( ex , "Unknown location: \"{}\"" , location ) ; return null ; }
public class AbstractQueryBuilderFactory { /** * add parser before * @ param parser * @ param beforeParser */ public void addRuleParserBefore ( IRuleParser parser , Class < ? extends IRuleParser > beforeParser ) { } }
int index = getIndexOfClass ( ruleParsers , beforeParser ) ; if ( index == - 1 ) { throw new ParserAddException ( "parser " + beforeParser . getSimpleName ( ) + " has not been added" ) ; } ruleParsers . add ( index , parser ) ;
public class MmtfUtils { /** * Converts the set of experimental techniques to an array of strings . * @ param experimentalTechniques the input set of experimental techniques * @ return the array of strings describing the methods used . */ public static String [ ] techniquesToStringArray ( Set < ExperimentalTechnique > experimentalTechniques ) { } }
if ( experimentalTechniques == null ) { return new String [ 0 ] ; } String [ ] outArray = new String [ experimentalTechniques . size ( ) ] ; int index = 0 ; for ( ExperimentalTechnique experimentalTechnique : experimentalTechniques ) { outArray [ index ] = experimentalTechnique . getName ( ) ; index ++ ; } return outArray ;
public class AppMessageHelper { /** * Log an error message . * @ param key message key for the application manager messages file . * @ param params message parameters . */ public void error ( String key , Object ... params ) { } }
Tr . error ( tc , key , params ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcStructuralSurfaceAction ( ) { } }
if ( ifcStructuralSurfaceActionEClass == null ) { ifcStructuralSurfaceActionEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 660 ) ; } return ifcStructuralSurfaceActionEClass ;
public class NetUtils { /** * 解析URL * @ param url url * @ return { @ link Map } * @ since 1.0.8 */ public static Map < String , String > parseUrl ( String url ) { } }
Map < String , String > result = new HashMap < > ( 8 ) ; result . put ( PROTOCOL_KEY , ValueConsts . EMPTY_STRING ) ; result . put ( HOST_KEY , ValueConsts . EMPTY_STRING ) ; result . put ( PATH_KEY , ValueConsts . EMPTY_STRING ) ; if ( Checker . isNotEmpty ( url ) ) { String [ ] pros ; final String protocolSplit = "://" ; if ( url . contains ( protocolSplit ) ) { pros = url . split ( protocolSplit ) ; } else { pros = new String [ ] { "" , url } ; } // 设置主机 、 协议 、 路径 result . put ( PROTOCOL_KEY , pros [ 0 ] ) ; if ( pros . length < ValueConsts . TWO_INT ) { pros = new String [ ] { pros [ 0 ] , ValueConsts . EMPTY_STRING } ; } if ( pros [ 1 ] . contains ( ValueConsts . SPLASH_STRING ) ) { int lastIndex = pros [ 1 ] . lastIndexOf ( ValueConsts . SPLASH_STRING ) ; if ( pros [ 1 ] . startsWith ( ValueConsts . SPLASH_STRING ) ) { // 文件协议 result . put ( PATH_KEY , pros [ 1 ] . substring ( 1 ) ) ; } else if ( pros [ 1 ] . contains ( ValueConsts . SPLASH_STRING ) ) { int index = pros [ 1 ] . indexOf ( "/" ) ; // 设置主机 result . put ( HOST_KEY , pros [ 1 ] . substring ( 0 , index ) ) ; // 设置参数 if ( pros [ 1 ] . contains ( ValueConsts . QUESTION_MARK ) ) { lastIndex = pros [ 1 ] . indexOf ( ValueConsts . QUESTION_MARK ) ; String [ ] params = pros [ 1 ] . split ( "\\?" ) [ 1 ] . split ( "&" ) ; for ( String param : params ) { String [ ] kv = param . split ( "=" ) ; result . put ( kv [ 0 ] , kv [ 1 ] ) ; } } // 设置路径 if ( lastIndex > index ) { String path = pros [ 1 ] . substring ( index + 1 , lastIndex ) ; path = path . endsWith ( ValueConsts . SPLASH_STRING ) ? path . substring ( 0 , path . length ( ) - 1 ) : path ; result . put ( PATH_KEY , path ) ; } } else { result . put ( HOST_KEY , pros [ 1 ] ) ; } } else { result . put ( HOST_KEY , pros [ 1 ] ) ; } } return result ;
public class SymbolsLineReader { /** * Stops reading at first encountered error , which implies the same * { @ link org . sonar . ce . task . projectanalysis . source . linereader . LineReader . ReadError } will be returned once an error * has been encountered and for any then provided { @ link DbFileSources . Line . Builder lineBuilder } . */ @ Override public Optional < ReadError > read ( DbFileSources . Line . Builder lineBuilder ) { } }
if ( readError == null ) { try { processSymbols ( lineBuilder ) ; } catch ( RangeOffsetConverter . RangeOffsetConverterException e ) { readError = new ReadError ( Data . SYMBOLS , lineBuilder . getLine ( ) ) ; LOG . warn ( format ( "Inconsistency detected in Symbols data. Symbols will be ignored for file '%s'" , file . getDbKey ( ) ) , e ) ; } } return Optional . ofNullable ( readError ) ;
public class VariableNamePattern { /** * Gets a { @ code VariableNamePattern } which matches { @ code plateVariables } in each * replication of { @ code plateName } . { @ code fixedVariables } are added to each * match as well . * @ param plateName * @ param plateVariables * @ param fixedVariables * @ return */ public static VariablePattern fromPlate ( String plateName , VariableNumMap plateVariables , VariableNumMap fixedVariables ) { } }
List < VariableNameMatcher > matchers = Lists . newArrayList ( ) ; for ( String variableName : plateVariables . getVariableNamesArray ( ) ) { matchers . add ( new VariableNameMatcher ( plateName + "/" , "/" + variableName , 0 ) ) ; } return new VariableNamePattern ( matchers , plateVariables , fixedVariables ) ;
public class RowPriorityResolver { /** * Move rows on top of the row it has priority over . */ private void moveRowsBasedOnPriority ( ) { } }
for ( RowNumber myNumber : overs . keySet ( ) ) { Over over = overs . get ( myNumber ) ; int newIndex = rowOrder . indexOf ( new RowNumber ( over . getOver ( ) ) ) ; rowOrder . remove ( myNumber ) ; rowOrder . add ( newIndex , myNumber ) ; }
public class HpelSystemStream { /** * Print a character . The character is translated into one or more bytes * according to the platform ' s default character encoding , and these bytes * are written in exactly the manner of the < code > { @ link # write ( int ) } < / code > * method . * @ param x * The < code > char < / code > to be printed . */ public void print ( char x ) { } }
if ( ivSuppress == true ) return ; String writeData = String . valueOf ( x ) ; doPrint ( writeData ) ;
public class Tap13Representer { /** * Print filler . * @ param pw Print Writer */ protected void printFiller ( PrintWriter pw ) { } }
if ( this . options . getIndent ( ) > 0 ) { for ( int i = 0 ; i < options . getIndent ( ) ; i ++ ) { pw . append ( ' ' ) ; } }
public class Utils { /** * Extracts value from map if given value is null . * @ param value current value * @ param props properties to extract value from * @ param key property name to extract * @ return initial value or value extracted from map */ public static String lookupIfEmpty ( final String value , final Map < String , String > props , final String key ) { } }
return value != null ? value : props . get ( key ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcSolidModel ( ) { } }
if ( ifcSolidModelEClass == null ) { ifcSolidModelEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 609 ) ; } return ifcSolidModelEClass ;
public class TileSetBundler { /** * Creates a tileset bundle at the location specified by the * < code > targetPath < / code > parameter , based on the description * provided via the < code > bundleDesc < / code > parameter . * @ param idBroker the tileset id broker that will be used to map * tileset names to tileset ids . * @ param bundleDesc a file object pointing to the bundle description * file . * @ param target the tileset bundle file that will be created . * @ return true if the bundle was rebuilt , false if it was not because * the bundle file was newer than all involved source files . * @ exception IOException thrown if an error occurs reading , writing * or processing anything . */ public boolean createBundle ( TileSetIDBroker idBroker , final File bundleDesc , File target ) throws IOException { } }
// stick an array list on the top of the stack into which we will // collect parsed tilesets ArrayList < TileSet > sets = Lists . newArrayList ( ) ; _digester . push ( sets ) ; // parse the tilesets FileInputStream fin = new FileInputStream ( bundleDesc ) ; try { _digester . parse ( fin ) ; } catch ( SAXException saxe ) { String errmsg = "Failure parsing bundle description file " + "[path=" + bundleDesc . getPath ( ) + "]" ; throw ( IOException ) new IOException ( errmsg ) . initCause ( saxe ) ; } finally { fin . close ( ) ; } // we want to make sure that at least one of the tileset image // files or the bundle definition file is newer than the bundle // file , otherwise consider the bundle up to date long newest = bundleDesc . lastModified ( ) ; // create a tileset bundle to hold our tilesets TileSetBundle bundle = new TileSetBundle ( ) ; // add all of the parsed tilesets to the tileset bundle try { for ( int ii = 0 ; ii < sets . size ( ) ; ii ++ ) { TileSet set = sets . get ( ii ) ; String name = set . getName ( ) ; // let ' s be robust if ( name == null ) { log . warning ( "Tileset was parsed, but received no name " + "[set=" + set + "]. Skipping." ) ; continue ; } // make sure this tileset ' s image file exists and check its last modified date File tsfile = new File ( bundleDesc . getParent ( ) , set . getImagePath ( ) ) ; if ( ! tsfile . exists ( ) ) { System . err . println ( "Tile set missing image file " + "[bundle=" + bundleDesc . getPath ( ) + ", name=" + set . getName ( ) + ", imgpath=" + tsfile . getPath ( ) + "]." ) ; continue ; } if ( tsfile . lastModified ( ) > newest ) { newest = tsfile . lastModified ( ) ; } // assign a tilset id to the tileset and bundle it try { int tileSetId = idBroker . getTileSetID ( name ) ; bundle . addTileSet ( tileSetId , set ) ; } catch ( PersistenceException pe ) { String errmsg = "Failure obtaining a tileset id for " + "tileset [set=" + set + "]." ; throw ( IOException ) new IOException ( errmsg ) . initCause ( pe ) ; } } // clear out our array list in preparation for another go sets . clear ( ) ; } finally { // before we go , we have to commit our brokered tileset ids // back to the broker ' s persistent store try { idBroker . commit ( ) ; } catch ( PersistenceException pe ) { log . warning ( "Failure committing brokered tileset ids " + "back to broker's persistent store " + "[error=" + pe + "]." ) ; } } // see if our newest file is newer than the tileset bundle if ( skipIfTargetNewer ( ) && newest < target . lastModified ( ) ) { return false ; } // create an image provider for loading our tileset images SimpleCachingImageProvider improv = new SimpleCachingImageProvider ( ) { @ Override protected BufferedImage loadImage ( String path ) throws IOException { return ImageIO . read ( new File ( bundleDesc . getParent ( ) , path ) ) ; } } ; return createBundle ( target , bundle , improv , bundleDesc . getParent ( ) , newest ) ;
public class Kerb5Context { /** * { @ inheritDoc } * @ see jcifs . smb . SSPContext # getFlags ( ) */ @ Override public int getFlags ( ) { } }
int contextFlags = 0 ; if ( this . gssContext . getCredDelegState ( ) ) { contextFlags |= NegTokenInit . DELEGATION ; } if ( this . gssContext . getMutualAuthState ( ) ) { contextFlags |= NegTokenInit . MUTUAL_AUTHENTICATION ; } if ( this . gssContext . getReplayDetState ( ) ) { contextFlags |= NegTokenInit . REPLAY_DETECTION ; } if ( this . gssContext . getSequenceDetState ( ) ) { contextFlags |= NegTokenInit . SEQUENCE_CHECKING ; } if ( this . gssContext . getAnonymityState ( ) ) { contextFlags |= NegTokenInit . ANONYMITY ; } if ( this . gssContext . getConfState ( ) ) { contextFlags |= NegTokenInit . CONFIDENTIALITY ; } if ( this . gssContext . getIntegState ( ) ) { contextFlags |= NegTokenInit . INTEGRITY ; } return contextFlags ;
public class ResponseTimeRootCauseServiceMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ResponseTimeRootCauseService responseTimeRootCauseService , ProtocolMarshaller protocolMarshaller ) { } }
if ( responseTimeRootCauseService == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( responseTimeRootCauseService . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( responseTimeRootCauseService . getNames ( ) , NAMES_BINDING ) ; protocolMarshaller . marshall ( responseTimeRootCauseService . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( responseTimeRootCauseService . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( responseTimeRootCauseService . getEntityPath ( ) , ENTITYPATH_BINDING ) ; protocolMarshaller . marshall ( responseTimeRootCauseService . getInferred ( ) , INFERRED_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class TzdbZoneRulesProvider { /** * Loads the rules . * @ param classLoader the class loader to use , not null * @ return true if updated * @ throws ZoneRulesException if unable to load */ private boolean load ( ClassLoader classLoader ) { } }
boolean updated = false ; URL url = null ; try { Enumeration < URL > en = classLoader . getResources ( "org/threeten/bp/TZDB.dat" ) ; while ( en . hasMoreElements ( ) ) { url = en . nextElement ( ) ; updated |= load ( url ) ; } } catch ( Exception ex ) { throw new ZoneRulesException ( "Unable to load TZDB time-zone rules: " + url , ex ) ; } return updated ;
public class ActionRequestProcessor { protected ActionResponseReflector createResponseReflector ( ActionRuntime runtime ) { } }
final ActionAdjustmentProvider adjustmentProvider = getAssistantDirector ( ) . assistWebDirection ( ) . assistActionAdjustmentProvider ( ) ; return new ActionResponseReflector ( runtime , getRequestManager ( ) , adjustmentProvider ) ;
public class FileBatch { /** * Read a FileBatch from the specified file . This method assumes the FileBatch was previously saved to * zip format using { @ link # writeAsZip ( File ) } or { @ link # writeAsZip ( OutputStream ) } * @ param file File to read from * @ return The loaded FileBatch * @ throws IOException If an error occurs during reading */ public static FileBatch readFromZip ( File file ) throws IOException { } }
try ( FileInputStream fis = new FileInputStream ( file ) ) { return readFromZip ( fis ) ; }
public class RuleHelper { /** * This method gets the name of the supplied fault . * @ param fault The fault * @ return The name */ public String faultName ( Object fault ) { } }
FaultDescriptor fd = getFaultDescriptor ( fault ) ; if ( fd != null ) { return fd . getName ( fault ) ; } return fault . getClass ( ) . getSimpleName ( ) ;
public class PubSubManager { /** * Check if it is possible to create PubSub nodes on this service . It could be possible that the * PubSub service allows only certain XMPP entities ( clients ) to create nodes and publish items * to them . * Note that since XEP - 60 does not provide an API to determine if an XMPP entity is allowed to * create nodes , therefore this method creates an instant node calling { @ link # createNode ( ) } to * determine if it is possible to create nodes . * @ return < code > true < / code > if it is possible to create nodes , < code > false < / code > otherwise . * @ throws NoResponseException * @ throws NotConnectedException * @ throws InterruptedException * @ throws XMPPErrorException */ public boolean canCreateNodesAndPublishItems ( ) throws NoResponseException , NotConnectedException , InterruptedException , XMPPErrorException { } }
LeafNode leafNode = null ; try { leafNode = createNode ( ) ; } catch ( XMPPErrorException e ) { if ( e . getStanzaError ( ) . getCondition ( ) == StanzaError . Condition . forbidden ) { return false ; } throw e ; } finally { if ( leafNode != null ) { deleteNode ( leafNode . getId ( ) ) ; } } return true ;
public class Memory { /** * Transfers count bytes from buffer to Memory * @ param memoryOffset start offset in the memory * @ param buffer the data buffer */ public void setBytes ( long memoryOffset , ByteBuffer buffer ) { } }
if ( buffer == null ) throw new NullPointerException ( ) ; else if ( buffer . remaining ( ) == 0 ) return ; int bufferOffset = buffer . position ( ) ; checkPosition ( memoryOffset ) ; long end = memoryOffset + buffer . remaining ( ) ; checkPosition ( end - 1 ) ; while ( memoryOffset < end ) { unsafe . putByte ( peer + memoryOffset , buffer . get ( bufferOffset ) ) ; memoryOffset ++ ; bufferOffset ++ ; }
public class MultimapJoiner { /** * Appends the string representation of each entry of { @ code map } , using the previously configured separator and * key - value separator , to { @ code appendable } . */ public < A extends Appendable > A appendTo ( A appendable , Map < ? , ? extends Collection < ? > > map ) throws IOException { } }
return appendTo ( appendable , map . entrySet ( ) ) ;
public class AmazonS3Client { /** * Pre - signs the specified request , using a signature query - string * parameter . * @ param request * The request to sign . * @ param methodName * The HTTP method ( GET , PUT , DELETE , HEAD ) for the specified * request . * @ param bucketName * The name of the bucket involved in the request . If the request * is not an operation on a bucket this parameter should be null . * @ param key * The object key involved in the request . If the request is not * an operation on an object , this parameter should be null . * @ param expiration * The time at which the signed request is no longer valid , and * will stop working . * @ param subResource * The optional sub - resource being requested as part of the * request ( e . g . " location " , " acl " , " logging " , or " torrent " ) . */ protected < T > void presignRequest ( Request < T > request , HttpMethod methodName , String bucketName , String key , Date expiration , String subResource ) { } }
// Run any additional request handlers if present beforeRequest ( request ) ; String resourcePath = "/" + ( ( bucketName != null ) ? bucketName + "/" : "" ) + ( ( key != null ) ? SdkHttpUtils . urlEncode ( key , true ) : "" ) + ( ( subResource != null ) ? "?" + subResource : "" ) ; // Make sure the resource - path for signing does not contain // any consecutive " / " s . // Note that we should also follow the same rule to escape // consecutive " / " s when generating the presigned URL . // See ServiceUtils # convertRequestToUrl ( . . . ) resourcePath = resourcePath . replaceAll ( "(?<=/)/" , "%2F" ) ; new S3QueryStringSigner ( methodName . toString ( ) , resourcePath , expiration ) . sign ( request , CredentialUtils . getCredentialsProvider ( request . getOriginalRequest ( ) , awsCredentialsProvider ) . getCredentials ( ) ) ; // The Amazon S3 DevPay token header is a special exception and can be safely moved // from the request ' s headers into the query string to ensure that it travels along // with the pre - signed URL when it ' s sent back to Amazon S3. if ( request . getHeaders ( ) . containsKey ( Headers . SECURITY_TOKEN ) ) { String value = request . getHeaders ( ) . get ( Headers . SECURITY_TOKEN ) ; request . addParameter ( Headers . SECURITY_TOKEN , value ) ; request . getHeaders ( ) . remove ( Headers . SECURITY_TOKEN ) ; }
public class srecParser { /** * / home / victor / srec / core / src / main / antlr / srec . g : 98:1 : literal : ( NUMBER - > ^ ( LITNUMBER NUMBER ) | BOOLEAN - > ^ ( LITBOOLEAN BOOLEAN ) | STRING - > ^ ( LITSTRING STRING ) | NULL - > LITNIL ) ; */ public final srecParser . literal_return literal ( ) throws RecognitionException { } }
srecParser . literal_return retval = new srecParser . literal_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token NUMBER56 = null ; Token BOOLEAN57 = null ; Token STRING58 = null ; Token NULL59 = null ; CommonTree NUMBER56_tree = null ; CommonTree BOOLEAN57_tree = null ; CommonTree STRING58_tree = null ; CommonTree NULL59_tree = null ; RewriteRuleTokenStream stream_BOOLEAN = new RewriteRuleTokenStream ( adaptor , "token BOOLEAN" ) ; RewriteRuleTokenStream stream_NULL = new RewriteRuleTokenStream ( adaptor , "token NULL" ) ; RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream ( adaptor , "token STRING" ) ; RewriteRuleTokenStream stream_NUMBER = new RewriteRuleTokenStream ( adaptor , "token NUMBER" ) ; try { // / home / victor / srec / core / src / main / antlr / srec . g : 99:2 : ( NUMBER - > ^ ( LITNUMBER NUMBER ) | BOOLEAN - > ^ ( LITBOOLEAN BOOLEAN ) | STRING - > ^ ( LITSTRING STRING ) | NULL - > LITNIL ) int alt14 = 4 ; switch ( input . LA ( 1 ) ) { case NUMBER : { alt14 = 1 ; } break ; case BOOLEAN : { alt14 = 2 ; } break ; case STRING : { alt14 = 3 ; } break ; case NULL : { alt14 = 4 ; } break ; default : if ( state . backtracking > 0 ) { state . failed = true ; return retval ; } NoViableAltException nvae = new NoViableAltException ( "" , 14 , 0 , input ) ; throw nvae ; } switch ( alt14 ) { case 1 : // / home / victor / srec / core / src / main / antlr / srec . g : 99:4 : NUMBER { NUMBER56 = ( Token ) match ( input , NUMBER , FOLLOW_NUMBER_in_literal535 ) ; if ( state . failed ) return retval ; if ( state . backtracking == 0 ) stream_NUMBER . add ( NUMBER56 ) ; // AST REWRITE // elements : NUMBER // token labels : // rule labels : retval // token list labels : // rule list labels : // wildcard labels : if ( state . backtracking == 0 ) { retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . tree : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; // 100:3 : - > ^ ( LITNUMBER NUMBER ) { // / home / victor / srec / core / src / main / antlr / srec . g : 100:6 : ^ ( LITNUMBER NUMBER ) { CommonTree root_1 = ( CommonTree ) adaptor . nil ( ) ; root_1 = ( CommonTree ) adaptor . becomeRoot ( ( CommonTree ) adaptor . create ( LITNUMBER , "LITNUMBER" ) , root_1 ) ; adaptor . addChild ( root_1 , stream_NUMBER . nextNode ( ) ) ; adaptor . addChild ( root_0 , root_1 ) ; } } retval . tree = root_0 ; } } break ; case 2 : // / home / victor / srec / core / src / main / antlr / srec . g : 102:4 : BOOLEAN { BOOLEAN57 = ( Token ) match ( input , BOOLEAN , FOLLOW_BOOLEAN_in_literal554 ) ; if ( state . failed ) return retval ; if ( state . backtracking == 0 ) stream_BOOLEAN . add ( BOOLEAN57 ) ; // AST REWRITE // elements : BOOLEAN // token labels : // rule labels : retval // token list labels : // rule list labels : // wildcard labels : if ( state . backtracking == 0 ) { retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . tree : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; // 103:3 : - > ^ ( LITBOOLEAN BOOLEAN ) { // / home / victor / srec / core / src / main / antlr / srec . g : 103:6 : ^ ( LITBOOLEAN BOOLEAN ) { CommonTree root_1 = ( CommonTree ) adaptor . nil ( ) ; root_1 = ( CommonTree ) adaptor . becomeRoot ( ( CommonTree ) adaptor . create ( LITBOOLEAN , "LITBOOLEAN" ) , root_1 ) ; adaptor . addChild ( root_1 , stream_BOOLEAN . nextNode ( ) ) ; adaptor . addChild ( root_0 , root_1 ) ; } } retval . tree = root_0 ; } } break ; case 3 : // / home / victor / srec / core / src / main / antlr / srec . g : 105:4 : STRING { STRING58 = ( Token ) match ( input , STRING , FOLLOW_STRING_in_literal572 ) ; if ( state . failed ) return retval ; if ( state . backtracking == 0 ) stream_STRING . add ( STRING58 ) ; // AST REWRITE // elements : STRING // token labels : // rule labels : retval // token list labels : // rule list labels : // wildcard labels : if ( state . backtracking == 0 ) { retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . tree : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; // 106:3 : - > ^ ( LITSTRING STRING ) { // / home / victor / srec / core / src / main / antlr / srec . g : 106:6 : ^ ( LITSTRING STRING ) { CommonTree root_1 = ( CommonTree ) adaptor . nil ( ) ; root_1 = ( CommonTree ) adaptor . becomeRoot ( ( CommonTree ) adaptor . create ( LITSTRING , "LITSTRING" ) , root_1 ) ; adaptor . addChild ( root_1 , stream_STRING . nextNode ( ) ) ; adaptor . addChild ( root_0 , root_1 ) ; } } retval . tree = root_0 ; } } break ; case 4 : // / home / victor / srec / core / src / main / antlr / srec . g : 108:4 : NULL { NULL59 = ( Token ) match ( input , NULL , FOLLOW_NULL_in_literal591 ) ; if ( state . failed ) return retval ; if ( state . backtracking == 0 ) stream_NULL . add ( NULL59 ) ; // AST REWRITE // elements : // token labels : // rule labels : retval // token list labels : // rule list labels : // wildcard labels : if ( state . backtracking == 0 ) { retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . tree : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; // 109:3 : - > LITNIL { adaptor . addChild ( root_0 , ( CommonTree ) adaptor . create ( LITNIL , "LITNIL" ) ) ; } retval . tree = root_0 ; } } break ; } retval . stop = input . LT ( - 1 ) ; if ( state . backtracking == 0 ) { retval . tree = ( CommonTree ) adaptor . rulePostProcessing ( root_0 ) ; adaptor . setTokenBoundaries ( retval . tree , retval . start , retval . stop ) ; } } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; retval . tree = ( CommonTree ) adaptor . errorNode ( input , retval . start , input . LT ( - 1 ) , re ) ; } finally { } return retval ;
public class ICalComponent { /** * Gets all sub - components of a given class . Changes to the returned list * will update the parent component object , and vice versa . * @ param clazz the component class * @ param < T > the component class * @ return the sub - components */ public < T extends ICalComponent > List < T > getComponents ( Class < T > clazz ) { } }
return new ICalComponentList < T > ( clazz ) ;
public class FsJobFileHandler { /** * We write settings to ~ / . fscrawler / { job _ name } / _ status . json * @ param jobname is the job _ name * @ param job Status file to write * @ throws IOException in case of error while reading */ public void write ( String jobname , FsJob job ) throws IOException { } }
writeFile ( jobname , FILENAME , FsJobParser . toJson ( job ) ) ;
public class EventListenerOrMilestoneActivityBehavior { /** * resume / / / / / */ public void onResume ( CmmnActivityExecution execution ) { } }
ensureTransitionAllowed ( execution , SUSPENDED , AVAILABLE , "resume" ) ; CmmnActivityExecution parent = execution . getParent ( ) ; if ( parent != null ) { if ( ! parent . isActive ( ) ) { String id = execution . getId ( ) ; throw LOG . resumeInactiveCaseException ( "resume" , id ) ; } } resuming ( execution ) ;
public class SentStructureJsComponent { /** * private void fillFilterAnnotations ( VisualizerInput visInput , int type ) { */ private void fillFilterAnnotations ( VisualizerInput visInput , int type ) { } }
List < String > displayedAnnotations = null ; Map < String , Set < String > > displayedAnnotationsMap = null ; switch ( type ) { case ( 0 ) : { displayedAnnotations = EventExtractor . computeDisplayAnnotations ( visInput , SNode . class ) ; displayedAnnotationsMap = displayedNodeAnnotations ; break ; } case ( 1 ) : { displayedAnnotations = computeDisplayedRelAnnotations ( visInput , configurations . get ( type ) , SPointingRelation . class ) ; displayedAnnotationsMap = displayedPointingRelAnnotations ; break ; } case ( 2 ) : { displayedAnnotations = computeDisplayedRelAnnotations ( visInput , configurations . get ( type ) , SSpanningRelation . class ) ; displayedAnnotationsMap = displayedSpanningRelAnnotations ; break ; } case ( 3 ) : { displayedAnnotations = computeDisplayedRelAnnotations ( visInput , configurations . get ( type ) , SDominanceRelation . class ) ; displayedAnnotationsMap = displayedDominanceRelAnnotations ; break ; } default : { throw new IllegalArgumentException ( ) ; } } for ( String annotation : displayedAnnotations ) { String anno = null ; String ns = null ; Set < String > namespaces = null ; if ( annotation . contains ( "::" ) ) { String [ ] annotationParts = annotation . split ( "::" ) ; if ( annotationParts . length == 2 ) { anno = annotationParts [ 1 ] ; ns = annotationParts [ 0 ] ; } else { throw new IllegalArgumentException ( "The annotation string in resolver_vis_map table is not well formed." ) ; } } else { anno = annotation ; } if ( displayedAnnotationsMap . containsKey ( anno ) ) { namespaces = displayedAnnotationsMap . get ( anno ) ; } else { namespaces = new HashSet < String > ( ) ; } if ( ns != null ) { namespaces . add ( ns ) ; } displayedAnnotationsMap . put ( anno , namespaces ) ; }
public class ArrayUtil { /** * Swaps the two specified elements in the specified array . */ private static void swap ( Object [ ] arr , int i , int j ) { } }
Object tmp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = tmp ;
public class BooleanOperation { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > test against a regular expression < / i > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > e . g . . . . valueOf ( n . property ( " name " ) ) . < b > REGEX ( " A . * " ) < / b > < / i > < / div > * < br / > */ public Concatenator REGEX ( String regex ) { } }
getBooleanOp ( ) . setOperator ( Operator . REGEX ) ; return this . operateOn ( regex ) ;
public class WampMessageParser { /** * Constructs a String by reading the characters from the Reader * @ param reader Reader to read from * @ return String containing the message * @ throws IOException in case of read failure */ private String convertToString ( Reader reader ) throws IOException { } }
StringBuilder stringBuilder = new StringBuilder ( ) ; int numChars ; char [ ] chars = new char [ 50 ] ; do { numChars = reader . read ( chars , 0 , chars . length ) ; if ( numChars > 0 ) { stringBuilder . append ( chars , 0 , numChars ) ; } } while ( numChars != - 1 ) ; return stringBuilder . toString ( ) ;
public class Phaser { /** * Possibly blocks and waits for phase to advance unless aborted . * Call only on root phaser . * @ param phase current phase * @ param node if non - null , the wait node to track interrupt and timeout ; * if null , denotes noninterruptible wait * @ return current phase */ private int internalAwaitAdvance ( int phase , QNode node ) { } }
// assert root = = this ; releaseWaiters ( phase - 1 ) ; // ensure old queue clean boolean queued = false ; // true when node is enqueued int lastUnarrived = 0 ; // to increase spins upon change int spins = SPINS_PER_ARRIVAL ; long s ; int p ; while ( ( p = ( int ) ( ( s = state ) >>> PHASE_SHIFT ) ) == phase ) { if ( node == null ) { // spinning in noninterruptible mode int unarrived = ( int ) s & UNARRIVED_MASK ; if ( unarrived != lastUnarrived && ( lastUnarrived = unarrived ) < NCPU ) spins += SPINS_PER_ARRIVAL ; boolean interrupted = Thread . interrupted ( ) ; if ( interrupted || -- spins < 0 ) { // need node to record intr node = new QNode ( this , phase , false , false , 0L ) ; node . wasInterrupted = interrupted ; } } else if ( node . isReleasable ( ) ) // done or aborted break ; else if ( ! queued ) { // push onto queue AtomicReference < QNode > head = ( phase & 1 ) == 0 ? evenQ : oddQ ; QNode q = node . next = head . get ( ) ; if ( ( q == null || q . phase == phase ) && ( int ) ( state >>> PHASE_SHIFT ) == phase ) // avoid stale enq queued = head . compareAndSet ( q , node ) ; } else { try { ForkJoinPool . managedBlock ( node ) ; } catch ( InterruptedException cantHappen ) { node . wasInterrupted = true ; } } } if ( node != null ) { if ( node . thread != null ) node . thread = null ; // avoid need for unpark ( ) if ( node . wasInterrupted && ! node . interruptible ) Thread . currentThread ( ) . interrupt ( ) ; if ( p == phase && ( p = ( int ) ( state >>> PHASE_SHIFT ) ) == phase ) return abortWait ( phase ) ; // possibly clean up on abort } releaseWaiters ( phase ) ; return p ;
public class ElasticSearchFrequentlyRelatedItemSearchProcessor { /** * Creates a query like : * " size " : 0, * " timeout " : 5000, * " query " : { * " constant _ score " : { * " filter " : { * " bool " : { * " must " : [ { * " term " : { * " related - with " : " apparentice you ' re hired " * " term " : { * " channel " : " bbc " * " facets " : { * " frequently - related - with " : { * " terms " : { * " field " : " id " , * " size " : 5, * " execution _ hint " : " map " */ private SearchRequestBuilder createFrequentlyRelatedContentSearch ( RelatedItemSearch search , Client searchClient ) { } }
SearchRequestBuilder sr = searchClient . prepareSearch ( ) ; sr . internalBuilder ( builder . createFrequentlyRelatedContentSearch ( search ) ) ; sr . setIndices ( indexName ) ; return sr ;
public class ELEvaluator { /** * Gets the parsed form of the given expression string . If the * parsed form is cached ( and caching is not bypassed ) , return the * cached form , otherwise parse and cache the value . Returns either * a String , Expression , or ExpressionString . */ public Object parseExpressionString ( String pExpressionString ) throws ELException { } }
// See if it ' s an empty String if ( pExpressionString . length ( ) == 0 ) { return "" ; } if ( ! ( mBypassCache ) && ( sCachedExpressionStrings == null ) ) { createExpressionStringMap ( ) ; } // See if it ' s in the cache Object ret = mBypassCache ? null : sCachedExpressionStrings . get ( pExpressionString ) ; if ( ret == null ) { // Parse the expression Reader r = new StringReader ( pExpressionString ) ; ELParser parser = new ELParser ( r ) ; try { ret = parser . ExpressionString ( ) ; if ( ! mBypassCache ) { sCachedExpressionStrings . put ( pExpressionString , ret ) ; } } catch ( ParseException exc ) { throw new ELException ( formatParseException ( pExpressionString , exc ) ) ; } catch ( TokenMgrError exc ) { // Note - this should never be reached , since the parser is // constructed to tokenize any input ( illegal inputs get // parsed to < BADLY _ ESCAPED _ STRING _ LITERAL > or // < ILLEGAL _ CHARACTER > throw new ELException ( exc . getMessage ( ) ) ; } } return ret ;
public class CmsLocaleManager { /** * Sets the default locale of the Java VM to < code > { @ link Locale # ENGLISH } < / code > if the * current default has any other language then English set . < p > * This is required because otherwise the default ( English ) resource bundles * would not be displayed for the English locale if a translated default locale exists . < p > * Here ' s an example of how this issues shows up : * On a German server , the default locale usually is < code > { @ link Locale # GERMAN } < / code > . * All English translations for OpenCms are located in the " default " message files , for example * < code > org . opencms . i18n . message . properties < / code > . If the German localization is installed , it will be * located in < code > org . opencms . i18n . message _ de . properties < / code > . If user has English selected * as his locale , the default Java lookup mechanism first tries to find * < code > org . opencms . i18n . message _ en . properties < / code > . However , this file does not exist , since the * English localization is kept in the default file . Next , the Java lookup mechanism tries to find the servers * default locale , which in this example is German . Since there is a German message file , the Java lookup mechanism * is finished and uses this German localization , not the default file . Therefore the * user get the German localization , not the English one . * Setting the default locale explicitly to English avoids this issue . < p > */ private static void setDefaultLocale ( ) { } }
// set the default locale to english // this is required because otherwise the default ( english ) resource bundles // would not be displayed for the english locale if a translated locale exists Locale oldLocale = Locale . getDefault ( ) ; if ( ! ( Locale . ENGLISH . getLanguage ( ) . equals ( oldLocale . getLanguage ( ) ) ) ) { // default language is not English try { Locale . setDefault ( Locale . ENGLISH ) ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_I18N_DEFAULT_LOCALE_2 , Locale . ENGLISH , oldLocale ) ) ; } } catch ( Exception e ) { // any Exception : the locale has not been changed , so there may be issues with the English // localization but OpenCms will run in general CmsLog . INIT . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_UNABLE_TO_SET_DEFAULT_LOCALE_2 , Locale . ENGLISH , oldLocale ) , e ) ; } } else { if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_I18N_KEEPING_DEFAULT_LOCALE_1 , oldLocale ) ) ; } } // initialize the static member with the new default m_defaultLocale = Locale . getDefault ( ) ;
public class OAuthProviderProcessingFilter { /** * Whether to skip processing for the specified request . * @ param request The request . * @ return Whether to skip processing . */ protected boolean skipProcessing ( HttpServletRequest request ) { } }
return ( ( request . getAttribute ( OAUTH_PROCESSING_HANDLED ) != null ) && ( Boolean . TRUE . equals ( request . getAttribute ( OAUTH_PROCESSING_HANDLED ) ) ) ) ;
public class DefaultEntityHandler { /** * 文字列型かどうかを判定する * @ param type JDBC上の型 * @ return 文字列型の場合 < code > true < / code > */ private boolean isStringType ( final JDBCType type ) { } }
return JDBCType . CHAR . equals ( type ) || JDBCType . NCHAR . equals ( type ) || JDBCType . VARCHAR . equals ( type ) || JDBCType . NVARCHAR . equals ( type ) || JDBCType . LONGNVARCHAR . equals ( type ) ;
public class NetworkAcl { /** * One or more entries ( rules ) in the network ACL . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setEntries ( java . util . Collection ) } or { @ link # withEntries ( java . util . Collection ) } if you want to override * the existing values . * @ param entries * One or more entries ( rules ) in the network ACL . * @ return Returns a reference to this object so that method calls can be chained together . */ public NetworkAcl withEntries ( NetworkAclEntry ... entries ) { } }
if ( this . entries == null ) { setEntries ( new com . amazonaws . internal . SdkInternalList < NetworkAclEntry > ( entries . length ) ) ; } for ( NetworkAclEntry ele : entries ) { this . entries . add ( ele ) ; } return this ;
public class StatisticsInner { /** * Retrieve the statistics for the account . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param filter The filter to apply on the operation . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < List < StatisticsModelInner > > listByAutomationAccountAsync ( String resourceGroupName , String automationAccountName , String filter , final ServiceCallback < List < StatisticsModelInner > > serviceCallback ) { } }
return ServiceFuture . fromResponse ( listByAutomationAccountWithServiceResponseAsync ( resourceGroupName , automationAccountName , filter ) , serviceCallback ) ;
public class PropertiesConfigHelper { /** * Returns the map of variantSet for the bundle * @ param bundleName * the bundle name * @ return the map of variantSet for the bundle */ public Map < String , VariantSet > getCustomBundleVariantSets ( String bundleName ) { } }
Map < String , VariantSet > variantSets = new HashMap < > ( ) ; StringTokenizer tk = new StringTokenizer ( getCustomBundleProperty ( bundleName , PropertiesBundleConstant . BUNDLE_FACTORY_CUSTOM_VARIANTS , "" ) , ";" ) ; while ( tk . hasMoreTokens ( ) ) { String [ ] mapEntry = tk . nextToken ( ) . trim ( ) . split ( ":" ) ; String type = mapEntry [ 0 ] ; String defaultVariant = mapEntry [ 1 ] ; String values = mapEntry [ 2 ] ; String [ ] variantsArray = StringUtils . split ( values , "," ) ; List < String > variants = new ArrayList < > ( ) ; variants . addAll ( Arrays . asList ( variantsArray ) ) ; VariantSet variantSet = new VariantSet ( type , defaultVariant , variants ) ; variantSets . put ( type , variantSet ) ; } return variantSets ;
public class AiMesh { /** * Returns the y - coordinate of a vertex bitangent . * @ param vertex the vertex index * @ return the y coordinate */ public float getTangentY ( int vertex ) { } }
if ( ! hasTangentsAndBitangents ( ) ) { throw new IllegalStateException ( "mesh has no bitangents" ) ; } checkVertexIndexBounds ( vertex ) ; return m_tangents . getFloat ( ( vertex * 3 + 1 ) * SIZEOF_FLOAT ) ;
public class IoServiceListenerSupport { /** * Calls { @ link IoServiceListener # sessionDestroyed ( IoSession ) } for all registered listeners . */ public void fireSessionDestroyed ( IoSession session ) { } }
// Try to remove the remaining empty session set after removal . if ( managedSessions . remove ( session . getId ( ) ) == null ) { return ; } // Fire session events . session . getFilterChain ( ) . fireSessionClosed ( ) ; // Fire listener events . try { for ( IoServiceListener l : listeners ) { try { l . sessionDestroyed ( session ) ; } catch ( Throwable e ) { ExceptionMonitor . getInstance ( ) . exceptionCaught ( e ) ; } } } finally { // Fire a virtual service deactivation event for the last session of the connector . if ( session . getService ( ) instanceof IoConnector ) { boolean lastSession ; synchronized ( managedSessions ) { lastSession = managedSessions . isEmpty ( ) ; } if ( lastSession ) { fireServiceDeactivated ( ) ; } } }
public class ntp_sync { /** * < pre > * Use this operation to get status of ntpd . * < / pre > */ public static ntp_sync [ ] get ( nitro_service client ) throws Exception { } }
ntp_sync resource = new ntp_sync ( ) ; resource . validate ( "get" ) ; return ( ntp_sync [ ] ) resource . get_resources ( client ) ;
public class CPOptionValuePersistenceImpl { /** * Removes the cp option value where companyId = & # 63 ; and externalReferenceCode = & # 63 ; from the database . * @ param companyId the company ID * @ param externalReferenceCode the external reference code * @ return the cp option value that was removed */ @ Override public CPOptionValue removeByC_ERC ( long companyId , String externalReferenceCode ) throws NoSuchCPOptionValueException { } }
CPOptionValue cpOptionValue = findByC_ERC ( companyId , externalReferenceCode ) ; return remove ( cpOptionValue ) ;
public class ModuleItemInfoImpl { /** * Use to register overriding modules . Such complex approach was used because overriding modules * is the only item that require additional parameter during registration . This parameter may be used * in disable predicate to differentiate overriding modules from normal modules . * @ param action registration action */ public static void overrideScope ( final Runnable action ) { } }
override . set ( true ) ; try { action . run ( ) ; } finally { override . remove ( ) ; }
public class LockFile { /** * Retrieves a < tt > LockFile < / tt > instance , initialized with a < tt > File < / tt > * object whose path is the canonical form of the one specified by the * given < tt > path < / tt > argument . < p > * The resulting < tt > LockFile < / tt > instance does not yet hold a lock * condition on the file with the given path , nor does it guarantee that the * file pre - exists or is created . * However , upon successful execution , it is guaranteed that all required * parent directories have been created and that the underlying platform has * verified the specified path is legal on the file system of the underlying * storage partition . * @ return a < tt > LockFile < / tt > instance initialized with a < tt > File < / tt > * object whose path is the one specified by the given < tt > path < / tt > * argument . * @ param path the path of the < tt > File < / tt > object with which the retrieved * < tt > LockFile < / tt > object is to be initialized * @ throws FileCanonicalizationException if an I / O error occurs upon * canonicalization of the given path , which is possible because * it may be illegal on the runtime file system or because * construction of the canonical path name may require native file * system queries * @ throws FileSecurityException if a required system property value cannot * be accessed , or if a security manager exists and its < tt > { @ link * java . lang . SecurityManager # checkRead } < / tt > method denies read * access to the file ; or if its < tt > { @ link * java . lang . SecurityManager # checkRead ( java . lang . String ) } < / tt > * method does not permit verification of the existence of all * necessary parent directories ; or if the < tt > { @ link * java . lang . SecurityManager # checkWrite ( java . lang . String ) } < / tt > * method does not permit all necessary parent directories to be * created */ public static final LockFile newLockFile ( final String path ) throws FileCanonicalizationException , FileSecurityException { } }
LockFile lockFile = newNIOLockFile ( ) ; if ( lockFile == null ) { lockFile = new LockFile ( ) ; } lockFile . setPath ( path ) ; return lockFile ;
public class UBL21DocumentTypes { /** * Get the domain object class of the passed namespace . * @ param sNamespace * The namespace URI of any UBL 2.1 document type . May be * < code > null < / code > . * @ return < code > null < / code > if no such UBL 2.1 document type exists . */ @ Nullable public static Class < ? > getImplementationClassOfNamespace ( @ Nullable final String sNamespace ) { } }
final EUBL21DocumentType eDocType = getDocumentTypeOfNamespace ( sNamespace ) ; return eDocType == null ? null : eDocType . getImplementationClass ( ) ;
public class AbstractJsonDeserializer { /** * Convenience method for subclasses . * @ param paramName the name of the parameter * @ param errorMessage the errormessage to add to the exception if the param does not exist . * @ return a stringparameter with given name . If it does not exist and the errormessage is provided , * an IOException is thrown with that message . if the errormessage is not provided , null is returned . * @ throws IOException Exception if the paramname does not exist and an errormessage is provided . */ protected Integer getIntParam ( String paramName , String errorMessage ) throws IOException { } }
return getIntParam ( paramName , errorMessage , ( Map < String , Object > ) inputParams . get ( ) ) ;
public class SliceOps { /** * Calculates the sliced size given the current size , number of elements * skip , and the number of elements to limit . * @ param size the current size * @ param skip the number of elements to skip , assumed to be > = 0 * @ param limit the number of elements to limit , assumed to be > = 0 , with * a value of { @ code Long . MAX _ VALUE } if there is no limit * @ return the sliced size */ private static long calcSize ( long size , long skip , long limit ) { } }
return size >= 0 ? Math . max ( - 1 , Math . min ( size - skip , limit ) ) : - 1 ;
public class ParallelClient { /** * Initialize . create the httpClientStore , tcpClientStore */ public void initialize ( ) { } }
if ( isClosed . get ( ) ) { logger . info ( "Initialing Parallel Client Resources: actor system, HttpClientStore, Task Manager ...." ) ; ActorConfig . createAndGetActorSystem ( ) ; httpClientStore . init ( ) ; tcpSshPingResourceStore . init ( ) ; isClosed . set ( false ) ; logger . info ( "Parallel Client Resources has been initialized." ) ; } else { logger . debug ( "NO OP. Parallel Client Resources has already been initialized." ) ; }
public class ConnectionResource { /** * Prepare statement . * @ param _ sql the sql * @ param _ strings the strings * @ return the prepared statement * @ throws SQLException the SQL exception */ public PreparedStatement prepareStatement ( final String _sql , final String [ ] _strings ) throws SQLException { } }
return getConnection ( ) . prepareStatement ( _sql , _strings ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Object } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link Object } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/citygml/bridge/2.0" , name = "_GenericApplicationPropertyOfIntBridgeInstallation" ) public JAXBElement < Object > create_GenericApplicationPropertyOfIntBridgeInstallation ( Object value ) { } }
return new JAXBElement < Object > ( __GenericApplicationPropertyOfIntBridgeInstallation_QNAME , Object . class , null , value ) ;
public class JsDocInfoParser { /** * Parses a { @ link JSDocInfo } object . This parsing method reads all tokens returned by the { @ link * JsDocTokenStream # getJsDocToken ( ) } method until the { @ link JsDocToken # EOC } is returned . * @ return { @ code true } if JSDoc information was correctly parsed , { @ code false } otherwise */ public boolean parse ( ) { } }
state = State . SEARCHING_ANNOTATION ; skipEOLs ( ) ; JsDocToken token = next ( ) ; // Always record that we have a comment . if ( jsdocBuilder . shouldParseDocumentation ( ) ) { ExtractionInfo blockInfo = extractBlockComment ( token ) ; token = blockInfo . token ; if ( ! blockInfo . string . isEmpty ( ) ) { jsdocBuilder . recordBlockDescription ( blockInfo . string ) ; } } else { if ( token != JsDocToken . ANNOTATION && token != JsDocToken . EOC ) { // Mark that there was a description , but don ' t bother marking // what it was . jsdocBuilder . recordBlockDescription ( "" ) ; } } return parseHelperLoop ( token , new ArrayList < ExtendedTypeInfo > ( ) ) ;
public class AutoMlClient { /** * Creates a model . Returns a Model in the [ response ] [ google . longrunning . Operation . response ] field * when it completes . When you create a model , several model evaluations are created for it : a * global evaluation , and one evaluation for each annotation spec . * < p > Sample code : * < pre > < code > * try ( AutoMlClient autoMlClient = AutoMlClient . create ( ) ) { * LocationName parent = LocationName . of ( " [ PROJECT ] " , " [ LOCATION ] " ) ; * Model model = Model . newBuilder ( ) . build ( ) ; * CreateModelRequest request = CreateModelRequest . newBuilder ( ) * . setParent ( parent . toString ( ) ) * . setModel ( model ) * . build ( ) ; * Model response = autoMlClient . createModelAsync ( request ) . get ( ) ; * < / code > < / pre > * @ param request The request object containing all of the parameters for the API call . * @ throws com . google . api . gax . rpc . ApiException if the remote call fails */ @ BetaApi ( "The surface for long-running operations is not stable yet and may change in the future." ) public final OperationFuture < Model , OperationMetadata > createModelAsync ( CreateModelRequest request ) { } }
return createModelOperationCallable ( ) . futureCall ( request ) ;
public class ChannelAction { /** * Sets the slowmode value , which limits the amount of time that individual users must wait * between sending messages in the new TextChannel . This is measured in seconds . * < p > Note that only { @ link net . dv8tion . jda . core . AccountType # CLIENT CLIENT } type accounts are * affected by slowmode , and that { @ link net . dv8tion . jda . core . AccountType # BOT BOT } accounts * are immune to the restrictions . * < br > Having { @ link net . dv8tion . jda . core . Permission # MESSAGE _ MANAGE MESSAGE _ MANAGE } or * { @ link net . dv8tion . jda . core . Permission # MANAGE _ CHANNEL MANAGE _ CHANNEL } permission also * grants immunity to slowmode . * @ param slowmode * The number of seconds required to wait between sending messages in the channel . * @ throws IllegalArgumentException * If the { @ code slowmode } is greater than 120 , or less than 0 * @ return The current ChannelAction , for chaining convenience */ @ CheckReturnValue public ChannelAction setSlowmode ( int slowmode ) { } }
Checks . check ( slowmode <= 120 && slowmode >= 0 , "Slowmode must be between 0 and 120 (seconds)!" ) ; this . slowmode = slowmode ; return this ;
public class ChromeCustomTabs { /** * Adds the required extras and flags to an { @ link Intent } for using Chrome Custom Tabs . If * Chrome Custom Tabs are not available or supported no change will be made to the { @ link Intent } . * @ param context * @ param intent The { @ link Intent } to add the extras and flags to for Chrome Custom Tabs . * @ return The { @ link Intent } supplied with additional extras and flags if Chrome Custom Tabs * are supported and available . */ public static Intent addChromeCustomTabsExtras ( Context context , Intent intent ) { } }
if ( SDK_INT >= JELLY_BEAN_MR2 && ChromeCustomTabs . isAvailable ( context ) ) { Bundle extras = new Bundle ( ) ; extras . putBinder ( "android.support.customtabs.extra.SESSION" , null ) ; intent . putExtras ( extras ) ; intent . addFlags ( Intent . FLAG_ACTIVITY_MULTIPLE_TASK | Intent . FLAG_ACTIVITY_CLEAR_TASK ) ; } return intent ;
public class Exchanger { /** * Exchange function when arenas enabled . See above for explanation . * @ param item the ( non - null ) item to exchange * @ param timed true if the wait is timed * @ param ns if timed , the maximum wait time , else 0L * @ return the other thread ' s item ; or null if interrupted ; or * TIMED _ OUT if timed and timed out */ private final Object arenaExchange ( Object item , boolean timed , long ns ) { } }
Node [ ] a = arena ; Node p = participant . get ( ) ; for ( int i = p . index ; ; ) { // access slot at i int b , m , c ; long j ; // j is raw array offset Node q = ( Node ) U . getObjectVolatile ( a , j = ( i << ASHIFT ) + ABASE ) ; if ( q != null && U . compareAndSwapObject ( a , j , q , null ) ) { Object v = q . item ; // release q . match = item ; Thread w = q . parked ; if ( w != null ) U . unpark ( w ) ; return v ; } else if ( i <= ( m = ( b = bound ) & MMASK ) && q == null ) { p . item = item ; // offer if ( U . compareAndSwapObject ( a , j , null , p ) ) { long end = ( timed && m == 0 ) ? System . nanoTime ( ) + ns : 0L ; Thread t = Thread . currentThread ( ) ; // wait for ( int h = p . hash , spins = SPINS ; ; ) { Object v = p . match ; if ( v != null ) { U . putOrderedObject ( p , MATCH , null ) ; p . item = null ; // clear for next use p . hash = h ; return v ; } else if ( spins > 0 ) { h ^= h << 1 ; h ^= h >>> 3 ; h ^= h << 10 ; // xorshift if ( h == 0 ) // initialize hash h = SPINS | ( int ) t . getId ( ) ; else if ( h < 0 && // approx 50 % true ( -- spins & ( ( SPINS >>> 1 ) - 1 ) ) == 0 ) Thread . yield ( ) ; // two yields per wait } else if ( U . getObjectVolatile ( a , j ) != p ) spins = SPINS ; // releaser hasn ' t set match yet else if ( ! t . isInterrupted ( ) && m == 0 && ( ! timed || ( ns = end - System . nanoTime ( ) ) > 0L ) ) { U . putObject ( t , BLOCKER , this ) ; // emulate LockSupport p . parked = t ; // minimize window if ( U . getObjectVolatile ( a , j ) == p ) U . park ( false , ns ) ; p . parked = null ; U . putObject ( t , BLOCKER , null ) ; } else if ( U . getObjectVolatile ( a , j ) == p && U . compareAndSwapObject ( a , j , p , null ) ) { if ( m != 0 ) // try to shrink U . compareAndSwapInt ( this , BOUND , b , b + SEQ - 1 ) ; p . item = null ; p . hash = h ; i = p . index >>>= 1 ; // descend if ( Thread . interrupted ( ) ) return null ; if ( timed && m == 0 && ns <= 0L ) return TIMED_OUT ; break ; // expired ; restart } } } else p . item = null ; // clear offer } else { if ( p . bound != b ) { // stale ; reset p . bound = b ; p . collides = 0 ; i = ( i != m || m == 0 ) ? m : m - 1 ; } else if ( ( c = p . collides ) < m || m == FULL || ! U . compareAndSwapInt ( this , BOUND , b , b + SEQ + 1 ) ) { p . collides = c + 1 ; i = ( i == 0 ) ? m : i - 1 ; // cyclically traverse } else i = m + 1 ; // grow p . index = i ; } }
public class NumberType { /** * Converts a value to this type */ public Object convertToDefaultType ( SessionInterface session , Object a ) { } }
if ( a == null ) { return a ; } Type otherType ; if ( a instanceof Number ) { if ( a instanceof BigInteger ) { a = new BigDecimal ( ( BigInteger ) a ) ; } else if ( a instanceof Float ) { a = new Double ( ( ( Float ) a ) . doubleValue ( ) ) ; } else if ( a instanceof Byte ) { a = ValuePool . getInt ( ( ( Byte ) a ) . intValue ( ) ) ; } else if ( a instanceof Short ) { a = ValuePool . getInt ( ( ( Short ) a ) . intValue ( ) ) ; } if ( a instanceof Integer ) { otherType = Type . SQL_INTEGER ; } else if ( a instanceof Long ) { otherType = Type . SQL_BIGINT ; } else if ( a instanceof Double ) { otherType = Type . SQL_DOUBLE ; } else if ( a instanceof BigDecimal ) { // BEGIN Cherry - picked code change from hsqldb - 2.2.8 otherType = Type . SQL_DECIMAL_DEFAULT ; /* if ( typeCode = = Types . SQL _ DECIMAL | | typeCode = = Types . SQL _ NUMERIC ) { return convertToTypeLimits ( session , a ) ; BigDecimal val = ( BigDecimal ) a ; otherType = getNumberType ( Types . SQL _ DECIMAL , JavaSystem . precision ( val ) , scale ) ; */ // END Cherry - picked code change from hsqldb - 2.2.8 } else { throw Error . error ( ErrorCode . X_42561 ) ; } // BEGIN Cherry - picked code change from hsqldb - 2.2.8 switch ( typeCode ) { case Types . TINYINT : case Types . SQL_SMALLINT : case Types . SQL_INTEGER : return convertToInt ( session , a , Types . INTEGER ) ; case Types . SQL_BIGINT : return convertToLong ( session , a ) ; case Types . SQL_REAL : case Types . SQL_FLOAT : case Types . SQL_DOUBLE : return convertToDouble ( a ) ; case Types . SQL_NUMERIC : case Types . SQL_DECIMAL : { a = convertToDecimal ( a ) ; BigDecimal dec = ( BigDecimal ) a ; if ( scale != dec . scale ( ) ) { dec = dec . setScale ( scale , BigDecimal . ROUND_HALF_DOWN ) ; } return dec ; } default : throw Error . error ( ErrorCode . X_42561 ) ; } // END Cherry - picked code change from hsqldb - 2.2.8 } else if ( a instanceof String ) { otherType = Type . SQL_VARCHAR ; } else { throw Error . error ( ErrorCode . X_42561 ) ; } return convertToType ( session , a , otherType ) ;
public class CmsRenameView { /** * Changes the state of the widget . < p > * @ param state the state to change to */ void changeState ( State state ) { } }
m_state = state ; switch ( state ) { case validationRunning : m_cancelButton . setEnabled ( false ) ; m_okButton . setEnabled ( false ) ; clearValidationError ( ) ; break ; case validationFailed : m_okButton . setEnabled ( false ) ; m_cancelButton . setEnabled ( true ) ; break ; case validationUnknown : default : m_cancelButton . setEnabled ( true ) ; m_okButton . setEnabled ( true ) ; clearValidationError ( ) ; break ; }
public class Named { public void copy ( Copier aFrom ) { } }
if ( aFrom == null ) return ; Nameable from = ( Nameable ) aFrom ; this . name = from . getName ( ) ;
public class Polarizability { /** * Gets the numberOfHydrogen attribute of the Polarizability object . * @ param atomContainer Description of the Parameter * @ param atom Description of the Parameter * @ return The numberOfHydrogen value */ private int getNumberOfHydrogen ( IAtomContainer atomContainer , IAtom atom ) { } }
java . util . List < IBond > bonds = atomContainer . getConnectedBondsList ( atom ) ; IAtom connectedAtom ; int hCounter = 0 ; for ( IBond bond : bonds ) { connectedAtom = bond . getOther ( atom ) ; if ( connectedAtom . getSymbol ( ) . equals ( "H" ) ) { hCounter += 1 ; } } return hCounter ;
public class SDVertexParams { /** * Define the inputs to the DL4J SameDiff Vertex with specific names * @ param inputNames Names of the inputs . Number here also defines the number of vertex inputs * @ see # defineInputs ( int ) */ public void defineInputs ( String ... inputNames ) { } }
Preconditions . checkArgument ( inputNames != null && inputNames . length > 0 , "Input names must not be null, and must have length > 0: got %s" , inputNames ) ; this . inputs = Arrays . asList ( inputNames ) ;
public class JKNumbersUtil { /** * Adds the amounts . * @ param num1 the num 1 * @ param num2 the num 2 * @ return the double */ public static double addAmounts ( final double num1 , final double num2 ) { } }
final BigDecimal b1 = new BigDecimal ( num1 ) ; final BigDecimal b2 = new BigDecimal ( num2 ) ; BigDecimal b3 = b1 . add ( b2 ) ; b3 = b3 . setScale ( 3 , BigDecimal . ROUND_HALF_UP ) ; final double result = b3 . doubleValue ( ) ; return result ;
public class DiscussionCommentResourcesImpl { /** * Add a comment to a discussion . * It mirrors to the following Smartsheet REST API method : POST / discussion / { discussionId } / comments < / p > * @ param sheetId the sheet id * @ param discussionId the discussion id * @ param comment the comment to add * @ return the created comment * @ throws IllegalArgumentException if any argument is null or empty string * @ throws InvalidRequestException if there is any problem with the REST API request * @ throws AuthorizationException if there is any problem with the REST API authorization ( access token ) * @ throws ResourceNotFoundException if the resource cannot be found * @ throws ServiceUnavailableException if the REST API service is not available ( possibly due to rate limiting ) * @ throws SmartsheetException if there is any other error during the operation */ public Comment addComment ( long sheetId , long discussionId , Comment comment ) throws SmartsheetException { } }
return this . createResource ( "sheets/" + sheetId + "/discussions/" + discussionId + "/comments" , Comment . class , comment ) ;
public class YamlLoader { /** * Loads a YAML document from an { @ link InputStream } and builds a * { @ link YamlNode } tree that is under the provided top - level * { @ code rootName } key . This loading mode requires the topmost level * of the YAML document to be a mapping . * @ param inputStream The input stream to load the YAML from * @ param rootName The name of the root ' s key * @ return the tree built from the YAML document */ public static YamlNode load ( InputStream inputStream , String rootName ) { } }
try { Object document = getLoad ( ) . loadFromInputStream ( inputStream ) ; return buildDom ( rootName , document ) ; } catch ( Exception ex ) { throw new YamlException ( "An error occurred while loading and parsing the YAML stream" , ex ) ; }
public class Branch { /** * < p > Initialises a session with the Branch API , passing the { @ link Activity } and assigning a * { @ link BranchReferralInitListener } to perform an action upon successful initialisation . < / p > * @ param callback A { @ link BranchReferralInitListener } instance that will be called * following successful ( or unsuccessful ) initialisation of the session * with the Branch API . * @ param activity The calling { @ link Activity } for context . * @ return A { @ link Boolean } value , indicating < i > false < / i > if initialisation is * unsuccessful . */ public boolean initSession ( BranchReferralInitListener callback , Activity activity ) { } }
if ( customReferrableSettings_ == CUSTOM_REFERRABLE_SETTINGS . USE_DEFAULT ) { initUserSessionInternal ( callback , activity , true ) ; } else { boolean isReferrable = customReferrableSettings_ == CUSTOM_REFERRABLE_SETTINGS . REFERRABLE ; initUserSessionInternal ( callback , activity , isReferrable ) ; } return true ;
public class NewWordDiscover { /** * 提取词语 * @ param doc 大文本 * @ param size 需要提取词语的数量 * @ return 一个词语列表 */ public List < WordInfo > discover ( String doc , int size ) { } }
try { return discover ( new BufferedReader ( new StringReader ( doc ) ) , size ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; }
public class JaroDistanceTextSimilarity { /** * 计算两段文本为了保持相等需要的换位次数 * @ param text1 文本1 * @ param text2 文本2 * @ return 换位次数 */ private int transpositions ( String text1 , String text2 ) { } }
int transpositions = 0 ; for ( int i = 0 ; i < text1 . length ( ) ; i ++ ) { if ( text1 . charAt ( i ) != text2 . charAt ( i ) ) { transpositions ++ ; } } return transpositions ;
public class ContainerInstance { /** * Adds a new health check , with the default interval ( 60 seconds ) and timeout ( 0 milliseconds ) . * @ param name the name of the health check * @ param url the URL of the health check * @ return a HttpHealthCheck instance representing the health check that has been added * @ throws IllegalArgumentException if the name is empty , or the URL is not a well - formed URL */ @ Nonnull public HttpHealthCheck addHealthCheck ( String name , String url ) { } }
return addHealthCheck ( name , url , DEFAULT_HEALTH_CHECK_INTERVAL_IN_SECONDS , DEFAULT_HEALTH_CHECK_TIMEOUT_IN_MILLISECONDS ) ;
public class JKConversionUtil { /** * To integer . * @ param value the value * @ param defaultValue the default value * @ return the int */ public static int toInteger ( Object value , int defaultValue ) { } }
if ( value == null || value . toString ( ) . trim ( ) . equals ( "" ) ) { return defaultValue ; } if ( value instanceof Integer ) { return ( Integer ) value ; } return ( int ) JKConversionUtil . toDouble ( value ) ;
public class TheMovieDbApi { /** * This method is used to retrieve all of the basic information about a * movie collection . * You can get the ID needed for this method by making a getMovieInfo * request for the belongs _ to _ collection . * @ param collectionId collectionId * @ param language language * @ return CollectionInfo * @ throws MovieDbException exception */ public CollectionInfo getCollectionInfo ( int collectionId , String language ) throws MovieDbException { } }
return tmdbCollections . getCollectionInfo ( collectionId , language ) ;
public class BlueprintBeanProxyTargetLocator { /** * { @ inheritDoc } */ @ Override protected BeanReactor < BlueprintContainer > createStrategy ( ) { } }
if ( getBeanName ( ) . isEmpty ( ) ) { throw new IllegalStateException ( "Blueprint requires annotation name" ) ; } if ( overwrites == null || overwrites . size ( ) == 0 || ! overwrites . containsKey ( getBeanName ( ) ) ) { return new BlueprintBeanReactor ( getBeanName ( ) ) ; } return new BlueprintBeanReactor ( overwrites . get ( getBeanName ( ) ) ) ;
public class HttpFields { /** * Get multi headers * @ return Enumeration of the values , or null if no such header . * @ param name the case - insensitive field name */ public Enumeration getValues ( String name ) { } }
FieldInfo info = getFieldInfo ( name ) ; final Field field = getField ( info , true ) ; if ( field != null ) { return new Enumeration ( ) { Field f = field ; public boolean hasMoreElements ( ) { while ( f != null && f . _version != _version ) f = f . _next ; return f != null ; } public Object nextElement ( ) throws NoSuchElementException { if ( f == null ) throw new NoSuchElementException ( ) ; Field n = f ; do f = f . _next ; while ( f != null && f . _version != _version ) ; return n . _value ; } } ; } return null ;
public class ClassWriter { /** * Write code attribute of method . */ void writeCode ( Code code ) { } }
databuf . appendChar ( code . max_stack ) ; databuf . appendChar ( code . max_locals ) ; databuf . appendInt ( code . cp ) ; databuf . appendBytes ( code . code , 0 , code . cp ) ; databuf . appendChar ( code . catchInfo . length ( ) ) ; for ( List < char [ ] > l = code . catchInfo . toList ( ) ; l . nonEmpty ( ) ; l = l . tail ) { for ( int i = 0 ; i < l . head . length ; i ++ ) databuf . appendChar ( l . head [ i ] ) ; } int acountIdx = beginAttrs ( ) ; int acount = 0 ; if ( code . lineInfo . nonEmpty ( ) ) { int alenIdx = writeAttr ( names . LineNumberTable ) ; databuf . appendChar ( code . lineInfo . length ( ) ) ; for ( List < char [ ] > l = code . lineInfo . reverse ( ) ; l . nonEmpty ( ) ; l = l . tail ) for ( int i = 0 ; i < l . head . length ; i ++ ) databuf . appendChar ( l . head [ i ] ) ; endAttr ( alenIdx ) ; acount ++ ; } if ( genCrt && ( code . crt != null ) ) { CRTable crt = code . crt ; int alenIdx = writeAttr ( names . CharacterRangeTable ) ; int crtIdx = beginAttrs ( ) ; int crtEntries = crt . writeCRT ( databuf , code . lineMap , log ) ; endAttrs ( crtIdx , crtEntries ) ; endAttr ( alenIdx ) ; acount ++ ; } // counter for number of generic local variables if ( code . varDebugInfo && code . varBufferSize > 0 ) { int nGenericVars = 0 ; int alenIdx = writeAttr ( names . LocalVariableTable ) ; databuf . appendChar ( code . getLVTSize ( ) ) ; for ( int i = 0 ; i < code . varBufferSize ; i ++ ) { Code . LocalVar var = code . varBuffer [ i ] ; for ( Code . LocalVar . Range r : var . aliveRanges ) { // write variable info Assert . check ( r . start_pc >= 0 && r . start_pc <= code . cp ) ; databuf . appendChar ( r . start_pc ) ; Assert . check ( r . length > 0 && ( r . start_pc + r . length ) <= code . cp ) ; databuf . appendChar ( r . length ) ; VarSymbol sym = var . sym ; databuf . appendChar ( pool . put ( sym . name ) ) ; Type vartype = sym . erasure ( types ) ; databuf . appendChar ( pool . put ( typeSig ( vartype ) ) ) ; databuf . appendChar ( var . reg ) ; if ( needsLocalVariableTypeEntry ( var . sym . type ) ) { nGenericVars ++ ; } } } endAttr ( alenIdx ) ; acount ++ ; if ( nGenericVars > 0 ) { alenIdx = writeAttr ( names . LocalVariableTypeTable ) ; databuf . appendChar ( nGenericVars ) ; int count = 0 ; for ( int i = 0 ; i < code . varBufferSize ; i ++ ) { Code . LocalVar var = code . varBuffer [ i ] ; VarSymbol sym = var . sym ; if ( ! needsLocalVariableTypeEntry ( sym . type ) ) continue ; for ( Code . LocalVar . Range r : var . aliveRanges ) { // write variable info databuf . appendChar ( r . start_pc ) ; databuf . appendChar ( r . length ) ; databuf . appendChar ( pool . put ( sym . name ) ) ; databuf . appendChar ( pool . put ( typeSig ( sym . type ) ) ) ; databuf . appendChar ( var . reg ) ; count ++ ; } } Assert . check ( count == nGenericVars ) ; endAttr ( alenIdx ) ; acount ++ ; } } if ( code . stackMapBufferSize > 0 ) { if ( debugstackmap ) System . out . println ( "Stack map for " + code . meth ) ; int alenIdx = writeAttr ( code . stackMap . getAttributeName ( names ) ) ; writeStackMap ( code ) ; endAttr ( alenIdx ) ; acount ++ ; } acount += writeTypeAnnotations ( code . meth . getRawTypeAttributes ( ) , true ) ; endAttrs ( acountIdx , acount ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcCraneRailFShapeProfileDef ( ) { } }
if ( ifcCraneRailFShapeProfileDefEClass == null ) { ifcCraneRailFShapeProfileDefEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 128 ) ; } return ifcCraneRailFShapeProfileDefEClass ;
public class SegmentGroup { /** * List of dimensions to include or exclude . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDimensions ( java . util . Collection ) } or { @ link # withDimensions ( java . util . Collection ) } if you want to * override the existing values . * @ param dimensions * List of dimensions to include or exclude . * @ return Returns a reference to this object so that method calls can be chained together . */ public SegmentGroup withDimensions ( SegmentDimensions ... dimensions ) { } }
if ( this . dimensions == null ) { setDimensions ( new java . util . ArrayList < SegmentDimensions > ( dimensions . length ) ) ; } for ( SegmentDimensions ele : dimensions ) { this . dimensions . add ( ele ) ; } return this ;
public class PlaceRecognition { /** * 维特比算法求解最优标签 * @ param roleTagList * @ return */ public static List < NS > viterbiCompute ( List < EnumItem < NS > > roleTagList ) { } }
return Viterbi . computeEnum ( roleTagList , PlaceDictionary . transformMatrixDictionary ) ;
public class Pyramid { /** * 该塔中一共有几个8度空间 */ public int buildOctaves ( ImagePixelArray source , float scale , int levelsPerOctave , float octaveSigm , int minSize ) { } }
this . octaves = new ArrayList < OctaveSpace > ( ) ; OctaveSpace downSpace = null ; ImagePixelArray prev = source ; while ( prev != null && prev . width >= minSize && prev . height >= minSize ) { OctaveSpace osp = new OctaveSpace ( ) ; // Create both the gaussian filtered images and the DOG maps osp . makeGaussianImgs ( prev , scale , levelsPerOctave , octaveSigm ) ; osp . makeGaussianDiffImgs ( ) ; octaves . add ( osp ) ; prev = osp . getLastGaussianImg ( ) . halved ( ) ; if ( downSpace != null ) downSpace . up = osp ; osp . down = downSpace ; downSpace = osp ; scale *= 2.0 ; } return ( octaves . size ( ) ) ;
public class UcumEssenceService { /** * / * ( non - Javadoc ) * @ see org . eclipse . ohf . ucum . UcumServiceEx # getProperties ( ) */ @ Override public Set < String > getProperties ( ) { } }
Set < String > result = new HashSet < String > ( ) ; for ( DefinedUnit unit : model . getDefinedUnits ( ) ) { result . add ( unit . getProperty ( ) ) ; } return result ;
public class AutoCompleteTextFieldComponent { /** * Shows the validation success icon in the textfield * @ param text * the text to store in the UI state object */ public void showValidationSuccesIcon ( final String text ) { } }
validationIcon . setValue ( FontAwesome . CHECK_CIRCLE . getHtml ( ) ) ; validationIcon . setStyleName ( SPUIStyleDefinitions . SUCCESS_ICON ) ; filterManagementUIState . setFilterQueryValue ( text ) ; filterManagementUIState . setIsFilterByInvalidFilterQuery ( Boolean . FALSE ) ;
public class Vector2d { /** * / * ( non - Javadoc ) * @ see org . joml . Vector2dc # add ( org . joml . Vector2fc , org . joml . Vector2d ) */ public Vector2d add ( Vector2fc v , Vector2d dest ) { } }
dest . x = x + v . x ( ) ; dest . y = y + v . y ( ) ; return dest ;
public class ThriftService { /** * Choose the next Cassandra host name in the list or a random one . */ private String chooseHost ( String [ ] dbHosts ) { } }
String host = null ; synchronized ( m_lastHostLock ) { if ( dbHosts . length == 1 ) { host = dbHosts [ 0 ] ; } else if ( ! Utils . isEmpty ( m_lastHost ) ) { for ( int index = 0 ; host == null && index < dbHosts . length ; index ++ ) { if ( dbHosts [ index ] . equals ( m_lastHost ) ) { host = dbHosts [ ( ++ index ) % dbHosts . length ] ; } } } if ( host == null ) { host = dbHosts [ new Random ( ) . nextInt ( dbHosts . length ) ] ; } m_lastHost = host ; } return host ;
public class AmBaseSpout { /** * Not use this class ' s key history function , and not use MessageId ( Id identify by storm ) . < br > * Send message to downstream component with grouping key . < br > * Use following situation . * < ol > * < li > Not use this class ' s key history function . < / li > * < li > Not use storm ' s fault detect function . < / li > * < / ol > * @ param message sending message * @ param groupingKey grouping key */ protected void emitWithNoKeyIdAndGrouping ( StreamMessage message , String groupingKey ) { } }
this . getCollector ( ) . emit ( new Values ( groupingKey , message ) ) ;
public class DataRetrievalPolicy { /** * The policy rule . Although this is a list type , currently there must be only one rule , which contains a Strategy * field and optionally a BytesPerHour field . * @ param rules * The policy rule . Although this is a list type , currently there must be only one rule , which contains a * Strategy field and optionally a BytesPerHour field . */ public void setRules ( java . util . Collection < DataRetrievalRule > rules ) { } }
if ( rules == null ) { this . rules = null ; return ; } this . rules = new java . util . ArrayList < DataRetrievalRule > ( rules ) ;
public class PortalPropertyEditorRegistrar { /** * / * ( non - Javadoc ) * @ see org . springframework . beans . PropertyEditorRegistrar # registerCustomEditors ( org . springframework . beans . PropertyEditorRegistry ) */ @ Override public void registerCustomEditors ( PropertyEditorRegistry registry ) { } }
if ( this . propertyEditors == null ) { this . logger . warn ( "No PropertyEditors Map configured, returning with no action taken." ) ; return ; } for ( final Map . Entry < Class < ? > , PropertyEditor > editorEntry : this . propertyEditors . entrySet ( ) ) { final Class < ? > requiredType = editorEntry . getKey ( ) ; final PropertyEditor editor = editorEntry . getValue ( ) ; if ( this . logger . isTraceEnabled ( ) ) { this . logger . trace ( "Registering PropertyEditor '" + editor + "' for type '" + requiredType + "'" ) ; } registry . registerCustomEditor ( requiredType , editor ) ; }
public class ControllerRegistry { /** * Register all controller methods in the specified packages . * @ param packages */ public void register ( Package ... packages ) { } }
List < String > packageNames = Arrays . stream ( packages ) . map ( Package :: getName ) . collect ( Collectors . toList ( ) ) ; register ( packageNames . toArray ( new String [ packageNames . size ( ) ] ) ) ;
public class LineDataImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . LINE_DATA__LINEDATA : setLinedata ( LINEDATA_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class ComputeNodeDeleteUserOptions { /** * Set the time the request was issued . Client libraries typically set this to the current system clock time ; set it explicitly if you are calling the REST API directly . * @ param ocpDate the ocpDate value to set * @ return the ComputeNodeDeleteUserOptions object itself . */ public ComputeNodeDeleteUserOptions withOcpDate ( DateTime ocpDate ) { } }
if ( ocpDate == null ) { this . ocpDate = null ; } else { this . ocpDate = new DateTimeRfc1123 ( ocpDate ) ; } return this ;
public class syslog_aaa { /** * < pre > * Use this operation to delete aaa syslog message details . . * < / pre > */ public static syslog_aaa delete ( nitro_service client , syslog_aaa resource ) throws Exception { } }
resource . validate ( "delete" ) ; return ( ( syslog_aaa [ ] ) resource . delete_resource ( client ) ) [ 0 ] ;
public class PdfMBeansReport { /** * Affiche l ' arbre des MBeans . * @ throws DocumentException e */ void writeTree ( ) throws DocumentException { } }
// MBeans pour la plateforme margin = 0 ; final MBeanNode platformNode = mbeans . get ( 0 ) ; writeTree ( platformNode . getChildren ( ) ) ; for ( final MBeanNode node : mbeans ) { if ( node != platformNode ) { newPage ( ) ; addToDocument ( new Chunk ( node . getName ( ) , boldFont ) ) ; margin = 0 ; writeTree ( node . getChildren ( ) ) ; } }
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcTShapeProfileDef ( ) { } }
if ( ifcTShapeProfileDefEClass == null ) { ifcTShapeProfileDefEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 694 ) ; } return ifcTShapeProfileDefEClass ;
public class PluginRegistry { /** * Returns all the plugins for a given repository that are instances * of a certain class . * @ param pluginClass the class the plugin must implement to be selected . * @ return List list of plugins from the repository . */ public List getPlugins ( final Class pluginClass ) { } }
synchronized ( pluginMap ) { List pluginList = new ArrayList ( pluginMap . size ( ) ) ; Iterator iter = pluginMap . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Object plugin = iter . next ( ) ; if ( pluginClass . isInstance ( plugin ) ) { pluginList . add ( plugin ) ; } } return pluginList ; }