signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class BuildTasksInner { /** * Get the source control properties for a build task . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param buildTaskName The name of the container registry build task . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the SourceRepositoryPropertiesInner object */ public Observable < ServiceResponse < SourceRepositoryPropertiesInner > > listSourceRepositoryPropertiesWithServiceResponseAsync ( String resourceGroupName , String registryName , String buildTaskName ) { } }
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( registryName == null ) { throw new IllegalArgumentException ( "Parameter registryName is required and cannot be null." ) ; } if ( buildTaskName == null ) { throw new IllegalArgumentException ( "Parameter buildTaskName is required and cannot be null." ) ; } final String apiVersion = "2018-02-01-preview" ; return service . listSourceRepositoryProperties ( this . client . subscriptionId ( ) , resourceGroupName , registryName , buildTaskName , apiVersion , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < SourceRepositoryPropertiesInner > > > ( ) { @ Override public Observable < ServiceResponse < SourceRepositoryPropertiesInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < SourceRepositoryPropertiesInner > clientResponse = listSourceRepositoryPropertiesDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class ArcEagerBeamTrainer { /** * 获取 zero cost oracle * @ param instance 训练实例 * @ param oracles 当前的oracle * @ param newOracles 储存新oracle * @ return 这些 oracles 中在模型看来分数最大的那个 * @ throws Exception */ private Configuration zeroCostDynamicOracle ( Instance instance , Collection < Configuration > oracles , Collection < Configuration > newOracles ) { } }
float bestScore = Float . NEGATIVE_INFINITY ; Configuration bestScoringOracle = null ; for ( Configuration configuration : oracles ) { if ( ! configuration . state . isTerminalState ( ) ) { State currentState = configuration . state ; Object [ ] features = FeatureExtractor . extractAllParseFeatures ( configuration , featureLength ) ; // I only assumed that we need zero cost ones if ( instance . actionCost ( Action . Shift , - 1 , currentState ) == 0 ) { Configuration newConfig = configuration . clone ( ) ; float score = classifier . shiftScore ( features , false ) ; ArcEager . shift ( newConfig . state ) ; newConfig . addAction ( 0 ) ; newConfig . addScore ( score ) ; newOracles . add ( newConfig ) ; if ( newConfig . getScore ( true ) > bestScore ) { bestScore = newConfig . getScore ( true ) ; bestScoringOracle = newConfig ; } } if ( ArcEager . canDo ( Action . RightArc , currentState ) ) { float [ ] rightArcScores = classifier . rightArcScores ( features , false ) ; for ( int dependency : dependencyRelations ) { if ( instance . actionCost ( Action . RightArc , dependency , currentState ) == 0 ) { Configuration newConfig = configuration . clone ( ) ; float score = rightArcScores [ dependency ] ; ArcEager . rightArc ( newConfig . state , dependency ) ; newConfig . addAction ( 3 + dependency ) ; newConfig . addScore ( score ) ; newOracles . add ( newConfig ) ; if ( newConfig . getScore ( true ) > bestScore ) { bestScore = newConfig . getScore ( true ) ; bestScoringOracle = newConfig ; } } } } if ( ArcEager . canDo ( Action . LeftArc , currentState ) ) { float [ ] leftArcScores = classifier . leftArcScores ( features , false ) ; for ( int dependency : dependencyRelations ) { if ( instance . actionCost ( Action . LeftArc , dependency , currentState ) == 0 ) { Configuration newConfig = configuration . clone ( ) ; float score = leftArcScores [ dependency ] ; ArcEager . leftArc ( newConfig . state , dependency ) ; newConfig . addAction ( 3 + dependencyRelations . size ( ) + dependency ) ; newConfig . addScore ( score ) ; newOracles . add ( newConfig ) ; if ( newConfig . getScore ( true ) > bestScore ) { bestScore = newConfig . getScore ( true ) ; bestScoringOracle = newConfig ; } } } } if ( instance . actionCost ( Action . Reduce , - 1 , currentState ) == 0 ) { Configuration newConfig = configuration . clone ( ) ; float score = classifier . reduceScore ( features , false ) ; ArcEager . reduce ( newConfig . state ) ; newConfig . addAction ( 1 ) ; newConfig . addScore ( score ) ; newOracles . add ( newConfig ) ; if ( newConfig . getScore ( true ) > bestScore ) { bestScore = newConfig . getScore ( true ) ; bestScoringOracle = newConfig ; } } } else { newOracles . add ( configuration ) ; } } return bestScoringOracle ;
public class VcfReader { /** * Read zero or more VCF samples from the specified file . * @ param file file to read from , must not be null * @ return zero or more VCF samples read from the specified file * @ throws IOException if an I / O error occurs */ public static Iterable < VcfSample > samples ( final File file ) throws IOException { } }
checkNotNull ( file ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( file ) ) ) { return samples ( reader ) ; }
public class AmazonRedshiftClient { /** * Returns the total amount of snapshot usage and provisioned storage for a user in megabytes . * @ param describeStorageRequest * @ return Result of the DescribeStorage operation returned by the service . * @ sample AmazonRedshift . DescribeStorage * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / redshift - 2012-12-01 / DescribeStorage " target = " _ top " > AWS API * Documentation < / a > */ @ Override public DescribeStorageResult describeStorage ( DescribeStorageRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDescribeStorage ( request ) ;
public class SequenceFunctionRefiner { /** * Like { @ link AlignmentTools # applyAlignment ( Map , int ) } , returns a map of k applications of alignmentMap . However , * it also sets loops of size less than k as ineligible . * @ param alignmentMap * f ( x ) * @ param k * @ param eligible * Eligible residues . Residues from small cycles are removed . * @ return f ^ k ( x ) */ private static Map < Integer , Integer > applyAlignmentAndCheckCycles ( Map < Integer , Integer > alignmentMap , int k , List < Integer > eligible ) { } }
// Convert to lists to establish a fixed order ( avoid concurrent modification ) List < Integer > preimage = new ArrayList < Integer > ( alignmentMap . keySet ( ) ) ; // currently unmodified List < Integer > image = new ArrayList < Integer > ( preimage ) ; for ( int n = 1 ; n <= k ; n ++ ) { // apply alignment for ( int i = 0 ; i < image . size ( ) ; i ++ ) { final Integer pre = image . get ( i ) ; final Integer post = ( pre == null ? null : alignmentMap . get ( pre ) ) ; image . set ( i , post ) ; // Make cycles ineligible if ( post != null && post . equals ( preimage . get ( i ) ) ) { eligible . remove ( preimage . get ( i ) ) ; // Could be O ( n ) with List impl } } } Map < Integer , Integer > imageMap = new HashMap < Integer , Integer > ( alignmentMap . size ( ) ) ; // now populate with actual values for ( int i = 0 ; i < preimage . size ( ) ; i ++ ) { Integer pre = preimage . get ( i ) ; Integer postK = image . get ( i ) ; imageMap . put ( pre , postK ) ; } return imageMap ;
public class ClassDoc { /** * Get a MethodDoc in this ClassDoc with a name and signature * matching that of the specified MethodDoc */ public MethodDoc getMatchingMethod ( MethodDoc method ) { } }
MethodDoc [ ] methods = getMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( method . getName ( ) . equals ( methods [ i ] . getName ( ) ) && method . getSignature ( ) . equals ( methods [ i ] . getSignature ( ) ) ) { return methods [ i ] ; } } return null ;
public class MotionImageInserterMarshaller { /** * Marshall the given parameter object . */ public void marshall ( MotionImageInserter motionImageInserter , ProtocolMarshaller protocolMarshaller ) { } }
if ( motionImageInserter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( motionImageInserter . getFramerate ( ) , FRAMERATE_BINDING ) ; protocolMarshaller . marshall ( motionImageInserter . getInput ( ) , INPUT_BINDING ) ; protocolMarshaller . marshall ( motionImageInserter . getInsertionMode ( ) , INSERTIONMODE_BINDING ) ; protocolMarshaller . marshall ( motionImageInserter . getOffset ( ) , OFFSET_BINDING ) ; protocolMarshaller . marshall ( motionImageInserter . getPlayback ( ) , PLAYBACK_BINDING ) ; protocolMarshaller . marshall ( motionImageInserter . getStartTime ( ) , STARTTIME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class BigtableSession { /** * { @ inheritDoc } */ @ Override public synchronized void close ( ) throws IOException { } }
if ( watchdog != null ) { watchdog . stop ( ) ; } long timeoutNanos = TimeUnit . SECONDS . toNanos ( 10 ) ; long endTimeNanos = System . nanoTime ( ) + timeoutNanos ; for ( ManagedChannel channel : managedChannels ) { channel . shutdown ( ) ; } for ( ManagedChannel channel : managedChannels ) { long awaitTimeNanos = endTimeNanos - System . nanoTime ( ) ; if ( awaitTimeNanos <= 0 ) { break ; } try { channel . awaitTermination ( awaitTimeNanos , TimeUnit . NANOSECONDS ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new IOException ( "Interrupted while closing the channelPools" ) ; } } for ( ManagedChannel channel : managedChannels ) { if ( ! channel . isTerminated ( ) ) { // Sometimes , gRPC channels don ' t close properly . We cannot explain why that happens , // nor can we reproduce the problem reliably . However , that doesn ' t actually cause // problems . Synchronous RPCs will throw exceptions right away . Buffered Mutator based // async operations are already logged . Direct async operations may have some trouble , // but users should not currently be using them directly . // NOTE : We haven ' t seen this problem since removing the RefreshingChannel LOG . info ( "Could not close %s after 10 seconds." , channel . getClass ( ) . getName ( ) ) ; break ; } } managedChannels . clear ( ) ; try { if ( dataGCJClient != null ) { dataGCJClient . close ( ) ; } } catch ( Exception ex ) { throw new IOException ( "Could not close the data client" , ex ) ; } try { if ( adminGCJClient != null ) { adminGCJClient . close ( ) ; } } catch ( Exception ex ) { throw new IOException ( "Could not close the admin client" , ex ) ; } BigtableClientMetrics . counter ( MetricLevel . Info , "sessions.active" ) . dec ( ) ;
public class EventSubscriptionsInner { /** * Create or update an event subscription . * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope . * @ param scope The identifier of the resource to which the event subscription needs to be created or updated . The scope can be a subscription , or a resource group , or a top level resource belonging to a resource provider namespace , or an EventGrid topic . For example , use ' / subscriptions / { subscriptionId } / ' for a subscription , ' / subscriptions / { subscriptionId } / resourceGroups / { resourceGroupName } ' for a resource group , and ' / subscriptions / { subscriptionId } / resourceGroups / { resourceGroupName } / providers / { resourceProviderNamespace } / { resourceType } / { resourceName } ' for a resource , and ' / subscriptions / { subscriptionId } / resourceGroups / { resourceGroupName } / providers / Microsoft . EventGrid / topics / { topicName } ' for an EventGrid topic . * @ param eventSubscriptionName Name of the event subscription . Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only . * @ param eventSubscriptionInfo Event subscription properties containing the destination and filter information * @ 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 < EventSubscriptionInner > createOrUpdateAsync ( String scope , String eventSubscriptionName , EventSubscriptionInner eventSubscriptionInfo , final ServiceCallback < EventSubscriptionInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( scope , eventSubscriptionName , eventSubscriptionInfo ) , serviceCallback ) ;
public class TargetsApi { /** * Save a personal favorite * Save a target to the agent & # 39 ; s personal favorites in the specified category . * @ param personalFavoriteData ( required ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < ApiSuccessResponse > savePersonalFavoriteWithHttpInfo ( PersonalFavoriteData personalFavoriteData ) throws ApiException { } }
com . squareup . okhttp . Call call = savePersonalFavoriteValidateBeforeCall ( personalFavoriteData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class SRTServletRequest { /** * Returns the name of the user making this request , or null if not * known . Same as the CGI variable REMOTE _ USER . * This logic is delegatd to the registered IWebAppSecurityCollaborator . */ public String getRemoteUser ( ) { } }
if ( WCCustomProperties . CHECK_REQUEST_OBJECT_IN_USE ) { checkRequestObjectInUse ( ) ; } String remoteUser = null ; Principal principal = getUserPrincipal ( ) ; if ( principal == null ) { // remoteUser = null ; if ( _request != null ) { remoteUser = _request . getRemoteUser ( ) ; } } else { remoteUser = principal . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "getRemoteUser" , "(security enabled)" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { // 306998.15 logger . logp ( Level . FINE , CLASS_NAME , "getRemoteUser" , "user=" + remoteUser ) ; } return remoteUser ;
public class MyHTTPUtils { /** * Get the response headers for URL * @ param stringUrl URL to use * @ return headers HTTP Headers * @ throws IOException I / O error happened */ public static Map < String , List < String > > getResponseHeaders ( String stringUrl ) throws IOException { } }
return getResponseHeaders ( stringUrl , true ) ;
public class IOUtils { /** * write file * @ param filePath * @ param stream * @ return * @ see { @ link # writeStream ( String , InputStream , boolean ) } */ public static boolean writeStream ( String filePath , InputStream stream ) throws IOException { } }
return writeStream ( filePath , stream , false ) ;
public class ExtractUtil { /** * Return the response bodies as String from a JavaDoc comment block . * @ param jdoc The javadoc block comment . * @ return the response bodies as String */ public static List < String > extractResponseBodies ( JavadocComment jdoc ) { } }
List < String > list = new ArrayList < > ( ) ; list . addAll ( extractDocAnnotation ( DOC_RESPONSE_BODY , jdoc ) ) ; return list ;
public class DomService { private static int sizeToInt ( String size ) { } }
int position = size . indexOf ( 'p' ) ; if ( position < 0 ) { return Integer . parseInt ( size ) ; } return Integer . parseInt ( size . substring ( 0 , position ) ) ;
public class HttpResponseParser { /** * Parses the reason phrase . This is called from the generated bytecode . * @ param buffer The buffer * @ param state The current state * @ param builder The exchange builder * @ return The number of bytes remaining */ @ SuppressWarnings ( "unused" ) final void handleReasonPhrase ( ByteBuffer buffer , ResponseParseState state , HttpResponseBuilder builder ) { } }
StringBuilder stringBuilder = state . stringBuilder ; while ( buffer . hasRemaining ( ) ) { final char next = ( char ) buffer . get ( ) ; if ( next == '\n' || next == '\r' ) { builder . setReasonPhrase ( stringBuilder . toString ( ) ) ; state . state = ResponseParseState . AFTER_REASON_PHRASE ; state . stringBuilder . setLength ( 0 ) ; state . parseState = 0 ; state . leftOver = ( byte ) next ; state . pos = 0 ; state . nextHeader = null ; return ; } else { stringBuilder . append ( next ) ; } }
public class JtsBinaryParser { /** * Parse the given { @ link org . postgis . binary . ValueGetter } into a JTS * { @ link org . locationtech . jts . geom . MultiLineString } . * @ param data { @ link org . postgis . binary . ValueGetter } to parse . * @ param srid SRID of the parsed geometries . * @ return The parsed { @ link org . locationtech . jts . geom . MultiLineString } . */ private MultiLineString parseMultiLineString ( ValueGetter data , int srid ) { } }
int count = data . getInt ( ) ; LineString [ ] strings = new LineString [ count ] ; this . parseGeometryArray ( data , strings , srid ) ; return JtsGeometry . geofac . createMultiLineString ( strings ) ;
public class RandomProjection { /** * Create a copy random projection by using matrix product with a random matrix * @ param data * @ return the projected matrix */ public INDArray project ( INDArray data ) { } }
long [ ] tShape = targetShape ( data . shape ( ) , eps , components , autoMode ) ; return data . mmul ( getProjectionMatrix ( tShape , this . rng ) ) ;
public class MultiMEProxyHandler { /** * Method that creates the NeighbourProxyListener instance for reading messages * from the Neighbours . It then registers the listener to start receiving * messages * @ throws SIResourceException Thrown if there are errors while * creating the */ private void createProxyListener ( ) throws SIResourceException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createProxyListener" ) ; // Create the proxy listener instance _proxyListener = new NeighbourProxyListener ( _neighbours , this ) ; /* * Now we can create our asynchronous consumer to listen on * SYSTEM . MENAME . PROXY . QUEUE Queue for receiving subscription * updates */ // 169897.1 modified parameters try { _proxyAsyncConsumer = _messageProcessor . getSystemConnection ( ) . createSystemConsumerSession ( _messageProcessor . getProxyHandlerDestAddr ( ) , // destination name null , // Destination filter null , // SelectionCriteria - discriminator and selector Reliability . ASSURED_PERSISTENT , // reliability false , // enable read ahead false , null , false ) ; // 169897.1 modified parameters _proxyAsyncConsumer . registerAsynchConsumerCallback ( _proxyListener , 0 , 0 , 1 , null ) ; _proxyAsyncConsumer . start ( false ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.proxyhandler.MultiMEProxyHandler.createProxyListener" , "1:1271:1.96" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createProxyListener" , "SIResourceException" ) ; // The Exceptions should already be NLS ' d throw new SIResourceException ( e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createProxyListener" ) ;
public class VisualStudioNETProjectWriter { /** * Returns true if the file has an extension that * appears in the group filter . * @ param filter * String group filter * @ param candidate * File file * @ return boolean true if member of group */ private boolean isGroupMember ( final String filter , final File candidate ) { } }
final String fileName = candidate . getName ( ) ; final int lastDot = fileName . lastIndexOf ( '.' ) ; if ( lastDot >= 0 && lastDot < fileName . length ( ) - 1 ) { final String extension = ";" + fileName . substring ( lastDot + 1 ) . toLowerCase ( ) + ";" ; final String semiFilter = ";" + filter + ";" ; return semiFilter . contains ( extension ) ; } return false ;
public class InternalService { /** * Returns observable to update a conversation . * @ param conversationId ID of a conversation to update . * @ param request Request with conversation details to update . * @ param eTag Tag to specify local data version . * @ return Observable to update a conversation . */ public Observable < ComapiResult < ConversationDetails > > updateConversation ( @ NonNull final String conversationId , @ NonNull final ConversationUpdate request , @ Nullable final String eTag ) { } }
final String token = getToken ( ) ; if ( sessionController . isCreatingSession ( ) ) { return getTaskQueue ( ) . queueUpdateConversation ( conversationId , request , eTag ) ; } else if ( TextUtils . isEmpty ( token ) ) { return Observable . error ( getSessionStateErrorDescription ( ) ) ; } else { return doUpdateConversation ( token , conversationId , request , eTag ) ; }
public class _ARouter { /** * Build postcard by path and group */ protected Postcard build ( String path , String group ) { } }
if ( TextUtils . isEmpty ( path ) || TextUtils . isEmpty ( group ) ) { throw new HandlerException ( Consts . TAG + "Parameter is invalid!" ) ; } else { PathReplaceService pService = ARouter . getInstance ( ) . navigation ( PathReplaceService . class ) ; if ( null != pService ) { path = pService . forString ( path ) ; } return new Postcard ( path , group ) ; }
public class PropertiesTask { /** * Public API . */ public Formula getFormula ( ) { } }
Reagent [ ] reagents = new Reagent [ ] { ResourceHelper . CONTEXT_SOURCE , ResourceHelper . LOCATION_TASK , AbstractContainerTask . SUBTASKS } ; final Formula rslt = new SimpleFormula ( getClass ( ) , reagents ) ; return rslt ;
public class BaseBankCardTrackData { /** * Verifies that the available data is consistent between Track 1 and * Track 2 , or any other track . * @ return True if the data is consistent . */ public boolean isConsistentWith ( final BaseBankCardTrackData other ) { } }
if ( this == other ) { return true ; } if ( other == null ) { return false ; } boolean equals = true ; if ( hasAccountNumber ( ) && other . hasAccountNumber ( ) ) { if ( ! getAccountNumber ( ) . equals ( other . getAccountNumber ( ) ) ) { equals = false ; } } if ( hasExpirationDate ( ) && other . hasExpirationDate ( ) ) { if ( ! getExpirationDate ( ) . equals ( other . getExpirationDate ( ) ) ) { equals = false ; } } if ( hasServiceCode ( ) && other . hasServiceCode ( ) ) { if ( ! getServiceCode ( ) . equals ( other . getServiceCode ( ) ) ) { equals = false ; } } return equals ;
public class TransTypes { /** * Add a bridge definition and enter corresponding method symbol in * local scope of origin . * @ param pos The source code position to be used for the definition . * @ param meth The method for which a bridge needs to be added * @ param impl That method ' s implementation ( possibly the method itself ) * @ param origin The class to which the bridge will be added * @ param hypothetical * True if the bridge method is not strictly necessary in the * binary , but is represented in the symbol table to detect * erasure clashes . * @ param bridges The list buffer to which the bridge will be added */ void addBridge ( DiagnosticPosition pos , MethodSymbol meth , MethodSymbol impl , ClassSymbol origin , boolean hypothetical , ListBuffer < JCTree > bridges ) { } }
make . at ( pos ) ; Type origType = types . memberType ( origin . type , meth ) ; Type origErasure = erasure ( origType ) ; // Create a bridge method symbol and a bridge definition without a body . Type bridgeType = meth . erasure ( types ) ; long flags = impl . flags ( ) & AccessFlags | SYNTHETIC | BRIDGE | ( origin . isInterface ( ) ? DEFAULT : 0 ) ; if ( hypothetical ) flags |= HYPOTHETICAL ; MethodSymbol bridge = new MethodSymbol ( flags , meth . name , bridgeType , origin ) ; /* once JDK - 6996415 is solved it should be checked if this approach can * be applied to method addOverrideBridgesIfNeeded */ bridge . params = createBridgeParams ( impl , bridge , bridgeType ) ; bridge . setAttributes ( impl ) ; if ( ! hypothetical ) { JCMethodDecl md = make . MethodDef ( bridge , null ) ; // The bridge calls this . impl ( . . ) , if we have an implementation // in the current class , super . impl ( . . . ) otherwise . JCExpression receiver = ( impl . owner == origin ) ? make . This ( origin . erasure ( types ) ) : make . Super ( types . supertype ( origin . type ) . tsym . erasure ( types ) , origin ) ; // The type returned from the original method . Type calltype = erasure ( impl . type . getReturnType ( ) ) ; // Construct a call of this . impl ( params ) , or super . impl ( params ) , // casting params and possibly results as needed . JCExpression call = make . Apply ( null , make . Select ( receiver , impl ) . setType ( calltype ) , translateArgs ( make . Idents ( md . params ) , origErasure . getParameterTypes ( ) , null ) ) . setType ( calltype ) ; JCStatement stat = ( origErasure . getReturnType ( ) . hasTag ( VOID ) ) ? make . Exec ( call ) : make . Return ( coerce ( call , bridgeType . getReturnType ( ) ) ) ; md . body = make . Block ( 0 , List . of ( stat ) ) ; // Add bridge to ` bridges ' buffer bridges . append ( md ) ; } // Add bridge to scope of enclosing class and ` overridden ' table . origin . members ( ) . enter ( bridge ) ; overridden . put ( bridge , meth ) ;
public class CompressionUtil { /** * Compresses the source file using a variety of supported compression * algorithms . This method will create a target file in the same * directory as the source file and will append a file extension matching * the compression algorithm used . For example , using " gzip " will mean a * source file of " app . log " would be compressed to " app . log . gz " . * @ param sourceFile The uncompressed file * @ param algorithm The compression algorithm to use * @ param deleteSourceFileAfterCompressed Delete the original source file * only if the compression was successful . * @ return The compressed file * @ throws FileAlreadyExistsException Thrown if the target file already * exists and an overwrite is not permitted . This exception is a * subclass of IOException , so its safe to only catch an IOException * if no specific action is required for this case . * @ throws IOException Thrown if an error occurs while attempting to * compress the source file . */ public static File compress ( File sourceFile , String algorithm , boolean deleteSourceFileAfterCompressed ) throws FileAlreadyExistsException , IOException { } }
return compress ( sourceFile , sourceFile . getParentFile ( ) , algorithm , deleteSourceFileAfterCompressed ) ;
public class AbstractCloseableIteratorCollection { /** * Copied from AbstractCollection since we need to close iterator */ @ Override public < T > T [ ] toArray ( T [ ] a ) { } }
// Estimate size of array ; be prepared to see more or fewer elements int size = size ( ) ; T [ ] r = a . length >= size ? a : ( T [ ] ) java . lang . reflect . Array . newInstance ( a . getClass ( ) . getComponentType ( ) , size ) ; try ( CloseableIterator < O > it = iterator ( ) ) { for ( int i = 0 ; i < r . length ; i ++ ) { if ( ! it . hasNext ( ) ) { // fewer elements than expected if ( a == r ) { r [ i ] = null ; // null - terminate } else if ( a . length < i ) { return Arrays . copyOf ( r , i ) ; } else { System . arraycopy ( r , 0 , a , 0 , i ) ; if ( a . length > i ) { a [ i ] = null ; } } return a ; } r [ i ] = ( T ) it . next ( ) ; } // more elements than expected return it . hasNext ( ) ? finishToArray ( r , it ) : r ; }
public class StringUtil { /** * Converts the specified byte array into a hexadecimal value and appends it to the specified buffer . */ public static < T extends Appendable > T toHexString ( T dst , byte [ ] src ) { } }
return toHexString ( dst , src , 0 , src . length ) ;
public class auditsyslogpolicy_vpnvserver_binding { /** * Use this API to fetch auditsyslogpolicy _ vpnvserver _ binding resources of given name . */ public static auditsyslogpolicy_vpnvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
auditsyslogpolicy_vpnvserver_binding obj = new auditsyslogpolicy_vpnvserver_binding ( ) ; obj . set_name ( name ) ; auditsyslogpolicy_vpnvserver_binding response [ ] = ( auditsyslogpolicy_vpnvserver_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class HashIndex { /** * Unlink a node from a linked list and link into the reclaimed list . * @ param index an index into hashTable * @ param lastLookup either - 1 or the node to which the target node is linked * @ param lookup the node to remove */ void unlinkNode ( int index , int lastLookup , int lookup ) { } }
// A VoltDB extension to diagnose ArrayOutOfBounds . voltDBhistory [ voltDBhistoryDepth ++ % voltDBhistoryCapacity ] = - index - 1 ; // End of VoltDB extension // unlink the node if ( lastLookup == - 1 ) { hashTable [ index ] = linkTable [ lookup ] ; } else { linkTable [ lastLookup ] = linkTable [ lookup ] ; } // add to reclaimed list linkTable [ lookup ] = reclaimedNodePointer ; reclaimedNodePointer = lookup ; elementCount -- ;
public class ResourceManager { /** * private Mixer getMixer ( ) * Info [ ] mixerInfo = AudioSystem . getMixerInfo ( ) ; * int i = 0; * boolean present = false ; * while ( i < mixerInfo . length & & ! present ) * if ( mixerInfo [ i ] . getName ( ) . contains ( " Java " ) ) * present = true ; * else * if ( present ) * return AudioSystem . getMixer ( mixerInfo [ i ] ) ; * else * return null ; * private Clip getClip ( Mixer pMixer , AudioInputStream pStream ) * DataLine . Info lineInfo = new DataLine . Info ( Clip . class , pStream . getFormat ( ) ) ; * try * return ( Clip ) AudioSystem . getLine ( lineInfo ) ; * catch ( LineUnavailableException e ) * return null ; */ private Clip loadSound ( String pName ) { } }
try { java . net . URL soundurl = ResourceManager . class . getResource ( "/res/" + pName + ".wav" ) ; AudioInputStream s = AudioSystem . getAudioInputStream ( soundurl ) ; Clip snd = AudioSystem . getClip ( ) ; snd . open ( s ) ; mSounds . put ( pName , snd ) ; return snd ; } catch ( Exception e ) { LOGGER . error ( "Unable to load sound " + pName + "." ) ; return null ; }
public class AbstractSingleton { /** * Implementation of { @ link IScopeDestructionAware } . Calls the protected * { @ link # onBeforeDestroy ( ) } method . */ @ Override public final void onBeforeScopeDestruction ( @ Nonnull final IScope aScopeToBeDestroyed ) throws Exception { } }
if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "onBeforeScopeDestruction for '" + toString ( ) + "' in scope " + aScopeToBeDestroyed . toString ( ) ) ; // Check init state if ( isInInstantiation ( ) ) { if ( LOGGER . isWarnEnabled ( ) ) LOGGER . warn ( "Object currently in instantiation is destroyed soon: " + toString ( ) ) ; } else if ( ! isInstantiated ( ) ) { if ( LOGGER . isWarnEnabled ( ) ) LOGGER . warn ( "Object not instantiated is destroyed soon: " + toString ( ) ) ; } // Check destruction state if ( isInPreDestruction ( ) ) { if ( LOGGER . isErrorEnabled ( ) ) LOGGER . error ( "Object already in pre destruction is destroyed soon again: " + toString ( ) ) ; } else if ( isInDestruction ( ) ) { if ( LOGGER . isErrorEnabled ( ) ) LOGGER . error ( "Object already in destruction is destroyed soon again: " + toString ( ) ) ; } else if ( isDestroyed ( ) ) { if ( LOGGER . isErrorEnabled ( ) ) LOGGER . error ( "Object already destroyed is destroyed soon again: " + toString ( ) ) ; } setInPreDestruction ( true ) ; onBeforeDestroy ( aScopeToBeDestroyed ) ; // do not reset PreDestruction - happens in onScopeDestruction
public class LoginResponseParser { /** * { @ inheritDoc } */ @ Override public final void clear ( ) { } }
super . clear ( ) ; continueFlag = false ; currentStageNumber = LoginStage . SECURITY_NEGOTIATION ; nextStageNumber = LoginStage . SECURITY_NEGOTIATION ; maxVersion = 0 ; activeVersion = 0 ; initiatorSessionID . clear ( ) ; targetSessionIdentifyingHandle = 0 ;
public class CmsFormatterConfigurationCacheState { /** * Gets the formatters as a multimap with the resource types as keys and caches this multimap if necessary . < p > * @ return the multimap of formatters by resource type */ private Multimap < String , I_CmsFormatterBean > getFormattersByType ( ) { } }
if ( m_formattersByType == null ) { ArrayListMultimap < String , I_CmsFormatterBean > formattersByType = ArrayListMultimap . create ( ) ; for ( I_CmsFormatterBean formatter : m_formatters . values ( ) ) { for ( String typeName : formatter . getResourceTypeNames ( ) ) { formattersByType . put ( typeName , formatter ) ; } } m_formattersByType = formattersByType ; } Multimap < String , I_CmsFormatterBean > result = Multimaps . unmodifiableMultimap ( m_formattersByType ) ; return result ;
public class Schema { /** * Get metadata about keyspace inner ColumnFamilies * @ param keyspaceName The name of the keyspace * @ return metadata about ColumnFamilies the belong to the given keyspace */ public Map < String , CFMetaData > getKeyspaceMetaData ( String keyspaceName ) { } }
assert keyspaceName != null ; KSMetaData ksm = keyspaces . get ( keyspaceName ) ; assert ksm != null ; return ksm . cfMetaData ( ) ;
public class GPXPoint { /** * Set a link to additional information about the point . * @ param attributes The current attributes being parsed */ public final void setLink ( Attributes attributes ) { } }
ptValues [ GpxMetadata . PTLINK ] = attributes . getValue ( GPXTags . HREF ) ;
public class ConnectionOptions { /** * Support for Java non - blocking IO * @ param nioParams The NIO mode can be configured through the NioParams class */ public ConnectionOptions withNioParams ( NioParams nioParams ) { } }
this . nioParams = nioParams ; factory . setNioParams ( Assert . notNull ( nioParams , "nioParams" ) ) ; factory . useNio ( ) ; return this ;
public class HpelHelper { /** * Determine if the specified Throwable contains a nested Throwable and return a reference * to that Throwable , if it exists . * @ param a non - null Throwable * @ return a reference to the nested Throwable . Null is returned if the specified Throwable * does not support nesting of Throwables or if the nested Throwable is null . */ private final static Throwable getNestedThrowable ( Throwable t ) { } }
// This is the current list of Throwables that we know of that support nested // exceptions . Add to the list if more show up . // D200273 // Throwables that support nested exceptions using getCause are not special any more since // in JDK1.4 that ' s what it ' s supposed to be called . // if ( t instanceof com . ibm . ws . exception . WsNestedException ) / / D200273 // return ( ( com . ibm . ws . exception . WsNestedException ) t ) . getCause ( ) ; / / D200273 Class < ? > cName = t . getClass ( ) ; if ( cName . getName ( ) . equals ( "org.omg.CORBA.portable.UnknownException" ) ) return ( Throwable ) getFieldValue ( t , "originalEx" ) ; if ( t instanceof java . rmi . RemoteException ) return ( ( java . rmi . RemoteException ) t ) . detail ; if ( t instanceof java . lang . reflect . InvocationTargetException ) return ( ( java . lang . reflect . InvocationTargetException ) t ) . getTargetException ( ) ; if ( t instanceof javax . naming . NamingException ) return ( ( javax . naming . NamingException ) t ) . getRootCause ( ) ; // 131536 package javax . ejb doesnot exist . Implemented Reflection API . // if ( t instanceof javax . ejb . EJBException ) // return ( ( javax . ejb . EJBException ) t ) . getCausedByException ( ) ; if ( cName . getName ( ) . equals ( "javax.ejb.EJBException" ) ) return invokeMethod ( t , "getCausedByException" ) ; if ( t instanceof java . sql . SQLException ) return ( ( java . sql . SQLException ) t ) . getNextException ( ) ; if ( cName . getName ( ) . equals ( "javax.mail.MessagingException" ) ) return invokeMethod ( t , "getNextException" ) ; if ( cName . getName ( ) . equals ( "org.xml.sax.SAXException" ) ) return invokeMethod ( t , "getException" ) ; // if ( t instanceof javax . xml . transform . TransformerException ) / / D200273 // return ( ( javax . xml . transform . TransformerException ) t ) . getCause ( ) ; / / D200273 if ( cName . getName ( ) . equals ( "javax.servlet.jsp.JspException" ) ) return invokeMethod ( t , "getCause" ) ; if ( cName . getName ( ) . equals ( "javax.servlet.ServletException" ) ) return invokeMethod ( t , "getRootCause" ) ; if ( cName . getName ( ) . equals ( "javax.resource.ResourceException" ) ) return invokeMethod ( t , "getCause" ) ; if ( cName . getName ( ) . equals ( "javax.jms.JMSException" ) ) return invokeMethod ( t , "getLinkedException" ) ; if ( t instanceof java . lang . reflect . UndeclaredThrowableException ) return ( ( java . lang . reflect . UndeclaredThrowableException ) t ) . getUndeclaredThrowable ( ) ; if ( t instanceof java . io . WriteAbortedException ) return ( ( java . io . WriteAbortedException ) t ) . detail ; if ( t instanceof java . rmi . server . ServerCloneException ) return ( ( java . rmi . server . ServerCloneException ) t ) . detail ; if ( t instanceof java . security . PrivilegedActionException ) return ( ( java . security . PrivilegedActionException ) t ) . getException ( ) ; // These Exceptions are not used in WebSphere currently , or the contact has // indicated we shouldn ' t process them . Leave here as comments , in case this changes . /* * if ( t instanceof java . lang . ClassNotFoundException ) * return ( ( java . lang . ClassNotFoundException ) t ) . getException ( ) ; */ return null ;
public class OverpassQuery { /** * Defines a global bounding box that is then implicitly added to all queries ( unless they specify a different explicit bounding box ) * @ param southernLat the southern latitude * @ param westernLon the western longitude * @ param northernLat the northern latitude * @ param easternLon the eastern longitude * @ return the current OverpassQuery object */ public OverpassQuery boundingBox ( double southernLat , double westernLon , double northernLat , double easternLon ) { } }
builder . append ( String . format ( Locale . US , "[bbox:%s,%s,%s,%s]" , southernLat , westernLon , northernLat , easternLon ) ) ; return this ;
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 917:1 : modifyStatement : s = ' modify ' parExpression ' { ' ( e = expression ( ' , ' e = expression ) * ) ? c = ' } ' ; */ public final void modifyStatement ( ) throws RecognitionException { } }
int modifyStatement_StartIndex = input . index ( ) ; Token s = null ; Token c = null ; ParserRuleReturnScope e = null ; ParserRuleReturnScope parExpression7 = null ; JavaModifyBlockDescr d = null ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 89 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 921:5 : ( s = ' modify ' parExpression ' { ' ( e = expression ( ' , ' e = expression ) * ) ? c = ' } ' ) // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 921:7 : s = ' modify ' parExpression ' { ' ( e = expression ( ' , ' e = expression ) * ) ? c = ' } ' { s = ( Token ) match ( input , 95 , FOLLOW_95_in_modifyStatement3951 ) ; if ( state . failed ) return ; pushFollow ( FOLLOW_parExpression_in_modifyStatement3953 ) ; parExpression7 = parExpression ( ) ; state . _fsp -- ; if ( state . failed ) return ; if ( state . backtracking == 0 ) { d = new JavaModifyBlockDescr ( ( parExpression7 != null ? input . toString ( parExpression7 . start , parExpression7 . stop ) : null ) ) ; d . setStart ( ( ( CommonToken ) s ) . getStartIndex ( ) ) ; d . setInScopeLocalVars ( getLocalDeclarations ( ) ) ; this . addBlockDescr ( d ) ; } match ( input , 121 , FOLLOW_121_in_modifyStatement3965 ) ; if ( state . failed ) return ; // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 929:9 : ( e = expression ( ' , ' e = expression ) * ) ? int alt125 = 2 ; int LA125_0 = input . LA ( 1 ) ; if ( ( ( LA125_0 >= CharacterLiteral && LA125_0 <= DecimalLiteral ) || LA125_0 == FloatingPointLiteral || ( LA125_0 >= HexLiteral && LA125_0 <= Identifier ) || ( LA125_0 >= OctalLiteral && LA125_0 <= StringLiteral ) || LA125_0 == 29 || LA125_0 == 36 || ( LA125_0 >= 40 && LA125_0 <= 41 ) || ( LA125_0 >= 44 && LA125_0 <= 45 ) || LA125_0 == 53 || LA125_0 == 65 || LA125_0 == 67 || ( LA125_0 >= 70 && LA125_0 <= 71 ) || LA125_0 == 77 || ( LA125_0 >= 79 && LA125_0 <= 80 ) || LA125_0 == 82 || LA125_0 == 85 || LA125_0 == 92 || LA125_0 == 94 || ( LA125_0 >= 97 && LA125_0 <= 98 ) || LA125_0 == 105 || LA125_0 == 108 || LA125_0 == 111 || LA125_0 == 115 || LA125_0 == 118 || LA125_0 == 126 ) ) { alt125 = 1 ; } switch ( alt125 ) { case 1 : // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 929:11 : e = expression ( ' , ' e = expression ) * { pushFollow ( FOLLOW_expression_in_modifyStatement3973 ) ; e = expression ( ) ; state . _fsp -- ; if ( state . failed ) return ; if ( state . backtracking == 0 ) { d . getExpressions ( ) . add ( ( e != null ? input . toString ( e . start , e . stop ) : null ) ) ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 930:12 : ( ' , ' e = expression ) * loop124 : while ( true ) { int alt124 = 2 ; int LA124_0 = input . LA ( 1 ) ; if ( ( LA124_0 == 43 ) ) { alt124 = 1 ; } switch ( alt124 ) { case 1 : // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 930:13 : ' , ' e = expression { match ( input , 43 , FOLLOW_43_in_modifyStatement3989 ) ; if ( state . failed ) return ; pushFollow ( FOLLOW_expression_in_modifyStatement3993 ) ; e = expression ( ) ; state . _fsp -- ; if ( state . failed ) return ; if ( state . backtracking == 0 ) { d . getExpressions ( ) . add ( ( e != null ? input . toString ( e . start , e . stop ) : null ) ) ; } } break ; default : break loop124 ; } } } break ; } c = ( Token ) match ( input , 125 , FOLLOW_125_in_modifyStatement4017 ) ; if ( state . failed ) return ; if ( state . backtracking == 0 ) { d . setEnd ( ( ( CommonToken ) c ) . getStopIndex ( ) ) ; } } } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { // do for sure before leaving if ( state . backtracking > 0 ) { memoize ( input , 89 , modifyStatement_StartIndex ) ; } }
public class DERBitString { /** * return the correct number of bytes for a bit string defined in * a 16 bit constant */ static protected byte [ ] getBytes ( int bitString ) { } }
if ( bitString > 255 ) { byte [ ] bytes = new byte [ 2 ] ; bytes [ 0 ] = ( byte ) ( bitString & 0xFF ) ; bytes [ 1 ] = ( byte ) ( ( bitString >> 8 ) & 0xFF ) ; return bytes ; } else { byte [ ] bytes = new byte [ 1 ] ; bytes [ 0 ] = ( byte ) ( bitString & 0xFF ) ; return bytes ; }
public class LongStream { /** * Returns the last element wrapped by { @ code OptionalLong } class . * If stream is empty , returns { @ code OptionalLong . empty ( ) } . * < p > This is a short - circuiting terminal operation . * @ return an { @ code OptionalLong } with the last element * or { @ code OptionalLong . empty ( ) } if the stream is empty * @ since 1.1.8 */ @ NotNull public OptionalLong findLast ( ) { } }
return reduce ( new LongBinaryOperator ( ) { @ Override public long applyAsLong ( long left , long right ) { return right ; } } ) ;
public class SimpleNodeListProvider { /** * Netflix specific impl so we can load from eureka . * @ param appName * @ return * @ throws IOException */ private Map < ServerGroup , EVCacheServerGroupConfig > bootstrapFromEureka ( String appName ) throws IOException { } }
if ( env == null || region == null ) return Collections . < ServerGroup , EVCacheServerGroupConfig > emptyMap ( ) ; final String url = "http://discoveryreadonly." + region + ".dyn" + env + ".netflix.net:7001/v2/apps/" + appName ; final CloseableHttpClient httpclient = HttpClients . createDefault ( ) ; final long start = System . currentTimeMillis ( ) ; CloseableHttpResponse httpResponse = null ; try { final RequestConfig requestConfig = RequestConfig . custom ( ) . setSocketTimeout ( timeout ) . setConnectTimeout ( timeout ) . build ( ) ; HttpGet httpGet = new HttpGet ( url ) ; httpGet . addHeader ( "Accept" , "application/json" ) ; httpGet . setConfig ( requestConfig ) ; httpResponse = httpclient . execute ( httpGet ) ; final int statusCode = httpResponse . getStatusLine ( ) . getStatusCode ( ) ; if ( ! ( statusCode >= 200 && statusCode < 300 ) ) { log . error ( "Status Code : " + statusCode + " for url " + url ) ; return Collections . < ServerGroup , EVCacheServerGroupConfig > emptyMap ( ) ; } final InputStreamReader in = new InputStreamReader ( httpResponse . getEntity ( ) . getContent ( ) , Charset . defaultCharset ( ) ) ; final JSONTokener js = new JSONTokener ( in ) ; final JSONObject jsonObj = new JSONObject ( js ) ; final JSONObject application = jsonObj . getJSONObject ( "application" ) ; final JSONArray instances = application . getJSONArray ( "instance" ) ; final Map < ServerGroup , EVCacheServerGroupConfig > serverGroupMap = new HashMap < ServerGroup , EVCacheServerGroupConfig > ( ) ; final ChainedDynamicProperty . BooleanProperty useBatchPort = EVCacheConfig . getInstance ( ) . getChainedBooleanProperty ( appName + ".use.batch.port" , "evcache.use.batch.port" , Boolean . FALSE , null ) ; for ( int i = 0 ; i < instances . length ( ) ; i ++ ) { final JSONObject instanceObj = instances . getJSONObject ( i ) ; final JSONObject metadataObj = instanceObj . getJSONObject ( "dataCenterInfo" ) . getJSONObject ( "metadata" ) ; final String asgName = instanceObj . getString ( "asgName" ) ; final DynamicBooleanProperty asgEnabled = EVCacheConfig . getInstance ( ) . getDynamicBooleanProperty ( asgName + ".enabled" , true ) ; if ( ! asgEnabled . get ( ) ) { if ( log . isDebugEnabled ( ) ) log . debug ( "ASG " + asgName + " is disabled so ignoring it" ) ; continue ; } final String zone = metadataObj . getString ( "availability-zone" ) ; final ServerGroup rSet = new ServerGroup ( zone , asgName ) ; final String localIp = metadataObj . getString ( "local-ipv4" ) ; final JSONObject instanceMetadataObj = instanceObj . getJSONObject ( "metadata" ) ; final String evcachePortString = instanceMetadataObj . optString ( "evcache.port" , "11211" ) ; final String rendPortString = instanceMetadataObj . optString ( "rend.port" , "0" ) ; final String rendBatchPortString = instanceMetadataObj . optString ( "rend.batch.port" , "0" ) ; final int rendPort = Integer . parseInt ( rendPortString ) ; final int rendBatchPort = Integer . parseInt ( rendBatchPortString ) ; final String rendMemcachedPortString = instanceMetadataObj . optString ( "rend.memcached.port" , "0" ) ; final String rendMementoPortString = instanceMetadataObj . optString ( "rend.memento.port" , "0" ) ; final int evcachePort = Integer . parseInt ( evcachePortString ) ; final int port = rendPort == 0 ? evcachePort : ( ( useBatchPort . get ( ) . booleanValue ( ) ) ? rendBatchPort : rendPort ) ; EVCacheServerGroupConfig config = serverGroupMap . get ( rSet ) ; if ( config == null ) { config = new EVCacheServerGroupConfig ( rSet , new HashSet < InetSocketAddress > ( ) , Integer . parseInt ( rendPortString ) , Integer . parseInt ( rendMemcachedPortString ) , Integer . parseInt ( rendMementoPortString ) ) ; serverGroupMap . put ( rSet , config ) ; // final ArrayList < Tag > tags = new ArrayList < Tag > ( 2 ) ; // tags . add ( new BasicTag ( EVCacheMetricsFactory . CACHE , appName ) ) ; // tags . add ( new BasicTag ( EVCacheMetricsFactory . SERVERGROUP , rSet . getName ( ) ) ) ; // EVCacheMetricsFactory . getInstance ( ) . getLongGauge ( EVCacheMetricsFactory . CONFIG , tags ) . set ( Long . valueOf ( port ) ) ; } final InetAddress add = InetAddresses . forString ( localIp ) ; final InetAddress inetAddress = InetAddress . getByAddress ( localIp , add . getAddress ( ) ) ; final InetSocketAddress address = new InetSocketAddress ( inetAddress , port ) ; config . getInetSocketAddress ( ) . add ( address ) ; } if ( log . isDebugEnabled ( ) ) log . debug ( "Returning : " + serverGroupMap ) ; return serverGroupMap ; } catch ( Exception e ) { if ( log . isDebugEnabled ( ) ) log . debug ( "URL : " + url + "; Timeout " + timeout , e ) ; } finally { if ( httpResponse != null ) { try { httpResponse . close ( ) ; } catch ( IOException e ) { } } if ( log . isDebugEnabled ( ) ) log . debug ( "Total Time to execute " + url + " " + ( System . currentTimeMillis ( ) - start ) + " msec." ) ; } return Collections . < ServerGroup , EVCacheServerGroupConfig > emptyMap ( ) ;
public class RegularPactTask { /** * Creates a writer for each output . Creates an OutputCollector which forwards its input to all writers . * The output collector applies the configured shipping strategies for each writer . */ protected void initOutputs ( ) throws Exception { } }
this . chainedTasks = new ArrayList < ChainedDriver < ? , ? > > ( ) ; this . eventualOutputs = new ArrayList < BufferWriter > ( ) ; this . output = initOutputs ( this , this . userCodeClassLoader , this . config , this . chainedTasks , this . eventualOutputs ) ;
public class SerializerIntrinsics { /** * Conditional Move . */ public final void cmov ( CONDITION cc , Register dst , Register src ) { } }
emitX86 ( conditionToCMovCC ( cc ) , dst , src ) ;
public class UserInterfaceApi { /** * Open Market Details Open the market details window for a specific typeID * inside the client - - - SSO Scope : esi - ui . open _ window . v1 * @ param typeId * The item type to open in market window ( required ) * @ param datasource * The server name you would like data from ( optional , default to * tranquility ) * @ param token * Access token to use if unable to set a header ( optional ) * @ throws ApiException * If fail to call the API , e . g . server error or cannot * deserialize the response body */ public void postUiOpenwindowMarketdetails ( Integer typeId , String datasource , String token ) throws ApiException { } }
postUiOpenwindowMarketdetailsWithHttpInfo ( typeId , datasource , token ) ;
public class GlobalUsersInner { /** * Get personal preferences for a user . * @ param userName The name of the user . * @ param personalPreferencesOperationsPayload Represents payload for any Environment operations like get , start , stop , connect * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the GetPersonalPreferencesResponseInner object */ public Observable < ServiceResponse < GetPersonalPreferencesResponseInner > > getPersonalPreferencesWithServiceResponseAsync ( String userName , PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload ) { } }
if ( userName == null ) { throw new IllegalArgumentException ( "Parameter userName is required and cannot be null." ) ; } if ( personalPreferencesOperationsPayload == null ) { throw new IllegalArgumentException ( "Parameter personalPreferencesOperationsPayload is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } Validator . validate ( personalPreferencesOperationsPayload ) ; return service . getPersonalPreferences ( userName , personalPreferencesOperationsPayload , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < GetPersonalPreferencesResponseInner > > > ( ) { @ Override public Observable < ServiceResponse < GetPersonalPreferencesResponseInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < GetPersonalPreferencesResponseInner > clientResponse = getPersonalPreferencesDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class TimeZoneAdapter { /** * TimeZone API ; calls through to wrapped time zone . */ @ Override public int getOffset ( int era , int year , int month , int day , int dayOfWeek , int millis ) { } }
return zone . getOffset ( era , year , month , day , dayOfWeek , millis ) ;
public class IntArrayBitWriter { /** * assumes count is non - zero */ private void doWrite ( int bits , int count ) { } }
int frontBits = ( ( int ) position ) & 31 ; int firstInt = ( int ) ( position >> 5 ) ; int sumBits = count + frontBits ; if ( sumBits <= 32 ) { int i = ints [ firstInt ] ; int mask = frontMask ( frontBits ) | backMask ( sumBits ) ; i &= mask ; i |= ( bits << ( 32 - sumBits ) ) & ~ mask ; ints [ firstInt ] = i ; } else { int i = ints [ firstInt ] ; int mask = frontMask ( frontBits ) ; i &= mask ; int lostBits = sumBits - 32 ; i |= ( bits >> lostBits ) & ~ mask ; ints [ firstInt ] = i ; i = ints [ firstInt + 1 ] ; mask = backMask ( lostBits ) ; i &= mask ; i |= ( bits << ( 32 - lostBits ) ) & ~ mask ; ints [ firstInt + 1 ] = i ; }
public class CmsLocationSuggestOracle { /** * Executes the suggestions callback . < p > * @ param request the suggestions request * @ param suggestions the suggestions * @ param callback the callback */ private static void respond ( Request request , List < LocationSuggestion > suggestions , Callback callback ) { } }
callback . onSuggestionsReady ( request , new Response ( suggestions ) ) ;
public class AmazonIdentityManagementClient { /** * Deletes the access key pair associated with the specified IAM user . * If you do not specify a user name , IAM determines the user name implicitly based on the AWS access key ID signing * the request . This operation works for access keys under the AWS account . Consequently , you can use this operation * to manage AWS account root user credentials even if the AWS account has no associated users . * @ param deleteAccessKeyRequest * @ return Result of the DeleteAccessKey operation returned by the service . * @ throws NoSuchEntityException * The request was rejected because it referenced a resource entity that does not exist . The error message * describes the resource . * @ throws LimitExceededException * The request was rejected because it attempted to create resources beyond the current AWS account limits . * The error message describes the limit exceeded . * @ throws ServiceFailureException * The request processing has failed because of an unknown error , exception or failure . * @ sample AmazonIdentityManagement . DeleteAccessKey * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / iam - 2010-05-08 / DeleteAccessKey " target = " _ top " > AWS API * Documentation < / a > */ @ Override public DeleteAccessKeyResult deleteAccessKey ( DeleteAccessKeyRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDeleteAccessKey ( request ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.ibm.com/websphere/wim" , name = "preferredLanguage" ) public JAXBElement < String > createPreferredLanguage ( String value ) { } }
return new JAXBElement < String > ( _PreferredLanguage_QNAME , String . class , null , value ) ;
public class FacesContext { /** * < p class = " changed _ added _ 2_0 " > Return the { @ link PartialViewContext } * for this request . The { @ link PartialViewContext } is used to control * the processing of specified components during the execute portion of * the request processing lifecycle ( known as partial processing ) and * the rendering of specified components ( known as partial rendering ) . * This method must return a new { @ link PartialViewContext } if one * does not already exist . < / p > * @ throws IllegalStateException if this method is called after * this instance has been released * @ since 2.0 */ public PartialViewContext getPartialViewContext ( ) { } }
if ( defaultFacesContext != null ) { return defaultFacesContext . getPartialViewContext ( ) ; } if ( ! isCreatedFromValidFactory ) { if ( partialViewContextForInvalidFactoryConstruction == null ) { PartialViewContextFactory f = ( PartialViewContextFactory ) FactoryFinder . getFactory ( FactoryFinder . PARTIAL_VIEW_CONTEXT_FACTORY ) ; partialViewContextForInvalidFactoryConstruction = f . getPartialViewContext ( FacesContext . getCurrentInstance ( ) ) ; } return partialViewContextForInvalidFactoryConstruction ; } throw new UnsupportedOperationException ( ) ;
public class SwidWriter { /** * Write the object into a file . * @ param swidTag * The root of content tree to be written . * @ param file * File to be written . If this file already exists , it will be overwritten . * @ throws com . labs64 . utils . swid . exception . SwidException * If any unexpected problem occurs during the writing . * @ throws IllegalArgumentException * If any of the method parameters are null */ public void write ( final SoftwareIdentificationTagComplexType swidTag , final File file ) { } }
JAXBUtils . writeObject ( objectFactory . createSoftwareIdentificationTag ( swidTag ) , file , getComment ( ) ) ;
public class LocalVariableTableAttr { /** * Add an entry into the LocalVariableTableAttr . */ public void addEntry ( LocalVariable localVar ) { } }
String varName = localVar . getName ( ) ; if ( varName == null ) { int num = localVar . getNumber ( ) ; varName = num < 0 ? "_" : ( "v" + num + '$' ) ; } ConstantUTFInfo name = getConstantPool ( ) . addConstantUTF ( varName ) ; ConstantUTFInfo descriptor = getConstantPool ( ) . addConstantUTF ( localVar . getType ( ) . getDescriptor ( ) ) ; mEntries . add ( new Entry ( localVar , name , descriptor ) ) ; mCleanEntries = null ;
public class HexUtil { /** * 将十六进制字符数组转换为字符串 * @ param hexStr 十六进制String * @ param charset 编码 * @ return 字符串 */ public static String decodeHexStr ( String hexStr , Charset charset ) { } }
if ( StrUtil . isEmpty ( hexStr ) ) { return hexStr ; } return decodeHexStr ( hexStr . toCharArray ( ) , charset ) ;
public class InventoryItem { /** * The inventory data of the inventory type . * @ return The inventory data of the inventory type . */ public java . util . List < java . util . Map < String , String > > getContent ( ) { } }
if ( content == null ) { content = new com . amazonaws . internal . SdkInternalList < java . util . Map < String , String > > ( ) ; } return content ;
public class DisassociateDomainRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DisassociateDomainRequest disassociateDomainRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( disassociateDomainRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( disassociateDomainRequest . getFleetArn ( ) , FLEETARN_BINDING ) ; protocolMarshaller . marshall ( disassociateDomainRequest . getDomainName ( ) , DOMAINNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CPFriendlyURLEntryPersistenceImpl { /** * Returns all the cp friendly url entries where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; and main = & # 63 ; . * @ param groupId the group ID * @ param classNameId the class name ID * @ param classPK the class pk * @ param main the main * @ return the matching cp friendly url entries */ @ Override public List < CPFriendlyURLEntry > findByG_C_C_M ( long groupId , long classNameId , long classPK , boolean main ) { } }
return findByG_C_C_M ( groupId , classNameId , classPK , main , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class ServletRESTRequestWithParams { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . rest . handler . RESTRequest # isUserInRole ( java . lang . String ) */ @ Override public boolean isUserInRole ( String role ) { } }
ServletRESTRequestImpl ret = castRequest ( ) ; if ( ret != null ) return ret . isUserInRole ( role ) ; return false ;
public class JcrNodeType { /** * { @ inheritDoc } * In JCR 1.0 , this method applied to all children . However , this was changed in the JSR - 283 specification to apply only to * nodes , and it is also deprecated . * @ see javax . jcr . nodetype . NodeType # canRemoveItem ( java . lang . String ) */ @ Override @ SuppressWarnings ( "deprecation" ) public boolean canRemoveItem ( String itemName ) { } }
CheckArg . isNotNull ( itemName , "itemName" ) ; Name childName = context . getValueFactories ( ) . getNameFactory ( ) . create ( itemName ) ; return nodeTypes ( ) . canRemoveItem ( this . name , null , childName , true ) ;
public class TypeMapStore { /** * Returns a TypeMap for the { @ code sourceType } , { @ code destinationType } and { @ code typeMapName } , * else null if none exists . */ @ SuppressWarnings ( "unchecked" ) public < S , D > TypeMap < S , D > get ( Class < S > sourceType , Class < D > destinationType , String typeMapName ) { } }
TypeMap < S , D > typeMap = ( TypeMap < S , D > ) typeMaps . get ( TypePair . of ( sourceType , destinationType , typeMapName ) ) ; if ( typeMap != null ) return typeMap ; for ( TypePair < ? , ? > typePair : getPrimitiveWrapperTypePairs ( sourceType , destinationType , typeMapName ) ) { typeMap = ( TypeMap < S , D > ) typeMaps . get ( typePair ) ; if ( typeMap != null ) return typeMap ; } return null ;
public class BigSet { /** * Deleting data files . */ public void delete ( ) { } }
for ( int i = 1 ; i < m_nextNo ; i ++ ) { new File ( m_fileName + "_" + i ) . delete ( ) ; } m_nextNo = 1 ;
public class AWSApplicationDiscoveryClient { /** * Starts an import task , which allows you to import details of your on - premises environment directly into AWS * without having to use the Application Discovery Service ( ADS ) tools such as the Discovery Connector or Discovery * Agent . This gives you the option to perform migration assessment and planning directly from your imported data , * including the ability to group your devices as applications and track their migration status . * To start an import request , do this : * < ol > * < li > * Download the specially formatted comma separated value ( CSV ) import template , which you can find here : < a * href = " https : / / s3 - us - west - 2 . amazonaws . com / templates - 7cffcf56 - bd96-4b1c - b45b - a5b42f282e46 / import _ template . csv " * > https : / / s3 - us - west - 2 . amazonaws . com / templates - 7cffcf56 - bd96-4b1c - b45b - a5b42f282e46 / import _ template . csv < / a > . * < / li > * < li > * Fill out the template with your server and application data . * < / li > * < li > * Upload your import file to an Amazon S3 bucket , and make a note of it ' s Object URL . Your import file must be in * the CSV format . * < / li > * < li > * Use the console or the < code > StartImportTask < / code > command with the AWS CLI or one of the AWS SDKs to import the * records from your file . * < / li > * < / ol > * For more information , including step - by - step procedures , see < a * href = " https : / / docs . aws . amazon . com / application - discovery / latest / userguide / discovery - import . html " > Migration Hub * Import < / a > in the < i > AWS Application Discovery Service User Guide < / i > . * < note > * There are limits to the number of import tasks you can create ( and delete ) in an AWS account . For more * information , see < a * href = " https : / / docs . aws . amazon . com / application - discovery / latest / userguide / ads _ service _ limits . html " > AWS Application * Discovery Service Limits < / a > in the < i > AWS Application Discovery Service User Guide < / i > . * < / note > * @ param startImportTaskRequest * @ return Result of the StartImportTask operation returned by the service . * @ throws ResourceInUseException * This issue occurs when the same < code > clientRequestToken < / code > is used with the * < code > StartImportTask < / code > action , but with different parameters . For example , you use the same request * token but have two different import URLs , you can encounter this issue . If the import tasks are meant to * be different , use a different < code > clientRequestToken < / code > , and try again . * @ throws AuthorizationErrorException * The AWS user account does not have permission to perform the action . Check the IAM policy associated with * this account . * @ throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range . Verify the parameter values and * try again . * @ throws ServerInternalErrorException * The server experienced an internal error . Try again . * @ sample AWSApplicationDiscovery . StartImportTask */ @ Override public StartImportTaskResult startImportTask ( StartImportTaskRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeStartImportTask ( request ) ;
public class KPointCrossover { /** * Has a probability < i > crossoverRate < / i > of performing the crossover where the operator will select at random multiple crossover points . < br > * Each gene comes from one of the two parents . Each time a crossover point is reached , the parent is switched . < br > * Otherwise , returns the genes of a random parent . * @ return The crossover result . See { @ link CrossoverResult } . */ @ Override public CrossoverResult crossover ( ) { } }
double [ ] [ ] parents = parentSelection . selectParents ( ) ; boolean isModified = false ; double [ ] resultGenes = parents [ 0 ] ; if ( rng . nextDouble ( ) < crossoverRate ) { // Select crossover points Deque < Integer > crossoverPoints = getCrossoverPointsGenerator ( parents [ 0 ] . length ) . getCrossoverPoints ( ) ; // Crossover resultGenes = new double [ parents [ 0 ] . length ] ; int currentParent = 0 ; int nextCrossover = crossoverPoints . pop ( ) ; for ( int i = 0 ; i < resultGenes . length ; ++ i ) { if ( i == nextCrossover ) { currentParent = currentParent == 0 ? 1 : 0 ; nextCrossover = crossoverPoints . pop ( ) ; } resultGenes [ i ] = parents [ currentParent ] [ i ] ; } isModified = true ; } return new CrossoverResult ( isModified , resultGenes ) ;
public class JQLChecker { /** * Extract all bind parameters and dynamic part used in query . * @ param jqlContext * the jql context * @ param jql * the jql * @ return the list */ public List < JQLPlaceHolder > extractPlaceHoldersAsList ( final JQLContext jqlContext , String jql ) { } }
return extractPlaceHolders ( jqlContext , jql , new ArrayList < JQLPlaceHolder > ( ) ) ;
public class CoronaJobHistory { /** * Logs launch time of job . * @ param startTime start time of job . * @ param totalMaps total maps assigned by jobtracker . * @ param totalReduces total reduces . */ public void logInited ( long startTime , int totalMaps , int totalReduces ) { } }
if ( disableHistory ) { return ; } if ( null != writers ) { log ( writers , RecordTypes . Job , new Keys [ ] { Keys . JOBID , Keys . LAUNCH_TIME , Keys . TOTAL_MAPS , Keys . TOTAL_REDUCES , Keys . JOB_STATUS } , new String [ ] { jobId . toString ( ) , String . valueOf ( startTime ) , String . valueOf ( totalMaps ) , String . valueOf ( totalReduces ) , Values . PREP . name ( ) } ) ; }
public class DefaultManagedConnectionPool { /** * { @ inheritDoc } */ public void removeIdleConnections ( ) { } }
long now = System . currentTimeMillis ( ) ; long timeoutSetting = pool . getConfiguration ( ) . getIdleTimeoutMinutes ( ) * 1000L * 60 ; CapacityDecrementer decrementer = pool . getCapacity ( ) . getDecrementer ( ) ; if ( decrementer == null || ! credential . equals ( pool . getPrefillCredential ( ) ) ) { decrementer = DefaultCapacity . DEFAULT_DECREMENTER ; } if ( TimedOutDecrementer . class . getName ( ) . equals ( decrementer . getClass ( ) . getName ( ) ) || TimedOutFIFODecrementer . class . getName ( ) . equals ( decrementer . getClass ( ) . getName ( ) ) ) { // Allow through each minute if ( now < ( lastIdleCheck + 60000L ) ) return ; } else { // Otherwise , strict check if ( now < ( lastIdleCheck + timeoutSetting ) ) return ; } lastIdleCheck = now ; long timeout = now - timeoutSetting ; int destroyed = 0 ; if ( pool . getLogger ( ) . isTraceEnabled ( ) ) { synchronized ( this ) { pool . getLogger ( ) . trace ( ManagedConnectionPoolUtility . fullDetails ( this , "removeIdleConnections(" + timeout + ")" , pool . getConnectionManager ( ) . getManagedConnectionFactory ( ) , pool . getConnectionManager ( ) , pool , pool . getConfiguration ( ) , listeners , pool . getInternalStatistics ( ) , credential . getSubject ( ) , credential . getConnectionRequestInfo ( ) ) ) ; } } else if ( pool . getLogger ( ) . isDebugEnabled ( ) ) { pool . getLogger ( ) . debug ( ManagedConnectionPoolUtility . details ( "removeIdleConnections(" + timeout + ")" , pool . getConfiguration ( ) . getId ( ) , getCount ( IN_USE , listeners ) , pool . getConfiguration ( ) . getMaxSize ( ) ) ) ; } for ( ConnectionListener cl : listeners ) { if ( cl . changeState ( FREE , VALIDATION ) ) { if ( decrementer . shouldDestroy ( cl , timeout , listeners . size ( ) , pool . getConfiguration ( ) . getMinSize ( ) , destroyed ) ) { if ( Tracer . isEnabled ( ) ) Tracer . destroyConnectionListener ( pool . getConfiguration ( ) . getId ( ) , this , cl , false , true , false , false , false , false , false , Tracer . isRecordCallstacks ( ) ? new Throwable ( "CALLSTACK" ) : null ) ; if ( pool . getInternalStatistics ( ) . isEnabled ( ) ) pool . getInternalStatistics ( ) . deltaTimedOut ( ) ; destroyAndRemoveConnectionListener ( cl , listeners ) ; destroyed ++ ; } else { if ( ! cl . changeState ( VALIDATION , FREE ) ) { if ( Tracer . isEnabled ( ) ) Tracer . destroyConnectionListener ( pool . getConfiguration ( ) . getId ( ) , this , cl , false , false , false , false , true , false , false , Tracer . isRecordCallstacks ( ) ? new Throwable ( "CALLSTACK" ) : null ) ; if ( pool . getInternalStatistics ( ) . isEnabled ( ) ) pool . getInternalStatistics ( ) . deltaTimedOut ( ) ; destroyAndRemoveConnectionListener ( cl , listeners ) ; destroyed ++ ; } } } } if ( ! pool . isShutdown ( ) ) { boolean emptyManagedConnectionPool = false ; if ( credential . equals ( pool . getPrefillCredential ( ) ) && pool . getConfiguration ( ) . isPrefill ( ) ) { if ( pool . getConfiguration ( ) . getMinSize ( ) > 0 ) { prefill ( ) ; } else { emptyManagedConnectionPool = true ; } } else { emptyManagedConnectionPool = true ; } // Empty pool if ( emptyManagedConnectionPool && listeners . isEmpty ( ) ) pool . emptyManagedConnectionPool ( this ) ; }
public class IntArray { /** * Creates IntArray backed by int array * @ param buffer * @ param offset * @ param length * @ return */ public static IntArray getInstance ( int [ ] buffer , int offset , int length ) { } }
return getInstance ( IntBuffer . wrap ( buffer , offset , length ) ) ;
public class StringMatcher { /** * Implement UnicodeMatcher */ @ Override public String toPattern ( boolean escapeUnprintable ) { } }
StringBuffer result = new StringBuffer ( ) ; StringBuffer quoteBuf = new StringBuffer ( ) ; if ( segmentNumber > 0 ) { // i . e . , if this is a segment result . append ( '(' ) ; } for ( int i = 0 ; i < pattern . length ( ) ; ++ i ) { char keyChar = pattern . charAt ( i ) ; // OK ; see note ( 1 ) above UnicodeMatcher m = data . lookupMatcher ( keyChar ) ; if ( m == null ) { Utility . appendToRule ( result , keyChar , false , escapeUnprintable , quoteBuf ) ; } else { Utility . appendToRule ( result , m . toPattern ( escapeUnprintable ) , true , escapeUnprintable , quoteBuf ) ; } } if ( segmentNumber > 0 ) { // i . e . , if this is a segment result . append ( ')' ) ; } // Flush quoteBuf out to result Utility . appendToRule ( result , - 1 , true , escapeUnprintable , quoteBuf ) ; return result . toString ( ) ;
public class VersionRegEx { /** * Returns the greater of the two given versions by comparing them using their natural * ordering . If both versions are equal , then the first argument is returned . * @ param v1 The first version . * @ param v2 The second version . * @ return The greater version . * @ throws IllegalArgumentException If either argument is < code > null < / code > . * @ since 0.4.0 */ public static VersionRegEx max ( VersionRegEx v1 , VersionRegEx v2 ) { } }
require ( v1 != null , "v1 is null" ) ; require ( v2 != null , "v2 is null" ) ; return compare ( v1 , v2 , false ) < 0 ? v2 : v1 ;
public class ArtifactCollector { /** * Capture artifact from the current test result context . * @ param reason impetus for capture request ; may be ' null ' * @ return ( optional ) path at which the captured artifact was stored */ public Optional < Path > captureArtifact ( Throwable reason ) { } }
if ( ! provider . canGetArtifact ( getInstance ( ) ) ) { return Optional . absent ( ) ; } byte [ ] artifact = provider . getArtifact ( getInstance ( ) , reason ) ; if ( ( artifact == null ) || ( artifact . length == 0 ) ) { return Optional . absent ( ) ; } Path collectionPath = getCollectionPath ( ) ; if ( ! collectionPath . toFile ( ) . exists ( ) ) { try { Files . createDirectories ( collectionPath ) ; } catch ( IOException e ) { if ( provider . getLogger ( ) != null ) { String messageTemplate = "Unable to create collection directory ({}); no artifact was captured" ; provider . getLogger ( ) . warn ( messageTemplate , collectionPath , e ) ; } return Optional . absent ( ) ; } } Path artifactPath ; try { artifactPath = PathUtils . getNextPath ( collectionPath , getArtifactBaseName ( ) , provider . getArtifactExtension ( ) ) ; } catch ( IOException e ) { if ( provider . getLogger ( ) != null ) { provider . getLogger ( ) . warn ( "Unable to get output path; no artifact was captured" , e ) ; } return Optional . absent ( ) ; } try { if ( provider . getLogger ( ) != null ) { provider . getLogger ( ) . info ( "Saving captured artifact to ({})." , artifactPath ) ; } Files . write ( artifactPath , artifact ) ; } catch ( IOException e ) { if ( provider . getLogger ( ) != null ) { provider . getLogger ( ) . warn ( "I/O error saving to ({}); no artifact was captured" , artifactPath , e ) ; } return Optional . absent ( ) ; } recordArtifactPath ( artifactPath ) ; return Optional . of ( artifactPath ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link SurfacePropertyType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link SurfacePropertyType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "surfaceMember" ) public JAXBElement < SurfacePropertyType > createSurfaceMember ( SurfacePropertyType value ) { } }
return new JAXBElement < SurfacePropertyType > ( _SurfaceMember_QNAME , SurfacePropertyType . class , null , value ) ;
public class ListLogSubscriptionsResult { /** * A list of active < a > LogSubscription < / a > objects for calling the AWS account . * @ return A list of active < a > LogSubscription < / a > objects for calling the AWS account . */ public java . util . List < LogSubscription > getLogSubscriptions ( ) { } }
if ( logSubscriptions == null ) { logSubscriptions = new com . amazonaws . internal . SdkInternalList < LogSubscription > ( ) ; } return logSubscriptions ;
public class DescribeServicesRequest { /** * Specifies whether you want to see the resource tags for the service . If < code > TAGS < / code > is specified , the tags * are included in the response . If this field is omitted , tags are not included in the response . * @ param include * Specifies whether you want to see the resource tags for the service . If < code > TAGS < / code > is specified , * the tags are included in the response . If this field is omitted , tags are not included in the response . * @ see ServiceField */ public void setInclude ( java . util . Collection < String > include ) { } }
if ( include == null ) { this . include = null ; return ; } this . include = new com . amazonaws . internal . SdkInternalList < String > ( include ) ;
public class AbstractLayer { /** * Update showing state . * @ param fireEvents Should events be fired if state changes ? */ protected void updateShowing ( boolean fireEvents ) { } }
double scale = mapModel . getMapView ( ) . getCurrentScale ( ) ; if ( visible ) { boolean oldShowing = showing ; showing = scale >= layerInfo . getMinimumScale ( ) . getPixelPerUnit ( ) && scale <= layerInfo . getMaximumScale ( ) . getPixelPerUnit ( ) ; if ( oldShowing != showing && fireEvents ) { handlerManager . fireEvent ( new LayerShownEvent ( this , true ) ) ; } } else { showing = false ; }
public class SelectResultSet { /** * { inheritDoc } . */ public Object getObject ( int columnIndex ) throws SQLException { } }
checkObjectRange ( columnIndex ) ; return row . getInternalObject ( columnsInformation [ columnIndex - 1 ] , timeZone ) ;
public class AtomicMarkableReference { /** * Unconditionally sets the value of both the reference and mark . * @ param newReference the new value for the reference * @ param newMark the new value for the mark */ public void set ( V newReference , boolean newMark ) { } }
Pair < V > current = pair ; if ( newReference != current . reference || newMark != current . mark ) this . pair = Pair . of ( newReference , newMark ) ;
public class IotHubResourcesInner { /** * Get a list of all the jobs in an IoT hub . For more information , see : https : / / docs . microsoft . com / azure / iot - hub / iot - hub - devguide - identity - registry . * Get a list of all the jobs in an IoT hub . For more information , see : https : / / docs . microsoft . com / azure / iot - hub / iot - hub - devguide - identity - registry . * ServiceResponse < PageImpl < JobResponseInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the PagedList & lt ; JobResponseInner & gt ; object wrapped in { @ link ServiceResponse } if successful . */ public Observable < ServiceResponse < Page < JobResponseInner > > > listJobsNextSinglePageAsync ( final String nextPageLink ) { } }
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listJobsNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Page < JobResponseInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < JobResponseInner > > > call ( Response < ResponseBody > response ) { try { ServiceResponse < PageImpl < JobResponseInner > > result = listJobsNextDelegate ( response ) ; return Observable . just ( new ServiceResponse < Page < JobResponseInner > > ( result . body ( ) , result . response ( ) ) ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class ConversionEvent_TrackingUrlsMapEntry { /** * Gets the key value for this ConversionEvent _ TrackingUrlsMapEntry . * @ return key */ public com . google . api . ads . admanager . axis . v201811 . ConversionEvent getKey ( ) { } }
return key ;
public class AnycastOutputHandler { /** * Helper method used by AOStream to persistently record that flush has been started * @ param t the transaction * @ param stream the stream making this call * @ return the Item written * @ throws Exception */ public final Item writeStartedFlush ( TransactionCommon t , AOStream stream ) throws Exception { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeStartedFlush" ) ; String key = SIMPUtils . getRemoteGetKey ( stream . getRemoteMEUuid ( ) , stream . getGatheringTargetDestUuid ( ) ) ; StreamInfo sinfo = streamTable . get ( key ) ; if ( ( sinfo != null ) && sinfo . streamId . equals ( stream . streamId ) ) { AOStartedFlushItem item = new AOStartedFlushItem ( key , stream . streamId ) ; Transaction msTran = mp . resolveAndEnlistMsgStoreTransaction ( t ) ; this . containerItemStream . addItem ( item , msTran ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeStartedFlush" , item ) ; return item ; } // this should not occur // log error and throw exception SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.AnycastOutputHandler" , "1:2810:1.89.4.1" } , null ) ) ; // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.AnycastOutputHandler.writeStartedFlush" , "1:2817:1.89.4.1" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.impl.AnycastOutputHandler" , "1:2822:1.89.4.1" } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeStartedFlush" , e ) ; throw e ;
public class ClassFilter { /** * 对于java . lang . Object / java . util . Date对象 , hessian序列化时需要写入object / date , 此处进行转换 * @ param type 类名称 * @ return 转换结果 */ public static String encodeObjectAndDate ( String type ) { } }
return type . replace ( Object . class . getName ( ) , "object" ) . replace ( Date . class . getName ( ) , "date" ) ;
public class PolynomialRootFinder { /** * Given a set of polynomial coefficients , compute the roots of the polynomial . Depending on * the polynomial being considered the roots may contain complex number . When complex numbers are * present they will come in pairs of complex conjugates . * Coefficients are ordered from least to most significant , e . g : y = c [ 0 ] + x * c [ 1 ] + x * x * c [ 2 ] . * @ param coefficients Coefficients of the polynomial . * @ return The roots of the polynomial */ public static Complex_F64 [ ] findRoots ( double ... coefficients ) { } }
int N = coefficients . length - 1 ; // Construct the companion matrix DMatrixRMaj c = new DMatrixRMaj ( N , N ) ; double a = coefficients [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { c . set ( i , N - 1 , - coefficients [ i ] / a ) ; } for ( int i = 1 ; i < N ; i ++ ) { c . set ( i , i - 1 , 1 ) ; } // use generalized eigenvalue decomposition to find the roots EigenDecomposition_F64 < DMatrixRMaj > evd = DecompositionFactory_DDRM . eig ( N , false ) ; evd . decompose ( c ) ; Complex_F64 [ ] roots = new Complex_F64 [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { roots [ i ] = evd . getEigenvalue ( i ) ; } return roots ;
public class PerRequestResourceProvider { /** * { @ inheritDoc } */ @ Override public void releaseInstance ( Message m , Object o ) { } }
// Liberty Change for CXF Begain // if not managed by CDI or EJB , then call preDestory by ourself . // otherwise , perDestory has already been called by CDI / EJB JaxRsFactoryBeanCustomizer beanCustomizer = null ; if ( o != null ) { Bus bus = m . getExchange ( ) . getBus ( ) ; beanCustomizer = InjectionRuntimeContextHelper . findBeanCustomizer ( o . getClass ( ) , bus ) ; } if ( beanCustomizer == null ) { InjectionUtils . invokeLifeCycleMethod ( o , preDestroyMethod ) ; } // Liberty Change for CXF End
public class ConfigurationConversionService { /** * Creates a set of { @ code ConnectorType } based on the EVSEs . Duplicates will be filtered . * @ param evses list of EVSEs * @ return set of connector types */ public Set < ConnectorType > getConnectorTypesFromEvses ( Set < Evse > evses ) { } }
Set < ConnectorType > connectorTypes = new HashSet < > ( ) ; for ( Evse evse : evses ) { for ( Connector connector : evse . getConnectors ( ) ) { connectorTypes . add ( ConnectorType . fromConnectorType ( connector . getConnectorType ( ) ) ) ; } } return connectorTypes ;
public class AddressDivisionBase { /** * Gets the bytes for the lowest address in the range represented by this address division . * Since bytes are signed values while addresses are unsigned , values greater than 127 are * represented as the ( negative ) two ' s complement value of the actual value . * You can get the unsigned integer value i from byte b using i = 0xff & amp ; b . * @ return */ @ Override public byte [ ] getBytes ( ) { } }
byte cached [ ] = lowerBytes ; if ( cached == null ) { lowerBytes = cached = getBytesImpl ( true ) ; } return cached . clone ( ) ;
public class HttpActionBuilder { /** * Initiate http client action . */ public HttpClientActionBuilder client ( HttpClient httpClient ) { } }
HttpClientActionBuilder clientAction = new HttpClientActionBuilder ( action , httpClient ) . withApplicationContext ( applicationContext ) ; return clientAction ;
public class ListVirtualServicesResult { /** * The list of existing virtual services for the specified service mesh . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setVirtualServices ( java . util . Collection ) } or { @ link # withVirtualServices ( java . util . Collection ) } if you * want to override the existing values . * @ param virtualServices * The list of existing virtual services for the specified service mesh . * @ return Returns a reference to this object so that method calls can be chained together . */ public ListVirtualServicesResult withVirtualServices ( VirtualServiceRef ... virtualServices ) { } }
if ( this . virtualServices == null ) { setVirtualServices ( new java . util . ArrayList < VirtualServiceRef > ( virtualServices . length ) ) ; } for ( VirtualServiceRef ele : virtualServices ) { this . virtualServices . add ( ele ) ; } return this ;
public class CPSpecificationOptionWrapper { /** * Sets the localized descriptions of this cp specification option from the map of locales and localized descriptions . * @ param descriptionMap the locales and localized descriptions of this cp specification option */ @ Override public void setDescriptionMap ( Map < java . util . Locale , String > descriptionMap ) { } }
_cpSpecificationOption . setDescriptionMap ( descriptionMap ) ;
public class IonWriterSystemBinary { /** * just transfer the bytes into the current patch as ' proper ' ion binary serialization */ public void writeRaw ( byte [ ] value , int start , int len ) throws IOException { } }
startValue ( TID_RAW ) ; _writer . write ( value , start , len ) ; _patch . patchValue ( len ) ; closeValue ( ) ;
public class BaseTool { /** * Validate the values parsed by the options , will apply this for each CLIToolOptions added to the tool . subclasses * may override this but should call super * @ param cli cli * @ param args args * @ throws CLIToolOptionsException if an error occurs */ public void validateOptions ( final CommandLine cli , final String [ ] args ) throws CLIToolOptionsException { } }
if ( null != toolOptions ) { for ( final CLIToolOptions toolOpts : toolOptions ) { toolOpts . validate ( cli , args ) ; } }
public class PatternCLA { /** * { @ inheritDoc } */ @ Override public ComparablePattern convert ( final String valueStr , final boolean _caseSensitive , final Object target ) throws ParseException { } }
try { if ( _caseSensitive && isCaseSensitive ( ) ) return ComparablePattern . compile ( valueStr ) ; return ComparablePattern . compile ( valueStr , Pattern . CASE_INSENSITIVE ) ; } catch ( final PatternSyntaxException pse ) { throw new ParseException ( pse . getMessage ( ) , 0 ) ; }
public class NodeUtil { /** * Get the Node that defines the name of an object literal key . * @ param key A node */ static Node getObjectLitKeyNode ( Node key ) { } }
switch ( key . getToken ( ) ) { case STRING_KEY : case GETTER_DEF : case SETTER_DEF : case MEMBER_FUNCTION_DEF : return key ; case COMPUTED_PROP : return key . getFirstChild ( ) . isString ( ) ? key . getFirstChild ( ) : null ; default : break ; } throw new IllegalStateException ( "Unexpected node type: " + key ) ;
public class Stream { /** * Returns a new stream of { @ link Grouped } that is composed from keys that has been * extracted from each source stream item . * @ param groupSelector a function that extracts a key from a given item . * @ param < K > a type of key value . * @ return a new stream of { @ link Grouped } that is grouped by a key extracted from each source stream item . */ public < K > Stream < Grouped < K , T > > groupBy ( final Func1 < ? super T , ? extends K > groupSelector ) { } }
return groupBy ( groupSelector , new Func1 < T , T > ( ) { @ Override public T call ( T value ) { return value ; } } ) ;
public class ListCommandInvocationsResult { /** * ( Optional ) A list of all invocations . * @ return ( Optional ) A list of all invocations . */ public java . util . List < CommandInvocation > getCommandInvocations ( ) { } }
if ( commandInvocations == null ) { commandInvocations = new com . amazonaws . internal . SdkInternalList < CommandInvocation > ( ) ; } return commandInvocations ;
public class RandomDateUtils { /** * Returns a random { @ link LocalDate } within the specified range . * @ param startInclusive the earliest { @ link LocalDate } that can be returned * @ param endExclusive the upper bound ( not included ) * @ return the random { @ link LocalDate } * @ throws IllegalArgumentException if startInclusive or endExclusive are null or if endExclusive * is earlier than startInclusive */ public static LocalDate randomLocalDate ( LocalDate startInclusive , LocalDate endExclusive ) { } }
checkArgument ( startInclusive != null , "Start must be non-null" ) ; checkArgument ( endExclusive != null , "End must be non-null" ) ; Instant startInstant = startInclusive . atStartOfDay ( ) . toInstant ( UTC_OFFSET ) ; Instant endInstant = endExclusive . atStartOfDay ( ) . toInstant ( UTC_OFFSET ) ; Instant instant = randomInstant ( startInstant , endInstant ) ; return instant . atZone ( UTC ) . toLocalDate ( ) ;
public class AbstractDataIndexer { /** * Utility method for creating a String [ ] array from a map whose * keys are labels ( Strings ) to be stored in the array and whose * values are the indices ( Integers ) at which the corresponding * labels should be inserted . * @ param labelToIndexMap a < code > TObjectIntHashMap < / code > value * @ return a < code > String [ ] < / code > value * @ since maxent 1.2.6 */ protected static String [ ] toIndexedStringArray ( TObjectIntHashMap labelToIndexMap ) { } }
final String [ ] array = new String [ labelToIndexMap . size ( ) ] ; labelToIndexMap . forEachEntry ( new TObjectIntProcedure ( ) { public boolean execute ( Object str , int index ) { array [ index ] = ( String ) str ; return true ; } } ) ; return array ;
public class AgentSession { /** * Submits the completed form and returns the result of the transcript search . The result * will include all the data returned from the server so be careful with the amount of * data that the search may return . * @ param completedForm the filled out search form . * @ return the result of the transcript search . * @ throws SmackException * @ throws XMPPException * @ throws InterruptedException */ public ReportedData searchTranscripts ( Form completedForm ) throws XMPPException , SmackException , InterruptedException { } }
return transcriptSearchManager . submitSearch ( workgroupJID . asDomainBareJid ( ) , completedForm ) ;
public class IntraMDWMessengerJms { /** * jndi can be null , in which case send to the same site */ public void sendMessage ( String message ) throws ProcessException { } }
try { JMSServices . getInstance ( ) . sendTextMessage ( destination , JMSDestinationNames . INTRA_MDW_EVENT_HANDLER_QUEUE , message , 0 , null ) ; } catch ( Exception e ) { throw new ProcessException ( - 1 , e . getMessage ( ) , e ) ; }
public class ServiceWorkerManager { /** * Initial setup of the service worker registration . */ protected void setupRegistration ( ) { } }
if ( isServiceWorkerSupported ( ) ) { Navigator . serviceWorker . register ( getResource ( ) ) . then ( object -> { logger . info ( "Service worker has been successfully registered" ) ; registration = ( ServiceWorkerRegistration ) object ; onRegistered ( new ServiceEvent ( ) , registration ) ; // Observe service worker lifecycle observeLifecycle ( registration ) ; // Setup Service Worker events events setupOnControllerChangeEvent ( ) ; setupOnMessageEvent ( ) ; setupOnErrorEvent ( ) ; return null ; } , error -> { logger . info ( "ServiceWorker registration failed: " + error ) ; return null ; } ) ; } else { logger . info ( "Service worker is not supported by this browser." ) ; }