signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class systemmemory_stats { /** * < pre > * converts nitro response into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_response ( nitro_service service , String response ) throws Exception { } }
systemmemory_stats [ ] resources = new systemmemory_stats [ 1 ] ; systemmemory_response result = ( systemmemory_response ) service . get_payload_formatter ( ) . string_to_resource ( systemmemory_response . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == 444 ) { service . clear_session (...
public class ShanksAgentBayesianReasoningCapability { /** * Add information to the Bayesian network to reason with it . * @ param agent * @ param nodeName * @ param status * @ throws ShanksException */ public static void addEvidence ( BayesianReasonerShanksAgent agent , String nodeName , String status ) throws ...
ShanksAgentBayesianReasoningCapability . addEvidence ( agent . getBayesianNetwork ( ) , nodeName , status ) ;
public class VariableEvaluator { /** * Attempt to evaluate a variable expression . * @ param expr the expression string ( for example , " x + 0 " ) * @ param context the context for evaluation * @ return the result , or null if evaluation fails */ @ FFDCIgnore ( { } }
NumberFormatException . class , ArithmeticException . class , ConfigEvaluatorException . class } ) private String tryEvaluateExpression ( String expr , final EvaluationContext context , final boolean ignoreWarnings ) { try { return new ConfigExpressionEvaluator ( ) { @ Override String getProperty ( String argName ) thr...
public class GenericIHEAuditEventMessage { /** * Adds a Participant Object representing a document for XDS Exports * @ param documentUniqueId The Document Entry Unique Id * @ param repositoryUniqueId The Repository Unique Id of the Repository housing the document * @ param homeCommunityId The Home Community Id */...
List < TypeValuePairType > tvp = new LinkedList < > ( ) ; // SEK - 10/19/2011 - added check for empty or null , RE : Issue Tracker artifact artf2295 ( was Issue 135) if ( ! EventUtils . isEmptyOrNull ( repositoryUniqueId ) ) { tvp . add ( getTypeValuePair ( "Repository Unique Id" , repositoryUniqueId . getBytes ( ) ) )...
public class WARCInputFormat { /** * Opens a WARC file ( possibly compressed ) for reading , and returns a RecordReader for accessing it . */ @ Override public RecordReader < LongWritable , WARCWritable > createRecordReader ( InputSplit split , TaskAttemptContext context ) throws IOException , InterruptedException { } ...
return new WARCReader ( ) ;
public class DistributionList { /** * A complex type that contains one < code > DistributionSummary < / code > element for each distribution that was created * by the current AWS account . * @ param items * A complex type that contains one < code > DistributionSummary < / code > element for each distribution that...
if ( items == null ) { this . items = null ; return ; } this . items = new com . amazonaws . internal . SdkInternalList < DistributionSummary > ( items ) ;
public class XMLContentHandler { /** * Depending on the element , which has to be in the correct namespace , the method adds a property to the node or * removes completed nodes from the node stack . */ @ Override public void endElement ( final String uri , final String localName , final String qName ) throws SAXExcep...
LOG . trace ( "endElement uri={} localName={} qName={}" , uri , localName , qName ) ; if ( this . isNotInkstandNamespace ( uri ) ) { return ; } switch ( localName ) { case "rootNode" : LOG . debug ( "Closing rootNode" ) ; this . nodeStack . pop ( ) ; break ; case "node" : LOG . debug ( "Closing node" ) ; this . nodeSta...
public class Cap { /** * Returns the value of this product under the given model . * @ param evaluationTime Evaluation time . * @ param model The model . * @ return Value of this product und the given model . */ public double getValueAsPrice ( double evaluationTime , AnalyticModel model ) { } }
ForwardCurve forwardCurve = model . getForwardCurve ( forwardCurveName ) ; DiscountCurve discountCurve = model . getDiscountCurve ( discountCurveName ) ; DiscountCurve discountCurveForForward = null ; if ( forwardCurve == null && forwardCurveName != null && forwardCurveName . length ( ) > 0 ) { // User might like to ge...
public class GerritQueryHandler { /** * Runs the query and returns the result as a list of JSON formatted strings . * @ param queryString the query . * @ param getPatchSets if all patch - sets of the projects found should be included in the result . * Meaning if - - patch - sets should be appended to the command ...
final List < String > list = new LinkedList < String > ( ) ; try { runQuery ( queryString , getPatchSets , getCurrentPatchSet , getFiles , getCommitMessage , false , new LineVisitor ( ) { @ Override public void visit ( String line ) { list . add ( line . trim ( ) ) ; } } ) ; } catch ( GerritQueryException gqe ) { logge...
public class TransactionHelper { /** * Saves the given object in the database . * @ param < T > * type of given object obj * @ param obj * object to save * @ return saved object * @ throws Exception * save objects failed */ public final < T > T saveObject ( final T obj ) throws Exception { } }
return executeInTransaction ( new Runnable < T > ( ) { @ Override public T run ( final EntityManager entityManager ) { return persist ( obj , entityManager ) ; } } ) ;
public class ModelExt { /** * shot cache ' s name . * if current cacheName ! = the old cacheName , will reset old cache , update cache use the current cacheName and open syncToRedis . */ public void shotCacheName ( String cacheName ) { } }
// reset cache if ( StrKit . notBlank ( cacheName ) && ! cacheName . equals ( this . cacheName ) ) { GlobalSyncRedis . removeSyncCache ( this . cacheName ) ; } this . cacheName = cacheName ; // auto open sync to redis this . syncToRedis = true ; // update model redis mapping ModelRedisMapping . me ( ) . put ( this . ta...
public class AddResourcesListener { /** * Make sure jQuery is loaded before jQueryUI , and that every other Javascript * is loaded later . Also make sure that the BootsFaces resource files are loaded * prior to other resource files , giving the developer the opportunity to * overwrite a CSS or JS file . * @ par...
// / / first , handle the CSS files . // / / Put BootsFaces . css or BootsFaces . min . css first , // / / theme . css second // / / and everything else behind them . List < UIComponent > resources = new ArrayList < UIComponent > ( ) ; List < UIComponent > first = new ArrayList < UIComponent > ( ) ; List < UIComponent ...
public class IndexEvents { /** * Create an index entry . * @ param text The text for the Chunk . * @ param in1 The first level . * @ param in2 The second level . * @ return Returns the Chunk . */ public Chunk create ( final String text , final String in1 , final String in2 ) { } }
return create ( text , in1 , in2 , "" ) ;
public class FileMonitor { /** * Used to wait for transferred file ' s content length to stop changes for * 5 seconds * @ param aFile the file */ public static void waitFor ( File aFile ) { } }
if ( aFile == null ) return ; String path = aFile . getAbsolutePath ( ) ; long previousSize = IO . getFileSize ( path ) ; long currentSize = previousSize ; long sleepTime = Config . getPropertyLong ( "file.monitor.file.wait.time" , 100 ) . longValue ( ) ; while ( true ) { try { Thread . sleep ( sleepTime ) ; } catch ( ...
public class ArrayUtils { /** * Returns an { @ link Iterable } over the elements in the array . * @ param < T > Class type of the elements in the array . * @ param array array to iterate . * @ return an { @ link Iterable } over the elements in the array * or an empty { @ link Iterable } if the array is null or ...
return ( ) -> asIterator ( array ) ;
public class BlobStoreWriter { /** * Installs a finished blob into the store . */ public boolean install ( ) { } }
if ( tempFile == null ) return true ; // already installed // Move temp file to correct location in blob store : String destPath = store . getRawPathForKey ( blobKey ) ; File destPathFile = new File ( destPath ) ; if ( tempFile . renameTo ( destPathFile ) ) // If the move fails , assume it means a file with the same na...
public class ReportLastScan { /** * Generates a report . Defaults to HTML report if reportType is null . * @ param view * @ param model * @ param reportType */ public void generateReport ( ViewDelegate view , Model model , ReportType reportType ) { } }
// ZAP : Allow scan report file name to be specified final ReportType localReportType ; if ( reportType == null ) { localReportType = ReportType . HTML ; } else { localReportType = reportType ; } try { JFileChooser chooser = new WritableFileChooser ( Model . getSingleton ( ) . getOptionsParam ( ) . getUserDirectory ( )...
public class AbstractModelObject { /** * Convenience method to verify that the current request is a POST request . * @ deprecated * Use { @ link RequirePOST } on your method . */ @ Deprecated protected final void requirePOST ( ) throws ServletException { } }
StaplerRequest req = Stapler . getCurrentRequest ( ) ; if ( req == null ) return ; // invoked outside the context of servlet String method = req . getMethod ( ) ; if ( ! method . equalsIgnoreCase ( "POST" ) ) throw new ServletException ( "Must be POST, Can't be " + method ) ;
public class SubCommandMetaSyncVersion { /** * Parses command - line and synchronizes metadata versions across all * nodes . * @ param args Command - line input * @ param printHelp Tells whether to print help only or execute command * actually * @ throws IOException */ public static void executeCommand ( Stri...
OptionParser parser = getParser ( ) ; String url = null ; Boolean confirm = false ; // parse command - line input OptionSet options = parser . parse ( args ) ; if ( options . has ( AdminParserUtils . OPT_HELP ) ) { printHelp ( System . out ) ; return ; } AdminParserUtils . checkRequired ( options , AdminParserUtils . O...
public class NmeaUtil { /** * Returns true if and only if the sentence ' s checksum matches the * calculated checksum . * @ param sentence * @ return */ public static boolean isValid ( String sentence ) { } }
// Compare the characters after the asterisk to the calculation try { return sentence . substring ( sentence . lastIndexOf ( "*" ) + 1 ) . equalsIgnoreCase ( getChecksum ( sentence ) ) ; } catch ( AisParseException e ) { return false ; }
public class CountingMemoryCache { /** * Removes all the items from the cache whose key matches the specified predicate . * @ param predicate returns true if an item with the given key should be removed * @ return number of the items removed from the cache */ public int removeAll ( Predicate < K > predicate ) { } }
ArrayList < Entry < K , V > > oldExclusives ; ArrayList < Entry < K , V > > oldEntries ; synchronized ( this ) { oldExclusives = mExclusiveEntries . removeAll ( predicate ) ; oldEntries = mCachedEntries . removeAll ( predicate ) ; makeOrphans ( oldEntries ) ; } maybeClose ( oldEntries ) ; maybeNotifyExclusiveEntryRemov...
public class MapDotApi { /** * Get optional value by path . * @ param < T > optional value type * @ param clazz type of value * @ param map subject * @ param pathString nodes to walk in map * @ return value */ public static < T > Optional < Optional < T > > dotGetOptional ( final Map map , final String pathSt...
return dotGet ( map , Optional . class , pathString ) . map ( opt -> ( Optional < T > ) opt ) ;
public class StubJournal { /** * @ Override * public void onSaveRequest ( Result < Void > result ) * if ( ! _ journal . saveStart ( ) ) { * if ( _ toPeerJournal ! = null ) { * _ toPeerJournal . saveStart ( ) ; */ @ Override public void onSaveEnd ( boolean isValid ) { } }
_journal . saveEnd ( isValid ) ; if ( _toPeerJournal != null ) { _toPeerJournal . saveEnd ( isValid ) ; }
public class JobInProgress { /** * Populate the data structures as a task is scheduled . * Assuming { @ link JobTracker } is locked on entry . * @ param tip The tip for which the task is added * @ param id The attempt - id for the task * @ param tts task - tracker status * @ param isScheduled Whether this tas...
// Make an entry in the tip if the attempt is not scheduled i . e externally // added if ( ! isScheduled ) { tip . addRunningTask ( id , tts . getTrackerName ( ) ) ; } final JobTrackerInstrumentation metrics = jobtracker . getInstrumentation ( ) ; // keeping the earlier ordering intact String name ; String splits = "" ...
public class GetContentModerationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetContentModerationRequest getContentModerationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getContentModerationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getContentModerationRequest . getJobId ( ) , JOBID_BINDING ) ; protocolMarshaller . marshall ( getContentModerationRequest . getMaxResults ( ) , MAXRESULTS_B...
public class EmbeddableRegisteredResources { /** * Directs the RegisteredResources to recover its state after a failure . * This is based on the given RecoverableUnit object . The participant list is reconstructed . * @ param log The RecoverableUnit holding the RegisteredResources state . */ @ Override public void ...
final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "reconstruct" , new Object [ ] { rm , log } ) ; RecoveryManager recoveryManager = rm ; _retryCompletion = true ; reconstructHeuristics ( log ) ; // Read in XAResources and Corba resources ( sub...
public class CompoundLocation { /** * Returns the sequence position relative to the compound location . * @ param position * the local sequence position . * @ return the relative position . */ public Long getRelativePosition ( Long position ) { } }
long relativePosition = 0L ; for ( Location location : locations ) { if ( location instanceof RemoteLocation ) { relativePosition += location . getLength ( ) ; } else { if ( position < location . getBeginPosition ( ) || position > location . getEndPosition ( ) ) { relativePosition += location . getLength ( ) ; } else {...
public class DnsResolver { /** * Look into A - record at a specific DNS address . * @ return resolved IP addresses or null if no A - record was present */ @ Nullable public static List < String > resolveARecord ( String rootDomainName ) { } }
if ( isLocalOrIp ( rootDomainName ) ) { return null ; } try { Attributes attrs = getDirContext ( ) . getAttributes ( rootDomainName , new String [ ] { A_RECORD_TYPE , CNAME_RECORD_TYPE } ) ; Attribute aRecord = attrs . get ( A_RECORD_TYPE ) ; Attribute cRecord = attrs . get ( CNAME_RECORD_TYPE ) ; if ( aRecord != null ...
public class FlexiantComputeClient { /** * Retrieves a list of resources matching the given prefix on the given attribute * which are of the given type . * @ param prefix the prefix to match . * @ param attribute the attribute where the prefix should match . * @ param resourceType the type of the resource . *...
SearchFilter sf = new SearchFilter ( ) ; FilterCondition fc = new FilterCondition ( ) ; fc . setCondition ( Condition . STARTS_WITH ) ; fc . setField ( attribute ) ; fc . getValue ( ) . add ( prefix ) ; sf . getFilterConditions ( ) . add ( fc ) ; if ( locationUUID != null ) { FilterCondition fcLocation = new FilterCond...
public class PTSaxton2006 { /** * Equation 7 for calculating Adjusted density , g / cm - 3 * @ param slsnd Sand weight percentage by layer ( [ 0,100 ] % ) * @ param slcly Clay weight percentage by layer ( [ 0,100 ] % ) * @ param omPct Organic matter weight percentage by layer ( [ 0,100 ] % ) , ( = * SLOC * 1.72...
if ( compare ( df , "0.9" , CompareMode . NOTLESS ) && compare ( df , "1.3" , CompareMode . NOTGREATER ) ) { String normalDensity = calcNormalDensity ( slsnd , slcly , omPct ) ; String ret = product ( normalDensity , df ) ; LOG . debug ( "Calculate result for Adjusted density, g/cm-3 is {}" , ret ) ; return ret ; } els...
public class PerSessionLogHandler { /** * Removes session logs for the given session id . * NB ! If the handler has been configured to capture logs on quit no logs will be removed . * @ param sessionId The session id to use . */ public synchronized void removeSessionLogs ( SessionId sessionId ) { } }
if ( storeLogsOnSessionQuit ) { return ; } ThreadKey threadId = sessionToThreadMap . get ( sessionId ) ; SessionId sessionIdForThread = threadToSessionMap . get ( threadId ) ; if ( threadId != null && sessionIdForThread != null && sessionIdForThread . equals ( sessionId ) ) { threadToSessionMap . remove ( threadId ) ; ...
public class ByteOrderedTokenRange { /** * For example if the token is 0x01 but significantBytes is 2 , the result is 8 ( 0x0100 ) . */ private BigInteger toBigInteger ( ByteBuffer bb , int significantBytes ) { } }
byte [ ] bytes = Bytes . getArray ( bb ) ; byte [ ] target ; if ( significantBytes != bytes . length ) { target = new byte [ significantBytes ] ; System . arraycopy ( bytes , 0 , target , 0 , bytes . length ) ; } else { target = bytes ; } return new BigInteger ( 1 , target ) ;
public class ProteinPocketFinder { /** * Method assigns the atoms of a biopolymer to the grid . For every atom * the corresponding grid point is identified and set to the value * of the proteinInterior variable . * The atom radius and solvent radius is accounted for with the variables : * double rAtom , and dou...
// logger . debug . print ( " ASSIGN PROTEIN TO GRID " ) ; // 1 . Step : Set all grid points to solvent accessible this . grid = gridGenerator . initializeGrid ( this . grid , 0 ) ; // 2 . Step Grid points inaccessible to solvent are assigend a value of - 1 // set grid points around ( r _ atom + r _ solv ) to - 1 IAtom...
public class Utils { /** * It obtains the entities in the graph " g " whose type is the same as * " typeName " . * @ param g The graph considered * @ param typeName The type being searched * @ return The list of entities * @ throws NullEntity */ public static List < GraphEntity > getEntities ( Graph g , Strin...
GraphEntity [ ] ge = g . getEntities ( ) ; List < GraphEntity > result = new ArrayList < > ( ) ; for ( int k = 0 ; k < ge . length ; k ++ ) { if ( ge [ k ] . getType ( ) . equals ( typeName ) ) { result . add ( ge [ k ] ) ; } } return result ;
public class CachedLogger { /** * Dumps ( writes ) the currently cached log messages . * @ throws InvocationException when error occured . * @ see # write ( LogLevel , String , Exception , String ) */ public void dump ( ) throws InvocationException { } }
if ( _updated ) { synchronized ( _lock ) { if ( ! _updated ) return ; List < LogMessage > messages = _cache ; _cache = new ArrayList < LogMessage > ( ) ; save ( messages ) ; _updated = false ; _lastDumpTime = System . currentTimeMillis ( ) ; } }
public class RBACDecorator { /** * Converts { @ link ObjectName } to a key that helps verifying whether different MBeans * can produce same RBAC info * @ param allJmxAclPids * @ param objectName * @ return */ static String pidListKey ( List < String > allJmxAclPids , ObjectName objectName ) throws NoSuchAlgorit...
List < String > pidCandidates = iterateDownPids ( nameSegments ( objectName ) ) ; MessageDigest md = MessageDigest . getInstance ( "MD5" ) ; for ( String pc : pidCandidates ) { String generalPid = getGeneralPid ( allJmxAclPids , pc ) ; if ( generalPid . length ( ) > 0 ) { md . update ( generalPid . getBytes ( "UTF-8" )...
public class Transaction { /** * < p > Calculates a signature hash , that is , a hash of a simplified form of the transaction . How exactly the transaction * is simplified is specified by the type and anyoneCanPay parameters . < / p > * < p > This is a low level API and when using the regular { @ link Wallet } clas...
byte sigHashType = ( byte ) TransactionSignature . calcSigHashValue ( type , anyoneCanPay ) ; return hashForSignature ( inputIndex , redeemScript , sigHashType ) ;
public class Scheduler { /** * Gets a suitable instance to schedule the vertex execution to . * NOTE : This method does is not thread - safe , it needs to be synchronized by the caller . * @ param vertex The task to run . * @ return The instance to run the vertex on , it { @ code null } , if no instance is availa...
// we need potentially to loop multiple times , because there may be false positives // in the set - with - available - instances while ( true ) { Pair < Instance , Locality > instanceLocalityPair = findInstance ( requestedLocations , localOnly ) ; if ( instanceLocalityPair == null ) { return null ; } Instance instance...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getMDDXmBase ( ) { } }
if ( mddXmBaseEEnum == null ) { mddXmBaseEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 44 ) ; } return mddXmBaseEEnum ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getBSG ( ) { } }
if ( bsgEClass == null ) { bsgEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 223 ) ; } return bsgEClass ;
public class PersistentFactory { /** * Loads all elements of this class from the data store . Use this method only when you know * exactly what you are doing . Otherwise , you will pull a lot of data . * @ return all objects from the database * @ throws PersistenceException an error occurred executing the query *...
logger . debug ( "enter - list()" ) ; try { return find ( ( String ) null , ( Object ) null ) ; } finally { logger . debug ( "exit - list()" ) ; }
public class RTMPConnection { /** * Stops measurement . */ private void stopRoundTripMeasurement ( ) { } }
if ( keepAliveTask != null ) { boolean cancelled = keepAliveTask . cancel ( true ) ; keepAliveTask = null ; if ( cancelled && log . isDebugEnabled ( ) ) { log . debug ( "Keep alive was cancelled for {}" , sessionId ) ; } }
public class ApiOvhIp { /** * Get this object properties * REST : GET / ip / { ip } / mitigation / { ipOnMitigation } * @ param ip [ required ] * @ param ipOnMitigation [ required ] */ public OvhMitigationIp ip_mitigation_ipOnMitigation_GET ( String ip , String ipOnMitigation ) throws IOException { } }
String qPath = "/ip/{ip}/mitigation/{ipOnMitigation}" ; StringBuilder sb = path ( qPath , ip , ipOnMitigation ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhMitigationIp . class ) ;
public class DateRangeParam { /** * Sets the upper bound to be greaterthan to the given date */ public DateRangeParam setUpperBoundExclusive ( Date theUpperBound ) { } }
validateAndSet ( myLowerBound , new DateParam ( ParamPrefixEnum . LESSTHAN , theUpperBound ) ) ; return this ;
public class JMStats { /** * Max number . * @ param < N > the type parameter * @ param numberList the number list * @ return the number */ public static < N extends Number > Number max ( List < N > numberList ) { } }
return cal ( numberList , DoubleStream :: max ) ;
public class BProgram { /** * Reads and evaluates the code at the passed input stream . The stream is * read to its end , but is not closed . * @ param inStrm Input stream for reading the script to be evaluated . * @ param scriptName for error reporting purposes . * @ return Result of evaluating the code at { @...
InputStreamReader streamReader = new InputStreamReader ( inStrm , StandardCharsets . UTF_8 ) ; BufferedReader br = new BufferedReader ( streamReader ) ; StringBuilder sb = new StringBuilder ( ) ; String line ; try { while ( ( line = br . readLine ( ) ) != null ) { sb . append ( line ) . append ( "\n" ) ; } } catch ( IO...
public class ZooKeeperHelper { /** * Create an empty normal ( persistent ) Znode . If the znode already exists , do nothing . * @ param zookeeper ZooKeeper instance to work with . * @ param znode Znode to create . * @ throws KeeperException * @ throws InterruptedException */ static void createIfNotThere ( ZooKe...
try { create ( zookeeper , znode ) ; } catch ( KeeperException e ) { if ( e . code ( ) != KeeperException . Code . NODEEXISTS ) { // Rethrow all exceptions , except " node exists " , // because if the node exists , this method reached its goal . throw e ; } }
public class Assert { /** * Verifies the provided title matches the actual title of the current page * the application is on . This information will be logged and recorded , with * a screenshot for traceability and added debugging support . * @ param expectedTitlePattern the friendly name of the page */ @ Overrid...
String title = checkTitleMatches ( expectedTitlePattern , 0 , 0 ) ; assertTrue ( "Title Mismatch: title of '" + title + DOES_NOT_MATCH_PATTERN + expectedTitlePattern + "'" , title . matches ( expectedTitlePattern ) ) ;
public class DefaultHpsmClient { /** * Returns the type of the configuration item . * @ param cmdb * @ return the type of the configuration item . */ private String getItemType ( Cmdb cmdb ) { } }
String itemType = null ; String subType = cmdb . getConfigurationItemSubType ( ) ; String type = cmdb . getConfigurationItemType ( ) ; String hpsmSettingsSubType = hpsmSettings . getAppSubType ( ) ; String hpsmSettingsType = hpsmSettings . getAppType ( ) ; boolean typeCheck = false ; boolean subTypeCheck = false ; if (...
public class FastSafeIterableMap { /** * / * ( non - Javadoc ) * @ see android . arch . core . internal . SafeIterableMap # putIfAbsent ( java . lang . Object , java . lang . Object ) */ @ Override public V putIfAbsent ( @ NonNull K key , @ NonNull V v ) { } }
Entry < K , V > current = get ( key ) ; if ( current != null ) { return current . mValue ; } mHashMap . put ( key , put ( key , v ) ) ; return null ;
public class Task { /** * Makes a fluent cast of a Task ' s result possible , avoiding an extra continuation just to cast * the type of the result . */ public < TOut > Task < TOut > cast ( ) { } }
@ SuppressWarnings ( "unchecked" ) Task < TOut > task = ( Task < TOut > ) this ; return task ;
public class JKObjectUtil { public static String toXml ( final Object obj ) { } }
final ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; // XStream x = createXStream ( ) ; // String xml = x . toXML ( obj ) ; // return xml ; final XMLEncoder e = new XMLEncoder ( out ) ; e . setExceptionListener ( new JKObjectUtil . XmlEncoderExceptionListener ( ) ) ; // e . setPersistenceDelegate ( Object ...
public class DFSEvaluatorPreserver { /** * Adds the removed evaluator entry to the evaluator log . * @ param id */ @ Override public synchronized void recordRemovedEvaluator ( final String id ) { } }
if ( this . fileSystem != null && this . changeLogLocation != null ) { final String entry = REMOVE_FLAG + id + System . lineSeparator ( ) ; this . logContainerChange ( entry ) ; }
public class AmazonSageMakerWaiters { /** * Builds a NotebookInstanceStopped waiter by using custom parameters waiterParameters and other parameters defined * in the waiters specification , and then polls until it determines whether the resource entered the desired state * or not , where polling criteria is bound b...
return new WaiterBuilder < DescribeNotebookInstanceRequest , DescribeNotebookInstanceResult > ( ) . withSdkFunction ( new DescribeNotebookInstanceFunction ( client ) ) . withAcceptors ( new NotebookInstanceStopped . IsStoppedMatcher ( ) , new NotebookInstanceStopped . IsFailedMatcher ( ) ) . withDefaultPollingStrategy ...
public class GISTrainer { /** * Use this model to evaluate a context and populate the specified outsums array with the * likelihood of each outcome given that context . * @ param context The integers of the predicates which have been * observed at the present decision point . */ public void eval ( int [ ] context...
for ( int oid = 0 ; oid < numOutcomes ; oid ++ ) { outsums [ oid ] = iprob ; numfeats [ oid ] = 0 ; } int [ ] activeOutcomes ; double [ ] activeParameters ; for ( int i = 0 ; i < context . length ; i ++ ) { Context predParams = params [ context [ i ] ] ; activeOutcomes = predParams . getOutcomes ( ) ; activeParameters ...
public class Neighbours { /** * Recovers the Neighbours from the MessageStore * @ exception MessageStoreException Thrown if there was a failure * recovering the Neighbours . */ protected void recoverNeighbours ( ) throws MessageStoreException , SIResourceException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "recoverNeighbours" ) ; NonLockingCursor cursor = null ; try { cursor = _proxyHandler . newNonLockingItemStreamCursor ( new ClassEqualsFilter ( Neighbour . class ) ) ; AbstractItem item = null ; while ( ( item = cursor . nex...
public class AllConnectConnectionHolder { /** * 从亚健康丢到重试列表 * @ param providerInfo Provider * @ param transport 连接 */ protected void subHealthToRetry ( ProviderInfo providerInfo , ClientTransport transport ) { } }
providerLock . lock ( ) ; try { if ( subHealthConnections . remove ( providerInfo ) != null ) { retryConnections . put ( providerInfo , transport ) ; } } finally { providerLock . unlock ( ) ; }
public class SqlParamUtils { /** * 評価式の探索 * @ param node SQLノード * @ param params パラメータが見つかった場合に格納するSetオブジェクト */ private static void traverseExpression ( final ognl . Node node , final Set < String > params ) { } }
if ( node == null ) { return ; } if ( node instanceof ASTProperty ) { ASTProperty prop = ( ASTProperty ) node ; params . add ( prop . toString ( ) ) ; } else { int childCount = node . jjtGetNumChildren ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { ognl . Node child = node . jjtGetChild ( i ) ; traverseExpression ( ...
public class LayerDrawable { /** * Initializes the constant state from the values in the typed array . */ private void updateStateFromTypedArray ( TypedArray a ) { } }
final LayerState state = mLayerState ; // Account for any configuration changes . state . mChangingConfigurations |= TypedArrayCompat . getChangingConfigurations ( a ) ; // Extract the theme attributes , if any . state . mThemeAttrs = TypedArrayCompat . extractThemeAttrs ( a ) ; final int N = a . getIndexCount ( ) ; fo...
public class ReplicatedHashMap { /** * Creates a synchronized facade for a ReplicatedMap . All methods which * change state are invoked through a monitor . This is similar to * { @ link java . util . Collections . SynchronizedMap # synchronizedMap ( Map ) } , but also includes the replication * methods ( starting...
return new SynchronizedReplicatedMap < > ( map ) ;
public class JazzyHelper { /** * Notifies the OnScrollListener of an onScroll event , since JazzyListView is the primary listener for onScroll events . */ private void notifyAdditionalOnScrollListener ( AbsListView view , int firstVisibleItem , int visibleItemCount , int totalItemCount ) { } }
if ( mAdditionalOnScrollListener != null ) { mAdditionalOnScrollListener . onScroll ( view , firstVisibleItem , visibleItemCount , totalItemCount ) ; }
public class SchemaBuilder { /** * Starts a CREATE TYPE query with the given type name for the given keyspace name . */ @ NonNull public static CreateTypeStart createType ( @ Nullable CqlIdentifier keyspace , @ NonNull CqlIdentifier typeName ) { } }
return new DefaultCreateType ( keyspace , typeName ) ;
public class RequirePluginVersions { /** * Resolve plugin . * @ param plugin the plugin * @ param project the project * @ return the plugin */ protected Plugin resolvePlugin ( Plugin plugin , MavenProject project ) { } }
@ SuppressWarnings ( "unchecked" ) List < ArtifactRepository > pluginRepositories = project . getPluginArtifactRepositories ( ) ; Artifact artifact = factory . createPluginArtifact ( plugin . getGroupId ( ) , plugin . getArtifactId ( ) , VersionRange . createFromVersion ( "LATEST" ) ) ; try { this . resolver . resolve ...
public class JacksonDBCollection { /** * Wraps a DB collection in a JacksonDBCollection * @ param dbCollection The DB collection to wrap * @ param type The type of objects to deserialise to * @ param keyType The type of the objects key * @ return The wrapped collection */ public static < T , K > JacksonDBCollec...
return new JacksonDBCollection < T , K > ( dbCollection , DEFAULT_OBJECT_MAPPER . constructType ( type ) , DEFAULT_OBJECT_MAPPER . constructType ( keyType ) , DEFAULT_OBJECT_MAPPER , null ) ;
public class Maze2D { /** * Returns a set of points that are different with respect this maze . * Both mazes must have same size . * @ param to maze to be compared . * @ return set of different points . */ public Set < Point > diff ( Maze2D to ) { } }
char [ ] [ ] maze1 = this . getMazeCharArray ( ) ; char [ ] [ ] maze2 = to . getMazeCharArray ( ) ; Set < Point > differentLocations = new HashSet < Point > ( ) ; for ( int row = 0 ; row < this . rows ; row ++ ) { for ( int column = 0 ; column < this . columns ; column ++ ) { if ( maze1 [ row ] [ column ] != maze2 [ ro...
public class FessMessages { /** * Add the created action message for the key ' errors . property _ type _ double ' with parameters . * < pre > * message : { 0 } should be numeric . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ param arg0 The parameter arg0 for message . ( ...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_property_type_double , arg0 ) ) ; return this ;
public class DefaultParser { /** * Handles the following tokens : * - - L = V * - L = V * - - l = V * - l = V * @ param token the command line token to handle */ private void handleLongOptionWithEqual ( String token ) throws ParseException { } }
int pos = token . indexOf ( '=' ) ; String value = token . substring ( pos + 1 ) ; String opt = token . substring ( 0 , pos ) ; List < String > matchingOpts = options . getMatchingOptions ( opt ) ; if ( matchingOpts . isEmpty ( ) ) { handleUnknownToken ( currentToken ) ; } else if ( matchingOpts . size ( ) > 1 ) { thro...
public class AbstractDatabase { /** * Purges the given document from the database . This is more drastic than delete ( Document ) , * it removes all traces of the document . The purge will NOT be replicated to other databases . * @ param document */ public void purge ( @ NonNull Document document ) throws Couchbase...
if ( document == null ) { throw new IllegalArgumentException ( "document cannot be null." ) ; } if ( document . isNewDocument ( ) ) { throw new CouchbaseLiteException ( "Document doesn't exist in the database." , CBLError . Domain . CBLITE , CBLError . Code . NOT_FOUND ) ; } synchronized ( lock ) { prepareDocument ( do...
public class sdxtools_image { /** * Use this API to fetch filtered set of sdxtools _ image resources . * set the filter parameter values in filtervalue object . */ public static sdxtools_image [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { } }
sdxtools_image obj = new sdxtools_image ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; sdxtools_image [ ] response = ( sdxtools_image [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class Sneaky { /** * Wrap a { @ link CheckedFunction } in a { @ link Function } . * Example : * < code > < pre > * map . computeIfAbsent ( " key " , Unchecked . function ( k - > { * if ( k . length ( ) > 10) * throw new Exception ( " Only short strings allowed " ) ; * return 42; * < / pre > < / cod...
return Unchecked . function ( function , Unchecked . RETHROW_ALL ) ;
public class AmazonSimpleEmailServiceClient { /** * Adds an email address to the list of identities for your Amazon SES account in the current AWS Region and * attempts to verify it . As a result of executing this operation , a customized verification email is sent to the * specified address . * To use this opera...
request = beforeClientExecution ( request ) ; return executeSendCustomVerificationEmail ( request ) ;
public class AndExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case SimpleAntlrPackage . AND_EXPRESSION__LEFT : setLeft ( ( Expression ) null ) ; return ; case SimpleAntlrPackage . AND_EXPRESSION__RIGHT : setRight ( ( Expression ) null ) ; return ; } super . eUnset ( featureID ) ;
public class StartOnDemandReplicationRunRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StartOnDemandReplicationRunRequest startOnDemandReplicationRunRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( startOnDemandReplicationRunRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startOnDemandReplicationRunRequest . getReplicationJobId ( ) , REPLICATIONJOBID_BINDING ) ; protocolMarshaller . marshall ( startOnDemandReplicationRu...
public class JITOptions { /** * Package private method to obtain the keys stored in these * options . Also used on native side . * @ return The keys of these options */ int [ ] getKeys ( ) { } }
Set < Integer > keySet = map . keySet ( ) ; int keys [ ] = new int [ keySet . size ( ) ] ; int index = 0 ; for ( Integer key : keySet ) { keys [ index ] = key ; index ++ ; } return keys ;
public class CountCollection { /** * Gets list . * @ return the list */ public List < T > getList ( ) { } }
final ArrayList < T > list = new ArrayList < T > ( ) ; for ( final Entry < T , AtomicInteger > e : this . map . entrySet ( ) ) { for ( int i = 0 ; i < e . getValue ( ) . get ( ) ; i ++ ) { list . add ( e . getKey ( ) ) ; } } return list ;
public class WorkflowsInner { /** * Enables a workflow . * @ param resourceGroupName The resource group name . * @ param workflowName The workflow name . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail ...
return ServiceFuture . fromResponse ( enableWithServiceResponseAsync ( resourceGroupName , workflowName ) , serviceCallback ) ;
public class CalendarCodeGenerator { /** * The CLDR contains 4 standard pattern types for date and time : short , medium , long and full . * This generates a switch statement to format patterns of this type . * See CLDR " dateFormats " and " timeFormats " nodes . */ private MethodSpec buildTypedPatternMethod ( Stri...
MethodSpec . Builder method = MethodSpec . methodBuilder ( methodName ) . addAnnotation ( Override . class ) . addModifiers ( PUBLIC ) . addParameter ( CALENDAR_FORMAT , "type" ) . addParameter ( ZonedDateTime . class , "d" ) . addParameter ( StringBuilder . class , "b" ) ; method . beginControlFlow ( "if (type == null...
public class Utils { /** * Decode the given hex string to binary and then re - encoded it as a Base64 string . * @ param hexValue String of hexadecimal characters . * @ return Decoded binary value re - encoded with Base64. * @ throws IllegalArgumentException If the given value is null or invalid . */ public stati...
byte [ ] binary = DatatypeConverter . parseHexBinary ( hexValue ) ; return base64FromBinary ( binary ) ;
public class HMap { /** * Static factory method for creating an HMap from three given associations . * @ param key1 the first mapped key * @ param value1 the value mapped at key1 * @ param key2 the second mapped key * @ param value2 the value mapped at key2 * @ param key3 the third mapped key * @ param valu...
return hMap ( key1 , value1 , key2 , value2 ) . put ( key3 , value3 ) ;
public class GenericUtils { /** * Finds the generic type for the given interface for the given class element . * For example , for < code > class AProvider implements Provider & lt ; A & gt ; < / code > * element = AProvider * interfaceName = interface javax . inject . Provider * return A * @ param element Th...
List < ? extends TypeMirror > typeMirrors = interfaceGenericTypesFor ( element , interfaceName ) ; return typeMirrors . isEmpty ( ) ? null : typeMirrors . get ( 0 ) ;
public class Matrix4d { /** * Apply a model transformation to this matrix for a right - handed coordinate system , * that aligns the local < code > + Z < / code > axis with < code > ( dirX , dirY , dirZ ) < / code > . * If < code > M < / code > is < code > this < / code > matrix and < code > L < / code > the lookat...
return rotateTowards ( dirX , dirY , dirZ , upX , upY , upZ , this ) ;
public class ProducerService { /** * Adds publication - specific metadata to the message . * @ param channel The message channel . * @ param message The message . * @ param recipients The message recipients . * @ return The original message . */ private Message prepare ( String channel , Message message , Recip...
message . setMetadata ( "cwf.pub.node" , nodeId ) ; message . setMetadata ( "cwf.pub.channel" , channel ) ; message . setMetadata ( "cwf.pub.event" , UUID . randomUUID ( ) . toString ( ) ) ; message . setMetadata ( "cwf.pub.when" , System . currentTimeMillis ( ) ) ; message . setMetadata ( "cwf.pub.recipients" , recipi...
public class AutoFormatView { /** * Return the first view with the given content type . * @ param contentType * @ return */ public View viewByContentType ( String contentType ) { } }
for ( View view : views . values ( ) ) { if ( view . getContentType ( ) . equals ( contentType ) ) { return view ; } } return null ;
public class ImportInstanceTaskDetails { /** * The volumes . * @ return The volumes . */ public java . util . List < ImportInstanceVolumeDetailItem > getVolumes ( ) { } }
if ( volumes == null ) { volumes = new com . amazonaws . internal . SdkInternalList < ImportInstanceVolumeDetailItem > ( ) ; } return volumes ;
public class FunctionsInner { /** * Updates an existing function under an existing streaming job . This can be used to partially update ( ie . update one or two properties ) a function without affecting the rest the job or function definition . * @ param resourceGroupName The name of the resource group that contains ...
return updateWithServiceResponseAsync ( resourceGroupName , jobName , functionName , function ) . toBlocking ( ) . single ( ) . body ( ) ;
public class RESTAuthHelper { /** * Ensures that the given { @ code principal } has specified { @ code permission } on the given { @ code resource } . * @ param authHeader contents of an HTTP Authorization header * @ param resource representation of the resource being accessed * @ param principal the identity of ...
if ( ! isAuthorized ( authHeader , resource , principal , permission ) ) { throw new AuthorizationException ( String . format ( "Failed to authorize for resource [%s]" , resource ) , Response . Status . FORBIDDEN . getStatusCode ( ) ) ; }
public class NumberFormatterDemo { /** * Format numbers in this locale for several currencies . */ private static void money ( CLDR . Locale locale , CLDR . Currency [ ] currencies , String [ ] numbers , CurrencyFormatOptions opts ) { } }
for ( CLDR . Currency currency : currencies ) { System . out . println ( "Currency " + currency ) ; for ( String num : numbers ) { BigDecimal n = new BigDecimal ( num ) ; NumberFormatter fmt = CLDR . get ( ) . getNumberFormatter ( locale ) ; StringBuilder buf = new StringBuilder ( " " ) ; fmt . formatCurrency ( n , cu...
public class JobUploader { /** * Creates the Job folder on the DFS . * @ param applicationId * @ return a reference to the JobFolder that can be used to upload files to it . * @ throws IOException */ public JobFolder createJobFolderWithApplicationId ( final String applicationId ) throws IOException { } }
final Path jobFolderPath = jobSubmissionDirectoryProvider . getJobSubmissionDirectoryPath ( applicationId ) ; final String finalJobFolderPath = jobFolderPath . toString ( ) ; LOG . log ( Level . FINE , "Final job submission Directory: " + finalJobFolderPath ) ; return createJobFolder ( finalJobFolderPath ) ;
public class JerseyClientBuilder { /** * Uses the given { @ link ExecutorService } and { @ link ObjectMapper } . * @ param executorService a thread pool * @ param objectMapper an object mapper * @ return { @ code this } * @ see # using ( io . dropwizard . setup . Environment ) */ public JerseyClientBuilder usin...
this . executorService = executorService ; this . objectMapper = objectMapper ; return this ;
public class DeferredLintHandler { /** * Invoke all { @ link LintLogger } s that were associated with the provided { @ code pos } . */ public void flush ( DiagnosticPosition pos ) { } }
ListBuffer < LintLogger > loggers = loggersQueue . get ( pos ) ; if ( loggers != null ) { for ( LintLogger lintLogger : loggers ) { lintLogger . report ( ) ; } loggersQueue . remove ( pos ) ; }
public class Table { /** * Open the table , flush all rows from start , but do not freeze the table * @ param util a XMLUtil instance for writing XML * @ param appendable where to write * @ throws IOException if an I / O error occurs during the flush */ public void flushAllAvailableRows ( final XMLUtil util , fin...
this . appender . flushAllAvailableRows ( util , appendable ) ;
public class DescribeVpcEndpointServicesResult { /** * A list of supported services . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setServiceNames ( java . util . Collection ) } or { @ link # withServiceNames ( java . util . Collection ) } if you want to ...
if ( this . serviceNames == null ) { setServiceNames ( new com . amazonaws . internal . SdkInternalList < String > ( serviceNames . length ) ) ; } for ( String ele : serviceNames ) { this . serviceNames . add ( ele ) ; } return this ;
public class AlgorithmValidationSpecification { /** * An array of < code > AlgorithmValidationProfile < / code > objects , each of which specifies a training job and batch * transform job that Amazon SageMaker runs to validate your algorithm . * @ param validationProfiles * An array of < code > AlgorithmValidatio...
if ( validationProfiles == null ) { this . validationProfiles = null ; return ; } this . validationProfiles = new java . util . ArrayList < AlgorithmValidationProfile > ( validationProfiles ) ;
public class JdbcCpoXaAdapter { /** * Iterates through a collection of Objects , creates and stores them in the datasource . The assumption is that the * objects contained in the collection do not exist in the datasource . * This method creates and stores the objects in the datasource . The objects in the collectio...
return getCurrentResource ( ) . insertObjects ( coll ) ;
public class DefaultOpenAPIModelFilter { /** * { @ inheritDoc } */ @ Override public Link visitLink ( Context context , String key , Link link ) { } }
return link ;
public class Sheet { /** * Adds eval scripts to update the bad data array in the sheet to render validation failures produced by the most recent ajax update attempt . * @ param context the FacesContext */ public void renderBadUpdateScript ( final FacesContext context ) { } }
final String widgetVar = resolveWidgetVar ( ) ; final String invalidValue = getInvalidDataValue ( ) ; StringBuilder sb = new StringBuilder ( "PF('" + widgetVar + "')" ) ; sb . append ( ".cfg.errors=" ) ; sb . append ( invalidValue ) ; sb . append ( ";" ) ; sb . append ( "PF('" + widgetVar + "')" ) ; sb . append ( ".ht....
public class Preconditions { /** * An { @ code int } specialized version of { @ link # checkPrecondition ( Object , * boolean , Function ) } . * @ param value The value * @ param condition The predicate * @ param describer The describer for the predicate * @ return value * @ throws PreconditionViolationExce...
return innerCheckI ( value , condition , describer ) ;
public class InferenceSpecificationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( InferenceSpecification inferenceSpecification , ProtocolMarshaller protocolMarshaller ) { } }
if ( inferenceSpecification == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( inferenceSpecification . getContainers ( ) , CONTAINERS_BINDING ) ; protocolMarshaller . marshall ( inferenceSpecification . getSupportedTransformInstanceTypes ( ...
public class PropertiesPropertyResolver { /** * Resolves a property based on it ' s name . * @ param propertyName property name to be resolved * @ return value of property or null if property is not set or is empty . */ public String findProperty ( final String propertyName ) { } }
String value = null ; if ( m_properties != null ) { value = m_properties . getProperty ( propertyName ) ; } return value ;
public class DeleteMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Delete delete , ProtocolMarshaller protocolMarshaller ) { } }
if ( delete == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( delete . getKey ( ) , KEY_BINDING ) ; protocolMarshaller . marshall ( delete . getTableName ( ) , TABLENAME_BINDING ) ; protocolMarshaller . marshall ( delete . getConditionExpre...