signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JavaPackage { /** * Traverses the package tree visiting each matching package . * @ param predicate determines which packages within the package tree should be visited * @ param visitor will receive each package in the package tree matching the given predicate * @ see # accept ( Predicate , ClassVisitor ) */ @ PublicAPI ( usage = ACCESS ) public void accept ( Predicate < ? super JavaPackage > predicate , PackageVisitor visitor ) { } }
if ( predicate . apply ( this ) ) { visitor . visit ( this ) ; } for ( JavaPackage subPackage : getSubPackages ( ) ) { subPackage . accept ( predicate , visitor ) ; }
public class I2b2QueryResultsHandler { /** * Builds most of the concept tree , truncates the data tables , opens a * connection to the i2b2 project database , and does some other prep . This * method is called before the first call to * { @ link # handleQueryResult ( String , java . util . List , java . util . Map , java . util . Map , java . util . Map ) } . * @ throws QueryResultsHandlerProcessingException */ @ Override public void start ( PropositionDefinitionCache propDefs ) throws QueryResultsHandlerProcessingException { } }
Logger logger = I2b2ETLUtil . logger ( ) ; try { this . conceptDimensionHandler = new ConceptDimensionHandler ( dataConnectionSpec ) ; this . modifierDimensionHandler = new ModifierDimensionHandler ( dataConnectionSpec ) ; this . cache = new KnowledgeSourceCacheFactory ( ) . getInstance ( this . knowledgeSource , propDefs , true ) ; this . metadata = new MetadataFactory ( ) . getInstance ( propDefs , this . qrhId , this . cache , collectUserPropositionDefinitions ( ) , this . conceptsSection . getFolderSpecs ( ) , settings , this . data , this . metadataConnectionSpec ) ; this . providerDimensionFactory = new ProviderDimensionFactory ( this . metadata , this . settings , this . dataConnectionSpec ) ; this . patientDimensionFactory = new PatientDimensionFactory ( this . metadata , this . settings , this . data , this . dataConnectionSpec ) ; this . visitDimensionFactory = new VisitDimensionFactory ( this . metadata , this . settings , this . data , this . dataConnectionSpec ) ; DataRemoverFactory f = new DataRemoverFactory ( ) ; if ( this . query . getQueryMode ( ) == QueryMode . REPLACE ) { f . getInstance ( this . dataRemoveMethod ) . doRemoveData ( ) ; } f . getInstance ( this . metaRemoveMethod ) . doRemoveMetadata ( ) ; this . factHandlers = new ArrayList < > ( ) ; addPropositionFactHandlers ( ) ; executePreHook ( ) ; // disable indexes on observation _ fact to speed up inserts disableObservationFactIndexes ( ) ; // create i2b2 temporary tables using stored procedures truncateTempTables ( ) ; this . dataSchemaConnection = openDataDatabaseConnection ( ) ; this . dataSchemaName = this . dataSchemaConnection . getSchema ( ) ; if ( this . settings . getManageCTotalNum ( ) ) { try ( Connection conn = openMetadataDatabaseConnection ( ) ) { conn . setAutoCommit ( true ) ; try ( CallableStatement mappingCall = conn . prepareCall ( "{ call ECMETA.EC_CLEAR_C_TOTALNUM() }" ) ) { logger . log ( Level . INFO , "Clearing C_TOTALNUM for query {0}" , this . query . getName ( ) ) ; mappingCall . execute ( ) ; } } } logger . log ( Level . INFO , "Populating observation facts table for query {0}" , this . query . getName ( ) ) ; } catch ( KnowledgeSourceReadException | SQLException | OntologyBuildException ex ) { throw new QueryResultsHandlerProcessingException ( "Error during i2b2 load" , ex ) ; }
public class JCudnn { /** * < pre > * Uses a window [ center - lookBehind , center + lookAhead ] , where * lookBehind = floor ( ( lrnN - 1 ) / 2 ) , lookAhead = lrnN - lookBehind - 1. * Values of double parameters cast to tensor data type . * < / pre > */ public static int cudnnSetLRNDescriptor ( cudnnLRNDescriptor normDesc , int lrnN , double lrnAlpha , double lrnBeta , double lrnK ) { } }
return checkResult ( cudnnSetLRNDescriptorNative ( normDesc , lrnN , lrnAlpha , lrnBeta , lrnK ) ) ;
public class CLI { /** * Executed plain groovy . * @ param file the groovy file * @ param ll the log level . * @ param cmd * @ throws Exception */ public static void groovy ( String file , String ll , String cmd ) throws Exception { } }
String f = CLI . readFile ( file ) ; Object o = CLI . createSim ( f , true , ll ) ;
public class LogFile { /** * Apply log file details to { @ code LOG _ PATH } and { @ code LOG _ FILE } map entries . * @ param properties the properties to apply to */ public void applyTo ( Properties properties ) { } }
put ( properties , LoggingSystemProperties . LOG_PATH , this . path ) ; put ( properties , LoggingSystemProperties . LOG_FILE , toString ( ) ) ;
public class DependencySortOrder { /** * Gets a list of which elements the dependencies should be sorted after . Example : * If the list returns " scope , groupId " then the dependencies should be sorted first by scope and then by * groupId . * @ return a list of xml element names */ public Collection < String > getChildElementNames ( ) { } }
if ( childElementNames == null ) { childElementNames = Collections . unmodifiableList ( Arrays . asList ( parseChildElementNameList ( ) ) ) ; } return childElementNames ;
public class JerseyModuleExtender { /** * Sets Jersey container property . This allows setting ResourceConfig properties that can not be set via JAX RS features . * @ param name property name * @ param value property value * @ return * @ see org . glassfish . jersey . server . ServerProperties * @ since 0.22 */ public JerseyModuleExtender setProperty ( String name , Object value ) { } }
contributeProperties ( ) . addBinding ( name ) . toInstance ( value ) ; return this ;
public class CmsVfsModePropertyEditor { /** * Gets a pair of strings containing the default value to display for a given property and its source . < p > * @ param prop the property * @ param mode the mode * @ return a pair of the form ( defaultValue , origin ) */ private CmsPair < String , String > getDefaultValueToDisplay ( CmsClientProperty prop , Mode mode ) { } }
if ( ( mode == Mode . structure ) && ! CmsStringUtil . isEmpty ( prop . getResourceValue ( ) ) ) { String message = Messages . get ( ) . key ( Messages . GUI_ORIGIN_SHARED_0 ) ; return CmsPair . create ( prop . getResourceValue ( ) , message ) ; } CmsClientProperty inheritedProperty = m_handler . getInheritedProperty ( prop . getName ( ) ) ; if ( CmsClientProperty . isPropertyEmpty ( inheritedProperty ) ) { return null ; } CmsPathValue pathValue = inheritedProperty . getPathValue ( mode ) ; String message = Messages . get ( ) . key ( Messages . GUI_ORIGIN_INHERITED_1 , inheritedProperty . getOrigin ( ) ) ; return CmsPair . create ( pathValue . getValue ( ) , message ) ;
public class Closeables { /** * Closes a potential { @ linkplain Closeable } . * An { @ linkplain IOException } caused by { @ linkplain Closeable # close ( ) } is forwarded to the caller . * @ param object the object to check and close . * @ throws IOException if { @ link Closeable # close ( ) } fails . */ public static void close ( @ Nullable Object object ) throws IOException { } }
if ( object instanceof Closeable ) { ( ( Closeable ) object ) . close ( ) ; }
public class ClusteredExecutorService { /** * Initialize this executor service . */ protected synchronized void initialize ( ) { } }
String invocationServiceName = this . invocationServiceName ; invocationService = ( InvocationService ) CacheFactory . getService ( invocationServiceName ) ; if ( invocationService == null ) { throw new IllegalArgumentException ( "Invocation service [" + invocationServiceName + "] is not defined." ) ; } invocationService . addMemberListener ( this ) ; serviceMembers = invocationService . getInfo ( ) . getServiceMembers ( ) ; memberIterator = serviceMembers . iterator ( ) ;
public class Compiler { /** * Adds a new Script AST to the compile state . If a script for the same file * already exists the script will not be added , instead a call to * # replaceScript should be used . * @ param ast the ast of the new file */ public void addNewScript ( JsAst ast ) { } }
if ( ! addNewSourceAst ( ast ) ) { return ; } Node emptyScript = new Node ( Token . SCRIPT ) ; InputId inputId = ast . getInputId ( ) ; emptyScript . setInputId ( inputId ) ; emptyScript . setStaticSourceFile ( SourceFile . fromCode ( inputId . getIdName ( ) , "" ) ) ; processNewScript ( ast , emptyScript ) ;
public class JBBPDslBuilder { /** * Create named custom type array which size calculated by expression . * @ param type custom type , must not be null * @ param name name of the array , can be null for anonymous one * @ param size size of the array , if negative then read till the end of stream . * @ param param optional parameter for the field , can be null * @ return the builder instance , must not be null */ public JBBPDslBuilder CustomArray ( final String type , final String name , final int size , final String param ) { } }
return this . CustomArray ( type , name , arraySizeToString ( size ) , param ) ;
public class PartialSemiUniqueDatedIndex { /** * / * Transfer all entries from src to dest tables */ private void transferSemiUnique ( SemiUniqueEntry [ ] src , SemiUniqueEntry [ ] dest ) { } }
for ( int j = 0 ; j < src . length ; ++ j ) { SemiUniqueEntry e = src [ j ] ; src [ j ] = null ; while ( e != null ) { SemiUniqueEntry next = e . getSemiUniqueNext ( ) ; int i = indexFor ( e . getSemiUniqueHash ( ) , dest . length ) ; e . setSemiUniqueNext ( dest [ i ] ) ; dest [ i ] = e ; e = next ; } }
public class ENU { /** * Converts an ENU coordinate to Earth - Centered Earth - Fixed ( ECEF ) . * @ param cEnu the enu coordinate . * @ return the ecef coordinate . */ public Coordinate enuToEcef ( Coordinate cEnu ) { } }
double [ ] [ ] enu = new double [ ] [ ] { { cEnu . x } , { cEnu . y } , { cEnu . z } } ; RealMatrix enuMatrix = MatrixUtils . createRealMatrix ( enu ) ; RealMatrix deltasMatrix = _inverseRotationMatrix . multiply ( enuMatrix ) ; double [ ] column = deltasMatrix . getColumn ( 0 ) ; double cecfX = column [ 0 ] + _ecefROriginX ; double cecfY = column [ 1 ] + _ecefROriginY ; double cecfZ = column [ 2 ] + _ecefROriginZ ; return new Coordinate ( cecfX , cecfY , cecfZ ) ;
public class HttpRequester { /** * Build uri uri . * @ param httpOrHttps the http or https * @ param host the host * @ param path the path * @ param paramMap the param map * @ return the uri */ public static URI buildUri ( String httpOrHttps , String host , String path , Map < String , String > paramMap ) { } }
try { return new URIBuilder ( ) . setScheme ( httpOrHttps ) . setHost ( host ) . setPath ( path ) . setParameters ( buildNameValuePareList ( paramMap ) ) . build ( ) ; } catch ( URISyntaxException e ) { throw JMExceptionManager . handleExceptionAndReturnRuntimeEx ( log , e , "getResponseAsString" , httpOrHttps , host , path , paramMap ) ; }
public class MappedParametrizedObjectEntry { /** * Parse named parameter using { @ link StringNumberParser # parseTime ( String ) } and return time in * milliseconds ( Long value ) . * @ param name * parameter name * @ return Long value * @ throws RepositoryConfigurationException */ public Long getParameterTime ( String name ) throws RepositoryConfigurationException { } }
try { return StringNumberParser . parseTime ( getParameterValue ( name ) ) ; } catch ( NumberFormatException e ) { throw new RepositoryConfigurationException ( name + ": unparseable time (as Long). " + e , e ) ; }
public class MapUtils { /** * Puts entries from the { @ code source } map into the { @ code target } map , but without overriding * any existing entry in { @ code target } map , i . e . put only if the key does not exist in the * { @ code target } map . * @ param target The target map where to put new entries . * @ param source The source map from which read the entries . */ static < K , V > void putAllIfAbsent ( Map < K , V > target , Map < K , V > source ) { } }
for ( Map . Entry < K , V > entry : source . entrySet ( ) ) { if ( ! target . containsKey ( entry . getKey ( ) ) ) { target . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } }
public class TypedScopeCreator { /** * Creates a scope with all types declared . Declares newly discovered types * and type properties in the type registry . */ @ Override public TypedScope createScope ( Node root , AbstractScope < ? , ? > parent ) { } }
checkArgument ( parent == null || parent instanceof TypedScope ) ; TypedScope typedParent = ( TypedScope ) parent ; TypedScope scope = memoized . get ( root ) ; if ( scope != null ) { checkState ( typedParent == scope . getParent ( ) ) ; } else { scope = createScopeInternal ( root , typedParent ) ; memoized . put ( root , scope ) ; } return scope ;
public class Photo { /** * Sets the number of views for this Photo . For un - authenticated calls this value is not available and will be set to - 1. * @ param views * @ deprecated attribute no longer available */ @ Deprecated public void setViews ( String views ) { } }
if ( views != null ) { try { setViews ( Integer . parseInt ( views ) ) ; } catch ( NumberFormatException e ) { setViews ( - 1 ) ; } }
public class AllureResultsUtils { /** * Creates a new { @ link javax . xml . bind . Marshaller } for given class . * If marshaller created successfully , try to set following properties : * { @ link Marshaller # JAXB _ FORMATTED _ OUTPUT } and { @ link Marshaller # JAXB _ ENCODING } * using { @ link # setPropertySafely ( javax . xml . bind . Marshaller , String , Object ) } * @ param clazz specified class * @ return a created marshaller * @ throws AllureException if can ' t create marshaller for given class . */ public static Marshaller marshaller ( Class < ? > clazz ) { } }
Marshaller m = createMarshallerForClass ( clazz ) ; setPropertySafely ( m , JAXB_FORMATTED_OUTPUT , true ) ; setPropertySafely ( m , JAXB_ENCODING , StandardCharsets . UTF_8 . toString ( ) ) ; return m ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcAnnotationOccurrence ( ) { } }
if ( ifcAnnotationOccurrenceEClass == null ) { ifcAnnotationOccurrenceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 16 ) ; } return ifcAnnotationOccurrenceEClass ;
public class MinioClient { /** * Executes GET method for given request parameters . * @ param bucketName Bucket name . * @ param objectName Object name in the bucket . * @ param headerMap Map of HTTP headers for the request . * @ param queryParamMap Map of HTTP query parameters of the request . */ private HttpResponse executeGet ( String bucketName , String objectName , Map < String , String > headerMap , Map < String , String > queryParamMap ) throws InvalidBucketNameException , NoSuchAlgorithmException , InsufficientDataException , IOException , InvalidKeyException , NoResponseException , XmlPullParserException , ErrorResponseException , InternalException { } }
return execute ( Method . GET , getRegion ( bucketName ) , bucketName , objectName , headerMap , queryParamMap , null , 0 ) ;
public class IntListUtil { /** * Returns the minimum value in the given array of values , or { @ link * Integer # MAX _ VALUE } if the array is null or zero - length . */ public static int getMinValue ( int [ ] values ) { } }
int min = Integer . MAX_VALUE ; int vcount = ( values == null ) ? 0 : values . length ; for ( int ii = 0 ; ii < vcount ; ii ++ ) { if ( values [ ii ] < min ) { // new min min = values [ ii ] ; } } return min ;
public class AnsiPrintStream { /** * Helper for processEscapeCommand ( ) to iterate over integer options * @ param optionsIterator the underlying iterator * @ throws IOException if no more non - null values left */ private int getNextOptionInt ( Iterator < Object > optionsIterator ) throws IOException { } }
for ( ; ; ) { if ( ! optionsIterator . hasNext ( ) ) throw new IllegalArgumentException ( ) ; Object arg = optionsIterator . next ( ) ; if ( arg != null ) return ( Integer ) arg ; }
public class C3P0PooledDataSourceProvider { /** * The followings are only for testing purpose */ public int getAllConnectionNumber ( DataSource aPooledDataSource ) throws SQLException { } }
PooledDataSource pDs = ( PooledDataSource ) aPooledDataSource ; return pDs . getNumConnectionsAllUsers ( ) ;
public class SchedulerUtils { /** * Util method to get the arguments to the heron scheduler . * @ param config The static Config * @ param runtime The runtime Config * @ param freePorts list of free ports * @ return String [ ] representing the arguments to start heron - scheduler */ public static String [ ] schedulerCommandArgs ( Config config , Config runtime , List < Integer > freePorts ) { } }
// First let us have some safe checks if ( freePorts . size ( ) < PORTS_REQUIRED_FOR_SCHEDULER ) { throw new RuntimeException ( "Failed to find enough ports for executor" ) ; } for ( int port : freePorts ) { if ( port == - 1 ) { throw new RuntimeException ( "Failed to find available ports for executor" ) ; } } int httpPort = freePorts . get ( 0 ) ; List < String > commands = new ArrayList < > ( ) ; commands . add ( "--cluster" ) ; commands . add ( Context . cluster ( config ) ) ; commands . add ( "--role" ) ; commands . add ( Context . role ( config ) ) ; commands . add ( "--environment" ) ; commands . add ( Context . environ ( config ) ) ; commands . add ( "--topology_name" ) ; commands . add ( Context . topologyName ( config ) ) ; commands . add ( "--topology_bin" ) ; commands . add ( Context . topologyBinaryFile ( config ) ) ; commands . add ( "--http_port" ) ; commands . add ( Integer . toString ( httpPort ) ) ; return commands . toArray ( new String [ 0 ] ) ;
public class JDBCResultSetMetaData { /** * < ! - - start generic documentation - - > * Get the designated column ' s table ' s schema . * < ! - - end generic documentation - - > * < ! - - start Release - specific documentation - - > * < div class = " ReleaseSpecificDocumentation " > * < h3 > HSQLDB - Specific Information : < / h3 > < p > * Since 1.8.0 . x , HSQLDB implements standard SQL SCHEMA support ; * this method returns the actual schema of the column ' s table . * Columns generated in queries have no schema name . * < / div > * < ! - - end release - specific documentation - - > * @ param column the first column is 1 , the second is 2 , . . . * @ return schema name or " " if not applicable * @ exception SQLException if a database access error occurs */ public String getSchemaName ( int column ) throws SQLException { } }
checkColumn ( column ) ; String name = resultMetaData . columns [ -- column ] . getSchemaNameString ( ) ; ; return name == null ? "" : name ;
public class SelectList { /** * Deselect all options that display text matching the argument . * @ param label * the label to deselect */ public void deselectByLabel ( String label ) { } }
getDispatcher ( ) . beforeDeselect ( this , label ) ; new Select ( getElement ( ) ) . deselectByVisibleText ( label ) ; if ( Config . getBoolConfigProperty ( ConfigProperty . ENABLE_GUI_LOGGING ) ) { logUIActions ( UIActions . CLEARED , label ) ; } getDispatcher ( ) . afterDeselect ( this , label ) ;
public class CacheableSessionLockManager { /** * { @ inheritDoc } */ protected boolean isLockedPersisted ( NodeData node ) throws LockException { } }
LockData lData = null ; try { lData = lockManager . getExactNodeOrCloseParentLock ( node ) ; } catch ( RepositoryException e ) { throw new LockException ( e . getMessage ( ) , e ) ; } if ( lData == null || ( ! node . getIdentifier ( ) . equals ( lData . getNodeIdentifier ( ) ) && ! lData . isDeep ( ) ) ) { return false ; } return true ;
public class NotFound { /** * Returns a static NotFound instance and set the { @ link # payload } thread local * with cause specified . * When calling the instance on { @ link # getMessage ( ) } method , it will return whatever * stored in the { @ link # payload } thread local * @ param cause the cause * @ return a static NotFound instance as described above */ public static NotFound of ( Throwable cause ) { } }
if ( _localizedErrorMsg ( ) ) { return of ( cause , defaultMessage ( NOT_FOUND ) ) ; } else { touchPayload ( ) . cause ( cause ) ; return _INSTANCE ; }
public class XYDataset { /** * Adds the specified serie column to the dataset with custom label expression . * @ param column the serie column * @ param labelExpression column the custom label expression */ public void addSerie ( AbstractColumn column , StringExpression labelExpression ) { } }
series . add ( column ) ; seriesLabels . put ( column , labelExpression ) ;
public class FactoryMultiView { /** * Triangulate two view using the Discrete Linear Transform ( DLT ) with a calibrated camera . * @ see Wrap2ViewPixelDepthLinear * @ see TriangulateMetricLinearDLT * @ return Two view triangulation algorithm */ public static Triangulate2ViewsMetric triangulate2ViewMetric ( @ Nullable ConfigTriangulation config ) { } }
if ( config == null ) config = new ConfigTriangulation ( ) ; switch ( config . type ) { case DLT : return new Wrap2ViewPixelDepthLinear ( ) ; case GEOMETRIC : return new Wrap2ViewsTriangulateGeometric ( ) ; } throw new IllegalArgumentException ( "Unknown or unsupported type " + config . type ) ;
public class NodeConfig { /** * Sets the node identifier . * @ param id the node identifier * @ return the node configuration */ public NodeConfig setId ( String id ) { } }
return setId ( id != null ? NodeId . from ( id ) : null ) ;
public class VoiceApi { /** * Make a new call to the specified destination . * @ param destination The number to call . * @ param userData A key / value pairs list of the user data that should be attached to the call . */ public void makeCall ( String destination , KeyValueCollection userData ) throws WorkspaceApiException { } }
this . makeCall ( destination , userData , null , null ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link CmisAccessControlListType } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "removeACEs" , scope = CreateFolder . class ) public JAXBElement < CmisAccessControlListType > createCreateFolderRemoveACEs ( CmisAccessControlListType value ) { } }
return new JAXBElement < CmisAccessControlListType > ( _CreateDocumentRemoveACEs_QNAME , CmisAccessControlListType . class , CreateFolder . class , value ) ;
public class GetResourceMetricsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetResourceMetricsRequest getResourceMetricsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getResourceMetricsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getResourceMetricsRequest . getServiceType ( ) , SERVICETYPE_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getIdentifier ( ) , IDENTIFIER_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getMetricQueries ( ) , METRICQUERIES_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getStartTime ( ) , STARTTIME_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getEndTime ( ) , ENDTIME_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getPeriodInSeconds ( ) , PERIODINSECONDS_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getResourceMetricsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class JCuda { /** * Query attributes of a given memory range . < br > * < br > * Query attributes of the memory range starting at devPtr with a size of * count bytes . The memory range must refer to managed memory allocated via * cudaMallocManaged or declared via _ _ managed _ _ variables . The attributes * array will be interpreted to have numAttributes entries . The dataSizes * array will also be interpreted to have numAttributes entries . The results * of the query will be stored in data . < br > * < br > * The list of supported attributes are given below . Please refer to * { @ link # cudaMemRangeGetAttribute } for attribute descriptions and * restrictions . * < ul > * < li > * cudaMemRangeAttributeReadMostly * < / li > * < li > * cudaMemRangeAttributePreferredLocation * < / li > * < li > * cudaMemRangeAttributeAccessedBy * < / li > * < li > * cudaMemRangeAttributeLastPrefetchLocation * < / li > * < / ul > * @ param data A two - dimensional array containing pointers to memory * locations where the result of each attribute query will be written * to . * @ param dataSizes Array containing the sizes of each result * @ param attributes An array of { @ link cudaMemRangeAttribute } to query * ( numAttributes and the number of attributes in this array should * match ) * @ param numAttributes Number of attributes to query * @ param devPtr Start of the range to query * @ param count Size of the range to query * @ return cudaSuccess , cudaErrorInvalidValue * @ see JCuda # cudaMemRangeGetAttribute * @ see JCuda # cudaMemAdvisecudaMemPrefetchAsync */ public static int cudaMemRangeGetAttributes ( Pointer data [ ] , long dataSizes [ ] , int attributes [ ] , long numAttributes , Pointer devPtr , long count ) { } }
return checkResult ( cudaMemRangeGetAttributesNative ( data , dataSizes , attributes , numAttributes , devPtr , count ) ) ;
public class PolicyChecker { /** * Rewrite leaf nodes at the end of validation as described in RFC 3280 * section 6.1.5 : Step ( g ) ( iii ) . Leaf nodes with anyPolicy are replaced * by nodes explicitly representing initial policies not already * represented by leaf nodes . * This method should only be called when processing the final cert * and if the policy tree is not null and initial policies is not * anyPolicy . * @ param certIndex the depth of the tree * @ param initPolicies Set of user specified initial policies * @ param rootNode the root of the policy tree */ private static PolicyNodeImpl rewriteLeafNodes ( int certIndex , Set < String > initPolicies , PolicyNodeImpl rootNode ) { } }
Set < PolicyNodeImpl > anyNodes = rootNode . getPolicyNodesValid ( certIndex , ANY_POLICY ) ; if ( anyNodes . isEmpty ( ) ) { return rootNode ; } PolicyNodeImpl anyNode = anyNodes . iterator ( ) . next ( ) ; PolicyNodeImpl parentNode = ( PolicyNodeImpl ) anyNode . getParent ( ) ; parentNode . deleteChild ( anyNode ) ; // see if there are any initialPolicies not represented by leaf nodes Set < String > initial = new HashSet < > ( initPolicies ) ; for ( PolicyNodeImpl node : rootNode . getPolicyNodes ( certIndex ) ) { initial . remove ( node . getValidPolicy ( ) ) ; } if ( initial . isEmpty ( ) ) { // we deleted the anyPolicy node and have nothing to re - add , // so we need to prune the tree rootNode . prune ( certIndex ) ; if ( rootNode . getChildren ( ) . hasNext ( ) == false ) { rootNode = null ; } } else { boolean anyCritical = anyNode . isCritical ( ) ; Set < PolicyQualifierInfo > anyQualifiers = anyNode . getPolicyQualifiers ( ) ; for ( String policy : initial ) { Set < String > expectedPolicies = Collections . singleton ( policy ) ; PolicyNodeImpl node = new PolicyNodeImpl ( parentNode , policy , anyQualifiers , anyCritical , expectedPolicies , false ) ; } } return rootNode ;
public class LocalResourceIndexUpdater { /** * start the background index merging thread * @ throws ConfigurationException */ public void init ( ) throws ConfigurationException { } }
if ( index == null ) { throw new ConfigurationException ( "No index target" ) ; } if ( ! index . isUpdatable ( ) ) { throw new ConfigurationException ( "ResourceIndex is not updatable" ) ; } if ( incoming == null ) { throw new ConfigurationException ( "No incoming" ) ; } if ( runInterval > 0 ) { thread = new UpdateThread ( this , runInterval ) ; thread . start ( ) ; }
public class DefaultGroovyMethods { /** * Iterates from this number up to the given number using a step increment . * Each intermediate number is passed to the given closure . Example : * < pre > * 0 . step ( 10 , 2 ) { * println it * < / pre > * Prints even numbers 0 through 8. * @ param self a Number to start with * @ param to a Number to go up to , exclusive * @ param stepNumber a Number representing the step increment * @ param closure the closure to call * @ since 1.0 */ public static void step ( Number self , Number to , Number stepNumber , Closure closure ) { } }
if ( self instanceof BigDecimal || to instanceof BigDecimal || stepNumber instanceof BigDecimal ) { final BigDecimal zero = BigDecimal . valueOf ( 0 , 1 ) ; // Same as " 0.0 " . BigDecimal self1 = ( self instanceof BigDecimal ) ? ( BigDecimal ) self : new BigDecimal ( self . toString ( ) ) ; BigDecimal to1 = ( to instanceof BigDecimal ) ? ( BigDecimal ) to : new BigDecimal ( to . toString ( ) ) ; BigDecimal stepNumber1 = ( stepNumber instanceof BigDecimal ) ? ( BigDecimal ) stepNumber : new BigDecimal ( stepNumber . toString ( ) ) ; if ( stepNumber1 . compareTo ( zero ) > 0 && to1 . compareTo ( self1 ) > 0 ) { for ( BigDecimal i = self1 ; i . compareTo ( to1 ) < 0 ; i = i . add ( stepNumber1 ) ) { closure . call ( i ) ; } } else if ( stepNumber1 . compareTo ( zero ) < 0 && to1 . compareTo ( self1 ) < 0 ) { for ( BigDecimal i = self1 ; i . compareTo ( to1 ) > 0 ; i = i . add ( stepNumber1 ) ) { closure . call ( i ) ; } } else if ( self1 . compareTo ( to1 ) != 0 ) throw new GroovyRuntimeException ( "Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")" ) ; } else if ( self instanceof BigInteger || to instanceof BigInteger || stepNumber instanceof BigInteger ) { final BigInteger zero = BigInteger . valueOf ( 0 ) ; BigInteger self1 = ( self instanceof BigInteger ) ? ( BigInteger ) self : new BigInteger ( self . toString ( ) ) ; BigInteger to1 = ( to instanceof BigInteger ) ? ( BigInteger ) to : new BigInteger ( to . toString ( ) ) ; BigInteger stepNumber1 = ( stepNumber instanceof BigInteger ) ? ( BigInteger ) stepNumber : new BigInteger ( stepNumber . toString ( ) ) ; if ( stepNumber1 . compareTo ( zero ) > 0 && to1 . compareTo ( self1 ) > 0 ) { for ( BigInteger i = self1 ; i . compareTo ( to1 ) < 0 ; i = i . add ( stepNumber1 ) ) { closure . call ( i ) ; } } else if ( stepNumber1 . compareTo ( zero ) < 0 && to1 . compareTo ( self1 ) < 0 ) { for ( BigInteger i = self1 ; i . compareTo ( to1 ) > 0 ; i = i . add ( stepNumber1 ) ) { closure . call ( i ) ; } } else if ( self1 . compareTo ( to1 ) != 0 ) throw new GroovyRuntimeException ( "Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")" ) ; } else { int self1 = self . intValue ( ) ; int to1 = to . intValue ( ) ; int stepNumber1 = stepNumber . intValue ( ) ; if ( stepNumber1 > 0 && to1 > self1 ) { for ( int i = self1 ; i < to1 ; i += stepNumber1 ) { closure . call ( i ) ; } } else if ( stepNumber1 < 0 && to1 < self1 ) { for ( int i = self1 ; i > to1 ; i += stepNumber1 ) { closure . call ( i ) ; } } else if ( self1 != to1 ) throw new GroovyRuntimeException ( "Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")" ) ; }
public class ConfigInjection { /** * Method used to generate the values from environment variables or " values . yaml " */ public static Object getInjectValue ( String string ) { } }
Matcher m = pattern . matcher ( string ) ; StringBuffer sb = new StringBuffer ( ) ; // Parse the content inside pattern " $ { } " when this pattern is found while ( m . find ( ) ) { // Get parsing result Object value = getValue ( m . group ( 1 ) ) ; // Return directly when the parsing result don ' t need to be casted to String if ( ! ( value instanceof String ) ) { return value ; } m . appendReplacement ( sb , ( String ) value ) ; } return m . appendTail ( sb ) . toString ( ) ;
public class CommercePaymentMethodGroupRelPersistenceImpl { /** * Returns the first commerce payment method group rel in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce payment method group rel * @ throws NoSuchPaymentMethodGroupRelException if a matching commerce payment method group rel could not be found */ @ Override public CommercePaymentMethodGroupRel findByGroupId_First ( long groupId , OrderByComparator < CommercePaymentMethodGroupRel > orderByComparator ) throws NoSuchPaymentMethodGroupRelException { } }
CommercePaymentMethodGroupRel commercePaymentMethodGroupRel = fetchByGroupId_First ( groupId , orderByComparator ) ; if ( commercePaymentMethodGroupRel != null ) { return commercePaymentMethodGroupRel ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( groupId ) ; msg . append ( "}" ) ; throw new NoSuchPaymentMethodGroupRelException ( msg . toString ( ) ) ;
public class MRTask { /** * Get the resulting Frame from this invoked MRTask . If the passed in < code > key < / code > * is not null , then the resulting Frame will appear in the DKV . AppendableVec instances * are closed into Vec instances , which then appear in the DKV . * @ param key If null , then the Frame will not appear in the DKV . Otherwise , this result * will appear in the DKV under this key . * @ param names The names of the columns in the resulting Frame . * @ param domains The domains of the columns in the resulting Frame . * @ return null if _ noutputs is 0 , otherwise returns a Frame . */ public Frame outputFrame ( Key < Frame > key , String [ ] names , String [ ] [ ] domains ) { } }
Futures fs = new Futures ( ) ; Frame res = closeFrame ( key , names , domains , fs ) ; if ( key != null ) DKV . put ( res , fs ) ; fs . blockForPending ( ) ; return res ;
public class TileService { /** * Get a list of tile codes for a certain location ( bounding box ) . * @ param tileConfig The basic tile configuration . * @ param bounds The bounds in world space ( map CRS ) . * @ param resolution The resolution at which to search for tiles . * @ return A list of all tiles that lie within the location . */ public static List < TileCode > getTileCodesForBounds ( TileConfiguration tileConfig , Bbox bounds , double resolution ) { } }
List < TileCode > codes = new ArrayList < TileCode > ( ) ; if ( bounds . getHeight ( ) == 0 || bounds . getWidth ( ) == 0 ) { return codes ; } int tileLevel = tileConfig . getResolutionIndex ( resolution ) ; double actualResolution = tileConfig . getResolution ( tileLevel ) ; double worldTileWidth = tileConfig . getTileWidth ( ) * actualResolution ; double worldTileHeight = tileConfig . getTileHeight ( ) * actualResolution ; Coordinate tileOrigin = tileConfig . getTileOrigin ( ) ; int ymin = ( int ) Math . floor ( ( bounds . getY ( ) - tileOrigin . getY ( ) ) / worldTileHeight ) ; int ymax = ( int ) Math . floor ( ( bounds . getMaxY ( ) - tileOrigin . getY ( ) ) / worldTileHeight ) ; int xmin = ( int ) Math . floor ( ( bounds . getX ( ) - tileOrigin . getX ( ) ) / worldTileWidth ) ; int xmax = ( int ) Math . floor ( ( bounds . getMaxX ( ) - tileOrigin . getX ( ) ) / worldTileWidth ) ; if ( ymin < 0 ) { ymin = 0 ; } if ( xmin < 0 ) { xmin = 0 ; } if ( xmax < 0 || ymax < 0 ) { return codes ; } for ( int x = xmin ; x <= xmax ; x ++ ) { for ( int y = ymin ; y <= ymax ; y ++ ) { codes . add ( new TileCode ( tileLevel , x , y ) ) ; } } return codes ;
public class DummyBaseTransactionManager { /** * Commit the transaction associated with the calling thread . * @ throws javax . transaction . RollbackException * If the transaction was marked for rollback only , the transaction is rolled back and * this exception is thrown . * @ throws IllegalStateException If the calling thread is not associated with a transaction . * @ throws javax . transaction . SystemException * If the transaction service fails in an unexpected way . * @ throws javax . transaction . HeuristicMixedException * If a heuristic decision was made and some some parts of the transaction have been * committed while other parts have been rolled back . * @ throws javax . transaction . HeuristicRollbackException * If a heuristic decision to roll back the transaction was made . * @ throws SecurityException If the caller is not allowed to commit this transaction . */ @ Override public void commit ( ) throws RollbackException , HeuristicMixedException , HeuristicRollbackException , SecurityException , IllegalStateException , SystemException { } }
DummyTransaction tx = getTransaction ( ) ; if ( tx == null ) throw new IllegalStateException ( "thread not associated with transaction" ) ; tx . commit ( ) ; // Disassociate tx from thread . setTransaction ( null ) ;
public class InstallUtils { /** * Removes the " [ " , " ] " , " , " characters from the ArrayList string * @ param featureList A collection of the feature names * @ return A string with the features separated by space */ public static String getFeatureListOutput ( Collection < String > featureList ) { } }
StringBuffer sb = new StringBuffer ( ) ; for ( String output : featureList ) sb . append ( output + " " ) ; return sb . toString ( ) . trim ( ) ;
public class RenameFileTask { /** * Rename a file . * It may do a copy then a delete , or a simple rename , depending if the source and destination are * on the same drive or not . */ public static ISynchronizationPoint < IOException > rename ( File source , File destination , byte priority ) { } }
// TODO we should use the roots instead of drive TaskManager t1 = Threading . getDrivesTaskManager ( ) . getTaskManager ( source ) ; TaskManager t2 = Threading . getDrivesTaskManager ( ) . getTaskManager ( destination ) ; if ( t1 == t2 ) return new RenameFileTask ( t1 , source , destination , priority ) . start ( ) . getOutput ( ) ; AsyncWork < Long , IOException > copy = IOUtil . copy ( source , destination , priority , source . length ( ) , null , 0 , null ) ; SynchronizationPoint < IOException > result = new SynchronizationPoint < > ( ) ; copy . listenInline ( ( ) -> { new RemoveFileTask ( source , priority ) . start ( ) . getOutput ( ) . listenInline ( result ) ; } , result ) ; return result ;
public class OperaLauncherProtocol { /** * Receive and block until * all * length bytes are placed in buffer . * @ param buffer Target buffer to fill * @ param length Desired length * @ throws IOException if socket read error or protocol parse error */ private void recv ( byte [ ] buffer , int length ) throws IOException { } }
int bytes = 0 ; while ( bytes < length ) { int res = socket . getInputStream ( ) . read ( buffer , bytes , length - bytes ) ; if ( res > 0 ) { bytes += res ; } else { return ; } }
public class MultiChangeBuilder { /** * Removes a range of text . * @ param range The range of text to delete . It must not be null . Its start and end values specify the start * and end positions within the area . * @ see # deleteText ( int , int ) */ public MultiChangeBuilder < PS , SEG , S > deleteText ( IndexRange range ) { } }
return deleteText ( range . getStart ( ) , range . getEnd ( ) ) ;
public class MutableBigInteger { /** * This method is used for division of an n word dividend by a one word * divisor . The quotient is placed into quotient . The one word divisor is * specified by divisor . * @ return the remainder of the division is returned . */ int divideOneWord ( int divisor , MutableBigInteger quotient ) { } }
long divisorLong = divisor & LONG_MASK ; // Special case of one word dividend if ( intLen == 1 ) { long dividendValue = value [ offset ] & LONG_MASK ; int q = ( int ) ( dividendValue / divisorLong ) ; int r = ( int ) ( dividendValue - q * divisorLong ) ; quotient . value [ 0 ] = q ; quotient . intLen = ( q == 0 ) ? 0 : 1 ; quotient . offset = 0 ; return r ; } if ( quotient . value . length < intLen ) quotient . value = new int [ intLen ] ; quotient . offset = 0 ; quotient . intLen = intLen ; // Normalize the divisor int shift = Integer . numberOfLeadingZeros ( divisor ) ; int rem = value [ offset ] ; long remLong = rem & LONG_MASK ; if ( remLong < divisorLong ) { quotient . value [ 0 ] = 0 ; } else { quotient . value [ 0 ] = ( int ) ( remLong / divisorLong ) ; rem = ( int ) ( remLong - ( quotient . value [ 0 ] * divisorLong ) ) ; remLong = rem & LONG_MASK ; } int xlen = intLen ; while ( -- xlen > 0 ) { long dividendEstimate = ( remLong << 32 ) | ( value [ offset + intLen - xlen ] & LONG_MASK ) ; int q ; if ( dividendEstimate >= 0 ) { q = ( int ) ( dividendEstimate / divisorLong ) ; rem = ( int ) ( dividendEstimate - q * divisorLong ) ; } else { long tmp = divWord ( dividendEstimate , divisor ) ; q = ( int ) ( tmp & LONG_MASK ) ; rem = ( int ) ( tmp >>> 32 ) ; } quotient . value [ intLen - xlen ] = q ; remLong = rem & LONG_MASK ; } quotient . normalize ( ) ; // Unnormalize if ( shift > 0 ) return rem % divisor ; else return rem ;
public class Parser { /** * Cleans up the given group and adds it to the list of groups if still valid * @ param group * @ param groups */ private void addGroup ( List < Token > group , List < List < Token > > groups ) { } }
if ( group . isEmpty ( ) ) return ; // remove trailing tokens that should be ignored while ( ! group . isEmpty ( ) && IGNORED_TRAILING_TOKENS . contains ( group . get ( group . size ( ) - 1 ) . getType ( ) ) ) { group . remove ( group . size ( ) - 1 ) ; } // if the group still has some tokens left , we ' ll add it to our list of groups if ( ! group . isEmpty ( ) ) { groups . add ( group ) ; }
public class DiskAccessOneFile { /** * Read objects . * Only required for queries without index , which is worth a warning anyway . * SEE readAllObjects ( ) ! * @ param clsPx ClassProxy * @ param subClasses whether to include subclasses */ @ Override public CloseableIterator < ZooHandleImpl > oidIterator ( ZooClassProxy clsPx , boolean subClasses ) { } }
SchemaIndexEntry se = schemaIndex . getSchema ( clsPx . getSchemaId ( ) ) ; if ( se == null ) { throw new IllegalStateException ( "Schema not found for class: " + clsPx ) ; } return new ZooHandleIteratorAdapter ( se . getObjectIndexIterator ( ) , objectReader , cache ) ;
public class AbstractConverter { /** * Check the specified conversion stringency and logger are not null . * @ param stringency conversion stringency , must not be null * @ param logger logger , must not be null * @ throws NullPointerException if either conversion stringency or logger are null */ protected final void checkNotNull ( final ConversionStringency stringency , final Logger logger ) { } }
if ( stringency == null ) { throw new NullPointerException ( "stringency must not be null" ) ; } if ( logger == null ) { throw new NullPointerException ( "logger must not be null" ) ; }
public class DatabaseMetaDataTreeModel { /** * Set a status message in the JTextComponent passed to this * model . * @ param message The message that should be displayed . */ public void setStatusBarMessage ( final String message ) { } }
// Guaranteed to return a non - null array Object [ ] listeners = listenerList . getListenerList ( ) ; // Process the listeners last to first , notifying // those that are interested in this event for ( int i = listeners . length - 2 ; i >= 0 ; i -= 2 ) { if ( listeners [ i ] == StatusMessageListener . class ) { ( ( StatusMessageListener ) listeners [ i + 1 ] ) . statusMessageReceived ( message ) ; } }
public class NamespaceTools { /** * Return the { @ link NamespaceRegistry } associated with the arg session . * @ param session containing the NamespaceRegistry * @ return NamespaceRegistry */ public static NamespaceRegistry getNamespaceRegistry ( final Session session ) { } }
try { return requireNonNull ( session . getWorkspace ( ) . getNamespaceRegistry ( ) , "Couldn't find namespace registry in repository!" ) ; } catch ( final RepositoryException e ) { throw new RepositoryRuntimeException ( e ) ; }
public class UCharacter { /** * Same as { @ link Character # codePointAt ( CharSequence , int ) } . * Returns the code point at index . * This examines only the characters at index and index + 1. * @ param seq the characters to check * @ param index the index of the first or only char forming the code point * @ return the code point at the index */ public static final int codePointAt ( CharSequence seq , int index ) { } }
char c1 = seq . charAt ( index ++ ) ; if ( isHighSurrogate ( c1 ) ) { if ( index < seq . length ( ) ) { char c2 = seq . charAt ( index ) ; if ( isLowSurrogate ( c2 ) ) { return toCodePoint ( c1 , c2 ) ; } } } return c1 ;
public class BounceProxyStartupReporter { /** * Starts a loop to send a startup report to the monitoring service . < br > * The loop is executed forever , if startup reporting isn ' t successful . * @ return < code > true < / code > if a startup report could be sent successfully * and the bounce proxy controller responded that registration was * successful . If < code > false < / code > is returned , then sending a * report to the service failed . */ private boolean reportEventLoop ( ) { } }
// try forever to reach the bounce proxy , as otherwise the bounce proxy // isn ' t useful anyway while ( true ) { try { startupReportFutureAvailable . acquire ( ) ; break ; } catch ( InterruptedException e ) { // ignore & retry } } while ( startupReportFuture != null && ! startupReportFuture . isCancelled ( ) ) { try { reportEventAsHttpRequest ( ) ; // if no exception is thrown , reporting was successful and we // can return here startupReportFutureAvailable . release ( ) ; return true ; } catch ( Exception e ) { // TODO we might have to intercept the JoynrHttpMessage if the // bounce proxy responds that the client could not be // registered . It could be that two clients try to register with // the same ID . Then we won ' t have to try to register forever . // Do a more detailed error handling here ! logger . error ( "error notifying of Bounce Proxy startup: exception: {}, message: {}" , e . getClass ( ) , e . getMessage ( ) ) ; } try { Thread . sleep ( sendReportRetryIntervalMs ) ; } catch ( InterruptedException e ) { startupReportFutureAvailable . release ( ) ; return false ; } } startupReportFutureAvailable . release ( ) ; return false ;
public class HazardCurve { /** * Create a hazard curve from given times and given survival probabilities using given interpolation and extrapolation methods . * @ param name The name of this hazard curve . * @ param times Array of times as doubles . * @ param givenSurvivalProbabilities Array of corresponding survival probabilities . * @ param interpolationMethod The interpolation method used for the curve . * @ param extrapolationMethod The extrapolation method used for the curve . * @ param interpolationEntity The entity interpolated / extrapolated . * @ return A new discount factor object . */ public static HazardCurve createHazardCurveFromSurvivalProbabilities ( String name , double [ ] times , double [ ] givenSurvivalProbabilities , InterpolationMethod interpolationMethod , ExtrapolationMethod extrapolationMethod , InterpolationEntity interpolationEntity ) { } }
boolean [ ] isParameter = new boolean [ times . length ] ; for ( int timeIndex = 0 ; timeIndex < times . length ; timeIndex ++ ) { isParameter [ timeIndex ] = times [ timeIndex ] > 0 ; } return createHazardCurveFromSurvivalProbabilities ( name , times , givenSurvivalProbabilities , isParameter , interpolationMethod , extrapolationMethod , interpolationEntity ) ;
public class UserDataHelper { /** * Configures the agent from a IaaS registry . * @ param logger a logger * @ return the agent ' s data , or null if they could not be parsed */ public AgentProperties findParametersForAmazonOrOpenStack ( Logger logger ) { } }
logger . info ( "User data are being retrieved for AWS / Openstack..." ) ; // Copy the user data String userData = Utils . readUrlContentQuietly ( "http://169.254.169.254/latest/user-data" , logger ) ; String ip = Utils . readUrlContentQuietly ( "http://169.254.169.254/latest/meta-data/public-ipv4" , logger ) ; AgentProperties result = null ; try { // Parse the user data result = AgentProperties . readIaasProperties ( userData , logger ) ; // Verify the IP if ( ! AgentUtils . isValidIP ( ip ) ) { // Failed retrieving public IP : try private one instead ip = Utils . readUrlContentQuietly ( "http://169.254.169.254/latest/meta-data/local-ipv4" , logger ) ; } if ( AgentUtils . isValidIP ( ip ) ) result . setIpAddress ( ip ) ; else logger . severe ( "No IP address could be retrieved (either public-ipv4 or local-ipv4)." ) ; } catch ( IOException e ) { logger . severe ( "The network properties could not be read. " + e . getMessage ( ) ) ; Utils . logException ( logger , e ) ; } return result ;
public class BuildTrigger { /** * Convenience method to trigger downstream builds . * @ param build * The current build . Its downstreams will be triggered . * @ param listener * Receives the progress report . */ public static boolean execute ( AbstractBuild build , BuildListener listener ) { } }
PrintStream logger = listener . getLogger ( ) ; // Check all downstream Project of the project , not just those defined by BuildTrigger // TODO this may not yet be up to date if rebuildDependencyGraphAsync has been used ; need a method to wait for the last call made before now to finish final DependencyGraph graph = Jenkins . getInstance ( ) . getDependencyGraph ( ) ; List < Dependency > downstreamProjects = new ArrayList < > ( graph . getDownstreamDependencies ( build . getProject ( ) ) ) ; // Sort topologically downstreamProjects . sort ( new Comparator < Dependency > ( ) { public int compare ( Dependency lhs , Dependency rhs ) { // Swapping lhs / rhs to get reverse sort : return graph . compare ( rhs . getDownstreamProject ( ) , lhs . getDownstreamProject ( ) ) ; } } ) ; for ( Dependency dep : downstreamProjects ) { List < Action > buildActions = new ArrayList < > ( ) ; if ( dep . shouldTriggerBuild ( build , listener , buildActions ) ) { AbstractProject p = dep . getDownstreamProject ( ) ; // Allow shouldTriggerBuild to return false first , in case it is skipping because of a lack of Item . READ / DISCOVER permission : if ( p . isDisabled ( ) ) { logger . println ( Messages . BuildTrigger_Disabled ( ModelHyperlinkNote . encodeTo ( p ) ) ) ; continue ; } boolean scheduled = p . scheduleBuild ( p . getQuietPeriod ( ) , new UpstreamCause ( ( Run ) build ) , buildActions . toArray ( new Action [ 0 ] ) ) ; if ( Jenkins . getInstance ( ) . getItemByFullName ( p . getFullName ( ) ) == p ) { String name = ModelHyperlinkNote . encodeTo ( p ) ; if ( scheduled ) { logger . println ( Messages . BuildTrigger_Triggering ( name ) ) ; } else { logger . println ( Messages . BuildTrigger_InQueue ( name ) ) ; } } // otherwise upstream users should not know that it happened } } return true ;
public class LdapPersonAttributeDao { /** * / * ( non - Javadoc ) * @ see org . springframework . beans . factory . InitializingBean # afterPropertiesSet ( ) */ @ Override public void afterPropertiesSet ( ) throws Exception { } }
final Map < String , Set < String > > resultAttributeMapping = this . getResultAttributeMapping ( ) ; if ( this . setReturningAttributes && resultAttributeMapping != null ) { this . searchControls . setReturningAttributes ( resultAttributeMapping . keySet ( ) . toArray ( new String [ resultAttributeMapping . size ( ) ] ) ) ; } if ( this . contextSource == null ) { throw new BeanCreationException ( "contextSource must be set" ) ; }
public class diff_match_patch { /** * Rehydrate the text in a diff from a string of line hashes to real lines * of text . * @ param diffs * LinkedList of Diff objects . * @ param lineArray * List of unique strings . */ protected void diff_charsToLines ( LinkedList < Diff > diffs , List < String > lineArray ) { } }
StringBuilder text ; for ( Diff diff : diffs ) { text = new StringBuilder ( ) ; for ( int y = 0 ; y < diff . text . length ( ) ; y ++ ) { text . append ( lineArray . get ( diff . text . charAt ( y ) ) ) ; } diff . text = text . toString ( ) ; }
public class AbstractItemDefinitionAccessProvider { /** * Load values . * @ param parentNode * @ param propertyName * @ return * @ throws RepositoryException */ protected List < ValueData > loadPropertyValues ( NodeData parentNode , ItemData property , InternalQName propertyName ) throws RepositoryException { } }
if ( property == null ) { property = dataManager . getItemData ( parentNode , new QPathEntry ( propertyName , 1 ) , ItemType . PROPERTY ) ; } if ( property != null ) { if ( property . isNode ( ) ) throw new RepositoryException ( "Fail to load property " + propertyName + "not found for " + parentNode . getQPath ( ) . getAsString ( ) ) ; return ( ( PropertyData ) property ) . getValues ( ) ; } return null ;
public class DateTimeZone { /** * Sets the zone provider factory without performing the security check . * @ param provider provider to use , or null for default * @ return the provider * @ throws IllegalArgumentException if the provider is invalid */ private static Provider validateProvider ( Provider provider ) { } }
Set < String > ids = provider . getAvailableIDs ( ) ; if ( ids == null || ids . size ( ) == 0 ) { throw new IllegalArgumentException ( "The provider doesn't have any available ids" ) ; } if ( ! ids . contains ( "UTC" ) ) { throw new IllegalArgumentException ( "The provider doesn't support UTC" ) ; } if ( ! UTC . equals ( provider . getZone ( "UTC" ) ) ) { throw new IllegalArgumentException ( "Invalid UTC zone provided" ) ; } return provider ;
public class DefaultClientConfigImpl { /** * / * ( non - Javadoc ) * @ see com . netflix . niws . client . CliengConfig # getProperty ( com . netflix . niws . client . ClientConfigKey , java . lang . Object ) */ @ Override public Object getProperty ( IClientConfigKey key , Object defaultVal ) { } }
Object val = getProperty ( key ) ; if ( val == null ) { return defaultVal ; } return val ;
public class BucketManager { /** * TODO : 准备干掉setImage 、 unsetImage , 重写 */ public Response setImage ( String bucket , String srcSiteUrl ) throws QiniuException { } }
return setImage ( bucket , srcSiteUrl , null ) ;
public class ModuleDeps { /** * Adds all of the map entries from other to this map * @ param other * the map containing entries to add * @ return true if the map was modified */ public boolean addAll ( ModuleDeps other ) { } }
boolean modified = false ; for ( Map . Entry < String , ModuleDepInfo > entry : other . entrySet ( ) ) { modified |= add ( entry . getKey ( ) , new ModuleDepInfo ( entry . getValue ( ) ) ) ; } return modified ;
public class VirtualRoot { /** * Removes the { @ link DedicatedFileSystem } instance specified from * this virtual root . This happens when the { @ link java . nio . file . WatchService } of the * fs specified had been closed and a { @ link java . nio . file . ClosedWatchServiceException } has been * caused to be thrown . * @ param pDedicatedFileSystem */ public void removeFileSystem ( final DedicatedFileSystem pDedicatedFileSystem ) { } }
for ( final Iterator < Map . Entry < FileSystem , DedicatedFileSystem > > it = children . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { final Map . Entry < FileSystem , DedicatedFileSystem > next = it . next ( ) ; if ( pDedicatedFileSystem . equals ( next . getValue ( ) ) ) { manager . removeFileSystem ( next . getKey ( ) ) ; it . remove ( ) ; } }
public class DbxClientV1 { /** * Get the file or folder metadata for a given path . * < pre > * DbxClientV1 dbxClient = . . . * DbxEntry entry = dbxClient . getMetadata ( " / Photos " ) ; * if ( entry = = null ) { * System . out . println ( " No file or folder at that path . " ) ; * } else { * System . out . print ( entry . toStringMultiline ( ) ) ; * < / pre > * @ param path * The path to the file or folder ( see { @ link DbxPathV1 } ) . * @ param includeMediaInfo * If { @ code true } , then if the return value is a { @ link DbxEntry . File } , it might have * its { @ code photoInfo } and { @ code mediaInfo } fields filled in . * @ return If there is a file or folder at the given path , return the * metadata for that path . If there is no file or folder there , * return { @ code null } . */ public /* @ Nullable */ DbxEntry getMetadata ( final String path , boolean includeMediaInfo ) throws DbxException { } }
DbxPathV1 . checkArg ( "path" , path ) ; String host = this . host . getApi ( ) ; String apiPath = "1/metadata/auto" + path ; /* @ Nullable */ String [ ] params = { "list" , "false" , "include_media_info" , includeMediaInfo ? "true" : null , } ; return doGet ( host , apiPath , params , null , new DbxRequestUtil . ResponseHandler < /* @ Nullable */ DbxEntry > ( ) { @ Override public /* @ Nullable */ DbxEntry handle ( HttpRequestor . Response response ) throws DbxException { if ( response . getStatusCode ( ) == 404 ) return null ; if ( response . getStatusCode ( ) != 200 ) throw DbxRequestUtil . unexpectedStatus ( response ) ; // Will return ' null ' for " is _ deleted = true " entries . return DbxRequestUtil . readJsonFromResponse ( DbxEntry . ReaderMaybeDeleted , response ) ; } } ) ;
public class DefaultKamCacheService { /** * Removes any cached entries for this KAM handle . * This method will block obtaining a write lock on the cache . * @ param handle String */ private void purgeHandle ( String handle ) { } }
write . lock ( ) ; try { kamMap . remove ( handle ) ; Set < Entry < FilteredKAMKey , String > > entries = fltrdMap . entrySet ( ) ; Iterator < Entry < FilteredKAMKey , String > > iter = entries . iterator ( ) ; while ( iter . hasNext ( ) ) { Entry < FilteredKAMKey , String > next = iter . next ( ) ; if ( handle . equals ( next . getValue ( ) ) ) { iter . remove ( ) ; } } Set < Entry < KamInfo , String > > entries2 = unfltrdMap . entrySet ( ) ; Iterator < Entry < KamInfo , String > > iter2 = entries2 . iterator ( ) ; while ( iter2 . hasNext ( ) ) { Entry < KamInfo , String > next = iter2 . next ( ) ; if ( handle . equals ( next . getValue ( ) ) ) { iter2 . remove ( ) ; } } } finally { write . unlock ( ) ; }
public class EngineManager { /** * Different RenderEngines can register themselves with the * EngineManager factory to be available with EngineManager . getInstance ( ) ; * @ param engine RenderEngine instance , e . g . SnipRenderEngine */ public static synchronized void registerEngine ( RenderEngine engine ) { } }
if ( null == availableEngines ) { availableEngines = new HashMap ( ) ; } availableEngines . put ( engine . getName ( ) , engine ) ;
public class CertUtil { /** * 用配置文件acp _ sdk . properties配置路径 加载敏感信息加密证书 */ private static void initRootCert ( ) { } }
LogUtil . writeLog ( "加载根证书==>" + SDKConfig . getConfig ( ) . getRootCertPath ( ) ) ; if ( ! isEmpty ( SDKConfig . getConfig ( ) . getRootCertPath ( ) ) ) { rootCert = initCert ( SDKConfig . getConfig ( ) . getRootCertPath ( ) ) ; LogUtil . writeLog ( "Load RootCert Successful" ) ; } else { LogUtil . writeLog ( "WARN: acpsdk.rootCert.path is empty" ) ; }
public class DocumentSettings { /** * Puts / HELVETICA . pfb in the fontCache as an embedded font . * @ throws IOException * @ throws DocumentException * @ throws VectorPrintException when the argument is not one of the built in fonts * @ see # pdfA1A ( com . itextpdf . text . pdf . PdfWriter ) */ protected void builtInFontHack ( ) throws IOException , DocumentException , VectorPrintException { } }
ByteArrayOutputStream out = new ByteArrayOutputStream ( 30720 ) ; InputStream in = DocumentSettings . class . getResourceAsStream ( "/" + BaseFont . HELVETICA + ".pfb" ) ; IOHelper . load ( in , out , getSettings ( ) . getIntegerProperty ( ReportConstants . DEFAULTBUFFERSIZE , ReportConstants . BUFFERSIZE ) , true ) ; VectorPrintBaseFont . cacheAndEmbedBuiltInFont ( BaseFont . HELVETICA , out . toByteArray ( ) ) ;
public class SslContext { /** * Creates a new client - side { @ link SslContext } . * @ param provider the { @ link SslContext } implementation to use . * { @ code null } to use the current default one . * @ param certChainFile an X . 509 certificate chain file in PEM format . * { @ code null } to use the system default * @ return a new client - side { @ link SslContext } * @ deprecated Replaced by { @ link SslContextBuilder } */ @ Deprecated public static SslContext newClientContext ( SslProvider provider , File certChainFile ) throws SSLException { } }
return newClientContext ( provider , certChainFile , null ) ;
public class MaterialStepper { /** * Go to the step with the specified step id . * @ see MaterialStep # getStep ( ) */ public void goToStepId ( int id ) { } }
for ( int i = 0 ; i < getWidgetCount ( ) ; i ++ ) { Widget w = getWidget ( i ) ; if ( w instanceof MaterialStep ) { MaterialStep materialStep = ( MaterialStep ) w ; boolean active = materialStep . getStep ( ) == id ; materialStep . setActive ( active ) ; if ( active ) { setCurrentStepIndex ( i ) ; } } }
public class Stream { /** * Zip together the iterators until one of them runs out of values . * Each array of values is combined into a single value using the supplied zipFunction function . * @ param c * @ param zipFunction * @ return */ @ SuppressWarnings ( "resource" ) public static < R > Stream < R > zip ( final Collection < ? extends DoubleStream > c , final DoubleNFunction < R > zipFunction ) { } }
if ( N . isNullOrEmpty ( c ) ) { return Stream . empty ( ) ; } final int len = c . size ( ) ; final DoubleIterator [ ] iters = new DoubleIterator [ len ] ; int i = 0 ; for ( DoubleStream s : c ) { iters [ i ++ ] = s . iteratorEx ( ) ; } return new IteratorStream < > ( new ObjIteratorEx < R > ( ) { @ Override public boolean hasNext ( ) { for ( int i = 0 ; i < len ; i ++ ) { if ( iters [ i ] . hasNext ( ) == false ) { return false ; } } return true ; } @ Override public R next ( ) { final double [ ] args = new double [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { args [ i ] = iters [ i ] . nextDouble ( ) ; } return zipFunction . apply ( args ) ; } } ) . onClose ( newCloseHandler ( c ) ) ;
public class WeightedPathDescriptor { /** * Calculates the weighted path descriptors . * @ param container Parameter is the atom container . * @ return A DoubleArrayResult value representing the weighted path values */ @ Override public DescriptorValue calculate ( IAtomContainer container ) { } }
IAtomContainer local = AtomContainerManipulator . removeHydrogens ( container ) ; int natom = local . getAtomCount ( ) ; DoubleArrayResult retval = new DoubleArrayResult ( ) ; ArrayList < List < ? > > pathList = new ArrayList < List < ? > > ( ) ; // unique paths for ( int i = 0 ; i < natom - 1 ; i ++ ) { IAtom a = local . getAtom ( i ) ; for ( int j = i + 1 ; j < natom ; j ++ ) { IAtom b = local . getAtom ( j ) ; pathList . addAll ( PathTools . getAllPaths ( local , a , b ) ) ; } } // heteroatoms double [ ] pathWts = getPathWeights ( pathList , local ) ; double mid = 0.0 ; for ( double pathWt3 : pathWts ) mid += pathWt3 ; mid += natom ; // since we don ' t calculate paths of length 0 above retval . add ( mid ) ; retval . add ( mid / ( double ) natom ) ; pathList . clear ( ) ; int count = 0 ; for ( int i = 0 ; i < natom ; i ++ ) { IAtom a = local . getAtom ( i ) ; if ( a . getSymbol ( ) . equalsIgnoreCase ( "C" ) ) continue ; count ++ ; for ( int j = 0 ; j < natom ; j ++ ) { IAtom b = local . getAtom ( j ) ; if ( a . equals ( b ) ) continue ; pathList . addAll ( PathTools . getAllPaths ( local , a , b ) ) ; } } pathWts = getPathWeights ( pathList , local ) ; mid = 0.0 ; for ( double pathWt2 : pathWts ) mid += pathWt2 ; mid += count ; retval . add ( mid ) ; // oxygens pathList . clear ( ) ; count = 0 ; for ( int i = 0 ; i < natom ; i ++ ) { IAtom a = local . getAtom ( i ) ; if ( ! a . getSymbol ( ) . equalsIgnoreCase ( "O" ) ) continue ; count ++ ; for ( int j = 0 ; j < natom ; j ++ ) { IAtom b = local . getAtom ( j ) ; if ( a . equals ( b ) ) continue ; pathList . addAll ( PathTools . getAllPaths ( local , a , b ) ) ; } } pathWts = getPathWeights ( pathList , local ) ; mid = 0.0 ; for ( double pathWt1 : pathWts ) mid += pathWt1 ; mid += count ; retval . add ( mid ) ; // nitrogens pathList . clear ( ) ; count = 0 ; for ( int i = 0 ; i < natom ; i ++ ) { IAtom a = local . getAtom ( i ) ; if ( ! a . getSymbol ( ) . equalsIgnoreCase ( "N" ) ) continue ; count ++ ; for ( int j = 0 ; j < natom ; j ++ ) { IAtom b = local . getAtom ( j ) ; if ( a . equals ( b ) ) continue ; pathList . addAll ( PathTools . getAllPaths ( local , a , b ) ) ; } } pathWts = getPathWeights ( pathList , local ) ; mid = 0.0 ; for ( double pathWt : pathWts ) mid += pathWt ; mid += count ; retval . add ( mid ) ; return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , retval , getDescriptorNames ( ) ) ;
public class Ascii { /** * Returns a copy of the input character sequence in which all { @ linkplain # isUpperCase ( char ) * uppercase ASCII characters } have been converted to lowercase . All other characters are copied * without modification . * @ param chars the chars * @ return the string * @ since 14.0 */ public static String toLowerCase ( CharSequence chars ) { } }
if ( chars instanceof String ) { return toLowerCase ( ( String ) chars ) ; } int length = chars . length ( ) ; StringBuilder builder = new StringBuilder ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { builder . append ( toLowerCase ( chars . charAt ( i ) ) ) ; } return builder . toString ( ) ;
public class ConstraintChain { /** * Chains the member constraints and returns the output of the last constraint . * @ param match match to process * @ param ind mapped indices * @ return satisfying elements */ @ Override public Collection < BioPAXElement > generate ( Match match , int ... ind ) { } }
Collection < BioPAXElement > gen = new HashSet < BioPAXElement > ( con [ 0 ] . generate ( match , ind ) ) ; Set < BioPAXElement > input = new HashSet < BioPAXElement > ( ) ; Set < BioPAXElement > output = new HashSet < BioPAXElement > ( gen ) ; int [ ] tempInd = { 0 , 1 } ; for ( int i = 1 ; i < con . length ; i ++ ) { if ( output . isEmpty ( ) ) break ; input . clear ( ) ; input . addAll ( output ) ; output . clear ( ) ; for ( BioPAXElement ele : input ) { Match m = new Match ( 2 ) ; m . set ( ele , 0 ) ; output . addAll ( con [ i ] . generate ( m , tempInd ) ) ; } } return output ;
public class TreeWithIDBuilder { /** * A generic method to build a tree of objects . * @ param < KEYTYPE > * The tree key type . * @ param < DATATYPE > * The tree item value type . * @ param aAll * A linear list of objects to build the tree from . May not be * < code > null < / code > . * @ param aParentResolver * The callback method to determine the parental object of a given * object . May not be < code > null < / code > . * @ return A tree with all the objects . Never < code > null < / code > . * @ throws IllegalStateException * if the hierarchy cannot be determined because an object references * a parent that is not in the list ! */ @ Nonnull public static < KEYTYPE , DATATYPE extends IHasID < KEYTYPE > > DefaultTreeWithID < KEYTYPE , DATATYPE > buildTree ( @ Nonnull final Collection < ? extends DATATYPE > aAll , @ Nonnull final IParentProvider < DATATYPE > aParentResolver ) { } }
ValueEnforcer . notNull ( aAll , "All" ) ; ValueEnforcer . notNull ( aParentResolver , "ParentResolver" ) ; return _buildTree ( new CommonsArrayList < > ( aAll ) , aParentResolver ) ;
public class PartitionedFileSourceBase { /** * Helper method to add new { @ link WorkUnit } s for this job . It iterates through a date partitioned directory and * creates a { @ link WorkUnit } for each file that needs to be processed . It then adds that { @ link WorkUnit } to a * { @ link MultiWorkUnitWeightedQueue } */ private void addNewWorkUnits ( MultiWorkUnitWeightedQueue multiWorkUnitWeightedQueue ) { } }
try { List < PartitionAwareFileRetriever . FileInfo > filesToPull = retriever . getFilesToProcess ( this . lowWaterMark , this . maxFilesPerJob - this . fileCount ) ; Collections . sort ( filesToPull ) ; String topicName = this . sourceDir . getName ( ) ; String namespace = this . sourceState . getProp ( ConfigurationKeys . EXTRACT_NAMESPACE_NAME_KEY ) ; Map < Long , Extract > extractMap = new HashMap < > ( ) ; for ( PartitionAwareFileRetriever . FileInfo file : filesToPull ) { Extract extract = getExtractForFile ( file , topicName , namespace , extractMap ) ; LOG . info ( "Will process file " + file . getFilePath ( ) ) ; WorkUnit singleWorkUnit = WorkUnit . create ( extract ) ; singleWorkUnit . setProp ( ConfigurationKeys . SOURCE_ENTITY , topicName ) ; singleWorkUnit . setProp ( ConfigurationKeys . SOURCE_FILEBASED_FILES_TO_PULL , file . getFilePath ( ) ) ; singleWorkUnit . setProp ( ConfigurationKeys . WORK_UNIT_LOW_WATER_MARK_KEY , file . getWatermarkMsSinceEpoch ( ) ) ; singleWorkUnit . setProp ( ConfigurationKeys . WORK_UNIT_HIGH_WATER_MARK_KEY , file . getWatermarkMsSinceEpoch ( ) ) ; singleWorkUnit . setProp ( ConfigurationKeys . WORK_UNIT_DATE_PARTITION_KEY , file . getWatermarkMsSinceEpoch ( ) ) ; singleWorkUnit . setProp ( ConfigurationKeys . WORK_UNIT_DATE_PARTITION_NAME , file . getPartitionName ( ) ) ; if ( this . sourceState . getPropAsBoolean ( ConfigurationKeys . SCHEMA_IN_SOURCE_DIR , ConfigurationKeys . DEFAULT_SCHEMA_IN_SOURCE_DIR ) ) { addSchemaFile ( file , singleWorkUnit ) ; } multiWorkUnitWeightedQueue . addWorkUnit ( singleWorkUnit , file . getFileSize ( ) ) ; this . fileCount ++ ; } LOG . info ( "Total number of files extracted for the current run: " + filesToPull . size ( ) ) ; } catch ( IOException e ) { Throwables . propagate ( e ) ; }
public class Parser { /** * Reports an error message at a given parse tree ' s location . * @ param parseTree The location to report the message at . * @ param message The message to report in String . format style . * @ param arguments The arguments to fill in the message format . */ @ FormatMethod private void reportError ( ParseTree parseTree , @ FormatString String message , Object ... arguments ) { } }
if ( parseTree == null ) { reportError ( message , arguments ) ; } else { errorReporter . reportError ( parseTree . location . start , message , arguments ) ; }
public class DefaultBeanClassBuilder { /** * A traitable class is a special class with support for dynamic properties and types . * This method builds the trait map , containing the references to the proxies * for each trait carried by an object at a given time . * @ param cw * @ param classDef */ protected void buildTraitMap ( ClassWriter cw , ClassDefinition classDef ) { } }
FieldVisitor fv = cw . visitField ( ACC_PRIVATE , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) , "Ljava/util/Map<Ljava/lang/String;Lorg/drools/core/factmodel/traits/Thing;>;" , null ) ; fv . visitEnd ( ) ; MethodVisitor mv ; mv = cw . visitMethod ( ACC_PUBLIC , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) , "()Ljava/util/Map<Ljava/lang/String;Lorg/drools/factmodel/traits/Thing;>;" , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "_setTraitMap" , Type . getMethodDescriptor ( Type . getType ( void . class ) , new Type [ ] { Type . getType ( Map . class ) } ) , null , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitFieldInsn ( PUTFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitInsn ( RETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "addTrait" , Type . getMethodDescriptor ( Type . getType ( void . class ) , new Type [ ] { Type . getType ( String . class ) , Type . getType ( Thing . class ) } ) , "(Ljava/lang/String;Lorg/drools/core/factmodel/traits/Thing;)V" , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitVarInsn ( ALOAD , 2 ) ; mv . visitMethodInsn ( INVOKEINTERFACE , Type . getInternalName ( Map . class ) , "put" , Type . getMethodDescriptor ( Type . getType ( Object . class ) , new Type [ ] { Type . getType ( Object . class ) , Type . getType ( Object . class ) } ) ) ; mv . visitInsn ( POP ) ; mv . visitInsn ( RETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "getTrait" , Type . getMethodDescriptor ( Type . getType ( Thing . class ) , new Type [ ] { Type . getType ( String . class ) } ) , Type . getMethodDescriptor ( Type . getType ( Thing . class ) , new Type [ ] { Type . getType ( String . class ) } ) , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitMethodInsn ( INVOKEINTERFACE , Type . getInternalName ( Map . class ) , "get" , Type . getMethodDescriptor ( Type . getType ( Object . class ) , new Type [ ] { Type . getType ( Object . class ) } ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( Thing . class ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "hasTrait" , Type . getMethodDescriptor ( Type . getType ( boolean . class ) , new Type [ ] { Type . getType ( String . class ) } ) , null , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; Label l0 = new Label ( ) ; mv . visitJumpInsn ( IFNONNULL , l0 ) ; mv . visitInsn ( ICONST_0 ) ; mv . visitInsn ( IRETURN ) ; mv . visitLabel ( l0 ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitMethodInsn ( INVOKEINTERFACE , Type . getInternalName ( Map . class ) , "containsKey" , Type . getMethodDescriptor ( Type . getType ( boolean . class ) , new Type [ ] { Type . getType ( Object . class ) } ) ) ; mv . visitInsn ( IRETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "hasTraits" , Type . getMethodDescriptor ( Type . getType ( boolean . class ) , new Type [ ] { } ) , null , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; Label l5 = new Label ( ) ; mv . visitJumpInsn ( IFNULL , l5 ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitMethodInsn ( INVOKEINTERFACE , Type . getInternalName ( Map . class ) , "isEmpty" , Type . getMethodDescriptor ( Type . BOOLEAN_TYPE , new Type [ ] { } ) ) ; mv . visitJumpInsn ( IFNE , l5 ) ; mv . visitInsn ( ICONST_1 ) ; Label l4 = new Label ( ) ; mv . visitJumpInsn ( GOTO , l4 ) ; mv . visitLabel ( l5 ) ; mv . visitInsn ( ICONST_0 ) ; mv . visitLabel ( l4 ) ; mv . visitInsn ( IRETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "removeTrait" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( String . class ) } ) , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( String . class ) } ) , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( TraitTypeMap . class ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , Type . getInternalName ( TraitTypeMap . class ) , "removeCascade" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( String . class ) } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "removeTrait" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( BitSet . class ) } ) , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( BitSet . class ) } ) , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( TraitTypeMap . class ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , Type . getInternalName ( TraitTypeMap . class ) , "removeCascade" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( BitSet . class ) } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "getTraits" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { } ) , "()Ljava/util/Collection<Ljava/lang/String;>;" , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , BuildUtils . getInternalType ( classDef . getName ( ) ) , "_getTraitMap" , Type . getMethodDescriptor ( Type . getType ( Map . class ) , new Type [ ] { } ) ) ; mv . visitMethodInsn ( INVOKEINTERFACE , Type . getInternalName ( Map . class ) , "keySet" , Type . getMethodDescriptor ( Type . getType ( Set . class ) , new Type [ ] { } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "_setBottomTypeCode" , Type . getMethodDescriptor ( Type . getType ( void . class ) , new Type [ ] { Type . getType ( BitSet . class ) } ) , null , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( TraitTypeMap . class ) ) ; mv . visitVarInsn ( ALOAD , 1 ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , Type . getInternalName ( TraitTypeMap . class ) , "setBottomCode" , Type . getMethodDescriptor ( Type . getType ( void . class ) , new Type [ ] { Type . getType ( BitSet . class ) } ) ) ; mv . visitInsn ( RETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "getMostSpecificTraits" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { } ) , "()Ljava/util/Collection<Lorg/drools/core/factmodel/traits/Thing;>;" , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; Label l99 = new Label ( ) ; mv . visitJumpInsn ( IFNULL , l99 ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( TraitTypeMap . class ) ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , Type . getInternalName ( TraitTypeMap . class ) , "getMostSpecificTraits" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitLabel ( l99 ) ; mv . visitMethodInsn ( INVOKESTATIC , Type . getInternalName ( Collections . class ) , "emptySet" , Type . getMethodDescriptor ( Type . getType ( Set . class ) , new Type [ ] { } ) ) ; mv . visitMethodInsn ( INVOKESTATIC , Type . getInternalName ( Collections . class ) , "unmodifiableCollection" , Type . getMethodDescriptor ( Type . getType ( Collection . class ) , new Type [ ] { Type . getType ( Collection . class ) } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ; mv = cw . visitMethod ( ACC_PUBLIC , "getCurrentTypeCode" , Type . getMethodDescriptor ( Type . getType ( BitSet . class ) , new Type [ ] { } ) , null , null ) ; mv . visitCode ( ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; Label l3 = new Label ( ) ; mv . visitJumpInsn ( IFNONNULL , l3 ) ; mv . visitInsn ( ACONST_NULL ) ; mv . visitInsn ( ARETURN ) ; mv . visitLabel ( l3 ) ; mv . visitVarInsn ( ALOAD , 0 ) ; mv . visitFieldInsn ( GETFIELD , BuildUtils . getInternalType ( classDef . getName ( ) ) , TraitableBean . TRAITSET_FIELD_NAME , Type . getDescriptor ( Map . class ) ) ; mv . visitTypeInsn ( CHECKCAST , Type . getInternalName ( TraitTypeMap . class ) ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , Type . getInternalName ( TraitTypeMap . class ) , "getCurrentTypeCode" , Type . getMethodDescriptor ( Type . getType ( BitSet . class ) , new Type [ ] { } ) ) ; mv . visitInsn ( ARETURN ) ; mv . visitMaxs ( 0 , 0 ) ; mv . visitEnd ( ) ;
public class AdmissionControlGroup { /** * Invoked when receiving a response to a transaction . Decrements pending txn count in addition * to tracking the number of request bytes accepted . Can invoke offBackpressure * on all group members if there is a backpressure condition that has ended */ public void reduceBackpressure ( int messageSize ) { } }
assert ( m_expectedThreadId == Thread . currentThread ( ) . getId ( ) ) ; if ( messageSize < 1 ) { throw new IllegalArgumentException ( "Message size must be > 0 but was " + messageSize ) ; } m_pendingTxnBytes -= messageSize ; m_pendingTxnCount -- ; checkAndLogInvariants ( ) ; if ( ( m_pendingTxnBytes < LESS_THAN_MAX_DESIRED_PENDING_BYTES ) && ( m_pendingTxnCount < LESS_THAN_MAX_DESIRED_PENDING_TXNS ) ) { if ( m_hadBackPressure ) { hostLog . debug ( "TXN backpressure ended" ) ; m_hadBackPressure = false ; for ( ACGMember m : m_members ) { m . offBackpressure ( ) ; } } }
public class Http { /** * Executes a PUT request . * @ param uri url of resource . * @ param content content to be put . * @ return { @ link Put } object . */ public static Put put ( String uri , String content ) { } }
return put ( uri , content . getBytes ( ) ) ;
public class RTMPConnection { /** * Start waiting for a valid handshake . */ public void startWaitForHandshake ( ) { } }
if ( log . isDebugEnabled ( ) ) { log . debug ( "startWaitForHandshake - {}" , sessionId ) ; } // start the handshake checker after maxHandshakeTimeout milliseconds if ( scheduler != null ) { try { waitForHandshakeTask = scheduler . schedule ( new WaitForHandshakeTask ( ) , new Date ( System . currentTimeMillis ( ) + maxHandshakeTimeout ) ) ; } catch ( TaskRejectedException e ) { log . error ( "WaitForHandshake task was rejected for {}" , sessionId , e ) ; } }
public class GatewayContextResolver { /** * own object to management . */ private DefaultServiceDefaultsContext resolveServiceDefaults ( ServiceDefaultsType serviceDefaults , RealmsContext realmsContext ) { } }
if ( serviceDefaults == null ) { return null ; } DefaultAcceptOptionsContext acceptOptions = null ; ServiceAcceptOptionsType serviceAcceptOptions = serviceDefaults . getAcceptOptions ( ) ; if ( serviceAcceptOptions != null ) { acceptOptions = new DefaultAcceptOptionsContext ( null , serviceAcceptOptions ) ; } DefaultConnectOptionsContext connectOptions = null ; ServiceConnectOptionsType serviceConnectOptions = serviceDefaults . getConnectOptions ( ) ; if ( serviceConnectOptions != null ) { connectOptions = new DefaultConnectOptionsContext ( null , serviceConnectOptions ) ; } Map < String , String > mimeMappings = null ; MimeMappingType [ ] mimeMappingTypes = serviceDefaults . getMimeMappingArray ( ) ; if ( mimeMappingTypes != null ) { mimeMappings = new HashMap < > ( ) ; for ( MimeMappingType mmt : mimeMappingTypes ) { mimeMappings . put ( mmt . getExtension ( ) , mmt . getMimeType ( ) ) ; } } return new DefaultServiceDefaultsContext ( acceptOptions , connectOptions , mimeMappings ) ;
public class BOSHClient { /** * Send the provided message data to the remote connection manager . The * provided message body does not need to have any BOSH - specific attribute * information set . It only needs to contain the actual message payload * that should be delivered to the remote server . * The first call to this method will result in a connection attempt * to the remote connection manager . Subsequent calls to this method * will block until the underlying session state allows for the message * to be transmitted . In certain scenarios - such as when the maximum * number of outbound connections has been reached - calls to this method * will block for short periods of time . * @ param body message data to send to remote server * @ throws BOSHException on message transmission failure */ public void send ( final ComposableBody body ) throws BOSHException { } }
assertUnlocked ( ) ; if ( body == null ) { throw ( new IllegalArgumentException ( "Message body may not be null" ) ) ; } HTTPExchange exch ; CMSessionParams params ; lock . lock ( ) ; try { blockUntilSendable ( body ) ; if ( ! isWorking ( ) && ! isTermination ( body ) ) { throw ( new BOSHException ( "Cannot send message when session is closed" ) ) ; } long rid = requestIDSeq . getNextRID ( ) ; ComposableBody request = body ; params = cmParams ; if ( params == null && exchanges . isEmpty ( ) ) { // This is the first message being sent request = applySessionCreationRequest ( rid , body ) ; } else { request = applySessionData ( rid , body ) ; if ( cmParams . isAckingRequests ( ) ) { pendingRequestAcks . add ( request ) ; } } exch = new HTTPExchange ( request ) ; exchanges . add ( exch ) ; notEmpty . signal ( ) ; clearEmptyRequest ( ) ; } finally { lock . unlock ( ) ; } AbstractBody finalReq = exch . getRequest ( ) ; HTTPResponse resp = httpSender . send ( params , finalReq ) ; exch . setHTTPResponse ( resp ) ; fireRequestSent ( finalReq ) ;
public class AbstractFindBugsTask { /** * Adds a reference to a classpath defined elsewhere . * @ param r * reference to a classpath defined elsewhere */ public void setClasspathRef ( Reference r ) { } }
Path path = createClasspath ( ) ; path . setRefid ( r ) ; path . toString ( ) ; // Evaluated for its side - effects ( throwing a // BuildException )
public class DJBarChartBuilder { /** * Adds the specified serie column to the dataset with custom label . * @ param column the serie column */ public DJBarChartBuilder addSerie ( AbstractColumn column , StringExpression labelExpression ) { } }
getDataset ( ) . addSerie ( column , labelExpression ) ; return this ;
public class SimonDataGenerator { /** * Wait random time . */ public void randomWait ( long min , long max ) { } }
final long waitTime = randomLong ( min , max ) ; try { Thread . sleep ( waitTime ) ; } catch ( InterruptedException interruptedException ) { // ignored }
public class CommerceTaxFixedRateUtil { /** * Returns the first commerce tax fixed rate in the ordered set where commerceTaxMethodId = & # 63 ; . * @ param commerceTaxMethodId the commerce tax method ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce tax fixed rate , or < code > null < / code > if a matching commerce tax fixed rate could not be found */ public static CommerceTaxFixedRate fetchByCommerceTaxMethodId_First ( long commerceTaxMethodId , OrderByComparator < CommerceTaxFixedRate > orderByComparator ) { } }
return getPersistence ( ) . fetchByCommerceTaxMethodId_First ( commerceTaxMethodId , orderByComparator ) ;
public class LocalisationManager { /** * Method addMEToQueuePointGuessSet * < p > Adds an ME to the guess set for queue points . * Unit tests only * @ return */ public void addMEToQueuePointGuessSet ( SIBUuid8 messagingEngineUuid ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addMEToQueuePointGuessSet" ) ; synchronized ( _queuePointsGuessSet ) { _queuePointsGuessSet . add ( messagingEngineUuid ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addMEToQueuePointGuessSet" ) ;
public class TSDB { final KeyValue compact ( final ArrayList < KeyValue > row , List < Annotation > annotations , List < HistogramDataPoint > histograms ) { } }
return compactionq . compact ( row , annotations , histograms ) ;
public class AnnotationLookup { /** * / * @ Nullable */ public JvmAnnotationReference findOrAddAnnotation ( /* @ NonNull */ JvmAnnotationTarget annotationTarget , /* @ NonNull */ Notifier context , /* @ NonNull */ Class < ? extends Annotation > type ) { } }
JvmAnnotationReference result = findAnnotation ( annotationTarget , type ) ; if ( result != null ) return result ; JvmAnnotationType annotationType = findAnnotationType ( type , context ) ; if ( annotationType != null ) { result = typesFactory . createJvmAnnotationReference ( ) ; result . setAnnotation ( annotationType ) ; return result ; } return null ;
public class XMLUserLoginModule { /** * Initialize this LoginModule . * < p > This method is called by the < code > LoginContext < / code > * after this < code > LoginModule < / code > has been instantiated . * The purpose of this method is to initialize this * < code > LoginModule < / code > with the relevant information . * If this < code > LoginModule < / code > does not understand * any of the data stored in < code > sharedState < / code > or * < code > options < / code > parameters , they can be ignored . * @ param _ subject the < code > Subject < / code > to be authenticated . < p > * @ param _ callbackHandler a < code > CallbackHandler < / code > for communicating * with the end user ( prompting for usernames and * passwords , for example ) . < p > * @ param _ sharedState state shared with other configured LoginModules . < p > * @ param _ options options specified in the login * < code > Configuration < / code > for this particular * < code > LoginModule < / code > . */ @ Override public final void initialize ( final Subject _subject , final CallbackHandler _callbackHandler , final Map < String , ? > _sharedState , final Map < String , ? > _options ) { } }
XMLUserLoginModule . LOG . debug ( "Init" ) ; this . subject = _subject ; this . callbackHandler = _callbackHandler ; readPersons ( ( String ) _options . get ( "xmlFileName" ) ) ;
public class DataIO { /** * Reads UTF - 8 encoded characters from the given stream , but does not read * the length . * @ param bytesExpected number of bytes expected to read * @ return number of characters actually read */ public static final int readUTF ( DataInput in , char [ ] chars , int offset , int length , int bytesExpected ) throws IOException { } }
int c , c2 , c3 ; int byteCount = 0 ; int charCount = 0 ; while ( byteCount < bytesExpected && charCount < length ) { c = in . readByte ( ) & 0xff ; switch ( c >> 4 ) { case 0 : case 1 : case 2 : case 3 : case 4 : case 5 : case 6 : case 7 : // 0xxxxx byteCount ++ ; chars [ offset + charCount ++ ] = ( char ) c ; break ; case 12 : case 13 : // 110x xxxx 10xx xxxx if ( ( byteCount += 2 ) > bytesExpected ) { throw new UTFDataFormatException ( ) ; } c2 = in . readByte ( ) ; if ( ( c2 & 0xc0 ) != 0x80 ) { throw new UTFDataFormatException ( ) ; } chars [ offset + charCount ++ ] = ( char ) ( ( ( c & 0x1f ) << 6 ) | ( c2 & 0x3f ) ) ; break ; case 14 : // 1110 xxxx 10xx xxxx 10xx xxxx if ( ( byteCount += 3 ) > bytesExpected ) { throw new UTFDataFormatException ( ) ; } c2 = in . readByte ( ) ; c3 = in . readByte ( ) ; if ( ( c2 & 0xc0 ) != 0x80 || ( c3 & 0xc0 ) != 0x80 ) { throw new UTFDataFormatException ( ) ; } chars [ offset + charCount ++ ] = ( char ) ( ( ( c & 0x0f ) << 12 ) | ( ( c2 & 0x3f ) << 6 ) | ( c3 & 0x3f ) ) ; break ; default : // 10xx xxxx , 1111 xxxx throw new UTFDataFormatException ( ) ; } } return charCount ;
public class CitrusRuntimeException { /** * Gets the custom failure stack with line number information where the testcase failed . * @ return the failureStack */ public Stack < FailureStackElement > getFailureStack ( ) { } }
Stack < FailureStackElement > stack = new Stack < FailureStackElement > ( ) ; for ( FailureStackElement failureStackElement : failureStack ) { stack . push ( failureStackElement ) ; } return stack ;
public class IIDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . IID__CON_DATA1 : return CON_DATA1_EDEFAULT == null ? conData1 != null : ! CON_DATA1_EDEFAULT . equals ( conData1 ) ; case AfplibPackage . IID__XBASE : return XBASE_EDEFAULT == null ? xBase != null : ! XBASE_EDEFAULT . equals ( xBase ) ; case AfplibPackage . IID__YBASE : return YBASE_EDEFAULT == null ? yBase != null : ! YBASE_EDEFAULT . equals ( yBase ) ; case AfplibPackage . IID__XUNITS : return XUNITS_EDEFAULT == null ? xUnits != null : ! XUNITS_EDEFAULT . equals ( xUnits ) ; case AfplibPackage . IID__YUNITS : return YUNITS_EDEFAULT == null ? yUnits != null : ! YUNITS_EDEFAULT . equals ( yUnits ) ; case AfplibPackage . IID__XSIZE : return XSIZE_EDEFAULT == null ? xSize != null : ! XSIZE_EDEFAULT . equals ( xSize ) ; case AfplibPackage . IID__YSIZE : return YSIZE_EDEFAULT == null ? ySize != null : ! YSIZE_EDEFAULT . equals ( ySize ) ; case AfplibPackage . IID__CON_DATA2 : return CON_DATA2_EDEFAULT == null ? conData2 != null : ! CON_DATA2_EDEFAULT . equals ( conData2 ) ; case AfplibPackage . IID__XC_SIZE_D : return XC_SIZE_D_EDEFAULT == null ? xcSizeD != null : ! XC_SIZE_D_EDEFAULT . equals ( xcSizeD ) ; case AfplibPackage . IID__YC_SIZE_D : return YC_SIZE_D_EDEFAULT == null ? ycSizeD != null : ! YC_SIZE_D_EDEFAULT . equals ( ycSizeD ) ; case AfplibPackage . IID__CON_DATA3 : return CON_DATA3_EDEFAULT == null ? conData3 != null : ! CON_DATA3_EDEFAULT . equals ( conData3 ) ; case AfplibPackage . IID__COLOR : return COLOR_EDEFAULT == null ? color != null : ! COLOR_EDEFAULT . equals ( color ) ; } return super . eIsSet ( featureID ) ;
public class ClaimBean { /** * { @ inheritDoc } */ @ Override public Class < ? extends Annotation > getScope ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getScope" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getScope" , scope ) ; } return scope ;