signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ReportUtil { /** * Get dynamic report layout * Report layout is dynamically modified in some situations like : * 1 . FOR Report Band Element * 2 . Functions in Header or Group Header * @ param con database connection * @ param layout report layout * @ param pBean parameters bean * @ return dynamic report layout * @ throws Exception */ public static ReportLayout getDynamicReportLayout ( Connection con , ReportLayout layout , ParametersBean pBean ) throws Exception { } }
ReportLayout convertedLayout = ReportUtil . getReportLayoutForHeaderFunctions ( layout ) ; // IMPORTANT : must take for report layout at the end because we save some transient data // ( see getForReportLayout : newReport . getGeneratedParamValues ( ) . put ( columnName , in . getId ( ) ) ; ReportLayout forConvertedLayout = ReportUtil . getForReportLayout ( con , convertedLayout , pBean ) ; return forConvertedLayout ;
public class TransformationChainFactory { /** * Adds the first sub - transformation to the chain . Subsequent transformations can be added by invoking methods on the TransformationConcatenator returned by this method . * @ param firstTransformation The first transformation in the chain . * @ param < Intermediate > The type of the output produced by the ( intermediate ) transformation added . * @ return A TransformationConcatenator that allows to add additional transformations to the chain or close the chain . */ public < Intermediate > TransformationConcatenator < Intermediate , Target > first ( Transformation < Source , Intermediate > firstTransformation ) { } }
transformationChain = new TransformationChain < Source , Target > ( ) ; transformationChain . chain . add ( firstTransformation ) ; return new TransformationConcatenator < Intermediate , Target > ( ) ;
public class BeanValidationService { /** * Called by DS to activate this service * @ param compcontext the context of this component */ protected void activate ( ComponentContext compcontext ) { } }
if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Activating " + this . getClass ( ) . getName ( ) ) ; } setInstance ( this ) ; this . beanValidation . activate ( compcontext ) ;
public class FNPImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . FNP__RG : return rg != null && ! rg . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
public class LOiToLongFunctionBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T > LOiToLongFunction < T > oiToLongFunctionFrom ( Consumer < LOiToLongFunctionBuilder < T > > buildingFunction ) { } }
LOiToLongFunctionBuilder builder = new LOiToLongFunctionBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class CmsExportpointsEdit { /** * Creates the list of widgets for this dialog . < p > */ @ Override protected void defineWidgets ( ) { } }
initModule ( ) ; setKeyPrefix ( KEY_PREFIX ) ; List destinations = getDestinations ( ) ; addWidget ( new CmsWidgetDialogParameter ( m_exportpoint , "uri" , PAGES [ 0 ] , new CmsVfsFileWidget ( ) ) ) ; addWidget ( new CmsWidgetDialogParameter ( m_exportpoint , "configuredDestination" , PAGES [ 0 ] , new CmsComboWidget ( destinations ) ) ) ; addWidget ( new CmsWidgetDialogParameter ( m_exportpoint , "destinationPath" , PAGES [ 0 ] , new CmsDisplayWidget ( ) ) ) ;
public class OmemoManager { /** * Notify all registered OmemoMessageListeners of an incoming OMEMO encrypted Carbon Copy . * Remember : If you want to receive OMEMO encrypted carbon copies , you have to enable carbons using * { @ link CarbonManager # enableCarbons ( ) } . * @ param direction direction of the carbon copy * @ param carbonCopy carbon copy itself * @ param wrappingMessage wrapping message * @ param decryptedCarbonCopy decrypted carbon copy OMEMO element */ void notifyOmemoCarbonCopyReceived ( CarbonExtension . Direction direction , Message carbonCopy , Message wrappingMessage , OmemoMessage . Received decryptedCarbonCopy ) { } }
for ( OmemoMessageListener l : omemoMessageListeners ) { l . onOmemoCarbonCopyReceived ( direction , carbonCopy , wrappingMessage , decryptedCarbonCopy ) ; }
public class HpelSystemStream { /** * Add the specified data to the trace cache . * This method is called when a write or print ( non terminating ) event is * encountered . This data will be cached , and will be forwarded to the trace * output as part of a larger event . Printlns ( terminating ) events are used * as the demarcation point where all cached data is written . In addition , * once the cache reaches a predetermined maximum size , it must be flushed . * The first operation that initiates a " sequence " will create the initial * event that captures the timestamp , etc . As more nonterminating events are * encountered , the data is simply added to a cache . A terminating event * will orphan the event and cache , and return the event so it can be * forwarded . * @ param data * a String to cache . */ private synchronized LogRecord cacheTraceData ( String data ) { } }
// If the data size , plus the size of any data already cached is too // large the event must // be fired . Return the event to the caller . // Assume a data size of 2 x " null " . length ( ) for null data int size = ( data == null ) ? 8 : data . length ( ) * 2 ; if ( ivCacheSize + size > svMaxCacheSize ) { return getTraceData ( data ) ; } if ( endsWithLineSeparator ( data ) ) { return getTraceData ( data ) ; } // Data can be cached . If " root " event does not exist , this should be // the first operation // in the sequence . Create the event . If event already exists , add data // to the cache . buffer . append ( data ) ; ivCacheSize += size ; return null ;
public class GetUserRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetUserRequest getUserRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getUserRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getUserRequest . getAccessToken ( ) , ACCESSTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CompositedMultiFrameImage { /** * Creates a composited image for the specified frame . */ protected CompositedMirage createCompositedMirage ( int index ) { } }
if ( _sources . length == 1 && _sources [ 0 ] . frames instanceof TileSetFrameImage ) { TileSetFrameImage frames = ( TileSetFrameImage ) _sources [ 0 ] . frames ; Rectangle tbounds = new Rectangle ( ) ; frames . getTrimmedBounds ( _orient , index , tbounds ) ; int x = frames . getXOrigin ( _orient , index ) - tbounds . x ; int y = frames . getYOrigin ( _orient , index ) - tbounds . y ; return new SubmirageForwarder ( frames . getTileMirage ( _orient , index ) , x , y ) ; } return new CompositedVolatileMirage ( index ) ;
public class LRSigner { /** * Sign the specified envelope with this signer * @ param envelope envelope to be signed * @ return signed envelope * @ throws LRException */ public LREnvelope sign ( LREnvelope envelope ) throws LRException { } }
// Bencode the document String bencodedMessage = bencode ( envelope . getSignableData ( ) ) ; // Clear sign the bencoded document String clearSignedMessage = signEnvelopeData ( bencodedMessage ) ; envelope . addSigningData ( signingMethod , publicKeyLocation , clearSignedMessage ) ; return envelope ;
public class CompileUtils { /** * Compiles a generated code to a Class . * @ param cl the ClassLoader used to load the class * @ param name the class name * @ param code the generated code * @ param < T > the class type * @ return the compiled class */ public static < T > Class < T > compile ( ClassLoader cl , String name , String code ) { } }
Tuple2 < ClassLoader , String > cacheKey = Tuple2 . of ( cl , name ) ; Class < ? > clazz = COMPILED_CACHE . getIfPresent ( cacheKey ) ; if ( clazz == null ) { clazz = doCompile ( cl , name , code ) ; COMPILED_CACHE . put ( cacheKey , clazz ) ; } // noinspection unchecked return ( Class < T > ) clazz ;
public class ConfigurationModuleBuilder { /** * TODO : It would be nice if this incorporated d by reference so that static analysis / documentation tools * could document the dependency between c and d . * @ param d a configuration module to merge * @ return the merged configuration module builder */ public final ConfigurationModuleBuilder merge ( final ConfigurationModule d ) { } }
if ( d == null ) { throw new NullPointerException ( "If merge() was passed a static final field that is initialized to non-null, " + "then this is almost certainly caused by a circular class dependency." ) ; } try { d . assertStaticClean ( ) ; } catch ( final ClassHierarchyException e ) { throw new ClassHierarchyException ( ReflectionUtilities . getFullName ( getClass ( ) ) + ": detected attempt to merge with ConfigurationModule that has had set() called on it" , e ) ; } final ConfigurationModuleBuilder c = deepCopy ( ) ; final ConfigurationModuleBuilder builder = d . getBuilder ( ) ; try { c . b . addConfiguration ( builder . b . build ( ) ) ; } catch ( final BindException e ) { throw new ClassHierarchyException ( e ) ; } c . reqDecl . addAll ( builder . reqDecl ) ; c . optDecl . addAll ( builder . optDecl ) ; c . reqUsed . addAll ( builder . reqUsed ) ; c . optUsed . addAll ( builder . optUsed ) ; c . setOpts . addAll ( builder . setOpts ) ; c . map . putAll ( builder . map ) ; c . freeImpls . putAll ( builder . freeImpls ) ; c . freeParams . putAll ( builder . freeParams ) ; c . lateBindClazz . putAll ( builder . lateBindClazz ) ; return c ;
public class ObjectNames { /** * Produce a generated JMX object name . * @ return JMX object name of the form " [ package _ name ] : type = [ class _ name ] , name = [ named _ value ] " */ public static String generatedNameOf ( Class < ? > clazz , String name ) { } }
return builder ( clazz , name ) . build ( ) ;
public class JMDictSenseLazy { /** * Returns a JMDictSense object , a new one of an existing one */ public static JMDictSense create ( ) { } }
if ( index >= instances . size ( ) ) { instances . add ( new JMDictSense ( ) ) ; } return instances . get ( index ++ ) ;
public class URLMap { /** * value : CONFIDENTIAL , INTEGRAL or REST . In case of REST , returns unchecked methods . */ public ActionString getUserDataString ( String value ) { } }
if ( value == null ) { return null ; } ActionString output = null ; if ( mapAllMethods != null ) { // handle all methods case . output = getUserDataStringFromAllMap ( mapAllMethods , value ) ; } else { output = getUserDataStringFromMethodsMap ( value ) ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getUserDataString output: " + output ) ; return output ;
public class ClassUtils { /** * Determines all the interfaces implemented by the given { @ link Class } type . * This method performs a deep analysis of all the interfaces implemented by the given { @ link Class } type * along with interfaces implemented by the { @ link Class Class ' s } { @ link Class superclass } , * up the { @ link Class } hierarchy until the { @ link Object } class is reached . * @ param type { @ link Class } to evaluate . * @ return all interfaces implemented by the given { @ link Class } and its superclass . * Returns an empty { @ link Set } if the given { @ link Class } does not implement any interfaces . * @ see # getInterfaces ( Class , Set ) * @ see java . lang . Class */ @ NullSafe public static Set < Class < ? > > getInterfaces ( Class type ) { } }
return Optional . ofNullable ( type ) . map ( theType -> getInterfaces ( type , new HashSet < > ( ) ) ) . orElse ( Collections . emptySet ( ) ) ;
public class VendorInstallerFactory { /** * Identifies the Service Vendor based on the given URL * @ param url Base URL to check * @ return Service Enum found or unsupported */ public static Service identify ( String url ) { } }
Service answer = Service . UNSUPPORTED ; int index = url . indexOf ( COMPOSUM_URL ) ; if ( index > 0 ) { answer = Service . COMPOSUM ; } else { index = url . indexOf ( CRX_URL ) ; if ( index > 0 ) { answer = Service . CRX ; } } return answer ;
public class MessageBirdClient { /** * Gets a ConversationMessage listing with specified pagination options . * @ param conversationId Conversation to get messages for . * @ param offset Number of objects to skip . * @ param limit Number of objects to take . * @ return List of messages . */ public ConversationMessageList listConversationMessages ( final String conversationId , final int offset , final int limit ) throws UnauthorizedException , GeneralException { } }
String url = String . format ( "%s%s/%s%s" , CONVERSATIONS_BASE_URL , CONVERSATION_PATH , conversationId , CONVERSATION_MESSAGE_PATH ) ; return messageBirdService . requestList ( url , offset , limit , ConversationMessageList . class ) ;
public class LToFltFunctionBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */ @ Nonnull public static < T > LToFltFunctionBuilder < T > toFltFunction ( Consumer < LToFltFunction < T > > consumer ) { } }
return new LToFltFunctionBuilder ( consumer ) ;
public class HazelcastKernelDiscoveryService { /** * Notifies the listeners about the discovering of a kernel . * @ param uri URI of the discovered kernel . */ protected void fireKernelDiscovered ( URI uri ) { } }
this . logger . getKernelLogger ( ) . info ( MessageFormat . format ( Messages . HazelcastKernelDiscoveryService_0 , uri , getCurrentKernel ( ) ) ) ; for ( final KernelDiscoveryServiceListener listener : this . listeners . getListeners ( KernelDiscoveryServiceListener . class ) ) { listener . kernelDiscovered ( uri ) ; }
public class AirlineBoardingPassTemplateBuilder { /** * Adds a { @ link BoardingPass } object to this template . This field is * mandatory for this template and should contain at least one element . * @ param passengerName * the passenger name . It can ' t be empty . * @ param pnrNumber * the Passenger Name Record number ( Booking Number ) . It can ' t be * empty . * @ param logoImageUrl * the URL of the logo . It can ' t be empty . * @ param aboveBarCodeImageUrl * the URL of the image to be shown above the bar code in the * center of the pass . It can ' t be empty . * @ return a builder for a { @ link BoardingPass } object . */ public BoardingPassBuilder addBoardingPass ( String passengerName , String pnrNumber , String logoImageUrl , String aboveBarCodeImageUrl ) { } }
return new BoardingPassBuilder ( this , passengerName , pnrNumber , logoImageUrl , aboveBarCodeImageUrl ) ;
public class RobotoTypefaces { /** * Create typeface from assets . * @ param context The Context the widget is running in , through which it can * access the current theme , resources , etc . * @ param typeface The value of " robotoTypeface " attribute * @ return Roboto { @ link Typeface } or throws IllegalArgumentException if unknown ` robotoTypeface ` attribute value . */ @ NonNull private static Typeface createTypeface ( @ NonNull Context context , @ RobotoTypeface int typeface ) { } }
String path ; switch ( typeface ) { case TYPEFACE_ROBOTO_THIN : path = "fonts/Roboto-Thin.ttf" ; break ; case TYPEFACE_ROBOTO_THIN_ITALIC : path = "fonts/Roboto-ThinItalic.ttf" ; break ; case TYPEFACE_ROBOTO_LIGHT : path = "fonts/Roboto-Light.ttf" ; break ; case TYPEFACE_ROBOTO_LIGHT_ITALIC : path = "fonts/Roboto-LightItalic.ttf" ; break ; case TYPEFACE_ROBOTO_REGULAR : path = "fonts/Roboto-Regular.ttf" ; break ; case TYPEFACE_ROBOTO_ITALIC : path = "fonts/Roboto-Italic.ttf" ; break ; case TYPEFACE_ROBOTO_MEDIUM : path = "fonts/Roboto-Medium.ttf" ; break ; case TYPEFACE_ROBOTO_MEDIUM_ITALIC : path = "fonts/Roboto-MediumItalic.ttf" ; break ; case TYPEFACE_ROBOTO_BOLD : path = "fonts/Roboto-Bold.ttf" ; break ; case TYPEFACE_ROBOTO_BOLD_ITALIC : path = "fonts/Roboto-BoldItalic.ttf" ; break ; case TYPEFACE_ROBOTO_BLACK : path = "fonts/Roboto-Black.ttf" ; break ; case TYPEFACE_ROBOTO_BLACK_ITALIC : path = "fonts/Roboto-BlackItalic.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_LIGHT : path = "fonts/RobotoCondensed-Light.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_LIGHT_ITALIC : path = "fonts/RobotoCondensed-LightItalic.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_REGULAR : path = "fonts/RobotoCondensed-Regular.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_ITALIC : path = "fonts/RobotoCondensed-Italic.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_BOLD : path = "fonts/RobotoCondensed-Bold.ttf" ; break ; case TYPEFACE_ROBOTO_CONDENSED_BOLD_ITALIC : path = "fonts/RobotoCondensed-BoldItalic.ttf" ; break ; case TYPEFACE_ROBOTO_SLAB_THIN : path = "fonts/RobotoSlab-Thin.ttf" ; break ; case TYPEFACE_ROBOTO_SLAB_LIGHT : path = "fonts/RobotoSlab-Light.ttf" ; break ; case TYPEFACE_ROBOTO_SLAB_REGULAR : path = "fonts/RobotoSlab-Regular.ttf" ; break ; case TYPEFACE_ROBOTO_SLAB_BOLD : path = "fonts/RobotoSlab-Bold.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_THIN : path = "fonts/RobotoMono-Thin.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_THIN_ITALIC : path = "fonts/RobotoMono-ThinItalic.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_LIGHT : path = "fonts/RobotoMono-Light.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_LIGHT_ITALIC : path = "fonts/RobotoMono-LightItalic.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_REGULAR : path = "fonts/RobotoMono-Regular.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_ITALIC : path = "fonts/RobotoMono-Italic.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_MEDIUM : path = "fonts/RobotoMono-Medium.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_MEDIUM_ITALIC : path = "fonts/RobotoMono-MediumItalic.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_BOLD : path = "fonts/RobotoMono-Bold.ttf" ; break ; case TYPEFACE_ROBOTO_MONO_BOLD_ITALIC : path = "fonts/RobotoMono-BoldItalic.ttf" ; break ; default : throw new IllegalArgumentException ( "Unknown `robotoTypeface` attribute value " + typeface ) ; } return Typeface . createFromAsset ( context . getAssets ( ) , path ) ;
public class Assert { /** * Equivalent to * assert ( o ! = null ) : msg ; */ public static < T > T checkNonNull ( T t , String msg ) { } }
if ( t == null ) error ( msg ) ; return t ;
public class ModbusUDPListener { /** * Starts this < tt > ModbusUDPListener < / tt > . */ @ Override public void run ( ) { } }
// Set a suitable thread name if ( threadName == null || threadName . isEmpty ( ) ) { threadName = String . format ( "Modbus UDP Listener [port:%d]" , port ) ; } Thread . currentThread ( ) . setName ( threadName ) ; ModbusUDPTransport transport ; try { if ( address == null ) { terminal = new UDPSlaveTerminal ( InetAddress . getByAddress ( new byte [ ] { 0 , 0 , 0 , 0 } ) ) ; } else { terminal = new UDPSlaveTerminal ( address ) ; } terminal . setTimeout ( timeout ) ; terminal . setPort ( port ) ; terminal . activate ( ) ; transport = new ModbusUDPTransport ( terminal ) ; } // Catch any fatal errors and set the listening flag to false to indicate an error catch ( Exception e ) { error = String . format ( "Cannot start UDP listener - %s" , e . getMessage ( ) ) ; listening = false ; return ; } listening = true ; try { while ( listening ) { handleRequest ( transport , this ) ; } } catch ( ModbusIOException ex1 ) { if ( ! ex1 . isEOF ( ) ) { logger . error ( "Exception occurred before EOF while handling request" , ex1 ) ; } } finally { try { terminal . deactivate ( ) ; transport . close ( ) ; } catch ( Exception ex ) { // ignore } }
public class Readers { /** * Reads the genotypes by using the given chromosome reader . * @ see Genotypes # read ( InputStream , Reader ) * @ param < A > the allele type * @ param < G > the gene type * @ param < C > the chromosome type * @ param in the input stream to read the genotype from * @ param chromosomeReader the used chromosome reader * @ return a genotype by using the given chromosome reader * @ throws XMLStreamException if reading the genotype fails * @ throws NullPointerException if one of the arguments is { @ code null } */ public static < A , G extends Gene < A , G > , C extends Chromosome < G > > List < io . jenetics . Genotype < G > > read ( final InputStream in , final Reader < ? extends C > chromosomeReader ) throws XMLStreamException { } }
return Genotypes . read ( in , chromosomeReader ) ;
public class ObjectGraphMeasurer { /** * Measures the footprint of the specified object graph . * The object graph is defined by a root object and whatever object can be * reached through that , excluding static fields , { @ code Class } objects , * and fields defined in { @ code enum } s ( all these are considered shared * values , which should not contribute to the cost of any single object * graph ) , and any object for which the user - provided predicate returns * { @ code false } . * @ param rootObject the root object of the object graph * @ param objectAcceptor a predicate that returns { @ code true } for objects * to be explored ( and treated as part of the footprint ) , or { @ code false } * to forbid the traversal to traverse the given object * @ return the footprint of the object graph */ public static Footprint measure ( Object rootObject , Predicate < Object > objectAcceptor ) { } }
Preconditions . checkNotNull ( objectAcceptor , "predicate" ) ; Predicate < Chain > completePredicate = Predicates . and ( ImmutableList . of ( ObjectExplorer . notEnumFieldsOrClasses , new ObjectExplorer . AtMostOncePredicate ( ) , Predicates . compose ( objectAcceptor , ObjectExplorer . chainToObject ) ) ) ; return ObjectExplorer . exploreObject ( rootObject , new ObjectGraphVisitor ( completePredicate ) , EnumSet . of ( Feature . VISIT_PRIMITIVES , Feature . VISIT_NULL ) ) ;
public class TimedResult { /** * Time timed result . * @ param < T > the type parameter * @ param fn the fn * @ return the timed result */ public static < T > com . simiacryptus . util . lang . TimedResult < T > time ( @ javax . annotation . Nonnull final UncheckedSupplier < T > fn ) { } }
long priorGcMs = ManagementFactory . getGarbageCollectorMXBeans ( ) . stream ( ) . mapToLong ( x -> x . getCollectionTime ( ) ) . sum ( ) ; final long start = System . nanoTime ( ) ; @ Nullable T result = null ; try { result = fn . get ( ) ; } catch ( @ javax . annotation . Nonnull final RuntimeException e ) { throw e ; } catch ( @ javax . annotation . Nonnull final Exception e ) { throw new RuntimeException ( e ) ; } long wallClockTime = System . nanoTime ( ) - start ; long gcTime = ManagementFactory . getGarbageCollectorMXBeans ( ) . stream ( ) . mapToLong ( x -> x . getCollectionTime ( ) ) . sum ( ) - priorGcMs ; return new com . simiacryptus . util . lang . TimedResult < T > ( result , wallClockTime , gcTime ) ;
public class NikeFS2LazyRandomAccessStorageImpl { /** * ( non - Javadoc ) * @ see * org . processmining . framework . log . rfb . fsio . FS2RandomAccessStorage # close ( ) */ @ Override public synchronized void close ( ) throws IOException { } }
alertSoftCopies ( ) ; if ( parent != null ) { parent . deregisterSoftCopy ( this ) ; } if ( isSoftCopy == false ) { // frees our rightfully owned blocks super . close ( ) ; } else { // shared blocks must not be freed ( soft copy ) blocks = null ; size = 0 ; pointer = 0 ; }
public class HttpRmiTransaction { /** * Set remote class and method . Compiles remote method path into format ready to be inserted into request URI , see * { @ link # methodPath } . * Method path format is described below . Note that extension is hard coded to < code > rmi < / code > . * < pre > * request - uri = class - name " / " method - name " . " extension * class - name = & lt ; qualified class name using / instead of . & gt ; * method - name = & lt ; method name & gt ; * extension = " rmi " * < / pre > * @ param className remote qualified class name , * @ param methodName remote method name . * @ throws IllegalArgumentException if < code > className < / code > argument is null or empty . * @ throws IllegalArgumentException if < code > methodName < / code > argument is null or empty . */ public void setMethod ( String className , String methodName ) { } }
Params . notNullOrEmpty ( className , "Class name" ) ; Params . notNullOrEmpty ( methodName , "Method name" ) ; StringBuilder builder = new StringBuilder ( ) ; builder . append ( Files . dot2urlpath ( className ) ) ; builder . append ( '/' ) ; builder . append ( methodName ) ; builder . append ( ".rmi" ) ; methodPath = builder . toString ( ) ;
public class AerospikeDeepJobConfig { /** * Configure Aerospike filters with the received Deep Filter objects . * @ param filters * @ return */ public AerospikeDeepJobConfig < T > filterQuery ( Filter [ ] filters ) { } }
if ( filters . length > 1 ) { throw new UnsupportedOperationException ( "Aerospike currently accepts only one filter operations" ) ; } else if ( filters . length > 0 ) { Filter deepFilter = filters [ 0 ] ; if ( ! isValidAerospikeFilter ( deepFilter ) ) { throw new UnsupportedOperationException ( "Aerospike currently supports only equality and range filter operations" ) ; } else if ( ! deepFilter . getFilterType ( ) . equals ( FilterType . EQ ) ) { operation ( "numrange" ) ; setAerospikeNumrange ( deepFilter ) ; } else { operation ( "scan" ) ; setAerospikeEqualsFilter ( deepFilter ) ; } } return this ;
public class GitlabAPI { /** * Returns the list of build triggers for a project . * @ param project the project * @ return list of build triggers * @ throws IllegalStateException if jobs are not enabled for the project */ public List < GitlabTrigger > getPipelineTriggers ( GitlabProject project ) { } }
if ( ! project . isJobsEnabled ( ) ) { // if the project has not allowed jobs , you will only get a 403 forbidden message which is // not helpful . throw new IllegalStateException ( "Jobs are not enabled for " + project . getNameWithNamespace ( ) ) ; } else { return retrieve ( ) . getAll ( GitlabProject . URL + "/" + project . getId ( ) + GitlabTrigger . URL + PARAM_MAX_ITEMS_PER_PAGE , GitlabTrigger [ ] . class ) ; }
public class TypeSignature { /** * Returns the { @ link String } representation of this type signature , as described in the class * documentation . */ public String signature ( ) { } }
if ( typeParameters . isEmpty ( ) ) { return name ; } else { return name + '<' + Joiner . on ( ", " ) . join ( typeParameters ) + '>' ; }
public class AmazonCodeDeployAsyncClient { /** * Simplified method form for invoking the ListDeployments operation with an AsyncHandler . * @ see # listDeploymentsAsync ( ListDeploymentsRequest , com . amazonaws . handlers . AsyncHandler ) */ @ Override public java . util . concurrent . Future < ListDeploymentsResult > listDeploymentsAsync ( com . amazonaws . handlers . AsyncHandler < ListDeploymentsRequest , ListDeploymentsResult > asyncHandler ) { } }
return listDeploymentsAsync ( new ListDeploymentsRequest ( ) , asyncHandler ) ;
public class SessionManagerRegistry { /** * Method registerSessionManager * @ param key * @ param sessionMgr */ public synchronized void registerSessionManager ( Object key , IGenericSessionManager sessionMgr ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( methodClassName , methodNames [ REGISTER_SESSION_MANAGER ] , "registryKey= " + key + " sessionMgr:" + sessionMgr ) ; } _genericSessionManagers . put ( key , sessionMgr ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . exiting ( methodClassName , methodNames [ REGISTER_SESSION_MANAGER ] ) ; }
public class MppDump { /** * This method recursively descends the directory structure , dumping * details of any files it finds to the output file . * @ param pw Output PrintWriter * @ param dir DirectoryEntry to dump * @ param prefix prefix used to identify path to this object * @ param showData flag indicating if data is dumped , or just structure * @ param hex set to true if hex output is required * @ param indent indent used if displaying structure only * @ throws Exception Thrown on file read errors */ private static void dumpTree ( PrintWriter pw , DirectoryEntry dir , String prefix , boolean showData , boolean hex , String indent ) throws Exception { } }
long byteCount ; for ( Iterator < Entry > iter = dir . getEntries ( ) ; iter . hasNext ( ) ; ) { Entry entry = iter . next ( ) ; if ( entry instanceof DirectoryEntry ) { String childIndent = indent ; if ( childIndent != null ) { childIndent += " " ; } String childPrefix = prefix + "[" + entry . getName ( ) + "]." ; pw . println ( "start dir: " + prefix + entry . getName ( ) ) ; dumpTree ( pw , ( DirectoryEntry ) entry , childPrefix , showData , hex , childIndent ) ; pw . println ( "end dir: " + prefix + entry . getName ( ) ) ; } else if ( entry instanceof DocumentEntry ) { if ( showData ) { pw . println ( "start doc: " + prefix + entry . getName ( ) ) ; if ( hex == true ) { byteCount = hexdump ( new DocumentInputStream ( ( DocumentEntry ) entry ) , pw ) ; } else { byteCount = asciidump ( new DocumentInputStream ( ( DocumentEntry ) entry ) , pw ) ; } pw . println ( "end doc: " + prefix + entry . getName ( ) + " (" + byteCount + " bytes read)" ) ; } else { if ( indent != null ) { pw . print ( indent ) ; } pw . println ( "doc: " + prefix + entry . getName ( ) ) ; } } else { pw . println ( "found unknown: " + prefix + entry . getName ( ) ) ; } }
public class MDLUtils { /** * method to generate MDL for a HELM molecule * @ param helm2notation input HELM2Notation * @ return MDL * @ throws BuilderMoleculeException if the helm molecule can not be built * @ throws CTKException general ChemToolKit exception passed to HELMToolKit * @ throws NotationException if notation is not valid * @ throws ChemistryException if the Chemistry Engine can not be initialized */ public static String generateMDL ( final HELM2Notation helm2notation ) throws BuilderMoleculeException , CTKException , NotationException , ChemistryException { } }
LOG . debug ( "Generate smiles representation for the whole HELM molecule" ) ; String smiles = SMILES . getSMILESForAll ( helm2notation ) ; LOG . debug ( "Convert smiles to mol" ) ; return Chemistry . getInstance ( ) . getManipulator ( ) . convert ( smiles , AbstractChemistryManipulator . StType . SMILES ) ;
public class AWSIotClient { /** * Information about the thing registration tasks . * @ param listThingRegistrationTaskReportsRequest * @ return Result of the ListThingRegistrationTaskReports operation returned by the service . * @ throws InvalidRequestException * The request is not valid . * @ throws ThrottlingException * The rate exceeds the limit . * @ throws UnauthorizedException * You are not authorized to perform this operation . * @ throws InternalFailureException * An unexpected error has occurred . * @ sample AWSIot . ListThingRegistrationTaskReports */ @ Override public ListThingRegistrationTaskReportsResult listThingRegistrationTaskReports ( ListThingRegistrationTaskReportsRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeListThingRegistrationTaskReports ( request ) ;
public class JSLocalConsumerPoint { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DispatchableConsumerPoint # ignoreInitialIndoubts ( ) */ @ Override public boolean ignoreInitialIndoubts ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "ignoreInitialIndoubts" ) ; boolean ignoreInitialIndoubts = _consumerSession . ignoreInitialIndoubts ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "ignoreInitialIndoubts" , Boolean . valueOf ( ignoreInitialIndoubts ) ) ; return ignoreInitialIndoubts ;
public class DefaultHistoryManager { /** * ( non - Javadoc ) * @ see org . activiti . engine . impl . history . HistoryManagerInterface # recordTaskNameChange ( java . lang . String , java . lang . String ) */ @ Override public void recordTaskNameChange ( String taskId , String taskName ) { } }
if ( isHistoryLevelAtLeast ( HistoryLevel . AUDIT ) ) { HistoricTaskInstanceEntity historicTaskInstance = getHistoricTaskInstanceEntityManager ( ) . findById ( taskId ) ; if ( historicTaskInstance != null ) { historicTaskInstance . setName ( taskName ) ; } }
public class SetDimensionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SetDimension setDimension , ProtocolMarshaller protocolMarshaller ) { } }
if ( setDimension == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( setDimension . getDimensionType ( ) , DIMENSIONTYPE_BINDING ) ; protocolMarshaller . marshall ( setDimension . getValues ( ) , VALUES_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class HTMLContext { /** * Split the given string around the given split value . This will also * ensure any of the given HTML tags are properly closed . * @ param text The text value to split * @ param splitValue The values to be split on * @ param HTMLBalanceTags The HTML tags to ensure are closed properly * @ return The array of string values per the splitting */ public String [ ] split ( String text , String splitValue , String [ ] HTMLBalanceTags ) { } }
String restOfText = text ; int nextBreakIndex = 0 ; List < String > list = new ArrayList < String > ( ) ; int splitValueLength = splitValue . length ( ) ; while ( restOfText . length ( ) > 0 ) { nextBreakIndex = restOfText . indexOf ( splitValue ) ; if ( nextBreakIndex < 0 ) { list . add ( restOfText ) ; break ; } list . add ( restOfText . substring ( 0 , nextBreakIndex + splitValueLength ) ) ; restOfText = restOfText . substring ( nextBreakIndex + splitValueLength ) ; } // This code makes sure that no ending HTML < / > tags are left out // causing malfomed pages . if ( HTMLBalanceTags . length > 0 ) { List < String > balancedList = new ArrayList < String > ( ) ; for ( int t = 0 ; t < HTMLBalanceTags . length ; t ++ ) { // first tag pass through if ( t < 1 ) { balancedList = getBalancedList ( HTMLBalanceTags [ t ] , list ) ; } else if ( balancedList . size ( ) > 1 ) { // after the first pass through keep trying on each // subsequent tag . balancedList = getBalancedList ( HTMLBalanceTags [ t ] , balancedList ) ; } } return balancedList . toArray ( new String [ balancedList . size ( ) ] ) ; } else { return list . toArray ( new String [ list . size ( ) ] ) ; }
public class XCodePackageManager { /** * Packages all the artifacts . The main artifact is set and all side artifacts are attached for * deployment . * @ param bundles * @ param buildDir */ void packageArtifacts ( final File compileDir , final MavenProject project , final Set < String > bundles ) throws IOException , XCodeException { } }
File mainArtifact = createMainArtifactFile ( project ) ; attachBundle ( compileDir , project , bundles , mainArtifact ) ; final File mainArtifactFile = archiveMainArtifact ( project , mainArtifact ) ; setMainArtifact ( project , mainArtifactFile ) ;
public class BlurImageOps { /** * Applies a median filter . * @ param input Input image . Not modified . * @ param output ( Optional ) Storage for output image , Can be null . Modified . * @ param radius Radius of the median blur function . * @ return Output blurred image . */ public static GrayU8 median ( GrayU8 input , @ Nullable GrayU8 output , int radius , @ Nullable IWorkArrays work ) { } }
if ( radius <= 0 ) throw new IllegalArgumentException ( "Radius must be > 0" ) ; output = InputSanityCheck . checkDeclare ( input , output ) ; boolean processed = BOverrideBlurImageOps . invokeNativeMedian ( input , output , radius ) ; if ( ! processed ) { int w = radius * 2 + 1 ; int offset [ ] = new int [ w * w ] ; if ( BoofConcurrency . USE_CONCURRENT ) { ImplMedianHistogramInner_MT . process ( input , output , radius , work ) ; } else { ImplMedianHistogramInner . process ( input , output , radius , work ) ; } // TODO Optimize this algorithm . It is taking up a large percentage of the CPU time ImplMedianSortEdgeNaive . process ( input , output , radius , offset ) ; } return output ;
public class SDRandom { /** * Generate a new random SDVariable , where values are randomly sampled according to a uniform distribution , * U ( min , max ) < br > * See { @ link # uniform ( double , double , long . . . ) } for the equivalent function where the shape is * specified as a SDVariable instead * @ param name Name of the new SDVariable * @ param min Minimum value * @ param max Maximum value . Must satisfy max > = min * @ param shape Shape of the new random SDVariable * @ return New SDVariable */ public SDVariable uniform ( String name , double min , double max , long ... shape ) { } }
SDVariable ret = f ( ) . randomUniform ( min , max , shape ) ; return updateVariableNameAndReference ( ret , name ) ;
public class PropsUtils { /** * Convert props to Map * @ param props props * @ param localOnly include local prop sets only or not * @ return String Map of props */ public static Map < String , String > toStringMap ( final Props props , final boolean localOnly ) { } }
final HashMap < String , String > map = new HashMap < > ( ) ; final Set < String > keyset = localOnly ? props . localKeySet ( ) : props . getKeySet ( ) ; for ( final String key : keyset ) { final String value = props . get ( key ) ; map . put ( key , value ) ; } return map ;
public class Solutions { /** * Retrieve a solution or the solutions list . */ @ Override @ Path ( "/{solutionId}" ) @ ApiOperation ( value = "Retrieve a solution or all solutions" , notes = "If {solutionId} is not present, returns all solutions." , response = Solution . class , responseContainer = "List" ) public JSONObject get ( String path , Map < String , String > headers ) throws ServiceException , JSONException { } }
SolutionServices solutionServices = ServiceLocator . getSolutionServices ( ) ; String id = getSegment ( path , 1 ) ; if ( id != null ) { Solution solution = solutionServices . getSolution ( id ) ; if ( solution == null ) throw new ServiceException ( 404 , "Solution not found: " + id ) ; else return solution . getJson ( ) ; } else { Query query = getQuery ( path , headers ) ; return solutionServices . getSolutions ( query ) . getJson ( ) ; }
public class SDBaseOps { /** * Returns the rank ( number of dimensions , i . e . , length ( shape ) ) of the specified SDVariable as a 0D scalar variable * @ param name Name of the output variable * @ param in Input variable * @ return 0D ( scalar ) output variable with value equal to the rank of the input variable */ public SDVariable rank ( String name , SDVariable in ) { } }
SDVariable ret = f ( ) . rank ( in ) ; return updateVariableNameAndReference ( ret , name ) ;
public class EmxMetadataParser { /** * Parses the packages sheet * @ param repo { @ link Repository } for the packages * @ param intermediateResults { @ link IntermediateParseResults } containing the parsed tag entities */ private void parsePackagesSheet ( Repository < Entity > repo , IntermediateParseResults intermediateResults ) { } }
if ( repo == null ) return ; // Collect packages int rowIndex = 1 ; for ( Entity packageEntity : resolvePackages ( repo ) ) { rowIndex ++ ; parseSinglePackage ( intermediateResults , rowIndex , packageEntity ) ; }
public class CoreRemoteMongoCollectionImpl { /** * Watches specified IDs in a collection . Requests a stream where the full document of update * events , and several other unnecessary fields are omitted from the change event objects * returned by the server . This can save on network usage when watching large documents * This convenience overload supports the use case * of non - { @ link BsonValue } instances of { @ link ObjectId } by wrapping them in * { @ link BsonObjectId } instances for the user . * @ param ids unique object identifiers of the IDs to watch . * @ return the stream of change events . */ @ Override public Stream < CompactChangeEvent < DocumentT > > watchCompact ( final ObjectId ... ids ) throws InterruptedException , IOException { } }
final BsonValue [ ] transformedIds = new BsonValue [ ids . length ] ; for ( int i = 0 ; i < ids . length ; i ++ ) { transformedIds [ i ] = new BsonObjectId ( ids [ i ] ) ; } return watchCompact ( transformedIds ) ;
public class random { /** * Returns a pseudo - random , uniformly distributed int value between origin * ( included ) and bound ( excluded ) . * @ param origin the origin ( inclusive ) of each random value * @ param bound the bound ( exclusive ) of each random value * @ param random the random engine to use for calculating the random * int value * @ return a random integer greater than or equal to { @ code min } and * less than or equal to { @ code max } * @ throws IllegalArgumentException if { @ code origin > = bound } */ public static int nextInt ( final int origin , final int bound , final Random random ) { } }
if ( origin >= bound ) { throw new IllegalArgumentException ( format ( "origin >= bound: %d >= %d" , origin , bound ) ) ; } final int value ; int n = bound - origin ; if ( n > 0 ) { value = random . nextInt ( n ) + origin ; } else { int r ; do { r = random . nextInt ( ) ; } while ( r < origin || r >= bound ) ; value = r ; } return value ;
public class STOImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . STO__IORNTION : return IORNTION_EDEFAULT == null ? iorntion != null : ! IORNTION_EDEFAULT . equals ( iorntion ) ; case AfplibPackage . STO__BORNTION : return BORNTION_EDEFAULT == null ? borntion != null : ! BORNTION_EDEFAULT . equals ( borntion ) ; } return super . eIsSet ( featureID ) ;
public class ModelsImpl { /** * Updates the regex entity model . * @ param appId The application ID . * @ param versionId The version ID . * @ param regexEntityId The regex entity extractor ID . * @ param regexEntityUpdateObject An object containing the new entity name and regex pattern . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws ErrorResponseException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the OperationStatus object if successful . */ public OperationStatus updateRegexEntityModel ( UUID appId , String versionId , UUID regexEntityId , RegexModelUpdateObject regexEntityUpdateObject ) { } }
return updateRegexEntityModelWithServiceResponseAsync ( appId , versionId , regexEntityId , regexEntityUpdateObject ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CacheProxy { /** * Removes the mapping from the cache without store - by - value copying nor waiting for synchronous * listeners to complete . * @ param key key whose mapping is to be removed from the cache * @ return the old value */ private V removeNoCopyOrAwait ( K key ) { } }
@ SuppressWarnings ( "unchecked" ) V [ ] removed = ( V [ ] ) new Object [ 1 ] ; cache . asMap ( ) . computeIfPresent ( key , ( k , expirable ) -> { if ( ! expirable . isEternal ( ) && expirable . hasExpired ( currentTimeMillis ( ) ) ) { dispatcher . publishExpired ( this , key , expirable . get ( ) ) ; statistics . recordEvictions ( 1L ) ; return null ; } dispatcher . publishRemoved ( this , key , expirable . get ( ) ) ; removed [ 0 ] = expirable . get ( ) ; return null ; } ) ; return removed [ 0 ] ;
public class WikibaseDataFetcher { /** * Fetches the documents for the entities that have pages of the given * titles on the given site . Site keys should be some site identifier known * to the Wikibase site that is queried , such as " enwiki " for Wikidata . org . * Note : This method will not work properly if a filter is set for sites * that excludes the requested site . * @ param siteKey * wiki site id , e . g . " enwiki " * @ param titles * list of string titles ( e . g . " Douglas Adams " ) of requested * entities * @ return map from titles for which data could be found to the documents * that were retrieved * @ throws MediaWikiApiErrorException * @ throws IOException */ public Map < String , EntityDocument > getEntityDocumentsByTitle ( String siteKey , List < String > titles ) throws MediaWikiApiErrorException , IOException { } }
List < String > newTitles = new ArrayList < > ( ) ; newTitles . addAll ( titles ) ; Map < String , EntityDocument > result = new HashMap < > ( ) ; boolean moreItems = ! newTitles . isEmpty ( ) ; while ( moreItems ) { List < String > subListOfTitles ; if ( newTitles . size ( ) <= maxListSize ) { subListOfTitles = newTitles ; moreItems = false ; } else { subListOfTitles = newTitles . subList ( 0 , maxListSize ) ; } WbGetEntitiesActionData properties = new WbGetEntitiesActionData ( ) ; properties . titles = ApiConnection . implodeObjects ( subListOfTitles ) ; properties . sites = siteKey ; result . putAll ( getEntityDocumentMap ( subListOfTitles . size ( ) , properties ) ) ; subListOfTitles . clear ( ) ; } return result ;
import java . util . * ; import java . lang . Math ; public class StandardDeviation { /** * Function to determine the standard deviation of a list of numbers . * The standard deviation is calculated as the square root of the average of * squared deviations from the mean . * Examples : * > > > calculateStandardDeviation ( Arrays . asList ( 4 , 2 , 5 , 8 , 6 ) ) * 2.23606797749979 * > > > calculateStandardDeviation ( Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ) * 2.160246899469287 * > > > calculateStandardDeviation ( Arrays . asList ( 5 , 9 , 10 , 15 , 6 , 4 ) ) * 4.070217029430577 * Args : * inputs : A list of numbers . * Returns : * Standard deviation of the numbers in the list . */ public static double calculateStandardDeviation ( List < Integer > inputs ) { } }
int countNumbers = inputs . size ( ) ; if ( countNumbers <= 1 ) { return 0.0 ; } double sum = 0.0 ; for ( int num : inputs ) { sum += num ; } double mean = sum / countNumbers ; double sumSquaredDeviations = 0.0 ; for ( int num : inputs ) { sumSquaredDeviations += Math . pow ( ( num - mean ) , 2 ) ; } double variance = sumSquaredDeviations / ( countNumbers - 1 ) ; return Math . sqrt ( variance ) ;
public class ES6Iterator { /** * 25.1.1.3 The IteratorResult Interface */ private Scriptable makeIteratorResult ( Context cx , Scriptable scope , boolean done , Object value ) { } }
Scriptable iteratorResult = cx . newObject ( scope ) ; ScriptableObject . putProperty ( iteratorResult , VALUE_PROPERTY , value ) ; ScriptableObject . putProperty ( iteratorResult , DONE_PROPERTY , done ) ; return iteratorResult ;
public class ActionCallMethodBuilder { /** * ActionCallMethods do not support chained method invocations */ public boolean supports ( final String line ) { } }
final List < String > splits = new ArrayList < String > ( ) ; int depth = 0 ; int textDepth = 0 ; boolean escape = false ; StringBuffer split = new StringBuffer ( ) ; for ( char c : line . toCharArray ( ) ) { if ( depth == 0 && c == '.' ) { splits . add ( split . toString ( ) ) ; split = new StringBuffer ( ) ; depth = 0 ; textDepth = 0 ; escape = false ; continue ; } else if ( c == '\\' ) { escape = true ; split . append ( c ) ; continue ; } else if ( textDepth == 0 && c == '"' ) { textDepth ++ ; } else if ( ! escape && textDepth > 0 && c == '"' ) { textDepth -- ; } else if ( textDepth == 0 && c == '(' ) { depth ++ ; } else if ( textDepth == 0 && c == ')' ) { depth -- ; } split . append ( c ) ; escape = false ; } splits . add ( split . toString ( ) ) ; return splits . size ( ) == 2 ;
public class OSQLFilterItemField { /** * Check whether or not this filter item is chain of fields ( e . g . " field1 . field2 . field3 " ) . Return true if filter item contains * only field projections operators , if field item contains any other projection operator the method returns false . When filter * item does not contains any chain operator , it is also field chain consist of one field . * @ return whether or not this filter item can be represented as chain of fields . */ public boolean isFieldChain ( ) { } }
if ( operationsChain == null ) { return true ; } for ( OPair < Integer , List < String > > pair : operationsChain ) { if ( ! pair . getKey ( ) . equals ( OSQLFilterFieldOperator . FIELD . id ) ) { return false ; } } return true ;
public class FileUtil { /** * 创建文件夹 , 如果存在直接返回此文件夹 < br > * 此方法不对File对象类型做判断 , 如果File不存在 , 无法判断其类型 * @ param dirPath 文件夹路径 , 使用POSIX格式 , 无论哪个平台 * @ return 创建的目录 */ public static File mkdir ( String dirPath ) { } }
if ( dirPath == null ) { return null ; } final File dir = file ( dirPath ) ; return mkdir ( dir ) ;
public class WizardPage { /** * Returns whether this page can already be shown to the user . Default implementation checks whether all previous * pages have been validated . * @ return true if page can be shown */ public boolean canShow ( ) { } }
WizardPage < DATA > back = getPreviousPage ( ) ; while ( back != null && back . isValid ( ) ) { back = back . getPreviousPage ( ) ; } return back == null ;
public class RaidHistogram { /** * If value is RECOVERY _ FAIL , we consider it as recovery failure */ public synchronized void put ( String path , long value , String taskId ) { } }
Point p ; int last = windowNum - 1 ; if ( value == RECOVERY_FAIL ) { p = new Point ( value , path , System . currentTimeMillis ( ) , taskId ) ; AtomicInteger counter = failedRecoveredFiles . get ( path ) ; if ( counter == null ) { counter = new AtomicInteger ( 0 ) ; failedRecoveredFiles . put ( path , counter ) ; } if ( counter . incrementAndGet ( ) == 1 ) { totalFailedPaths . get ( last ) . incrementAndGet ( ) ; } } else { value /= dividend ; p = new Point ( value , path , System . currentTimeMillis ( ) , taskId ) ; CounterArray counters = histo . get ( value ) ; if ( counters == null ) { counters = new CounterArray ( windowNum ) ; histo . put ( value , counters ) ; } counters . incrementAndGet ( last ) ; totalPoints . incrementAndGet ( last ) ; } points . add ( p ) ; InjectionHandler . processEvent ( InjectionEvent . RAID_SEND_RECOVERY_TIME , this , path , value , taskId ) ;
public class FacebookRestClient { /** * Used to retrieve photo objects using the search parameters ( one or more of the * parameters must be provided ) . * @ param subjId retrieve from photos associated with this user ( optional ) . * @ return an T of photo objects . * @ see # photos _ get ( Integer , Long , Collection ) * @ see < a href = " http : / / wiki . developers . facebook . com / index . php / Photos . get " > * Developers Wiki : Photos . get < / a > */ public T photos_get ( Integer subjId ) throws FacebookException , IOException { } }
return photos_get ( subjId , /* albumId */ null , /* photoIds */ null ) ;
public class JsonWriter { /** * Write an double field to the JSON file . * @ param fieldName field name * @ param value field value */ private void writeDoubleField ( String fieldName , Object value ) throws IOException { } }
double val = ( ( Number ) value ) . doubleValue ( ) ; if ( val != 0 ) { m_writer . writeNameValuePair ( fieldName , val ) ; }
public class IOManagerAsync { @ Override public BlockChannelWriter < MemorySegment > createBlockChannelWriter ( FileIOChannel . ID channelID , LinkedBlockingQueue < MemorySegment > returnQueue ) throws IOException { } }
checkState ( ! isShutdown . get ( ) , "I/O-Manager is shut down." ) ; return new AsynchronousBlockWriter ( channelID , this . writers [ channelID . getThreadNum ( ) ] . requestQueue , returnQueue ) ;
public class WriteContext { /** * Records the timezoned date - time values that are being written . This is * used to generate a DAYLIGHT property for vCalendar objects . * @ param floating true if the date is floating , false if not * @ param tz the timezone to format the date in or null for UTC * @ param date the date value */ public void addDate ( ICalDate date , boolean floating , TimeZone tz ) { } }
if ( date != null && date . hasTime ( ) && ! floating && tz != null ) { dates . add ( date ) ; }
public class Script { /** * < p > To run a script , first we parse it which breaks it up into chunks representing pushes of data or logical * opcodes . Then we can run the parsed chunks . < / p > * < p > The reason for this split , instead of just interpreting directly , is to make it easier * to reach into a programs structure and pull out bits of data without having to run it . * This is necessary to render the to / from addresses of transactions in a user interface . * Bitcoin Core does something similar . < / p > */ private void parse ( byte [ ] program ) throws ScriptException { } }
chunks = new ArrayList < > ( 5 ) ; // Common size . ByteArrayInputStream bis = new ByteArrayInputStream ( program ) ; int initialSize = bis . available ( ) ; while ( bis . available ( ) > 0 ) { int startLocationInProgram = initialSize - bis . available ( ) ; int opcode = bis . read ( ) ; long dataToRead = - 1 ; if ( opcode >= 0 && opcode < OP_PUSHDATA1 ) { // Read some bytes of data , where how many is the opcode value itself . dataToRead = opcode ; } else if ( opcode == OP_PUSHDATA1 ) { if ( bis . available ( ) < 1 ) throw new ScriptException ( ScriptError . SCRIPT_ERR_UNKNOWN_ERROR , "Unexpected end of script" ) ; dataToRead = bis . read ( ) ; } else if ( opcode == OP_PUSHDATA2 ) { // Read a short , then read that many bytes of data . if ( bis . available ( ) < 2 ) throw new ScriptException ( ScriptError . SCRIPT_ERR_UNKNOWN_ERROR , "Unexpected end of script" ) ; dataToRead = Utils . readUint16FromStream ( bis ) ; } else if ( opcode == OP_PUSHDATA4 ) { // Read a uint32 , then read that many bytes of data . // Though this is allowed , because its value cannot be > 520 , it should never actually be used if ( bis . available ( ) < 4 ) throw new ScriptException ( ScriptError . SCRIPT_ERR_UNKNOWN_ERROR , "Unexpected end of script" ) ; dataToRead = Utils . readUint32FromStream ( bis ) ; } ScriptChunk chunk ; if ( dataToRead == - 1 ) { chunk = new ScriptChunk ( opcode , null , startLocationInProgram ) ; } else { if ( dataToRead > bis . available ( ) ) throw new ScriptException ( ScriptError . SCRIPT_ERR_BAD_OPCODE , "Push of data element that is larger than remaining data" ) ; byte [ ] data = new byte [ ( int ) dataToRead ] ; checkState ( dataToRead == 0 || bis . read ( data , 0 , ( int ) dataToRead ) == dataToRead ) ; chunk = new ScriptChunk ( opcode , data , startLocationInProgram ) ; } // Save some memory by eliminating redundant copies of the same chunk objects . for ( ScriptChunk c : STANDARD_TRANSACTION_SCRIPT_CHUNKS ) { if ( c . equals ( chunk ) ) chunk = c ; } chunks . add ( chunk ) ; }
public class ReflectionUtils { /** * Is the given { @ code object } a primitive type or wrapper for a primitive type ? * @ param object * The object to check for primitive - ness . * @ return { @ code true } if { @ code object } is a primitive type or wrapper for a primitive type , { @ code false } * otherwise . */ public static boolean isPrimitive ( Object object ) { } }
if ( object == null ) { return false ; } Class < ? > type = object . getClass ( ) ; return object instanceof String || ( object instanceof Integer || Integer . TYPE . equals ( type ) ) || ( object instanceof Boolean || Boolean . TYPE . equals ( type ) ) || ( object instanceof Long || Long . TYPE . equals ( type ) ) || ( object instanceof Double || Double . TYPE . equals ( type ) ) || ( object instanceof Float || Float . TYPE . equals ( type ) ) || ( object instanceof Byte || Byte . TYPE . equals ( type ) ) || ( object instanceof Short || Short . TYPE . equals ( type ) ) || ( object instanceof Character || Character . TYPE . equals ( type ) ) ;
public class CommerceNotificationTemplateUserSegmentRelPersistenceImpl { /** * Returns the last commerce notification template user segment rel in the ordered set where commerceNotificationTemplateId = & # 63 ; . * @ param commerceNotificationTemplateId the commerce notification template ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching commerce notification template user segment rel , or < code > null < / code > if a matching commerce notification template user segment rel could not be found */ @ Override public CommerceNotificationTemplateUserSegmentRel fetchByCommerceNotificationTemplateId_Last ( long commerceNotificationTemplateId , OrderByComparator < CommerceNotificationTemplateUserSegmentRel > orderByComparator ) { } }
int count = countByCommerceNotificationTemplateId ( commerceNotificationTemplateId ) ; if ( count == 0 ) { return null ; } List < CommerceNotificationTemplateUserSegmentRel > list = findByCommerceNotificationTemplateId ( commerceNotificationTemplateId , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class SensorIoHandler { /** * Demultiplexes the message type and passes it to the appropriate method of * the IOAdapter . * @ see SensorIoAdapter # sensorSampleReceived ( IoSession , SampleMessage ) * @ see SensorIoAdapter # handshakeMessageReceived ( IoSession , HandshakeMessage ) */ @ Override public void messageReceived ( IoSession session , Object message ) throws Exception { } }
log . debug ( "{} <-- {}" , session , message ) ; if ( this . sensorIoAdapter == null ) { log . warn ( "No SensorIoAdapter defined. Ignoring message from {}: {}" , session , message ) ; return ; } if ( message instanceof SampleMessage ) { if ( this . sensorIoAdapter != null ) { this . sensorIoAdapter . sensorSampleReceived ( session , ( SampleMessage ) message ) ; } } else if ( message instanceof HandshakeMessage ) { log . debug ( "Received handshake message from {}: {}" , session , message ) ; if ( this . sensorIoAdapter != null ) { this . sensorIoAdapter . handshakeMessageReceived ( session , ( HandshakeMessage ) message ) ; } } else { log . warn ( "Unhandled message type for session {}: {}" , session , message ) ; }
public class AbstractCallActivityBuilder { /** * Sets a " camunda out " parameter to pass a variable from a sub process instance to the super process instance * @ param source the name of variable in the sub process instance * @ param target the name of the variable in the super process instance * @ return the builder object */ public B camundaOut ( String source , String target ) { } }
CamundaOut param = modelInstance . newInstance ( CamundaOut . class ) ; param . setCamundaSource ( source ) ; param . setCamundaTarget ( target ) ; addExtensionElement ( param ) ; return myself ;
public class Slf4jLogger { /** * Log a message at the ERROR level according to the specified format * and arguments . * < p > This form avoids superfluous object creation when the logger * is disabled for the ERROR level . < / p > * @ param format the format string * @ param argArray an array of arguments */ public void error ( String format , Object [ ] argArray ) { } }
if ( m_delegate . isErrorEnabled ( ) ) { FormattingTuple tuple = MessageFormatter . arrayFormat ( format , argArray ) ; m_delegate . error ( tuple . getMessage ( ) , tuple . getThrowable ( ) ) ; }
public class UsersApi { /** * Get a user . * Get the specified [ CfgPerson ] ( https : / / docs . genesys . com / Documentation / PSDK / latest / ConfigLayerRef / CfgPerson ) object . * @ param dbid The user & # 39 ; s DBID . ( required ) * @ return ApiResponse & lt ; GetUsersSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < GetUsersSuccessResponse > getUserWithHttpInfo ( String dbid ) throws ApiException { } }
com . squareup . okhttp . Call call = getUserValidateBeforeCall ( dbid , null , null ) ; Type localVarReturnType = new TypeToken < GetUsersSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class Session { /** * For refresh , we can ignore things like deletion or transience . * @ param pc * @ return the refreshed object */ private ZooPC checkObjectForRefresh ( Object pc ) { } }
if ( ! ( pc instanceof ZooPC ) ) { throw DBLogger . newUser ( "The object is not persistent capable: " + pc . getClass ( ) ) ; } ZooPC pci = ( ZooPC ) pc ; if ( ! pci . jdoZooIsPersistent ( ) ) { return pci ; } if ( pci . jdoZooGetContext ( ) . getSession ( ) != this ) { throw DBLogger . newUser ( "The object belongs to a different PersistenceManager." ) ; } return pci ;
public class CommerceNotificationAttachmentPersistenceImpl { /** * Returns a range of all the commerce notification attachments where commerceNotificationQueueEntryId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CommerceNotificationAttachmentModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param commerceNotificationQueueEntryId the commerce notification queue entry ID * @ param start the lower bound of the range of commerce notification attachments * @ param end the upper bound of the range of commerce notification attachments ( not inclusive ) * @ return the range of matching commerce notification attachments */ @ Override public List < CommerceNotificationAttachment > findByCommerceNotificationQueueEntryId ( long commerceNotificationQueueEntryId , int start , int end ) { } }
return findByCommerceNotificationQueueEntryId ( commerceNotificationQueueEntryId , start , end , null ) ;
public class JaxbUtils { /** * Convert a collection to a string and sends it to the Writer . * @ param rootName Name of the XML root element * @ param c Collection that needs to be marshalled * @ param w Output */ public static < T > void marshal ( String rootName , Collection < T > c , Writer w ) throws JAXBException { } }
// Create context with generic type JAXBContext ctx = JAXBContext . newInstance ( findTypes ( c ) ) ; Marshaller m = ctx . createMarshaller ( ) ; // Create wrapper collection JAXBElement element = createCollectionElement ( rootName , c ) ; m . marshal ( element , w ) ;
public class BrokerSession { /** * Package parameters for RPC call . If parameters already packaged , simply return the package . * @ param params Parameters to be packaged . * @ return Packaged parameters . */ private RPCParameters packageParams ( Object ... params ) { } }
if ( params == null ) { return null ; } if ( params . length == 1 && params [ 0 ] instanceof RPCParameters ) { return ( RPCParameters ) params [ 0 ] ; } return new RPCParameters ( params ) ;
public class InvTxMeth { /** * < p > Lazy get for quTxItBas . < / p > * @ return String * @ throws IOException - IO exception */ @ Override public final String lazyGetQuTxItBas ( ) throws IOException { } }
if ( this . quTxItBas == null ) { this . quTxItBas = loadString ( "/accounting/trade/" + this . flTxItBas ) ; } return this . quTxItBas ;
public class GetRouteResponsesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetRouteResponsesRequest getRouteResponsesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getRouteResponsesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getRouteResponsesRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( getRouteResponsesRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getRouteResponsesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( getRouteResponsesRequest . getRouteId ( ) , ROUTEID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class NetworkLatencyStrategyFactory { /** * - - - FACTORY METHOD - - - */ @ Override public < T extends Endpoint > Strategy < T > create ( ) { } }
if ( transporter == null ) { return new RoundRobinStrategy < T > ( broker , preferLocal ) ; } return new NetworkLatencyStrategy < T > ( broker , preferLocal , maxTries , this ) ;
public class BundleMap { /** * Implementation of Map . containsKey for the bundle implicit object . * This method is required by JSP 2.0 EL and performs the lookups of the * various available bundles which have been registered either explicitly or * implicitly . * @ param key The name of a bundle to lookup * @ return < code > true < / code > if the bundle is available ; < code > false < / code > otherwise */ public boolean containsKey ( Object key ) { } }
if ( key == null ) throw new NullPointerException ( "Binding to a resource bundle does not accept a null key" ) ; BundleNodeMap map = lookupScriptableBundle ( key . toString ( ) ) ; return map != null ;
public class AttributesAction { /** * Remove an existing ring from a Polygon or MultiPolygon at a given index . * @ param event * The { @ link MenuItemClickEvent } from clicking the action . */ public void onClick ( MenuItemClickEvent event ) { } }
final FeatureTransaction ft = mapWidget . getMapModel ( ) . getFeatureEditor ( ) . getFeatureTransaction ( ) ; if ( ft != null ) { SimpleFeatureAttributeWindow window = new SimpleFeatureAttributeWindow ( ft . getNewFeatures ( ) [ 0 ] ) { public void onOk ( Feature feature ) { // Copy the attributes to the real feature : // Don ' t overwrite the feature itself , as the GraphicsContext expects the same object for rendering ! ft . getNewFeatures ( ) [ 0 ] . setAttributes ( feature . getAttributes ( ) ) ; } public void onClose ( ) { } } ; window . show ( ) ; }
public class ThriftUtils { /** * Deserialize a JSON - encoded thrift object */ public static < T extends TBase > T deserializeJson ( T dest , String thriftJson ) throws TException { } }
// Tried having a static final deserializer , but it doesn ' t seem to be thread safe new TDeserializer ( new TJSONProtocol . Factory ( ) ) . deserialize ( dest , thriftJson , THRIFT_CHARSET ) ; return dest ;
public class XmlReport { /** * < p > toXml . < / p > * @ param document a { @ link com . greenpepper . document . Document } object . * @ return a { @ link java . lang . String } object . * @ throws java . io . IOException if any . */ public static String toXml ( com . greenpepper . document . Document document ) throws IOException { } }
StringWriter sw = new StringWriter ( ) ; XmlReport xmlReport = XmlReport . newInstance ( "" ) ; xmlReport . generate ( document ) ; xmlReport . printTo ( sw ) ; return sw . toString ( ) ;
public class LongArraysND { /** * Creates a < i > view < / i > on the given tuple as a { @ link LongArrayND } . * Changes in the given tuple will be visible in the returned array , * and vice versa . * @ param t The tuple * @ param size The size of the array * @ return The view on the tuple * @ throws NullPointerException If any argument is < code > null < / code > * @ throws IllegalArgumentException If the * { @ link LongTuple # getSize ( ) size } of the tuple does not match the * given array size ( that is , the product of all elements of the given * tuple ) . */ public static MutableLongArrayND wrap ( MutableLongTuple t , IntTuple size ) { } }
Objects . requireNonNull ( t , "The tuple is null" ) ; Objects . requireNonNull ( size , "The size is null" ) ; int totalSize = IntTupleFunctions . reduce ( size , 1 , ( a , b ) -> a * b ) ; if ( t . getSize ( ) != totalSize ) { throw new IllegalArgumentException ( "The tuple has a size of " + t . getSize ( ) + ", the expected " + "array size is " + size + " (total: " + totalSize + ")" ) ; } return new MutableTupleLongArrayND ( t , size ) ;
public class ExpandableRecyclerAdapter { /** * Notify any registered observers that the data set has changed . * This event does not specify what about the data set has changed , forcing * any observers to assume that all existing items and structure may no longer be valid . * LayoutManagers will be forced to fully rebind and relayout all visible views . < / p > * It will always be more efficient to use the more specific change events if you can . * Rely on { @ code # notifyParentDataSetChanged ( boolean ) } as a last resort . There will be no animation * of changes , unlike the more specific change events listed below . * @ see # notifyParentInserted ( int ) * @ see # notifyParentRemoved ( int ) * @ see # notifyParentChanged ( int ) * @ see # notifyParentRangeInserted ( int , int ) * @ see # notifyChildInserted ( int , int ) * @ see # notifyChildRemoved ( int , int ) * @ see # notifyChildChanged ( int , int ) * @ param preserveExpansionState If true , the adapter will attempt to preserve your parent ' s last expanded * state . This depends on object equality for comparisons of * old parents to parents in the new list . * If false , only { @ link Parent # isInitiallyExpanded ( ) } * will be used to determine expanded state . */ @ UiThread public void notifyParentDataSetChanged ( boolean preserveExpansionState ) { } }
if ( preserveExpansionState ) { mFlatItemList = generateFlattenedParentChildList ( mParentList , mExpansionStateMap ) ; } else { mFlatItemList = generateFlattenedParentChildList ( mParentList ) ; } notifyDataSetChanged ( ) ;
public class MultiLayerConfiguration { /** * Get a { @ link MemoryReport } for the given MultiLayerConfiguration . This is used to estimate the * memory requirements for the given network configuration and input * @ param inputType Input types for the network * @ return Memory report for the network */ public NetworkMemoryReport getMemoryReport ( InputType inputType ) { } }
Map < String , MemoryReport > memoryReportMap = new LinkedHashMap < > ( ) ; int nLayers = confs . size ( ) ; for ( int i = 0 ; i < nLayers ; i ++ ) { String layerName = confs . get ( i ) . getLayer ( ) . getLayerName ( ) ; if ( layerName == null ) { layerName = String . valueOf ( i ) ; } // Pass input type through preprocessor , if necessary InputPreProcessor preproc = getInputPreProcess ( i ) ; // TODO memory requirements for preprocessor if ( preproc != null ) { inputType = preproc . getOutputType ( inputType ) ; } LayerMemoryReport report = confs . get ( i ) . getLayer ( ) . getMemoryReport ( inputType ) ; memoryReportMap . put ( layerName , report ) ; inputType = confs . get ( i ) . getLayer ( ) . getOutputType ( i , inputType ) ; } return new NetworkMemoryReport ( memoryReportMap , MultiLayerConfiguration . class , "MultiLayerNetwork" , inputType ) ;
public class Expression2 { /** * Get the index of the parent expression that contains the given index . * Returns - 1 if the indexed expression has no parent . * @ param index * @ return */ public int getParentExpressionIndex ( int index ) { } }
if ( index == 0 ) { return - 1 ; } else { int [ ] parts = findSubexpression ( index ) ; int parentIndex = subexpressions . get ( parts [ 0 ] ) . getParentExpressionIndex ( parts [ 1 ] ) ; if ( parentIndex == - 1 ) { // index refers to a child of this expression . return 0 ; } else { // Return the index into this expression of the chosen child , // plus the index into that expression . return parentIndex + parts [ 2 ] ; } }
public class ServerListenerBuilder { /** * Add { @ link Consumer } s invoked when the { @ link Server } is started . * ( see : { @ link ServerListener # serverStarted ( Server ) } ) */ @ SafeVarargs public final ServerListenerBuilder addStartedCallbacks ( Consumer < ? super Server > ... consumers ) { } }
return addStartedCallbacks ( Arrays . asList ( consumers ) ) ;
public class Solo2 { /** * Extend the normal robotium getView to retry every 250ms over 10s to get the view requested * @ param id Resource id of the view * @ param timeout amount of time to retry getting the view * @ return View that we want to find by id */ public View getView ( int id , int timeout ) { } }
View v = null ; int RETRY_PERIOD = 250 ; int retryNum = timeout / RETRY_PERIOD ; for ( int i = 0 ; i < retryNum ; i ++ ) { try { v = super . getView ( id ) ; } catch ( Exception e ) { } if ( v != null ) { break ; } this . sleep ( RETRY_PERIOD ) ; } return v ;
public class ActionHandler { /** * 处理请求 * @ param req ServletRequest * @ param res ServletResponse * @ return 是否处理成功 */ public final boolean handle ( HttpServletRequest req , HttpServletResponse res ) { } }
return handle ( req , res , Request . getPath ( req ) ) ;
public class BshArray { /** * Collect dimensions array of supplied array object . * Returns the integer array used for Array . newInstance . * @ param arr to inspect * @ return int array of dimensions */ public static int [ ] dimensions ( Object arr ) { } }
int [ ] dims = new int [ Types . arrayDimensions ( arr . getClass ( ) ) ] ; if ( 0 == dims . length || 0 == ( dims [ 0 ] = Array . getLength ( arr ) ) ) return dims ; for ( int i = 1 ; i < dims . length ; i ++ ) if ( null != ( arr = Array . get ( arr , 0 ) ) ) dims [ i ] = Array . getLength ( arr ) ; else break ; return dims ;
public class SchemaMigrationMetadata { protected static String fingerprint ( SchemaMigrationDescriptor descriptor ) { } }
return DigestUtils . md5Hex ( SerializationUtils . serialize ( descriptor . getSchemaMigration ( ) ) ) ;
public class Intersectiond { /** * Determine whether the undirected line segment with the end points < code > p0 < / code > and < code > p1 < / code > * intersects the axis - aligned box given as its minimum corner < code > min < / code > and maximum corner < code > max < / code > , * and return the values of the parameter < i > t < / i > in the ray equation < i > p ( t ) = origin + p0 * ( p1 - p0 ) < / i > of the near and far point of intersection . * This method returns < code > true < / code > for a line segment whose either end point lies inside the axis - aligned box . * Reference : < a href = " https : / / dl . acm . org / citation . cfm ? id = 1198748 " > An Efficient and Robust Ray – Box Intersection < / a > * @ see # intersectLineSegmentAab ( Vector3dc , Vector3dc , Vector3dc , Vector3dc , Vector2d ) * @ param p0 * the line segment ' s first end point * @ param p1 * the line segment ' s second end point * @ param min * the minimum corner of the axis - aligned box * @ param max * the maximum corner of the axis - aligned box * @ param result * a vector which will hold the resulting values of the parameter * < i > t < / i > in the ray equation < i > p ( t ) = p0 + t * ( p1 - p0 ) < / i > of the near and far point of intersection * iff the line segment intersects the axis - aligned box * @ return { @ link # INSIDE } if the line segment lies completely inside of the axis - aligned box ; or * { @ link # OUTSIDE } if the line segment lies completely outside of the axis - aligned box ; or * { @ link # ONE _ INTERSECTION } if one of the end points of the line segment lies inside of the axis - aligned box ; or * { @ link # TWO _ INTERSECTION } if the line segment intersects two sides of the axis - aligned box * or lies on an edge or a side of the box */ public static int intersectLineSegmentAab ( Vector3dc p0 , Vector3dc p1 , Vector3dc min , Vector3dc max , Vector2d result ) { } }
return intersectLineSegmentAab ( p0 . x ( ) , p0 . y ( ) , p0 . z ( ) , p1 . x ( ) , p1 . y ( ) , p1 . z ( ) , min . x ( ) , min . y ( ) , min . z ( ) , max . x ( ) , max . y ( ) , max . z ( ) , result ) ;
public class MetadataContext { /** * Invokes { @ link DatabaseMetaData # getAttributes ( java . lang . String , java . lang . String , java . lang . String , * java . lang . String ) } with given arguments and returns bound information . * @ param catalog the value for { @ code catalog } parameter . * @ param schemaPattern the value for { @ code schemaPattern } parameter . * @ param typeNamePattern the value for { @ code typeNamePattern } parameter . * @ param attributeNamePattern the value for { @ code attributeNamePattern } parameter . * @ return a list of attributes . * @ throws SQLException if a database error occurs . */ public List < Attribute > getAttributes ( final String catalog , final String schemaPattern , final String typeNamePattern , final String attributeNamePattern ) throws SQLException { } }
final List < Attribute > list = new ArrayList < > ( ) ; try ( ResultSet results = databaseMetadata . getAttributes ( catalog , schemaPattern , typeNamePattern , attributeNamePattern ) ) { if ( results != null ) { bind ( results , Attribute . class , list ) ; } } return list ;
public class Property_Builder { /** * Sets the value to be returned by { @ link * org . inferred . freebuilder . processor . property . Property # getName ( ) } . * @ return this { @ code Builder } object * @ throws NullPointerException if { @ code name } is null */ public org . inferred . freebuilder . processor . property . Property . Builder setName ( String name ) { } }
this . name = Objects . requireNonNull ( name ) ; _unsetProperties . remove ( Property . NAME ) ; return ( org . inferred . freebuilder . processor . property . Property . Builder ) this ;
public class LssClient { /** * Resume your app stream by app name and stream name * @ param app app name * @ param stream stream name * @ return the response */ public ResumeAppStreamResponse resumeAppStream ( String app , String stream ) { } }
ResumeAppStreamRequest request = new ResumeAppStreamRequest ( ) ; request . setApp ( app ) ; request . setStream ( stream ) ; return resumeAppStream ( request ) ;
public class HeaderExecutionAction { /** * < p > getRenderedContent . < / p > * @ return a { @ link java . lang . String } object . */ public String getRenderedContent ( ) { } }
String content ; try { content = gpUtil . getPageContent ( getPage ( ) , implemented ) ; } catch ( GreenPepperServerException e ) { content = "" ; } return gpUtil . getViewRenderer ( ) . render ( content , new DefaultConversionContext ( getPage ( ) . toPageContext ( ) ) ) ;
public class CharacterizingSets { /** * Computes a characterizing set for a specified state in the given automaton . * @ param automaton * the automaton containing the state * @ param inputs * the input alphabets to consider * @ param state * the state for which to determine the characterizing set * @ param result * the collection in which to store the characterizing words */ public static < S , I , T > void findCharacterizingSet ( UniversalDeterministicAutomaton < S , I , T , ? , ? > automaton , Collection < ? extends I > inputs , S state , Collection < ? super Word < I > > result ) { } }
Object prop = automaton . getStateProperty ( state ) ; List < S > currentBlock = new ArrayList < > ( ) ; boolean multipleStateProps = false ; for ( S s : automaton ) { if ( Objects . equals ( s , state ) ) { continue ; } Object sProp = automaton . getStateProperty ( s ) ; if ( ! Objects . equals ( sProp , prop ) ) { multipleStateProps = true ; } else { currentBlock . add ( s ) ; } } if ( multipleStateProps ) { result . add ( Word . epsilon ( ) ) ; } while ( ! currentBlock . isEmpty ( ) ) { Iterator < S > it = currentBlock . iterator ( ) ; Word < I > suffix = null ; while ( it . hasNext ( ) && suffix == null ) { S s = it . next ( ) ; suffix = Automata . findSeparatingWord ( automaton , state , s , inputs ) ; } if ( suffix == null ) { return ; } result . add ( suffix ) ; List < Object > trace = buildTrace ( automaton , state , suffix ) ; List < S > nextBlock = new ArrayList < > ( ) ; while ( it . hasNext ( ) ) { S s = it . next ( ) ; if ( checkTrace ( automaton , s , suffix , trace ) ) { nextBlock . add ( s ) ; } } currentBlock = nextBlock ; }
public class AVLTreeDigest { /** * Outputs a histogram as bytes using a particularly cheesy encoding . */ @ Override public void asBytes ( ByteBuffer buf ) { } }
buf . putInt ( VERBOSE_ENCODING ) ; buf . putDouble ( min ) ; buf . putDouble ( max ) ; buf . putDouble ( ( float ) compression ( ) ) ; buf . putInt ( summary . size ( ) ) ; for ( Centroid centroid : summary ) { buf . putDouble ( centroid . mean ( ) ) ; } for ( Centroid centroid : summary ) { buf . putInt ( centroid . count ( ) ) ; }