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 reque...
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 ( ( ...
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 ( ) ; p...
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 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 ( ) . ...
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 win...
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...
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 BELObj...
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 no...
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 ...
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...
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 ) ...
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 . ...
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 [ ] classNa...
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 * @ ...
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...
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 ....
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_INTERCHANG...
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 */...
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 , " getNextV...
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 * @ p...
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 TransformerConfigurationExc...
// 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 ++ ) { Elem...
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 ...
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 defi...
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 . Coll...
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 SQLConfigurationExceptio...
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 SQLConfigurat...
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 ( Objec...
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 < C...
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_EDEFAUL...
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 . openh...
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 ; } } }...
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 < c...
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 , C...
/* * 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 ( ) ; /* * Mat...
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 ....
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 ( "...
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 ...
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 . addParamet...
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 . getVariableType...
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 ...
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 a...
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 . typ...
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 * @ p...
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 ...
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 * @ para...
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 Except...
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 ( ',' ) . appen...
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 ...
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 ...
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 ...
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" : setLongFile...
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 ( ) ; }...
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 . intern...
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 * func...
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 * ...
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 determinin...
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 n...
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...
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 } *...
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 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 ) . mustParticipateInTxOn...
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 ( LineStrin...
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...
List < String > newTargetResources = adjustModuleResourcePaths ( targetModule . getResources ( ) , sourceModule . getName ( ) , targetModule . getName ( ) , sourcePathPart , targetPathPart , iconPaths ) ; targetModule . setResources ( newTargetResources ) ; List < String > newTargetExcludeResources = adjustModuleResour...
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...
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 ) ; prot...
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 ( ) . app...
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 . *...
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 = " G...
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 ( ) ; chec...
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 ( c...
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 > ...
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 ...
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 assign...
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 ...
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 ( typeEle...
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 == n...
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 ...
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 ) . ...
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 ; }...
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...
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 fract...