signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class BatchDetachTypedLinkMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BatchDetachTypedLink batchDetachTypedLink , ProtocolMarshaller protocolMarshaller ) { } }
if ( batchDetachTypedLink == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchDetachTypedLink . getTypedLinkSpecifier ( ) , TYPEDLINKSPECIFIER_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CommerceAccountPersistenceImpl { /** * Clears the cache for the commerce account . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( CommerceAccount commerceAccount ) { } }
entityCache . removeResult ( CommerceAccountModelImpl . ENTITY_CACHE_ENABLED , CommerceAccountImpl . class , commerceAccount . getPrimaryKey ( ) ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ; clearUniqueFindersCache ( ( CommerceAccountModelImpl ) commerceAccount , true ) ;
public class OperationAccountant { /** * Blocks until all outstanding RPCs and retries have completed * @ throws java . lang . InterruptedException if any . */ public void awaitCompletion ( ) throws InterruptedException { } }
boolean performedWarning = false ; while ( hasInflightOperations ( ) ) { synchronized ( signal ) { if ( hasInflightOperations ( ) ) { signal . wait ( finishWaitMillis ) ; } } long now = clock . nanoTime ( ) ; if ( now >= noSuccessCheckDeadlineNanos ) { logNoSuccessWarning ( now ) ; resetNoSuccessWarningDeadline ( ) ; performedWarning = true ; } } if ( performedWarning ) { LOG . info ( "awaitCompletion() completed" ) ; }
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcSoundPowerMeasure ( ) { } }
if ( ifcSoundPowerMeasureEClass == null ) { ifcSoundPowerMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 866 ) ; } return ifcSoundPowerMeasureEClass ;
public class Util { /** * Returns the best match between the given preferred locale and the given * available locales . * The best match is given as the first available locale that exactly * matches the given preferred locale ( " exact match " ) . If no exact match * exists , the best match is given to an available locale that meets the * following criteria ( in order of priority ) : - available locale ' s variant * is empty and exact match for both language and country - available * locale ' s variant and country are empty , and exact match for language . * @ param pref the preferred locale @ param avail the available formatting * locales * @ return Available locale that best matches the given preferred locale , or * < tt > null < / tt > if no match exists */ private static Locale findFormattingMatch ( Locale pref , Locale [ ] avail ) { } }
Locale match = null ; boolean langAndCountryMatch = false ; for ( int i = 0 ; i < avail . length ; i ++ ) { if ( pref . equals ( avail [ i ] ) ) { // Exact match match = avail [ i ] ; break ; } else if ( ! "" . equals ( pref . getVariant ( ) ) && "" . equals ( avail [ i ] . getVariant ( ) ) && pref . getLanguage ( ) . equals ( avail [ i ] . getLanguage ( ) ) && pref . getCountry ( ) . equals ( avail [ i ] . getCountry ( ) ) ) { // Language and country match ; different variant match = avail [ i ] ; langAndCountryMatch = true ; } else if ( ! langAndCountryMatch && pref . getLanguage ( ) . equals ( avail [ i ] . getLanguage ( ) ) && ( "" . equals ( avail [ i ] . getCountry ( ) ) ) ) { // Language match if ( match == null ) { match = avail [ i ] ; } } } return match ;
public class GetLicenseConfigurationResult { /** * List of summaries of managed resources . * @ param managedResourceSummaryList * List of summaries of managed resources . */ public void setManagedResourceSummaryList ( java . util . Collection < ManagedResourceSummary > managedResourceSummaryList ) { } }
if ( managedResourceSummaryList == null ) { this . managedResourceSummaryList = null ; return ; } this . managedResourceSummaryList = new java . util . ArrayList < ManagedResourceSummary > ( managedResourceSummaryList ) ;
public class Window { /** * Aborts all current callers / threads waiting for a pending offer to be * accepted by the window . * @ return True if there were threads / callers that have a pending offer . * @ throws InterruptedException Thrown if the calling thread was interrupted * while waiting to obtain the window lock . */ public boolean abortPendingOffers ( ) throws InterruptedException { } }
this . lock . lockInterruptibly ( ) ; try { if ( this . pendingOffers . get ( ) > 0 ) { this . pendingOffersAborted . set ( true ) ; this . completedCondition . signalAll ( ) ; return true ; } else { return false ; } } finally { this . lock . unlock ( ) ; }
public class AbstractMetric { /** * Ranks the scores of an item - score map . * @ param userItems map with scores for each item * @ return the ranked list */ protected List < Double > rankScores ( final Map < I , Double > userItems ) { } }
List < Double > sortedScores = new ArrayList < > ( ) ; if ( userItems == null ) { return sortedScores ; } for ( Map . Entry < I , Double > e : userItems . entrySet ( ) ) { double pref = e . getValue ( ) ; if ( Double . isNaN ( pref ) ) { // we ignore any preference assigned as NaN continue ; } sortedScores . add ( pref ) ; } Collections . sort ( sortedScores , Collections . reverseOrder ( ) ) ; return sortedScores ;
public class DefaultSpeciesDialect { /** * Convert a { @ link BELObject } . Currently handles only { @ link Term } s and * { @ link Parameter } s as these are the only objects supported by Term . * @ param o * @ param speciesParam * @ return * @ see Term # addFunctionArgument ( BELObject ) */ protected BELObject convert ( BELObject o , Parameter speciesParam ) { } }
Class < ? > clazz = o . getClass ( ) ; if ( Term . class . isAssignableFrom ( clazz ) ) { return convert ( ( Term ) o , speciesParam ) ; } else if ( Parameter . class . isAssignableFrom ( clazz ) ) { return speciesParam ; } else { throw new UnsupportedOperationException ( "BEL object type " + o . getClass ( ) + " is not supported" ) ; }
public class Locale { /** * Replies the text that corresponds to the specified resource . * < p > This function assumes the classname of the caller as the * resource provider . * @ param classLoader is the classLoader to use . * @ param key is the name of the resource into the specified file * @ param params is the the list of parameters which will * replaces the < code > # 1 < / code > , < code > # 2 < / code > . . . into the string . * @ return the text that corresponds to the specified resource */ @ Pure public static String getString ( ClassLoader classLoader , String key , Object ... params ) { } }
return getString ( classLoader , detectResourceClass ( null ) , key , params ) ;
public class DateSpinner { /** * Toggles showing the weekday names instead of dates for the next week . Turning this on will * display e . g . " Sunday " for the day after tomorrow , otherwise it ' ll be January 1. * @ param enable True to enable , false to disable weekday names . */ public void setShowWeekdayNames ( boolean enable ) { } }
if ( showWeekdayNames != enable ) { showWeekdayNames = enable ; // if FLAG _ NUMBERS has been set , toggle the secondary text in the adapter if ( showNumbersInView ) setShowNumbersInViewInt ( enable ) ; // reselect the current item so it will use the new setting : setSelectedDate ( getSelectedDate ( ) ) ; }
public class CmsMergePagesThread { /** * The run method which starts the merging process . < p > */ @ Override public synchronized void run ( ) { } }
try { // do the rename operation m_mergePages . actionMerge ( getReport ( ) ) ; } catch ( Exception e ) { getReport ( ) . println ( e ) ; if ( LOG . isErrorEnabled ( ) ) { LOG . error ( e . getLocalizedMessage ( ) ) ; } }
public class CreateIntentVersionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateIntentVersionRequest createIntentVersionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createIntentVersionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createIntentVersionRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createIntentVersionRequest . getChecksum ( ) , CHECKSUM_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CreateTransitGatewayRouteTableRequest { /** * The tags to apply to the transit gateway route table . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setTagSpecifications ( java . util . Collection ) } or { @ link # withTagSpecifications ( java . util . Collection ) } if * you want to override the existing values . * @ param tagSpecifications * The tags to apply to the transit gateway route table . * @ return Returns a reference to this object so that method calls can be chained together . */ public CreateTransitGatewayRouteTableRequest withTagSpecifications ( TagSpecification ... tagSpecifications ) { } }
if ( this . tagSpecifications == null ) { setTagSpecifications ( new com . amazonaws . internal . SdkInternalList < TagSpecification > ( tagSpecifications . length ) ) ; } for ( TagSpecification ele : tagSpecifications ) { this . tagSpecifications . add ( ele ) ; } return this ;
public class FaultTolerance { /** * / * Input is a list of comma separated fully qualified class names */ private Class [ ] parseRecoverableExceptionClassNames ( String recoverableExceptionClassNames ) { } }
if ( recoverableExceptionClassNames != null ) { recoverableExceptionClassNames = recoverableExceptionClassNames . trim ( ) ; if ( recoverableExceptionClassNames . length ( ) == 0 ) { recoverableExceptionClassNames = null ; } } if ( recoverableExceptionClassNames == null ) { return new Class [ 0 ] ; } String [ ] classNames = recoverableExceptionClassNames . split ( "," ) ; Class [ ] classes = new Class [ classNames . length ] ; for ( int i = 0 ; i < classNames . length ; i ++ ) { try { classes [ i ] = Class . forName ( classNames [ i ] . trim ( ) ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( e ) ; } } return classes ;
public class SyncGroupsInner { /** * Gets a collection of sync database ids . * ServiceResponse < PageImpl < SyncDatabaseIdPropertiesInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the PagedList & lt ; SyncDatabaseIdPropertiesInner & gt ; object wrapped in { @ link ServiceResponse } if successful . */ public Observable < ServiceResponse < Page < SyncDatabaseIdPropertiesInner > > > listSyncDatabaseIdsNextSinglePageAsync ( final String nextPageLink ) { } }
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listSyncDatabaseIdsNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Page < SyncDatabaseIdPropertiesInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < SyncDatabaseIdPropertiesInner > > > call ( Response < ResponseBody > response ) { try { ServiceResponse < PageImpl < SyncDatabaseIdPropertiesInner > > result = listSyncDatabaseIdsNextDelegate ( response ) ; return Observable . just ( new ServiceResponse < Page < SyncDatabaseIdPropertiesInner > > ( result . body ( ) , result . response ( ) ) ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class Shape { /** * Output an int array for a particular dimension * @ param axes the axes * @ param shape the current shape * @ return */ public static int [ ] sizeForAxes ( int [ ] axes , int [ ] shape ) { } }
int [ ] ret = new int [ shape . length ] ; for ( int i = 0 ; i < axes . length ; i ++ ) { ret [ i ] = shape [ axes [ i ] ] ; } return ret ;
public class SocketAdapter { /** * This method must be implemented for PoolableAdapter */ @ Override public void closeConnection ( Object connection ) { } }
if ( connection != null ) { ( ( SoccomClient ) connection ) . close ( ) ; connection = null ; }
public class LogRecorderManager { /** * / * package */ static void doRss ( StaplerRequest req , StaplerResponse rsp , List < LogRecord > logs ) throws IOException , ServletException { } }
// filter log records based on the log level String level = req . getParameter ( "level" ) ; if ( level != null ) { Level threshold = Level . parse ( level ) ; List < LogRecord > filtered = new ArrayList < > ( ) ; for ( LogRecord r : logs ) { if ( r . getLevel ( ) . intValue ( ) >= threshold . intValue ( ) ) filtered . add ( r ) ; } logs = filtered ; } RSS . forwardToRss ( "Hudson log" , "" , logs , new FeedAdapter < LogRecord > ( ) { public String getEntryTitle ( LogRecord entry ) { return entry . getMessage ( ) ; } public String getEntryUrl ( LogRecord entry ) { return "log" ; // TODO : one URL for one log entry ? } public String getEntryID ( LogRecord entry ) { return String . valueOf ( entry . getSequenceNumber ( ) ) ; } public String getEntryDescription ( LogRecord entry ) { return Functions . printLogRecord ( entry ) ; } public Calendar getEntryTimestamp ( LogRecord entry ) { GregorianCalendar cal = new GregorianCalendar ( ) ; cal . setTimeInMillis ( entry . getMillis ( ) ) ; return cal ; } public String getEntryAuthor ( LogRecord entry ) { return JenkinsLocationConfiguration . get ( ) . getAdminAddress ( ) ; } } , req , rsp ) ;
public class RoadNetworkConstants { /** * Replies the system - default value for the type of * road . * @ param type a type * @ return the system - default value . * @ throws IllegalArgumentException if bad type . */ @ Pure public static String getSystemDefault ( RoadType type ) { } }
switch ( type ) { case OTHER : return DEFAULT_OTHER_ROAD_TYPE ; case PRIVACY_PATH : return DEFAULT_PRIVACY_ROAD_TYPE ; case TRACK : return DEFAULT_TRACK_ROAD_TYPE ; case BIKEWAY : return DEFAULT_BIKEWAY_ROAD_TYPE ; case LOCAL_ROAD : return DEFAULT_LOCAL_ROAD_ROAD_TYPE ; case INTERCHANGE_RAMP : return DEFAULT_INTERCHANGE_RAMP_ROAD_TYPE ; case MAJOR_URBAN_AXIS : return DEFAULT_MAJOR_URBAN_ROAD_TYPE ; case SECONDARY_ROAD : return DEFAULT_SECONDARY_ROAD_TYPE ; case MAJOR_ROAD : return DEFAULT_MAJOR_ROAD_TYPE ; case FREEWAY : return DEFAULT_FREEWAY_ROAD_TYPE ; default : } throw new IllegalArgumentException ( ) ;
public class NumberGenerator { /** * Method to get the next value for this sequence . Including additional * format information . To get the long value use { @ link # getNextValAsLong ( ) } * @ param _ args arguments for the formatter * @ return next value for this sequence * @ throws EFapsException on error */ public String getNextVal ( final Object ... _args ) throws EFapsException { } }
final Object [ ] args = new Object [ _args . length + 1 ] ; try { final long val = Context . getDbType ( ) . nextSequence ( Context . getThreadContext ( ) . getConnectionResource ( ) , getDBName ( ) ) ; args [ 0 ] = val ; } catch ( final SQLException e ) { throw new EFapsException ( NumberGenerator . class , " getNextVal()" , e ) ; } for ( int i = 0 ; i < _args . length ; i ++ ) { args [ i + 1 ] = _args [ i ] ; } final Locale local = Context . getThreadContext ( ) . getLocale ( ) ; final Formatter formatter = new Formatter ( local ) ; formatter . format ( this . format , args ) ; final String ret = formatter . toString ( ) ; formatter . close ( ) ; return ret ;
public class PackagesApi { /** * Get a Pager of project package files . * < pre > < code > GitLab Endpoint : GET / projects / : id / packages / : package _ id / package _ files < / code > < / pre > * @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance * @ param packageId the ID of the package to get the package files for * @ param itemsPerPage the number of PackageFile instances per page * @ return a Pager of PackageFile instances for the specified package ID * @ throws GitLabApiException if any exception occurs */ public Pager < PackageFile > getPackageFiles ( Object projectIdOrPath , Integer packageId , int itemsPerPage ) throws GitLabApiException { } }
return ( new Pager < PackageFile > ( this , PackageFile . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "packages" , packageId , "package_files" ) ) ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public CDDXocBase createCDDXocBaseFromString ( EDataType eDataType , String initialValue ) { } }
CDDXocBase result = CDDXocBase . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class XSLTLayout { /** * Sets XSLT transform . * @ param xsltdoc DOM document containing XSLT transform source , * may be modified . * @ throws TransformerConfigurationException if transformer can not be * created . */ public void setTransform ( final Document xsltdoc ) throws TransformerConfigurationException { } }
// scan transform source for xsl : output elements // and extract encoding , media ( mime ) type and output method String encodingName = null ; mediaType = null ; String method = null ; NodeList nodes = xsltdoc . getElementsByTagNameNS ( XSLT_NS , "output" ) ; for ( int i = 0 ; i < nodes . getLength ( ) ; i ++ ) { Element outputElement = ( Element ) nodes . item ( i ) ; if ( method == null || method . length ( ) == 0 ) { method = outputElement . getAttributeNS ( null , "method" ) ; } if ( encodingName == null || encodingName . length ( ) == 0 ) { encodingName = outputElement . getAttributeNS ( null , "encoding" ) ; } if ( mediaType == null || mediaType . length ( ) == 0 ) { mediaType = outputElement . getAttributeNS ( null , "media-type" ) ; } } if ( mediaType == null || mediaType . length ( ) == 0 ) { if ( "html" . equals ( method ) ) { mediaType = "text/html" ; } else if ( "xml" . equals ( method ) ) { mediaType = "text/xml" ; } else { mediaType = "text/plain" ; } } // if encoding was not specified , // add xsl : output encoding = US - ASCII to XSLT source if ( encodingName == null || encodingName . length ( ) == 0 ) { Element transformElement = xsltdoc . getDocumentElement ( ) ; Element outputElement = xsltdoc . createElementNS ( XSLT_NS , "output" ) ; outputElement . setAttributeNS ( null , "encoding" , "US-ASCII" ) ; transformElement . insertBefore ( outputElement , transformElement . getFirstChild ( ) ) ; encoding = Charset . forName ( "US-ASCII" ) ; } else { encoding = Charset . forName ( encodingName ) ; } DOMSource transformSource = new DOMSource ( xsltdoc ) ; templates = transformerFactory . newTemplates ( transformSource ) ;
public class RNAUtils { /** * method to generate the antiparallel sequence for a rna / dna polymer * @ param polymer * PolymerNotation * @ return antiparallel sequence * @ throws HELM2HandledException * if th polymer contains HELM2 features * @ throws RNAUtilsException * if the polymer is not RNA or DNA * @ throws ChemistryException * if the Chemistry Engine can not be initialized */ private static String generateAntiparallel ( PolymerNotation polymer ) throws HELM2HandledException , RNAUtilsException , ChemistryException { } }
return generateComplement ( polymer ) . reverse ( ) . toString ( ) ;
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns the last cp definition option value rel in the ordered set where key = & # 63 ; . * @ param key the key * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp definition option value rel , or < code > null < / code > if a matching cp definition option value rel could not be found */ @ Override public CPDefinitionOptionValueRel fetchByKey_Last ( String key , OrderByComparator < CPDefinitionOptionValueRel > orderByComparator ) { } }
int count = countByKey ( key ) ; if ( count == 0 ) { return null ; } List < CPDefinitionOptionValueRel > list = findByKey ( key , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class UpdateTagsForResourceRequest { /** * A list of tag keys to remove . * If a tag key doesn ' t exist , it is silently ignored . * @ param tagsToRemove * A list of tag keys to remove . < / p > * If a tag key doesn ' t exist , it is silently ignored . */ public void setTagsToRemove ( java . util . Collection < String > tagsToRemove ) { } }
if ( tagsToRemove == null ) { this . tagsToRemove = null ; return ; } this . tagsToRemove = new com . amazonaws . internal . SdkInternalList < String > ( tagsToRemove ) ;
public class Hashing { /** * Generate a hash for a long value . * @ param value to be hashed . * @ param mask mask to be applied that must be a power of 2 - 1. * @ return the hash of the value . */ public static int hash ( final long value , final int mask ) { } }
long hash = value * 31 ; hash = ( int ) hash ^ ( int ) ( hash >>> 32 ) ; return ( int ) hash & mask ;
public class DataSourceConfiguration { /** * Validates this configuration and checks that all required parameters are * set . Throws an exception if a property is missing . * @ throws SQLConfigurationException Thrown if a required property is * missing . */ public void validate ( ) throws SQLConfigurationException { } }
if ( this . url == null ) { throw new SQLConfigurationException ( "url is a required property" ) ; } if ( this . username == null ) { throw new SQLConfigurationException ( "username is a required property" ) ; } /* password isn ' t required in many databases if ( this . password = = null ) { throw new SQLConfigurationException ( " password is a required property " ) ; */ if ( this . name == null ) { throw new SQLConfigurationException ( "name is a required property" ) ; } if ( this . driver == null ) { throw new SQLConfigurationException ( "driver is a required property" ) ; }
public class Gson { /** * This method serializes the specified object , including those of generic types , into its * equivalent representation as a tree of { @ link JsonElement } s . This method must be used if the * specified object is a generic type . For non - generic objects , use { @ link # toJsonTree ( Object ) } * instead . * @ param src the object for which JSON representation is to be created * @ param typeOfSrc The specific genericized type of src . You can obtain * this type by using the { @ link com . google . gson . reflect . TypeToken } class . For example , * to get the type for { @ code Collection < Foo > } , you should use : * < pre > * Type typeOfSrc = new TypeToken & lt ; Collection & lt ; Foo & gt ; & gt ; ( ) { } . getType ( ) ; * < / pre > * @ return Json representation of { @ code src } * @ since 1.4 */ public JsonElement toJsonTree ( Object src , Type typeOfSrc ) { } }
JsonTreeWriter writer = new JsonTreeWriter ( ) ; toJson ( src , typeOfSrc , writer ) ; return writer . get ( ) ;
public class ValidatorContext { /** * 根据类型 < t > T < / t > 直接获取属性值 * @ param key 键 * @ param clazz 值类型 * @ return 值 */ public < T > T getAttribute ( String key , Class < T > clazz ) { } }
return ( T ) getAttribute ( key ) ;
public class Application { /** * < p > register . < / p > * @ param componentClass a { @ link java . lang . Class } object . * @ param contracts a { @ link java . util . Map } object . * @ return a { @ link ameba . core . Application } object . */ public Application register ( Class < ? > componentClass , Map < Class < ? > , Integer > contracts ) { } }
config . register ( componentClass , contracts ) ; return this ;
public class MarkdownHelper { /** * Skips spaces in the given String . * @ param sIn * Input String . * @ param nStart * Starting position . * @ return The new position or - 1 if EOL has been reached . */ public static int skipSpaces ( final String sIn , final int nStart ) { } }
int pos = nStart ; while ( pos < sIn . length ( ) && ( sIn . charAt ( pos ) == ' ' || sIn . charAt ( pos ) == '\n' ) ) pos ++ ; return pos < sIn . length ( ) ? pos : - 1 ;
public class HandlingContentExporter { /** * { @ inheritDoc } */ @ Override public void export ( NodeData node ) throws RepositoryException , SAXException { } }
if ( contentHandler != null ) { contentHandler . startDocument ( ) ; startPrefixMapping ( ) ; node . accept ( this ) ; endPrefixMapping ( ) ; contentHandler . endDocument ( ) ; }
public class CmsGalleryController { /** * Remove the category from the search object . < p > * @ param categoryPath the category path as id */ public void removeCategory ( String categoryPath ) { } }
m_searchObject . removeCategory ( categoryPath ) ; m_searchObjectChanged = true ; ValueChangeEvent . fire ( this , m_searchObject ) ;
public class ICPImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . ICP__XC_OSET : setXCOset ( XC_OSET_EDEFAULT ) ; return ; case AfplibPackage . ICP__YC_OSET : setYCOset ( YC_OSET_EDEFAULT ) ; return ; case AfplibPackage . ICP__XC_SIZE : setXCSize ( XC_SIZE_EDEFAULT ) ; return ; case AfplibPackage . ICP__YC_SIZE : setYCSize ( YC_SIZE_EDEFAULT ) ; return ; case AfplibPackage . ICP__XFIL_SIZE : setXFilSize ( XFIL_SIZE_EDEFAULT ) ; return ; case AfplibPackage . ICP__YFIL_SIZE : setYFilSize ( YFIL_SIZE_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class IHEAuditor { /** * Determines if this audit message represented should be sent or not * based on the IHE transaction it represents . Examples of transactions * that may be disabled are the ITI code ( " ITI - 14 " ) or the name of * the transaction ( " Register Document Set " ) . * @ see org . openhealthtools . ihe . atna . auditor . context . AuditorModuleConfig # getDisabledIHETransactions ( ) * @ see org . openhealthtools . ihe . atna . auditor . codes . ihe . IHETransactionEventTypeCodes * @ param msg The audit event message to check * @ return Whether the message should be sent */ public boolean isAuditorEnabledForTransaction ( AuditEventMessage msg ) { } }
CodedValueType transactionCode = EventUtils . getIHETransactionCodeFromMessage ( msg ) ; return isAuditorEnabledForTransaction ( transactionCode ) ;
public class Parser { /** * Parses an atom . This is either an identifier ( " bold " ) , a number ( 15px ) , a string ( ' OpenSans ' ) , a color * ( # 454545 ) or another expression in braces . */ private Expression parseAtomList ( ) { } }
Expression exp = parseAtom ( ) ; if ( ! tokenizer . current ( ) . isSymbol ( "," ) ) { return exp ; } ValueList atomList = new ValueList ( true ) ; atomList . add ( exp ) ; while ( tokenizer . current ( ) . isSymbol ( "," ) ) { tokenizer . consume ( ) ; atomList . add ( parseAtom ( ) ) ; } return atomList ;
public class SarlDocumentationParser { /** * Change the name of the language . * @ param outputLanguage the language name , or { @ code null } for ignoring the language name . */ @ Inject public void setOutputLanguage ( @ Named ( Constants . LANGUAGE_NAME ) String outputLanguage ) { } }
if ( ! Strings . isNullOrEmpty ( outputLanguage ) ) { final String [ ] parts = outputLanguage . split ( "\\.+" ) ; // $ NON - NLS - 1 $ if ( parts . length > 0 ) { final String simpleName = parts [ parts . length - 1 ] ; if ( ! Strings . isNullOrEmpty ( simpleName ) ) { this . languageName = simpleName ; return ; } } } this . languageName = null ;
public class Task { /** * Set a baseline value . * @ param baselineNumber baseline index ( 1-10) * @ param value baseline value */ public void setBaselineStart ( int baselineNumber , Date value ) { } }
set ( selectField ( TaskFieldLists . BASELINE_STARTS , baselineNumber ) , value ) ;
public class ModelUtils { /** * TODO : instead of having this function , we should add feature extractors that extend Model and extract features from Strings */ public static FeatureVector toFeatures ( Block map ) { } }
Map < Integer , Double > features = new HashMap < > ( ) ; if ( map != null ) { for ( int position = 0 ; position < map . getPositionCount ( ) ; position += 2 ) { features . put ( ( int ) BIGINT . getLong ( map , position ) , DOUBLE . getDouble ( map , position + 1 ) ) ; } } return new FeatureVector ( features ) ;
public class Log4jMDCAdapter { /** * Put a context value ( the < code > val < / code > parameter ) as identified with * the < code > key < / code > parameter into the current thread ' s context map . The * < code > key < / code > parameter cannot be null . Log4j does < em > not < / em > * support null for the < code > val < / code > parameter . * This method delegates all work to log4j ' s MDC . * @ throws IllegalArgumentException * in case the " key " or < b > " val " < / b > parameter is null */ public void put ( String key , String val ) { } }
org . apache . log4j . MDC . put ( key , val ) ;
public class ReverseBuilder { /** * Retrieves all end - entity certificates which satisfy constraints * and requirements specified in the parameters and PKIX state . */ private Collection < X509Certificate > getMatchingEECerts ( ReverseState currentState , List < CertStore > certStores ) throws CertStoreException , CertificateException , IOException { } }
/* * Compose a CertSelector to filter out * certs which do not satisfy requirements . * First , retrieve clone of current target cert constraints , and * then add more selection criteria based on current validation state . */ X509CertSelector sel = ( X509CertSelector ) targetCertConstraints . clone ( ) ; /* * Match on issuer ( subject of previous cert ) */ sel . setIssuer ( currentState . subjectDN ) ; /* * Match on certificate validity date . */ sel . setCertificateValid ( buildParams . date ( ) ) ; /* * Policy processing optimizations */ if ( currentState . explicitPolicy == 0 ) sel . setPolicy ( getMatchingPolicies ( ) ) ; /* * If previous cert has a subject key identifier extension , * use it to match on authority key identifier extension . */ /* if ( currentState . subjKeyId ! = null ) { AuthorityKeyIdentifierExtension authKeyId = new AuthorityKeyIdentifierExtension ( ( KeyIdentifier ) currentState . subjKeyId . get ( SubjectKeyIdentifierExtension . KEY _ ID ) , null , null ) ; sel . setAuthorityKeyIdentifier ( authKeyId . getExtensionValue ( ) ) ; */ /* * Require EE certs */ sel . setBasicConstraints ( - 2 ) ; /* Retrieve matching certs from CertStores */ HashSet < X509Certificate > eeCerts = new HashSet < > ( ) ; addMatchingCerts ( sel , certStores , eeCerts , true ) ; if ( debug != null ) { debug . println ( "ReverseBuilder.getMatchingEECerts got " + eeCerts . size ( ) + " certs." ) ; } return eeCerts ;
public class _ARouter { /** * Destroy arouter , it can be used only in debug mode . */ static synchronized void destroy ( ) { } }
if ( debuggable ( ) ) { hasInit = false ; LogisticsCenter . suspend ( ) ; logger . info ( Consts . TAG , "ARouter destroy success!" ) ; } else { logger . error ( Consts . TAG , "Destroy can be used in debug mode only!" ) ; }
public class SOAPClient { /** * New SOAP client uses new SOAP service . */ public void useNewSOAPService ( boolean direct ) throws Exception { } }
URL wsdlURL = getClass ( ) . getResource ( "/CustomerServiceNew.wsdl" ) ; org . customer . service . CustomerServiceService service = new org . customer . service . CustomerServiceService ( wsdlURL ) ; org . customer . service . CustomerService customerService = direct ? service . getCustomerServicePort ( ) : service . getCustomerServiceNewPort ( ) ; System . out . println ( "Using new SOAP CustomerService with new client" ) ; customer . v2 . Customer customer = createNewCustomer ( "Barry New SOAP" ) ; customerService . updateCustomer ( customer ) ; customer = customerService . getCustomerByName ( "Barry New SOAP" ) ; printNewCustomerDetails ( customer ) ;
public class ChannelServiceRestAdapter { /** * Remove the channel for the given cluster controller . * @ param ccid the ID of the channel * @ return response ok if deletion was successful , else empty response */ @ DELETE @ Path ( "/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}" ) public Response deleteChannel ( @ PathParam ( "ccid" ) String ccid ) { } }
try { log . info ( "DELETE channel for cluster controller: {}" , ccid ) ; if ( channelService . deleteChannel ( ccid ) ) { return Response . ok ( ) . build ( ) ; } return Response . noContent ( ) . build ( ) ; } catch ( WebApplicationException e ) { throw e ; } catch ( Exception e ) { log . error ( "DELETE channel for cluster controller: error: {}" , e . getMessage ( ) , e ) ; throw new WebApplicationException ( Status . INTERNAL_SERVER_ERROR ) ; }
public class CmsWidgetDialog { /** * Generates the dialog ending html code . < p > * @ return html code */ protected String defaultActionHtmlEnd ( ) { } }
StringBuffer result = new StringBuffer ( 2048 ) ; result . append ( dialogEnd ( ) ) ; result . append ( bodyEnd ( ) ) ; result . append ( htmlEnd ( ) ) ; return result . toString ( ) ;
public class URLProtocolRegistry { /** * Try to evaluate the matching URL protocol from the passed URL * @ param sURL * The URL to get the protocol from * @ return The corresponding URL protocol or < code > null < / code > if unresolved */ @ Nullable public IURLProtocol getProtocol ( @ Nullable final String sURL ) { } }
if ( sURL == null ) return null ; // Is called often - so no Lambdas m_aRWLock . readLock ( ) . lock ( ) ; try { for ( final IURLProtocol aProtocol : m_aProtocols . values ( ) ) if ( aProtocol . isUsedInURL ( sURL ) ) return aProtocol ; return null ; } finally { m_aRWLock . readLock ( ) . unlock ( ) ; }
public class JsonArray { /** * Returns the { @ link String } at the given index , or the default if it does not exist or is the wrong type . */ public String getString ( int key , String default_ ) { } }
Object o = get ( key ) ; return ( o instanceof String ) ? ( String ) o : default_ ;
public class Elements { /** * Adds a copy of the { @ code parameters } to { @ code method } . */ @ Requires ( { } }
"method != null" , "parameters != null" , "!parameters.contains(null)" } ) public static void copyParameters ( MethodModel method , List < ? extends VariableModel > parameters ) { ArrayList < VariableModel > list = new ArrayList < VariableModel > ( parameters ) ; for ( VariableModel param : list ) { method . addParameter ( new VariableModel ( param ) ) ; }
public class BaseData { /** * Retrieve variableTypes or taskCategories . */ @ Override @ Path ( "/{dataType}" ) public JSONObject get ( String path , Map < String , String > headers ) throws ServiceException , JSONException { } }
String dataType = getSegment ( path , 1 ) ; if ( dataType == null ) throw new ServiceException ( "Missing path segment: {dataType}" ) ; try { BaselineData baselineData = DataAccess . getBaselineData ( ) ; if ( dataType . equals ( "VariableTypes" ) ) { List < VariableType > variableTypes = baselineData . getVariableTypes ( ) ; JSONArray jsonArray = new JSONArray ( ) ; for ( VariableType variableType : variableTypes ) jsonArray . put ( variableType . getJson ( ) ) ; return new JsonArray ( jsonArray ) . getJson ( ) ; } else if ( dataType . equals ( "TaskCategories" ) ) { List < TaskCategory > taskCats = new ArrayList < TaskCategory > ( ) ; taskCats . addAll ( baselineData . getTaskCategories ( ) . values ( ) ) ; Collections . sort ( taskCats ) ; JSONArray jsonArray = new JSONArray ( ) ; for ( TaskCategory taskCat : taskCats ) jsonArray . put ( taskCat . getJson ( ) ) ; return new JsonArray ( jsonArray ) . getJson ( ) ; } else { throw new ServiceException ( "Unsupported dataType: " + dataType ) ; } } catch ( Exception ex ) { throw new ServiceException ( ex . getMessage ( ) , ex ) ; }
public class PrettySharedPreferences { /** * Call to get a { @ link com . tale . prettysharedpreferences . DoubleEditor } object for the specific * key . < code > NOTE : < / code > There is a unique { @ link com . tale . prettysharedpreferences . TypeEditor } * object for a unique key . * @ param key The name of the preference . * @ return { @ link com . tale . prettysharedpreferences . DoubleEditor } object to be store or retrieve * a { @ link java . lang . Double } value . */ protected DoubleEditor getDoubleEditor ( String key ) { } }
TypeEditor typeEditor = TYPE_EDITOR_MAP . get ( key ) ; if ( typeEditor == null ) { typeEditor = new DoubleEditor ( this , sharedPreferences , key ) ; TYPE_EDITOR_MAP . put ( key , typeEditor ) ; } else if ( ! ( typeEditor instanceof DoubleEditor ) ) { throw new IllegalArgumentException ( String . format ( "key %s is already used for other type" , key ) ) ; } return ( DoubleEditor ) typeEditor ;
public class DRL5Lexer { /** * $ ANTLR start " RIGHT _ PAREN " */ public final void mRIGHT_PAREN ( ) throws RecognitionException { } }
try { int _type = RIGHT_PAREN ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 242:9 : ( ' ) ' ) // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 242:11 : ' ) ' { match ( ')' ) ; if ( state . failed ) return ; } state . type = _type ; state . channel = _channel ; } finally { // do for sure before leaving }
public class OsiamConnector { /** * Retrieve a list of the of all { @ link User } resources saved in the OSIAM service . If you need to have all User but * the number is very large , this method can be slow . In this case you can also use Query . Builder with no filter to * split the number of User returned * @ param accessToken A valid AccessToken * @ param attributes the list of attributes that should be returned in the response * @ return a list of all Users * @ throws UnauthorizedException if the request could not be authorized . * @ throws ForbiddenException if the scope doesn ' t allow this request * @ throws ConnectionInitializationException if the connection to the given OSIAM service could not be initialized * @ throws IllegalStateException if OSIAM ' s endpoint ( s ) are not properly configured */ public List < User > getAllUsers ( AccessToken accessToken , String ... attributes ) { } }
return getUserService ( ) . getAllUsers ( accessToken , attributes ) ;
public class SSLConnectionLink { /** * @ see com . ibm . wsspi . channelfw . base . OutboundProtocolLink # connect ( java . lang . Object ) */ @ Override public void connect ( Object address ) throws Exception { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "connect, vc=" + getVCHash ( ) ) ; } // Determine if this is a redundant connect . if ( connected ) { handleRedundantConnect ( ) ; } this . targetAddress = ( TCPConnectRequestContext ) address ; // Nothing specific to SSL on connect . Pass through . ( ( OutboundConnectionLink ) getDeviceLink ( ) ) . connect ( address ) ; // PK13349 - mark that we are now connected this . connected = true ; // First check if the sslContext and sslEngine have already been set ( discrimination case ) if ( sslContext == null || getSSLEngine ( ) == null ) { // Create a new SSL context based on the current properties in the ssl config . this . sslContext = getChannel ( ) . getSSLContextForOutboundLink ( this , getVirtualConnection ( ) , address ) ; // Discrimination has not happened yet . Create new SSL engine . // PK46069 - use engine that allows session id re - use this . sslEngine = SSLUtils . getOutboundSSLEngine ( sslContext , getLinkConfig ( ) , targetAddress . getRemoteAddress ( ) . getHostName ( ) , targetAddress . getRemoteAddress ( ) . getPort ( ) , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "SSL engine hc=" + getSSLEngine ( ) . hashCode ( ) + " associated with vc=" + getVCHash ( ) ) ; } // Now do the SSL handshake . readyOutbound ( getVirtualConnection ( ) , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "connect" ) ; }
public class JedisCollections { /** * Get a { @ link java . util . Set } abstraction of a sorted set redis value in the specified database index and key . * @ param db the database index where the key with the sorted set value is / should be stored . * @ param key the key of the sorted set value in redis * @ param scoreProvider the provider to use for assigning scores when none is given explicitly . * @ return the { @ link JedisSortedSet } instance */ public JedisSortedSet getSortedSet ( int db , String key , ScoreProvider scoreProvider ) { } }
return new JedisSortedSet ( jedisPool , db , key , scoreProvider ) ;
public class OpsAgent { /** * For OPS actions generate a dummy response to the distributed * work to avoid startup initialization dependencies . Startup can take * a long time and we don ' t want to prevent other agents from making progress */ protected void handleJSONMessageAsDummy ( JSONObject obj ) throws Exception { } }
hostLog . info ( "Generating dummy response for ops request " + obj ) ; sendOpsResponse ( null , obj , OPS_DUMMY ) ;
public class BindingConverter { /** * / * @ Override */ public Set < ConvertiblePair > getConvertibleTypes ( ) { } }
Set < ConvertiblePair > result = new HashSet < ConvertiblePair > ( ) ; Iterable < ConverterKey < ? , ? > > entries = BINDING . getConverterEntries ( ) ; for ( ConverterKey < ? , ? > next : entries ) { result . add ( new ConvertiblePair ( next . getInputClass ( ) , next . getOutputClass ( ) ) ) ; } return result ;
public class KriptonTaskExecutor { /** * Returns an instance of the task executor . * @ return The singleton ArchTaskExecutor . */ public static KriptonTaskExecutor getInstance ( ) { } }
if ( sInstance != null ) { return sInstance ; } synchronized ( KriptonTaskExecutor . class ) { if ( sInstance == null ) { sInstance = new KriptonTaskExecutor ( ) ; } } return sInstance ;
public class CollectionPrinter { /** * Map to json string string . * @ param map the map * @ return the string */ public static String mapToJSONString ( Map < ? , ? > map ) { } }
if ( map == null || map . size ( ) == 0 ) { return "{}" ; } StringBuilder sb = new StringBuilder ( "{" ) ; for ( Object o : map . entrySet ( ) ) { Entry < ? , ? > e = ( Entry < ? , ? > ) o ; buildAppendString ( sb , e . getKey ( ) ) . append ( '=' ) ; buildAppendString ( sb , e . getValue ( ) ) . append ( ',' ) . append ( ' ' ) ; } return sb . delete ( sb . length ( ) - 2 , sb . length ( ) ) . append ( '}' ) . toString ( ) ;
public class ObjectCacheUnitImpl { /** * This implements the method in the ServletCacheUnit interface . This method is used to initialize event source for * invalidation listener * @ param createAsyncEventSource * boolean true - using async thread context for callback ; false - using caller thread for callback * @ param cacheName * The cache name * @ return EventSourceIntf The event source */ public EventSource createEventSource ( boolean createAsyncEventSource , String cacheName ) { } }
EventSource eventSource = new DCEventSource ( cacheName , createAsyncEventSource ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Using caller thread context for callback - cacheName= " + cacheName ) ; return eventSource ;
public class Util { /** * This method duplicates code in org . apache . el . util . ReflectionUtil . When * making changes keep the code in sync . */ static Method getMethod ( Class < ? > type , Method m ) { } }
if ( m == null || Modifier . isPublic ( type . getModifiers ( ) ) ) { return m ; } Class < ? > [ ] inf = type . getInterfaces ( ) ; Method mp = null ; for ( int i = 0 ; i < inf . length ; i ++ ) { try { mp = inf [ i ] . getMethod ( m . getName ( ) , m . getParameterTypes ( ) ) ; mp = getMethod ( mp . getDeclaringClass ( ) , mp ) ; if ( mp != null ) { return mp ; } } catch ( NoSuchMethodException e ) { // Ignore } } Class < ? > sup = type . getSuperclass ( ) ; if ( sup != null ) { try { mp = sup . getMethod ( m . getName ( ) , m . getParameterTypes ( ) ) ; mp = getMethod ( mp . getDeclaringClass ( ) , mp ) ; if ( mp != null ) { return mp ; } } catch ( NoSuchMethodException e ) { // Ignore } } return null ;
public class CommandHelper { /** * Convert the value according the type of DeviceData . * @ param deviceDataArgout * the DeviceData attribute to read * @ return DevState [ ] * @ throws DevFailed */ public static DevState [ ] extractToDevStateArray ( final DeviceData deviceDataArgout ) throws DevFailed { } }
final Object [ ] values = CommandHelper . extractArray ( deviceDataArgout ) ; if ( values == null ) { Except . throw_exception ( "TANGO_WRONG_DATA_ERROR" , "output is empty " , "CommandHelper.extractToFloatArray(deviceDataArgin)" ) ; } final DevState [ ] argout = new DevState [ values . length ] ; if ( values . length > 0 ) { if ( values [ 0 ] instanceof Short ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Short ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof String ) { for ( int i = 0 ; i < values . length ; i ++ ) { argout [ i ] = StateUtilities . getStateForName ( ( String ) values [ i ] ) ; } } else if ( values [ 0 ] instanceof Integer ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Integer ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof Long ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Long ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof Float ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Float ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof Boolean ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { if ( ( ( Boolean ) values [ i ] ) . booleanValue ( ) ) { argout [ i ] = DevState . from_int ( 1 ) ; } else { argout [ i ] = DevState . from_int ( 0 ) ; } } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof Double ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Double ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof Byte ) { for ( int i = 0 ; i < values . length ; i ++ ) { try { argout [ i ] = DevState . from_int ( ( ( Byte ) values [ i ] ) . intValue ( ) ) ; } catch ( final Exception e ) { argout [ i ] = DevState . UNKNOWN ; } } } else if ( values [ 0 ] instanceof DevState ) { for ( int i = 0 ; i < values . length ; i ++ ) { argout [ i ] = ( DevState ) values [ i ] ; } } else { Except . throw_exception ( "TANGO_WRONG_DATA_ERROR" , "output type " + values [ 0 ] . getClass ( ) + " not supported" , "CommandHelper.extractToFloatArray(Object value,deviceDataArgin)" ) ; } } return argout ;
public class ObjectOffsetImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setObjOstHi ( Integer newObjOstHi ) { } }
Integer oldObjOstHi = objOstHi ; objOstHi = newObjOstHi ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . OBJECT_OFFSET__OBJ_OST_HI , oldObjOstHi , objOstHi ) ) ;
public class OutlookFileAttachment { /** * Sets the property specified by the name parameter . Unknown names are ignored . */ public void setProperty ( final OutlookMessageProperty msgProp ) { } }
final String name = msgProp . getClazz ( ) ; final Object value = msgProp . getData ( ) ; if ( name != null && value != null ) { switch ( name ) { case "3701" : setSize ( msgProp . getSize ( ) ) ; setData ( ( byte [ ] ) value ) ; break ; case "3704" : setFilename ( ( String ) value ) ; break ; case "3707" : setLongFilename ( ( String ) value ) ; break ; case "370e" : setMimeTag ( ( String ) value ) ; break ; case "3703" : setExtension ( ( String ) value ) ; break ; default : // property to ignore , for full list see properties - list . txt } }
public class TextRazor { /** * Adds a new " extractor " to the request . * @ param extractor The new extractor name */ public void addExtractor ( String extractor ) { } }
if ( null == this . extractors ) { this . extractors = new ArrayList < String > ( ) ; } this . extractors . add ( extractor ) ;
public class DsParser { /** * Store statement * @ param s The statement * @ param writer The writer * @ exception Exception Thrown if an error occurs */ protected void storeStatement ( Statement s , XMLStreamWriter writer ) throws Exception { } }
writer . writeStartElement ( XML . ELEMENT_STATEMENT ) ; if ( s . getTrackStatements ( ) != null ) { writer . writeStartElement ( XML . ELEMENT_TRACK_STATEMENTS ) ; writer . writeCharacters ( s . getValue ( XML . ELEMENT_TRACK_STATEMENTS , s . getTrackStatements ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( s . getPreparedStatementsCacheSize ( ) != null ) { writer . writeStartElement ( XML . ELEMENT_PREPARED_STATEMENT_CACHE_SIZE ) ; writer . writeCharacters ( s . getValue ( XML . ELEMENT_PREPARED_STATEMENT_CACHE_SIZE , s . getPreparedStatementsCacheSize ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( s . isSharePreparedStatements ( ) != null && Boolean . TRUE . equals ( s . isSharePreparedStatements ( ) ) ) { writer . writeEmptyElement ( XML . ELEMENT_SHARE_PREPARED_STATEMENTS ) ; } writer . writeEndElement ( ) ;
public class DataTable2D { /** * Returns if the DataTable2D is valid . This data structure is considered * valid it all the DataTable cells are set and as a result the DataTable * has a rectangular format . * @ return */ public boolean isValid ( ) { } }
int totalNumberOfColumns = 0 ; Set < Object > columns = new HashSet < > ( ) ; for ( Map . Entry < Object , AssociativeArray > entry : internalData . entrySet ( ) ) { AssociativeArray row = entry . getValue ( ) ; if ( columns . isEmpty ( ) ) { // this is executed only for the first row for ( Object column : row . internalData . keySet ( ) ) { columns . add ( column ) ; } totalNumberOfColumns = columns . size ( ) ; } else { // validating the columns of next rows based on first column if ( totalNumberOfColumns != row . size ( ) ) { return false ; // if the number of rows do not much then it is invalid } for ( Object column : columns ) { if ( row . containsKey ( column ) == false ) { return false ; // if one of the detected columns do not exist , it is invalid } } } } return true ;
public class DJXYLineChartBuilder { /** * Adds the specified serie column to the dataset with custom label . * @ param column the serie column */ public DJXYLineChartBuilder addSerie ( AbstractColumn column , StringExpression labelExpression ) { } }
getDataset ( ) . addSerie ( column , labelExpression ) ; return this ;
public class DBIDUtil { /** * Make a DBID pair . * @ param id1 first ID * @ param id2 second ID * @ return DBID pair */ public static DBIDPair newPair ( DBIDRef id1 , DBIDRef id2 ) { } }
return DBIDFactory . FACTORY . newPair ( id1 , id2 ) ;
public class AtomContainer { /** * { @ inheritDoc } */ @ Override public boolean contains ( ISingleElectron singleElectron ) { } }
for ( int i = 0 ; i < getSingleElectronCount ( ) ; i ++ ) { if ( singleElectron == singleElectrons [ i ] ) return true ; } return false ;
public class SmartBinder { /** * Acquire a static folding function from the given target class , using the * given name and Lookup . Pass all arguments to that function and insert * the resulting value as newName into the argument list . * @ param newName the name of the new first argument where the fold * function ' s result will be passed * @ param lookup the Lookup to use for acquiring a folding function * @ param target the class on which to find the folding function * @ param method the name of the method to become a folding function * @ return a new SmartBinder with the fold applied */ public SmartBinder foldStatic ( String newName , Lookup lookup , Class < ? > target , String method ) { } }
Binder newBinder = binder . foldStatic ( lookup , target , method ) ; return new SmartBinder ( this , signature ( ) . prependArg ( newName , newBinder . type ( ) . parameterType ( 0 ) ) , binder ) ;
public class HlsGroupSettings { /** * Mapping of up to 4 caption channels to caption languages . Is only meaningful if captionLanguageSetting is set to * " insert " . * @ param captionLanguageMappings * Mapping of up to 4 caption channels to caption languages . Is only meaningful if captionLanguageSetting is * set to " insert " . */ public void setCaptionLanguageMappings ( java . util . Collection < CaptionLanguageMapping > captionLanguageMappings ) { } }
if ( captionLanguageMappings == null ) { this . captionLanguageMappings = null ; return ; } this . captionLanguageMappings = new java . util . ArrayList < CaptionLanguageMapping > ( captionLanguageMappings ) ;
public class CmsSecurityManager { /** * Determines a project where the deletion of a principal can be executed and sets it in the returned db context . < p > * @ param context the current request context * @ return the db context to use when deleting the principal . * @ throws CmsDataAccessException if determining a project that is suitable to delete the prinicipal fails . */ private CmsDbContext getDbContextForDeletePrincipal ( CmsRequestContext context ) throws CmsDataAccessException { } }
CmsProject currentProject = context . getCurrentProject ( ) ; CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; CmsUUID projectId = dbc . getProjectId ( ) ; // principal modifications are allowed if the current project is not the online project if ( currentProject . isOnlineProject ( ) ) { // this is needed because // I _ CmsUserDriver # removeAccessControlEntriesForPrincipal ( CmsDbContext , CmsProject , CmsProject , CmsUUID ) // expects an offline project , if not , data will become inconsistent // if the current project is the online project , check if there is a valid offline project at all List < CmsProject > projects = m_driverManager . getProjectDriver ( dbc ) . readProjects ( dbc , "" ) ; for ( CmsProject project : projects ) { if ( ! project . isOnlineProject ( ) ) { try { dbc . setProjectId ( project . getUuid ( ) ) ; if ( null != m_driverManager . readResource ( dbc , "/" , CmsResourceFilter . ALL ) ) { // shallow clone the context with project adjusted context = new CmsRequestContext ( context . getCurrentUser ( ) , project , context . getUri ( ) , context . getRequestMatcher ( ) , context . getSiteRoot ( ) , context . isSecureRequest ( ) , context . getLocale ( ) , context . getEncoding ( ) , context . getRemoteAddress ( ) , context . getRequestTime ( ) , context . getDirectoryTranslator ( ) , context . getFileTranslator ( ) , context . getOuFqn ( ) ) ; dbc = m_dbContextFactory . getDbContext ( context ) ; projectId = dbc . getProjectId ( ) ; break ; } } catch ( Exception e ) { // ignore } } } } dbc . setProjectId ( projectId ) ; return dbc ;
public class JsonInput { /** * opening quite already consumed */ String parseObjectKey ( ) throws IOException { } }
if ( cachedObjectKey != null ) { String key = cachedObjectKey ; cachedObjectKey = null ; return key ; } String str = parseString ( ) ; acceptEvent ( JsonEvent . COLON ) ; return str ;
public class AbstractMutableStore { /** * ( non - Javadoc ) * @ see com . arakelian . dao . Dao # deleteAll ( java . lang . Object [ ] ) */ @ Override public void deleteAll ( final String ... ids ) { } }
if ( ids == null || ids . length == 0 ) { return ; } // process ids in groups of < partition size > final ArrayList < String > list = Lists . newArrayList ( ids ) ; for ( final List < String > partition : Lists . partition ( list , config . getPartitionSize ( ) ) ) { doDeleteAllIds ( partition ) ; for ( final String id : partition ) { notifyDeleted ( id ) ; } }
public class StringUtil { /** * Removes each substring of the source String that matches the given * regular expression using the DOTALL option . * @ param source * the source string * @ param regex * the regular expression to which this string is to be matched * @ return The resulting { @ code String } * @ see String # replaceAll ( String , String ) * @ see Pattern # DOTALL * @ since 3.2 */ public static String removePattern ( final String source , final String regex ) { } }
return replacePattern ( source , regex , N . EMPTY_STRING ) ;
public class AbstractSingleFileObjectStore { /** * ( non - Javadoc ) * @ see com . ibm . ws . objectManager . ObjectStore # tokens ( ) */ public Set tokens ( ) { } }
if ( tokenSet == null ) { tokenSet = new AbstractSetView ( ) { public long size ( ) throws ObjectManagerException { return directory . size ( ) ; } // size ( ) . public Iterator iterator ( ) throws ObjectManagerException { final Iterator storeAreaIterator = directory . entrySet ( ) . iterator ( ) ; return new Iterator ( ) { public boolean hasNext ( ) throws ObjectManagerException { return storeAreaIterator . hasNext ( ) ; } // hasNext ( ) . public Object next ( ) throws ObjectManagerException { Directory . StoreArea storeArea = ( Directory . StoreArea ) storeAreaIterator . next ( ) ; Token token = new Token ( AbstractSingleFileObjectStore . this , storeArea . identifier ) ; return like ( token ) ; } // next ( ) . public boolean hasNext ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } // hasNext ( ) . public Object next ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } // next ( ) . public Object remove ( Transaction transaction ) throws ObjectManagerException { throw new UnsupportedOperationException ( ) ; } // remove ( ) . } ; // new Iterator ( ) . } // iterator ( ) . } ; // new AbstractSetView ( ) . } // if ( tokenSet = = null ) . return tokenSet ;
public class LambdaToMethod { /** * Set varargsElement field on a given tree ( must be either a new class tree * or a method call tree ) */ private void setVarargsIfNeeded ( JCTree tree , Type varargsElement ) { } }
if ( varargsElement != null ) { switch ( tree . getTag ( ) ) { case APPLY : ( ( JCMethodInvocation ) tree ) . varargsElement = varargsElement ; break ; case NEWCLASS : ( ( JCNewClass ) tree ) . varargsElement = varargsElement ; break ; default : throw new AssertionError ( ) ; } }
public class MithraTransactionalObjectImpl { /** * also called after constructing a new object for remote insert , non - persistent copy and detached copy */ protected void zSetData ( MithraDataObject data ) { } }
this . currentData = data ; this . persistenceState = PersistenceState . PERSISTED ; MithraTransaction currentTransaction = MithraManagerProvider . getMithraManager ( ) . getCurrentTransaction ( ) ; if ( currentTransaction != null && zGetPortal ( ) . getTxParticipationMode ( currentTransaction ) . mustParticipateInTxOnRead ( ) ) { this . transactionalState = currentTransaction . getReadLockedTransactionalState ( null , PersistenceState . PERSISTED ) ; }
public class ST_AsGeoJSON { /** * For type " Point " , the " coordinates " member must be a single position . * A position is the fundamental geometry construct . The " coordinates " * member of a geometry object is composed of one position ( in the case of a * Point geometry ) , an array of positions ( LineString or MultiPoint * geometries ) , an array of arrays of positions ( Polygons , * MultiLineStrings ) , or a multidimensional array of positions * ( MultiPolygon ) . * A position is represented by an array of numbers . There must be at least * two elements , and may be more . The order of elements must follow x , y , z * order ( easting , northing , altitude for coordinates in a projected * coordinate reference system , or longitude , latitude , altitude for * coordinates in a geographic coordinate reference system ) . Any number of * additional elements are allowed - - interpretation and meaning of * additional elements is beyond the scope of this specification . * Syntax : * { " type " : " Point " , " coordinates " : [ 100.0 , 0.0 ] } * @ param point * @ param sb */ public static void toGeojsonPoint ( Point point , StringBuilder sb ) { } }
Coordinate coord = point . getCoordinate ( ) ; sb . append ( "{\"type\":\"Point\",\"coordinates\":[" ) ; sb . append ( coord . x ) . append ( "," ) . append ( coord . y ) ; if ( ! Double . isNaN ( coord . z ) ) { sb . append ( "," ) . append ( coord . z ) ; } sb . append ( "]}" ) ;
public class CmsCloneModuleThread { /** * Adjusts the paths of the module resources from the source path to the target path . < p > * @ param sourceModule the source module * @ param targetModule the target module * @ param sourcePathPart the path part of the source module * @ param targetPathPart the path part of the target module * @ param iconPaths the path where resource type icons are located */ private void adjustModuleResources ( CmsModule sourceModule , CmsModule targetModule , String sourcePathPart , String targetPathPart , Map < String , String > iconPaths ) { } }
List < String > newTargetResources = adjustModuleResourcePaths ( targetModule . getResources ( ) , sourceModule . getName ( ) , targetModule . getName ( ) , sourcePathPart , targetPathPart , iconPaths ) ; targetModule . setResources ( newTargetResources ) ; List < String > newTargetExcludeResources = adjustModuleResourcePaths ( targetModule . getExcludeResources ( ) , sourceModule . getName ( ) , targetModule . getName ( ) , sourcePathPart , targetPathPart , iconPaths ) ; targetModule . setExcludeResources ( newTargetExcludeResources ) ;
public class Html5Creative { /** * Gets the html5Asset value for this Html5Creative . * @ return html5Asset * The HTML5 asset . To preview the HTML5 asset , use the { @ link * CreativeAsset # assetUrl } . * In this field , the { @ link CreativeAsset # assetByteArray } * must be a zip bundle and the * { @ link CreativeAsset # fileName } must have a zip * extension . This attribute is required . */ public com . google . api . ads . admanager . axis . v201811 . CreativeAsset getHtml5Asset ( ) { } }
return html5Asset ;
public class NotifyWorkersRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( NotifyWorkersRequest notifyWorkersRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( notifyWorkersRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( notifyWorkersRequest . getSubject ( ) , SUBJECT_BINDING ) ; protocolMarshaller . marshall ( notifyWorkersRequest . getMessageText ( ) , MESSAGETEXT_BINDING ) ; protocolMarshaller . marshall ( notifyWorkersRequest . getWorkerIds ( ) , WORKERIDS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class StudentsTDistribution { /** * Static version of the t distribution ' s PDF . * @ param val value to evaluate * @ param v degrees of freedom * @ return f ( val , v ) */ public static double logpdf ( double val , int v ) { } }
return GammaDistribution . logGamma ( ( v + 1 ) * .5 ) - GammaDistribution . logGamma ( v * .5 ) - .5 * FastMath . log ( v * Math . PI ) + FastMath . log1p ( val * val / v ) * - .5 * ( v + 1 ) ;
public class Infer { /** * Check bounds and perform incorporation . */ void doIncorporation ( InferenceContext inferenceContext , Warner warn ) throws InferenceException { } }
try { boolean progress = true ; int round = 0 ; while ( progress && round < MAX_INCORPORATION_STEPS ) { progress = false ; for ( Type t : inferenceContext . undetvars ) { UndetVar uv = ( UndetVar ) t ; if ( ! uv . incorporationActions . isEmpty ( ) ) { progress = true ; uv . incorporationActions . removeFirst ( ) . apply ( inferenceContext , warn ) ; } } round ++ ; } } finally { incorporationCache . clear ( ) ; }
public class NavigationResultBuilder { /** * Create a new instance of a NavigationResultBuilder using the provided NavigationResult instance as a base . * @ param result A NavigationResult whose entries are used as the basis to eventually construct a new * NavigationResult through this NavigationResultBuilder . * @ return A NavigationResultBuilder instance */ public static NavigationResultBuilder create ( NavigationResult result ) { } }
NavigationResultBuilder builder = new NavigationResultBuilder ( ) ; if ( result != null && result . getNext ( ) != null ) { builder . entries . addAll ( Arrays . asList ( result . getNext ( ) ) ) ; } return builder ;
public class Predictor { /** * The FREQUENCY complement command line contains up to 11 user - defined * frequencies that are used in the calculation . * @ param frel FREL is the array of up to 11 user - defined frequencies in * megahertz . * @ return */ public Predictor frequency ( double ... frel ) { } }
frequencies = frel ; CommandLine < Double > line = new CommandLine < > ( FREQUENCY , 5 ) ; for ( double f : frel ) { line . add ( f ) ; } input . add ( line ) ; return this ;
public class FileEditPanel { /** * This method is called from within the constructor to initialize the form . * WARNING : Do NOT modify this code . The content of this method is always * regenerated by the Form Editor . */ @ SuppressWarnings ( "unchecked" ) // < editor - fold defaultstate = " collapsed " desc = " Generated Code " > / / GEN - BEGIN : initComponents private void initComponents ( ) { } }
java . awt . GridBagConstraints gridBagConstraints ; labelBrowseCurrentLink = new javax . swing . JLabel ( ) ; textFieldFilePath = new javax . swing . JTextField ( ) ; buttonChooseFile = new javax . swing . JButton ( ) ; buttonReset = new javax . swing . JButton ( ) ; optionPanel = new javax . swing . JPanel ( ) ; checkBoxShowFileInSystem = new javax . swing . JCheckBox ( ) ; setBorder ( javax . swing . BorderFactory . createEmptyBorder ( 10 , 10 , 1 , 10 ) ) ; setLayout ( new java . awt . GridBagLayout ( ) ) ; labelBrowseCurrentLink . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/com/igormaznitsa/nbmindmap/icons/file_link.png" ) ) ) ; // NOI18N java . util . ResourceBundle bundle = java . util . ResourceBundle . getBundle ( "com/igormaznitsa/nbmindmap/i18n/Bundle" ) ; // NOI18N labelBrowseCurrentLink . setToolTipText ( bundle . getString ( "FileEditPanel.labelBrowseCurrentLink.toolTipText" ) ) ; // NOI18N labelBrowseCurrentLink . setCursor ( new java . awt . Cursor ( java . awt . Cursor . HAND_CURSOR ) ) ; labelBrowseCurrentLink . setVerticalTextPosition ( javax . swing . SwingConstants . BOTTOM ) ; labelBrowseCurrentLink . addMouseListener ( new java . awt . event . MouseAdapter ( ) { public void mouseClicked ( java . awt . event . MouseEvent evt ) { labelBrowseCurrentLinkMouseClicked ( evt ) ; } } ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBagConstraints . fill = java . awt . GridBagConstraints . BOTH ; gridBagConstraints . ipadx = 10 ; add ( labelBrowseCurrentLink , gridBagConstraints ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBagConstraints . fill = java . awt . GridBagConstraints . BOTH ; gridBagConstraints . weightx = 1000.0 ; add ( textFieldFilePath , gridBagConstraints ) ; buttonChooseFile . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/com/igormaznitsa/nbmindmap/icons/file_manager.png" ) ) ) ; // NOI18N buttonChooseFile . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { buttonChooseFileActionPerformed ( evt ) ; } } ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBagConstraints . fill = java . awt . GridBagConstraints . BOTH ; add ( buttonChooseFile , gridBagConstraints ) ; buttonReset . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/com/igormaznitsa/nbmindmap/icons/cross16.png" ) ) ) ; // NOI18N buttonReset . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { buttonResetActionPerformed ( evt ) ; } } ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBagConstraints . fill = java . awt . GridBagConstraints . BOTH ; add ( buttonReset , gridBagConstraints ) ; optionPanel . setLayout ( new java . awt . FlowLayout ( java . awt . FlowLayout . RIGHT ) ) ; org . openide . awt . Mnemonics . setLocalizedText ( checkBoxShowFileInSystem , bundle . getString ( "FileEditPanel.checkBoxShowFileInSystem.text" ) ) ; // NOI18N optionPanel . add ( checkBoxShowFileInSystem ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBagConstraints . gridx = 0 ; gridBagConstraints . gridy = 1 ; gridBagConstraints . gridwidth = 4 ; gridBagConstraints . fill = java . awt . GridBagConstraints . BOTH ; gridBagConstraints . ipadx = 2 ; add ( optionPanel , gridBagConstraints ) ;
public class UniversalSingleStorageJdbcQueue { /** * { @ inheritDoc } */ @ Override protected boolean putToEphemeralStorage ( Connection conn , IQueueMessage < String , byte [ ] > _msg ) { } }
if ( ! ( _msg instanceof UniversalIdStrQueueMessage ) ) { throw new IllegalArgumentException ( "This method requires an argument of type [" + UniversalIdStrQueueMessage . class . getName ( ) + "]!" ) ; } UniversalIdStrQueueMessage msg = ( UniversalIdStrQueueMessage ) _msg ; int numRows = getJdbcHelper ( ) . execute ( conn , SQL_PUT_TO_EPHEMERAL , getQueueName ( ) , msg . getId ( ) , msg . getTimestamp ( ) , msg . getQueueTimestamp ( ) , msg . getNumRequeues ( ) , msg . getContent ( ) ) ; return numRows > 0 ;
public class GPathResult { /** * Returns the specified Property of this GPathResult . * Realizes the follow shortcuts : * < ul > * < li > < code > ' . . ' < / code > for < code > parent ( ) < / code > * < li > < code > ' * ' < / code > for < code > children ( ) < / code > * < li > < code > ' * * ' < / code > for < code > depthFirst ( ) < / code > * < li > < code > ' @ ' < / code > for attribute access * < / ul > * @ param property the Property to fetch */ public Object getProperty ( final String property ) { } }
if ( ".." . equals ( property ) ) { return parent ( ) ; } else if ( "*" . equals ( property ) ) { return children ( ) ; } else if ( "**" . equals ( property ) ) { return depthFirst ( ) ; } else if ( property . startsWith ( "@" ) ) { if ( property . contains ( ":" ) && ! this . namespaceTagHints . isEmpty ( ) ) { final int i = property . indexOf ( ":" ) ; return new Attributes ( this , "@" + property . substring ( i + 1 ) , property . substring ( 1 , i ) , this . namespaceTagHints ) ; } else { return new Attributes ( this , property , this . namespaceTagHints ) ; } } else { if ( property . contains ( ":" ) && ! this . namespaceTagHints . isEmpty ( ) ) { final int i = property . indexOf ( ":" ) ; return new NodeChildren ( this , property . substring ( i + 1 ) , property . substring ( 0 , i ) , this . namespaceTagHints ) ; } else { return new NodeChildren ( this , property , this . namespaceTagHints ) ; } }
public class AwsSecurityFindingFilters { /** * The level of importance assigned to the resources associated with the finding . A score of 0 means the underlying * resources have no criticality , and a score of 100 is reserved for the most critical resources . * @ param criticality * The level of importance assigned to the resources associated with the finding . A score of 0 means the * underlying resources have no criticality , and a score of 100 is reserved for the most critical resources . */ public void setCriticality ( java . util . Collection < NumberFilter > criticality ) { } }
if ( criticality == null ) { this . criticality = null ; return ; } this . criticality = new java . util . ArrayList < NumberFilter > ( criticality ) ;
public class CodedInputStream { /** * Create a new CodedInputStream wrapping the given byte array slice . */ public static CodedInputStream newInstance ( final byte [ ] buf , final int off , final int len ) { } }
CodedInputStream result = new CodedInputStream ( buf , off , len ) ; try { // Some uses of CodedInputStream can be more efficient if they know // exactly how many bytes are available . By pushing the end point of the // buffer as a limit , we allow them to get this information via // getBytesUntilLimit ( ) . Pushing a limit that we know is at the end of // the stream can never hurt , since we can never past that point anyway . result . pushLimit ( len ) ; } catch ( InvalidProtocolBufferException ex ) { // The only reason pushLimit ( ) might throw an exception here is if len // is negative . Normally pushLimit ( ) ' s parameter comes directly off the // wire , so it ' s important to catch exceptions in case of corrupt or // malicious data . However , in this case , we expect that len is not a // user - supplied value , so we can assume that it being negative indicates // a programming error . Therefore , throwing an unchecked exception is // appropriate . throw new IllegalArgumentException ( ex ) ; } return result ;
public class TypeElementCatalog { /** * Add the given class to the catalog . * @ param typeElement the TypeElement to add to the catalog . */ public final void addTypeElement ( TypeElement typeElement ) { } }
if ( typeElement == null ) { return ; } addTypeElement ( typeElement , allClasses ) ; if ( utils . isOrdinaryClass ( typeElement ) ) { addTypeElement ( typeElement , ordinaryClasses ) ; } else if ( utils . isException ( typeElement ) ) { addTypeElement ( typeElement , exceptions ) ; } else if ( utils . isEnum ( typeElement ) ) { addTypeElement ( typeElement , enums ) ; } else if ( utils . isAnnotationType ( typeElement ) ) { addTypeElement ( typeElement , annotationTypes ) ; } else if ( utils . isError ( typeElement ) ) { addTypeElement ( typeElement , errors ) ; } else if ( utils . isInterface ( typeElement ) ) { addTypeElement ( typeElement , interfaces ) ; }
public class GoldenGrammarError { /** * setter for replace - sets * @ generated */ public void setReplace ( String v ) { } }
if ( GoldenGrammarError_Type . featOkTst && ( ( GoldenGrammarError_Type ) jcasType ) . casFeat_replace == null ) jcasType . jcas . throwFeatMissing ( "replace" , "cogroo.uima.GoldenGrammarError" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( GoldenGrammarError_Type ) jcasType ) . casFeatCode_replace , v ) ;
public class SenBotContext { /** * Get a File on the class path or file system or create it if it does not * exist */ public static File getOrCreateFile ( String url , boolean createIfNotFound ) throws IOException { } }
File file = null ; if ( url . contains ( ResourceUtils . CLASSPATH_URL_PREFIX ) ) { url = url . replaceAll ( ResourceUtils . CLASSPATH_URL_PREFIX , "" ) ; if ( url . startsWith ( "/" ) ) { url = url . substring ( 1 ) ; } URL resource = SenBotContext . class . getClassLoader ( ) . getResource ( "" ) ; if ( resource == null ) { throw new IOException ( "creating a new folder on the classpath is not allowed" ) ; } else { file = new File ( resource . getFile ( ) + "/" + url ) ; } } else { file = new File ( url ) ; } if ( createIfNotFound && ! file . exists ( ) ) { file . mkdirs ( ) ; } return file ;
public class Database { /** * Delete an index with the specified name and type in the given design document . * @ param indexName name of the index * @ param designDocId ID of the design doc ( the _ design prefix will be added if not present ) * @ param type type of the index , valid values or " text " or " json " */ public void deleteIndex ( String indexName , String designDocId , String type ) { } }
assertNotEmpty ( indexName , "indexName" ) ; assertNotEmpty ( designDocId , "designDocId" ) ; assertNotNull ( type , "type" ) ; if ( ! designDocId . startsWith ( "_design" ) ) { designDocId = "_design/" + designDocId ; } URI uri = new DatabaseURIHelper ( db . getDBUri ( ) ) . path ( "_index" ) . path ( designDocId ) . path ( type ) . path ( indexName ) . build ( ) ; InputStream response = null ; try { HttpConnection connection = Http . DELETE ( uri ) ; response = client . couchDbClient . executeToInputStream ( connection ) ; getResponse ( response , Response . class , client . getGson ( ) ) ; } finally { close ( response ) ; }
public class MPORGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . MPORG__RG_LENGTH : return RG_LENGTH_EDEFAULT == null ? rgLength != null : ! RG_LENGTH_EDEFAULT . equals ( rgLength ) ; case AfplibPackage . MPORG__TRIPLETS : return triplets != null && ! triplets . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
public class DWR3BeanGenerator { /** * Get the DWR Container . If multiple DWR containers exist in the * ServletContext , the first found is returned . * @ param context * The GeneratorContext * @ return The DWR Container */ private Container getContainer ( final GeneratorContext context ) { } }
List < Container > containers = StartupUtil . getAllPublishedContainers ( context . getServletContext ( ) ) ; // TODO : here we assume there is only one DWR Servlet / Container . . . we // should find a way to math the container with the DWR mapping config for ( Container container : containers ) { return container ; } throw new RuntimeException ( "FATAL: unable to find DWR Container!" ) ;
public class ValueAnimator { /** * This internal function processes a single animation frame for a given animation . The * currentTime parameter is the timing pulse sent by the handler , used to calculate the * elapsed duration , and therefore * the elapsed fraction , of the animation . The return value indicates whether the animation * should be ended ( which happens when the elapsed time of the animation exceeds the * animation ' s duration , including the repeatCount ) . * @ param currentTime The current time , as tracked by the static timing handler * @ return true if the animation ' s duration , including any repetitions due to * < code > repeatCount < / code > has been exceeded and the animation should be ended . */ boolean animationFrame ( long currentTime ) { } }
boolean done = false ; if ( mPlayingState == STOPPED ) { mPlayingState = RUNNING ; if ( mSeekTime < 0 ) { mStartTime = currentTime ; } else { mStartTime = currentTime - mSeekTime ; // Now that we ' re playing , reset the seek time mSeekTime = - 1 ; } } switch ( mPlayingState ) { case RUNNING : case SEEKED : float fraction = mDuration > 0 ? ( float ) ( currentTime - mStartTime ) / mDuration : 1f ; if ( fraction >= 1f ) { if ( mCurrentIteration < mRepeatCount || mRepeatCount == INFINITE ) { // Time to repeat if ( mListeners != null ) { int numListeners = mListeners . size ( ) ; for ( int i = 0 ; i < numListeners ; ++ i ) { mListeners . get ( i ) . onAnimationRepeat ( this ) ; } } if ( mRepeatMode == REVERSE ) { mPlayingBackwards = mPlayingBackwards ? false : true ; } mCurrentIteration += ( int ) fraction ; fraction = fraction % 1f ; mStartTime += mDuration ; } else { done = true ; fraction = Math . min ( fraction , 1.0f ) ; } } if ( mPlayingBackwards ) { fraction = 1f - fraction ; } animateValue ( fraction ) ; break ; } return done ;