signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ForkedJvmInfo { /** * Return the { @ link Charset } used to encode stream bytes from the slave . */ public Charset getCharset ( ) { } }
if ( bootstrapEvent != null ) { return Charset . forName ( bootstrapEvent . getDefaultCharsetName ( ) ) ; } else { return Charset . defaultCharset ( ) ; }
public class KeyVaultClientBaseImpl { /** * Updates a certificate operation . * Updates a certificate creation operation that is already in progress . This operation requires the certificates / update permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vault . azure . net . * @ ...
return updateCertificateOperationWithServiceResponseAsync ( vaultBaseUrl , certificateName , cancellationRequested ) . toBlocking ( ) . single ( ) . body ( ) ;
public class DeprecatedAPIListBuilder { /** * Add the members into a single list of deprecated members . * @ param rset set of elements deprecated for removal . * @ param sset set of deprecated elements . * @ param list List of all the particular deprecated members , e . g . methods . * @ param members members ...
for ( Element member : members ) { if ( utils . isDeprecatedForRemoval ( member ) ) { rset . add ( member ) ; } if ( utils . isDeprecated ( member ) ) { sset . add ( member ) ; } }
public class TransformsInner { /** * Create or Update Transform . * Creates or updates a new Transform . * @ param resourceGroupName The name of the resource group within the Azure subscription . * @ param accountName The Media Services account name . * @ param transformName The Transform name . * @ param par...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , accountName , transformName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class FunctionOneArg { /** * Set an argument expression for a function . This method is called by the * XPath compiler . * @ param arg non - null expression that represents the argument . * @ param argNum The argument number index . * @ throws WrongNumberArgsException If the argNum parameter is greater t...
if ( 0 == argNum ) { m_arg0 = arg ; arg . exprSetParent ( this ) ; } else reportWrongNumberArgs ( ) ;
public class FadableImageSprite { /** * Puts this sprite on the specified path and fades it in over the specified duration . * @ param path the path to move along * @ param fadePortion the portion of time to spend fading in , from 0.0f ( no time ) to 1.0f ( the * entire time ) */ public void moveAndFadeIn ( Path ...
move ( path ) ; setAlpha ( 0.0f ) ; _fadeInDuration = ( long ) ( pathDuration * fadePortion ) ;
public class DocumentServiceException { /** * The return status of a document upload request , < code > error < / code > or < code > success < / code > . * @ param status * The return status of a document upload request , < code > error < / code > or < code > success < / code > . */ @ com . fasterxml . jackson . an...
this . status = status ;
public class NFLockFreeLogger { /** * ( non - Javadoc ) * @ see org . apache . log4j . Category # removeAppender ( org . apache . log4j . Appender ) */ @ Override public void removeAppender ( Appender appender ) { } }
if ( appender == null || aai == null ) { return ; } boolean wasAttached = aai . isAttached ( appender ) ; aai . removeAppender ( appender ) ; if ( wasAttached ) { fireRemoveAppenderEvent ( appender ) ; }
public class AppendableVec { /** * reads , plus computes rows - per - chunk , min / max / mean , etc . */ public Vec close ( Futures fs ) { } }
// Compute # chunks int nchunk = _espc . length ; DKV . remove ( chunkKey ( nchunk ) , fs ) ; // remove potential trailing key while ( nchunk > 0 && _espc [ nchunk - 1 ] == 0 ) { nchunk -- ; DKV . remove ( chunkKey ( nchunk ) , fs ) ; // remove potential trailing key } boolean hasNumber = false , hasEnum = false , hasT...
public class AmazonEC2Client { /** * Deletes the specified subnet . You must terminate all running instances in the subnet before you can delete the * subnet . * @ param deleteSubnetRequest * @ return Result of the DeleteSubnet operation returned by the service . * @ sample AmazonEC2 . DeleteSubnet * @ see < ...
request = beforeClientExecution ( request ) ; return executeDeleteSubnet ( request ) ;
public class FLVReader { /** * Get the current position in a file or ByteBuffer . * @ return Current position in a file */ private long getCurrentPosition ( ) { } }
long pos ; if ( ! useLoadBuf ) { return in . position ( ) ; } try { if ( in != null ) { pos = ( channel . position ( ) - in . remaining ( ) ) ; } else { pos = channel . position ( ) ; } return pos ; } catch ( Exception e ) { log . error ( "Error getCurrentPosition" , e ) ; return 0 ; }
public class RuleDescrVisitor { /** * End leaf * @ param descr * @ return */ private RuleEval visitEvalDescr ( EvalDescr descr ) { } }
RuleEval eval = new RuleEval ( rule ) ; eval . setContent ( descr . getContent ( ) . toString ( ) ) ; eval . setClassMethodName ( descr . getClassMethodName ( ) ) ; eval . setOrderNumber ( orderNumber . next ( ) ) ; eval . setParentPath ( rule . getPath ( ) ) ; eval . setParentType ( rule . getVerifierComponentType ( )...
public class CommerceWarehouseItemLocalServiceBaseImpl { /** * Creates a new commerce warehouse item with the primary key . Does not add the commerce warehouse item to the database . * @ param commerceWarehouseItemId the primary key for the new commerce warehouse item * @ return the new commerce warehouse item */ @...
return commerceWarehouseItemPersistence . create ( commerceWarehouseItemId ) ;
public class WebcamUpdater { /** * Return currently available image . This method will return immediately while it was been * called after camera has been open . In case when there are parallel threads running and there * is a possibility to call this method in the opening time , or before camera has been open at ...
int i = 0 ; while ( image . get ( ) == null ) { // Just in case if another thread starts calling this method before // updater has been properly started . This will loop while image is // not available . try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } // Return n...
public class DirectionsApiRequest { /** * The list of waypoints as latitude / longitude locations . * < p > See { @ link # waypoints ( Waypoint . . . ) } . * @ param waypoints The waypoints to add to this directions request . * @ return Returns this { @ code DirectionsApiRequest } for call chaining . */ public Di...
Waypoint [ ] objWaypoints = new Waypoint [ waypoints . length ] ; for ( int i = 0 ; i < waypoints . length ; i ++ ) { objWaypoints [ i ] = new Waypoint ( waypoints [ i ] ) ; } return waypoints ( objWaypoints ) ;
public class LoggingClientBuilder { /** * Returns a newly - created { @ link LoggingClient } decorating { @ code delegate } based on the properties of * this builder . */ public < I extends Request , O extends Response > LoggingClient < I , O > build ( Client < I , O > delegate ) { } }
return new LoggingClient < > ( delegate , requestLogLevel ( ) , successfulResponseLogLevel ( ) , failedResponseLogLevel ( ) , requestHeadersSanitizer ( ) , requestContentSanitizer ( ) , requestTrailersSanitizer ( ) , responseHeadersSanitizer ( ) , responseContentSanitizer ( ) , responseTrailersSanitizer ( ) , responseC...
public class ListAvailableSolutionStacksResult { /** * A list of available solution stacks . * @ return A list of available solution stacks . */ public java . util . List < String > getSolutionStacks ( ) { } }
if ( solutionStacks == null ) { solutionStacks = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return solutionStacks ;
public class ScanObjectH3 { /** * Reads the Hessian value as an object . */ byte [ ] readBinary ( ) throws IOException { } }
TempOutputStream tos = new TempOutputStream ( ) ; while ( true ) { int ch = read ( ) ; int len ; switch ( ch ) { default : _peek = ch ; return tos . toByteArray ( ) ; case 0x20 : case 0x21 : case 0x22 : case 0x23 : case 0x24 : case 0x25 : case 0x26 : case 0x27 : case 0x28 : case 0x29 : case 0x2a : case 0x2b : case 0x2c...
public class Arguments { /** * Parses each argument and adds them to the collection of arguments ignoring any { @ code null } values . * @ param args the arguments to add * @ see # add ( String ) */ public void addAll ( final String ... args ) { } }
if ( args != null ) { for ( String arg : args ) { add ( arg ) ; } }
public class GPGFileDecryptor { /** * Private util function that finds the private key from keyring collection based on keyId and passPhrase * @ param pgpSec keyring collection * @ param keyID keyID for this encryption file * @ param passPhrase passPhrase for this encryption file * @ throws PGPException */ priv...
PGPSecretKey pgpSecKey = pgpSec . getSecretKey ( keyID ) ; if ( pgpSecKey == null ) { return null ; } return pgpSecKey . extractPrivateKey ( new JcePBESecretKeyDecryptorBuilder ( ) . setProvider ( BouncyCastleProvider . PROVIDER_NAME ) . build ( passPhrase . toCharArray ( ) ) ) ;
public class CmsJspTagHeadIncludes { /** * @ return < code > EVAL _ PAGE < / code > * @ see javax . servlet . jsp . tagext . Tag # doEndTag ( ) * @ throws JspException by interface default */ @ Override public int doEndTag ( ) throws JspException { } }
ServletRequest req = pageContext . getRequest ( ) ; CmsFlexController controller = CmsFlexController . getController ( req ) ; CmsObject cms = controller . getCmsObject ( ) ; try { if ( TYPE_CSS . equals ( m_type ) ) { tagCssAction ( cms , ( HttpServletRequest ) req ) ; } if ( TYPE_JAVASCRIPT . equals ( m_type ) ) { ta...
public class JTune { /** * Return the JNote that have the highest bounding box * @ return a JNote . May return < code > null < / code > if exclude is true and no notes between start and end ! */ private JNoteElementAbstract getHighestNoteGlyphBetween ( NoteAbstract start , NoteAbstract end , boolean excludeStartAndEn...
Collection jnotes = getNoteGlyphesBetween ( start , end ) ; JNoteElementAbstract ret = null ; boolean first = true ; for ( Iterator it = jnotes . iterator ( ) ; it . hasNext ( ) ; ) { JNoteElementAbstract n = ( JNoteElementAbstract ) it . next ( ) ; if ( first && excludeStartAndEnd ) { // ignore start ? first = false ;...
public class RegionDiskClient { /** * Resizes the specified regional persistent disk . * < p > Sample code : * < pre > < code > * try ( RegionDiskClient regionDiskClient = RegionDiskClient . create ( ) ) { * ProjectRegionDiskName disk = ProjectRegionDiskName . of ( " [ PROJECT ] " , " [ REGION ] " , " [ DISK ] ...
ResizeRegionDiskHttpRequest request = ResizeRegionDiskHttpRequest . newBuilder ( ) . setDisk ( disk == null ? null : disk . toString ( ) ) . setRegionDisksResizeRequestResource ( regionDisksResizeRequestResource ) . build ( ) ; return resizeRegionDisk ( request ) ;
public class SingleServiceWrapperInterceptor { /** * Checks if the method being invoked should be wrapped by a service . * It looks the method name up in the methodList . If its in the list , then * the method should be wrapped . If the list is null , then all methods * are wrapped . * @ param methodName The me...
if ( methodList == null ) { return true ; // Wrap all by default } if ( methodList . contains ( methodName ) ) { return true ; // Wrap a specific method } // If I get to this point , I should not wrap the call . return false ;
public class BSUImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . BSU__LID : setLID ( LID_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class Validator { /** * Registers the newly created tree for rendezvous in Stage . ANTIENTROPY . */ public void complete ( ) { } }
completeTree ( ) ; StageManager . getStage ( Stage . ANTI_ENTROPY ) . execute ( this ) ; if ( logger . isDebugEnabled ( ) ) { // log distribution of rows in tree logger . debug ( "Validated {} partitions for {}. Partitions per leaf are:" , validated , desc . sessionId ) ; tree . histogramOfRowCountPerLeaf ( ) . log ( ...
public class JsonConfig { /** * Registers a JsonBeanProcessor . < br > * [ Java - & gt ; JSON ] * @ param target the class to use as key * @ param jsonBeanProcessor the processor to register */ public void registerJsonBeanProcessor ( Class target , JsonBeanProcessor jsonBeanProcessor ) { } }
if ( target != null && jsonBeanProcessor != null ) { beanProcessorMap . put ( target , jsonBeanProcessor ) ; }
public class TruggerGenericTypeResolver { /** * Resolve the specified generic type against the given TypeVariable map . * @ param genericType the generic type to resolve * @ param typeVariableMap the TypeVariable Map to resolved against * @ return the type if it resolves to a Class , or < code > Object . class ot...
Type rawType = getRawType ( genericType , typeVariableMap ) ; return ( rawType instanceof Class ? ( Class ) rawType : Object . class ) ;
public class MoreElements { /** * Returns the set of all non - private methods from { @ code type } , including methods that it * inherits from its ancestors . Inherited methods that are overridden are not included in the * result . So if { @ code type } defines { @ code public String toString ( ) } , the returned ...
Overrides overrides = new Overrides . NativeOverrides ( elementUtils ) ; return getLocalAndInheritedMethods ( type , overrides ) ;
public class InternalXbaseParser { /** * InternalXbase . g : 1866:1 : entryRuleValidID : ruleValidID EOF ; */ public final void entryRuleValidID ( ) throws RecognitionException { } }
try { // InternalXbase . g : 1867:1 : ( ruleValidID EOF ) // InternalXbase . g : 1868:1 : ruleValidID EOF { if ( state . backtracking == 0 ) { before ( grammarAccess . getValidIDRule ( ) ) ; } pushFollow ( FOLLOW_1 ) ; ruleValidID ( ) ; state . _fsp -- ; if ( state . failed ) return ; if ( state . backtracking == 0 ) {...
public class JSAnonymousFunction { /** * Get the block that makes up body of this function * @ return Body of function */ @ Nonnull public JSBlock body ( ) { } }
if ( m_aBody == null ) m_aBody = new JSBlock ( ) . newlineAtEnd ( false ) ; return m_aBody ;
public class HeaderIndexFile { /** * Reads x bytes from the file to the given ByteBuffer ( position was set to zero ) , where x is the minimum of the * capacity of the buffer and the remaining written bytes in the file . The size of the HEADER will be respected * automatically . The position is set to the number of...
offset += contentStart ; destBuffer . clear ( ) ; int length = destBuffer . capacity ( ) ; if ( offset > filledUpTo ) { String errorMessage = "Tried to read data beginning at " + offset + " in File (max=" + filledUpTo + ") " + osFile . getName ( ) ; logger . debug ( errorMessage ) ; throw new IOException ( errorMessage...
public class ParallelRunner { /** * Delete a { @ link Path } . * This method submits a task to delete a { @ link Path } and returns immediately * after the task is submitted . * @ param path path to be deleted . */ public void deletePath ( final Path path , final boolean recursive ) { } }
this . futures . add ( new NamedFuture ( this . executor . submit ( new Callable < Void > ( ) { @ Override public Void call ( ) throws Exception { Lock lock = ParallelRunner . this . locks . get ( path . toString ( ) ) ; lock . lock ( ) ; try { HadoopUtils . deletePath ( ParallelRunner . this . fs , path , recursive ) ...
public class BenchmarkExecutor { /** * Executing the { @ link BeforeFirstRun } - annotated methods ( if still wasn ' t ) and the { @ link BeforeEachRun } methods . * @ param obj the object of the class where the bench runs currently in . */ public void executeBeforeMethods ( final Object obj ) { } }
// Invoke element only if not parameterized if ( this . element . getDataProvider ( ) == null ) { // invoking once the beforeFirstRun - method if ( ! beforeFirstRun ) { beforeFirstRun = true ; Method [ ] beforeFirst = null ; try { beforeFirst = element . findBeforeFirstRun ( ) ; if ( beforeFirst . length != 0 ) { check...
public class XMLUtils { /** * Get preferred SAX parser . * Preferred XML readers are in order : * < ol > * < li > { @ link Constants # SAX _ DRIVER _ DEFAULT _ CLASS Xerces } < / li > * < li > { @ link Constants # SAX _ DRIVER _ SUN _ HACK _ CLASS Sun ' s Xerces } < / li > * < li > { @ link Constants # SAX _ ...
XMLReader reader ; if ( System . getProperty ( SAX_DRIVER_PROPERTY ) != null ) { return XMLReaderFactory . createXMLReader ( ) ; } try { Class . forName ( SAX_DRIVER_DEFAULT_CLASS ) ; reader = XMLReaderFactory . createXMLReader ( SAX_DRIVER_DEFAULT_CLASS ) ; } catch ( final ClassNotFoundException e ) { try { Class . fo...
public class Similarity { /** * Computes the < a href = " http : / / en . wikipedia . org / wiki / Jaccard _ index " > Jaccard * index < / a > comparing the similarity both { @ code DoubleVector } s when viewed * as sets of samples . */ public static double jaccardIndex ( DoubleVector a , DoubleVector b ) { } }
Set < Double > intersection = new HashSet < Double > ( ) ; Set < Double > union = new HashSet < Double > ( ) ; for ( int i = 0 ; i < a . length ( ) ; ++ i ) { double d = a . get ( i ) ; intersection . add ( d ) ; union . add ( d ) ; } Set < Double > tmp = new HashSet < Double > ( ) ; for ( int i = 0 ; i < b . length ( ...
public class DescribeGroupRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeGroupRequest describeGroupRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeGroupRequest . getGroupName ( ) , GROUPNAME_BINDING ) ; protocolMarshaller . marshall ( describeGroupRequest . getAwsAccountId ( ) , AWSACCOUNTID_BINDING ) ...
public class MatrixParadigm { /** * Initialize a distance matrix . * @ param dq Distance query * @ return this */ public MatrixParadigm initializeWithDistances ( DistanceQuery < ? > dq ) { } }
final DBIDArrayIter ix = this . ix , iy = this . iy ; final double [ ] matrix = this . matrix ; int pos = 0 ; for ( ix . seek ( 0 ) ; ix . valid ( ) ; ix . advance ( ) ) { final int x = ix . getOffset ( ) ; assert ( pos == triangleSize ( x ) ) ; for ( iy . seek ( 0 ) ; iy . getOffset ( ) < x ; iy . advance ( ) ) { matr...
public class SoyListData { /** * Sets a data value at a given index . * @ param index The index . * @ param value The data to set . */ public void set ( int index , SoyData value ) { } }
if ( index == list . size ( ) ) { list . add ( ensureValidValue ( value ) ) ; } else { list . set ( index , ensureValidValue ( value ) ) ; }
public class MediaManagementApi { /** * Change the userData of bulk of interactions * Change the userData of bulk of interactions * @ param mgtManageUserData ( required ) * @ return ApiSuccessResponse * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body ...
ApiResponse < ApiSuccessResponse > resp = mgtManageUserDataWithHttpInfo ( mgtManageUserData ) ; return resp . getData ( ) ;
public class AbstractHibernateDao { /** * Get all by HQL with two pairs of parameterType - value * @ param secondHalfOfHql * @ param paramValue1 * @ param paramType1 * @ param paramValue2 * @ param paramType2 * @ return the query result */ public List < T > getAllByHql ( String secondHalfOfHql , Object para...
return getAllByHql ( secondHalfOfHql , new Object [ ] { paramValue1 , paramValue2 } , new Type [ ] { paramType2 , paramType2 } , null , null ) ;
public class PerspectiveOps { /** * Converts a calibration matrix into intrinsic parameters * @ param K Camera calibration matrix . * @ param width Image width in pixels * @ param height Image height in pixels * @ param output ( Output ) Where the intrinsic parameter are written to . If null then a new instance...
return ( C ) ImplPerspectiveOps_F64 . matrixToPinhole ( K , width , height , output ) ;
public class DialectFunctionTranslator { /** * = = = = = String Utils below = = = = = */ public static boolean isLetterNumber ( char c ) { } }
return ( c >= 'a' && c <= 'z' ) || ( c >= '0' && c <= '9' ) || ( c >= 'A' && c <= 'Z' ) || c == '_' || c == '.' || c == '@' || c == '#' || c == '$' || c == '+' || c == '-' ;
public class AstUtil { /** * Return true if the DeclarationExpression represents a ' final ' variable declaration . * NOTE : THIS IS A WORKAROUND . * There does not seem to be an easy way to determine whether the ' final ' modifier has been * specified for a variable declaration . Return true if the ' final ' is ...
if ( isFromGeneratedSourceCode ( declarationExpression ) ) { return false ; } List < Expression > variableExpressions = getVariableExpressions ( declarationExpression ) ; if ( ! variableExpressions . isEmpty ( ) ) { Expression variableExpression = variableExpressions . get ( 0 ) ; int startOfDeclaration = declarationEx...
public class SkillDetails { /** * The generic keywords associated with the skill that can be used to find a skill . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setGenericKeywords ( java . util . Collection ) } or { @ link # withGenericKeywords ( java . ut...
if ( this . genericKeywords == null ) { setGenericKeywords ( new java . util . ArrayList < String > ( genericKeywords . length ) ) ; } for ( String ele : genericKeywords ) { this . genericKeywords . add ( ele ) ; } return this ;
public class GenericRevisionInfo { /** * The deployment groups for which this is the current target revision . * @ return The deployment groups for which this is the current target revision . */ public java . util . List < String > getDeploymentGroups ( ) { } }
if ( deploymentGroups == null ) { deploymentGroups = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return deploymentGroups ;
public class SingleFileStore { /** * The base class implementation calls { @ link CacheLoader # loadEntry ( Object ) } for this , we can do better because * we keep all keys in memory . */ @ Override public boolean contains ( Object key ) { } }
FileEntry entry = entries . get ( key ) ; return entry != null && ! entry . isExpired ( timeService . wallClockTime ( ) ) ;
public class DateTime { /** * Parse the fractional seconds field from the input , returning the number of milliseconds and truncating extra places . */ private static int parseMillis ( Input s ) { } }
if ( s . index < s . len && s . getChar ( ) == '.' ) { int startIndex = ++ s . index ; int ms = parseInt ( s ) ; int len = s . index - startIndex ; for ( ; len < 3 ; len ++ ) ms *= 10 ; for ( ; len > 3 ; len -- ) ms /= 10 ; // truncate because it ' s easier than rounding . return ms ; } return 0 ;
public class BpsimFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public TimeUnit createTimeUnitObjectFromString ( EDataType eDataType , String initialValue ) { } }
return createTimeUnitFromString ( BpsimPackage . Literals . TIME_UNIT , initialValue ) ;
public class PrimaryKey { /** * Add a key component to this primary key . * Note adding a key component with the same name as that of an existing * one would overwrite and become a single key component instead of two . */ public PrimaryKey addComponent ( String keyAttributeName , Object keyAttributeValue ) { } }
components . put ( keyAttributeName , new KeyAttribute ( keyAttributeName , keyAttributeValue ) ) ; return this ;
public class SimpleThreadFactory { /** * Constructs and initializes a new { @ link Thread } . * @ param name name given to the new { @ link Thread } . * @ param task { @ link Runnable } task for the { @ link Thread } to execute . * @ return a new { @ link Thread } initialized by this factory . * @ throws Illega...
Assert . hasText ( name , "Thread name must be specified" ) ; Assert . notNull ( task , "Thread task must not be null" ) ; Thread thread = new Thread ( getThreadGroup ( ) , task , name ) ; thread . setContextClassLoader ( getContextClassLoader ( ) ) ; thread . setDaemon ( isDaemon ( ) ) ; thread . setPriority ( getPrio...
public class VirtualFlow { /** * Creates a viewport that lays out content horizontally */ public static < T , C extends Cell < T , ? > > VirtualFlow < T , C > createHorizontal ( ObservableList < T > items , Function < ? super T , ? extends C > cellFactory , Gravity gravity ) { } }
return new VirtualFlow < > ( items , cellFactory , new HorizontalHelper ( ) , gravity ) ;
public class Tuple15 { /** * Split this tuple into two tuples of degree 11 and 4. */ public final Tuple2 < Tuple11 < T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > , Tuple4 < T12 , T13 , T14 , T15 > > split11 ( ) { } }
return new Tuple2 < > ( limit11 ( ) , skip11 ( ) ) ;
public class PebbleKit { /** * A convenience function to assist in programatically registering a broadcast receiver for the ' DISCONNECTED ' * intent . * Go avoid leaking memory , activities registering BroadcastReceivers < em > must < / em > unregister them in the * Activity ' s { @ link android . app . Activity...
return registerBroadcastReceiverInternal ( context , INTENT_PEBBLE_DISCONNECTED , receiver ) ;
public class PrivateKeyRing { /** * Find a KeyExporter by public key * @ return key exporter */ public KeyExporter findKeyExporterByPublicKey ( PublicKey publicKey ) { } }
PrivateKey key = _privateKeys . get ( publicKey ) ; if ( key instanceof KeyExporter ) { return ( KeyExporter ) key ; } return null ;
public class CmsResourceTypesTable { /** * Init the table . < p > */ void init ( ) { } }
if ( m_container == null ) { m_container = new IndexedContainer ( ) ; setContainerDataSource ( m_container ) ; } else { m_container . removeAllContainerFilters ( ) ; m_container . removeAllItems ( ) ; } for ( TableProperty prop : TableProperty . values ( ) ) { m_container . addContainerProperty ( prop , prop . getType ...
public class CpuUtilisationWatch { /** * Gets the average CPU utilisation since the last call of { @ link CpuUtilisationWatch # start ( ) } * @ return the average CPU utilisation since the last call of { @ link CpuUtilisationWatch # start ( ) } */ public float getCpuUsagePercent ( ) { } }
if ( nanoBefore == null || cpuBefore == null ) { throw new IllegalStateException ( "nanoBefore or cpuBefore where null: nanoBefore: " + nanoBefore + ", " + " cpuBefore: " + cpuBefore ) ; } long cpuAfter = processCpuTime . getProcessCpuTime ( ) ; long nanoAfter = System . nanoTime ( ) ; float utilisation = ( ( float ) (...
public class IfcTelecomAddressImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < String > getTelephoneNumbers ( ) { } }
return ( EList < String > ) eGet ( Ifc4Package . Literals . IFC_TELECOM_ADDRESS__TELEPHONE_NUMBERS , true ) ;
public class AWSBatchClient { /** * Terminates a job in a job queue . Jobs that are in the < code > STARTING < / code > or < code > RUNNING < / code > state are * terminated , which causes them to transition to < code > FAILED < / code > . Jobs that have not progressed to the * < code > STARTING < / code > state ar...
request = beforeClientExecution ( request ) ; return executeTerminateJob ( request ) ;
public class TagConfig { /** * This will set the JavaScript support level for the id and name attributes . */ private static void setLegacyJavaScriptMode ( ) { } }
JspTagConfig tagConfig = ConfigUtil . getConfig ( ) . getJspTagConfig ( ) ; if ( tagConfig != null ) { javascriptMode = tagConfig . getIdJavascript ( ) . getValue ( ) ; } else { javascriptMode = IdJavascript . INT_DEFAULT ; }
public class DeviceProxyDAODefaultImpl { public void import_admin_device ( final DeviceProxy deviceProxy , final DbDevImportInfo info ) throws DevFailed { } }
checkIfTango ( deviceProxy , "import_admin_device()" ) ; /* * if ( deviceProxy . device = = null & & deviceProxy . devname ! = null ) * build _ connection ( deviceProxy ) ; */ // Get connection on administration device if ( deviceProxy . getAdm_dev ( ) == null ) { if ( DeviceProxyFactory . exists ( info . name ) ) { ...
public class Java9ConnectionDecorator { /** * { @ inheritDoc } */ @ Override public void setShardingKey ( ShardingKey shardingKey , ShardingKey superShardingKey ) throws SQLException { } }
getTarget ( ) . setShardingKey ( shardingKey , superShardingKey ) ;
public class Inflector { /** * Create a human name from a method name * @ param methodName The method name to get a human name * @ return The human name created */ public static String getHumanName ( String methodName ) { } }
char [ ] name = methodName . toCharArray ( ) ; StringBuilder humanName = new StringBuilder ( ) ; boolean digit = false ; boolean upper = true ; int upCount = 0 ; for ( int i = 0 ; i < name . length ; i ++ ) { if ( i == 0 ) { humanName . append ( Character . toUpperCase ( name [ i ] ) ) ; } else { humanName . append ( C...
public class EndlessScrollHelper { /** * An overload of { @ link # withNewItemsDeliveredTo ( ModelAdapter ) withNewItemsDeliveredTo ( ) } * that allows additional callbacks . * @ param modelItemAdapter * @ param extraOnNewItemsListener * @ return */ public EndlessScrollHelper < Model > withNewItemsDeliveredTo (...
mOnNewItemsListener = new DeliverToModelAdapter2 < > ( modelItemAdapter , extraOnNewItemsListener ) ; return this ;
public class HasMetadataOperation { /** * A wait method that combines watching and polling . * The need for that is that in some cases a pure watcher approach consistently fails . * @ param i The number of iterations to perform . * @ param started Time in milliseconds where the watch started . * @ param interva...
T item = fromServer ( ) . get ( ) ; if ( Readiness . isReady ( item ) ) { return item ; } ReadinessWatcher < T > watcher = new ReadinessWatcher < > ( item ) ; try ( Watch watch = watch ( item . getMetadata ( ) . getResourceVersion ( ) , watcher ) ) { try { return watcher . await ( interval , TimeUnit . MILLISECONDS ) ;...
public class Word2Vec { /** * Initialize the ModelBuilder , validating all arguments and preparing the * training frame . This call is expected to be overridden in the subclasses * and each subclass will start with " super . init ( ) ; " . * Verify that at the first column contains strings . Validate _ vec _ size...
super . init ( expensive ) ; if ( _parms . _train != null ) { // Can be called without an existing frame , but when present check for a string col if ( _parms . train ( ) . vecs ( ) . length == 0 || ! _parms . trainVec ( ) . isString ( ) ) error ( "_train" , "The first column of the training input frame has to be colum...
public class responderpolicy { /** * Use this API to unset the properties of responderpolicy resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , responderpolicy resource , String [ ] args ) throws Exception { } }
responderpolicy unsetresource = new responderpolicy ( ) ; unsetresource . name = resource . name ; return unsetresource . unset_resource ( client , args ) ;
public class AbstractSelectWhereJSON { /** * JSON API * */ @ Override public CompletableFuture < Tuple2 < List < String > , ExecutionInfo > > getListJSONAsyncWithStats ( ) { } }
final RuntimeEngine rte = getRte ( ) ; final CassandraOptions options = getOptions ( ) ; final StatementWrapper statementWrapper = getInternalBoundStatementWrapper ( ) ; if ( LOGGER . isTraceEnabled ( ) ) { LOGGER . trace ( format ( "Select async with execution info : %s" , statementWrapper . getBoundStatement ( ) . pr...
public class SerializationFormat { /** * Finds the { @ link SerializationFormat } with the specified { @ link # uriText ( ) } . */ public static Optional < SerializationFormat > find ( String uriText ) { } }
uriText = Ascii . toLowerCase ( requireNonNull ( uriText , "uriText" ) ) ; return Optional . ofNullable ( uriTextToFormats . get ( uriText ) ) ;
public class TrueTypeFontUnicode { /** * Gets the width of a < CODE > char < / CODE > in normalized 1000 units . * @ param char1 the unicode < CODE > char < / CODE > to get the width of * @ return the width in normalized 1000 units */ public int getWidth ( int char1 ) { } }
if ( vertical ) return 1000 ; if ( fontSpecific ) { if ( ( char1 & 0xff00 ) == 0 || ( char1 & 0xff00 ) == 0xf000 ) return getRawWidth ( char1 & 0xff , null ) ; else return 0 ; } else { return getRawWidth ( char1 , encoding ) ; }
public class SumStatsByMillisecondsFormular { public void calc ( CsvReader reader ) { } }
if ( reader == null || reader . isEmpty ( ) ) return ; init ( ) ; reader . sortRowsForIndexByType ( timeMsIndex , DataType . Long ) ; long tsMS , startTsMS = - 1 ; int size = reader . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { tsMS = reader . get ( i , timeMsIndex , DataType . Long ) ; this . currentVal = reader ...
public class TablePodImpl { /** * Notify the watches on the target server . */ @ Override public void notifyWatch ( byte [ ] key ) { } }
int hash = _table . getPodHash ( key ) ; TablePodNode node = getNode ( hash ) ; if ( node . isSelfOwner ( ) ) { _table . notifyWatch ( key ) ; } else { ServerBartender owner = node . getOwner ( ) ; ClusterServiceKraken proxy = _podKraken . getProxy ( owner . getId ( ) ) ; if ( proxy != null ) { proxy . notifyWatch ( _t...
public class Promises { /** * Returns an array with { @ code promise1 } and { @ code promise2 } results . */ @ SuppressWarnings ( "unchecked" ) @ Contract ( pure = true ) @ NotNull public static < T > Promise < T [ ] > toArray ( @ NotNull Class < T > type , @ NotNull Promise < ? extends T > promise1 , @ NotNull Promise...
return promise1 . combine ( promise2 , ( value1 , value2 ) -> { @ NotNull T [ ] array = ( T [ ] ) Array . newInstance ( type , 2 ) ; array [ 0 ] = value1 ; array [ 1 ] = value2 ; return array ; } ) ;
public class FileStoreDataSet { /** * List all of the sub - directories in a parent directory . * @ param parent Parent directory to search . * @ return All sub - directories under { @ code parent } . */ protected static File [ ] listDirs ( File parent ) { } }
return parent . listFiles ( new FileFilter ( ) { public boolean accept ( File file ) { return file . isDirectory ( ) ; } } ) ;
public class ResourcesInner { /** * Deletes a resource by ID . * @ param resourceId The fully qualified ID of the resource , including the resource name and resource type . Use the format , / subscriptions / { guid } / resourceGroups / { resource - group - name } / { resource - provider - namespace } / { resource - t...
deleteByIdWithServiceResponseAsync ( resourceId , apiVersion ) . toBlocking ( ) . last ( ) . body ( ) ;
public class MetadataService { /** * Restores a { @ link RepositoryMetadata } of the specified { @ code repoName } in the specified * { @ code projectName } . */ public CompletableFuture < Revision > restoreRepo ( Author author , String projectName , String repoName ) { } }
requireNonNull ( author , "author" ) ; requireNonNull ( projectName , "projectName" ) ; requireNonNull ( repoName , "repoName" ) ; final Change < JsonNode > change = Change . ofJsonPatch ( METADATA_JSON , new RemoveOperation ( JsonPointer . compile ( "/repos" + encodeSegment ( repoName ) + "/removal" ) ) . toJsonNode (...
public class Routes { /** * Gets the url of the given asset . Throws an exception if the asset cannot be found . * @ param path the asset ' s path * @ return the url */ public String asset ( String path ) { } }
Asset asset = assets . assetAt ( path ) ; if ( asset == null ) { // If the path starts with " / " , try without if ( path . startsWith ( "/" ) ) { return asset ( path . substring ( 1 ) ) ; } // Not found . throw new TemplateProcessingException ( "Cannot find the URL of the asset " + path ) ; } return asset . getPath ( ...
public class BaseRegistrationScreen { /** * Add all the screen listeners . */ public void addListeners ( ) { } }
super . addListeners ( ) ; this . getMainRecord ( ) . addListener ( new FileListener ( null ) { public int doRecordChange ( FieldInfo field , int iChangeType , boolean bDisplayOption ) { // Return an error to stop the change if ( iChangeType == DBConstants . AFTER_ADD_TYPE ) { strMessage = DBConstants . BLANK ; afterAd...
public class NotSupported { /** * < p > If called outside a transaction context , managed bean method execution * must then continue outside a transaction context . < / p > * < p > If called inside a transaction context , the current transaction context must * be suspended , the managed bean method execution must...
return runUnderUOWNoEnablement ( UOWSynchronizationRegistry . UOW_TYPE_LOCAL_TRANSACTION , true , context , "NOT_SUPPORTED" ) ;
public class ApiOvhDomain { /** * Zone restore points * REST : GET / domain / zone / { zoneName } / history * @ param creationDate _ to [ required ] Filter the value of creationDate property ( < = ) * @ param creationDate _ from [ required ] Filter the value of creationDate property ( > = ) * @ param zoneName [...
String qPath = "/domain/zone/{zoneName}/history" ; StringBuilder sb = path ( qPath , zoneName ) ; query ( sb , "creationDate.from" , creationDate_from ) ; query ( sb , "creationDate.to" , creationDate_to ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t3 ) ;
public class RedisClusterManagerFactory { /** * 创建一个新的redis实现的分布式管理器 * @ param host redis的主机地址 , 例如192.168.1.100 * @ param port redis的端口 , 例如8080 * @ param password 密码 * @ return redis实现的分布式锁管理器 */ public static RedisClusterManager newInstance ( String host , int port , String password ) { } }
return newInstance ( buildRedisConfig ( host , port , password ) ) ;
public class MtasSpanWildcardQuery { /** * ( non - Javadoc ) * @ see * org . apache . lucene . search . Query # rewrite ( org . apache . lucene . index . IndexReader ) */ @ Override public MtasSpanQuery rewrite ( IndexReader reader ) throws IOException { } }
Query q = query . rewrite ( reader ) ; if ( q instanceof SpanOrQuery ) { SpanQuery [ ] clauses = ( ( SpanOrQuery ) q ) . getClauses ( ) ; if ( clauses . length > MTAS_WILDCARD_EXPAND_BOUNDARY ) { // forward index solution ? throw new IOException ( "Wildcard expression \"" + CodecUtil . termValue ( term . text ( ) ) + "...
public class HttpClientResourceAdaptor { /** * Receives an Event from the HTTP client and sends it to the SLEE . * @ param event * @ param activity */ public void processResponseEvent ( ResponseEvent event , HttpClientActivity activity ) throws ActivityIsEndingException { } }
HttpClientActivityHandle ah = new HttpClientActivityHandle ( activity . getSessionId ( ) ) ; if ( tracer . isFineEnabled ( ) ) tracer . fine ( "==== FIRING ResponseEvent EVENT TO LOCAL SLEE, Event: " + event + " ====" ) ; try { resourceAdaptorContext . getSleeEndpoint ( ) . fireEvent ( ah , fireableEventType , event , ...
public class Mention { /** * Determines whether this { @ link Mention } contains the specified { @ link Mention } * @ param mention * @ return < code > true < / code > if this { @ link Mention } contains the specified { @ link Mention } , < code > false < / code > otherwise */ public boolean contains ( Mention ment...
return sentence . equals ( mention . sentence ) && start <= mention . start && end >= mention . end ;
public class OnSelectHandler { /** * Create the record message . * Override this to add information to the message . * @ param bookmark The bookmark of the record that is selected . * @ return The record message . */ public RecordMessage createMessage ( Object bookmark ) { } }
int iRecordMessageType = DBConstants . SELECT_TYPE ; RecordMessageHeader messageHeader = new RecordMessageHeader ( this . getOwner ( ) , bookmark , null , iRecordMessageType , null ) ; RecordMessage message = new RecordMessage ( messageHeader ) ; message . put ( RecordMessageHeader . UPDATE_ON_SELECT , new Boolean ( m_...
public class ServerVersionQuery { /** * Check if the server is reachable * @ param baseUrl The url of the server to test * @ param connectTimeout connection timeout * @ param timeUnit connection timeout unit * @ return true if reachable otherwise false . * @ throws IOException if an error occurs */ public sta...
OkHttpClient client = new OkHttpClient ( ) ; client . setConnectTimeout ( connectTimeout , timeUnit ) ; return isServerReachable ( baseUrl , client ) ;
public class OMVRBTree { /** * Returns the first Entry in the OMVRBTree ( according to the OMVRBTree ' s key - sort function ) . Returns null if the OMVRBTree is * empty . */ protected OMVRBTreeEntry < K , V > getFirstEntry ( ) { } }
OMVRBTreeEntry < K , V > p = root ; if ( p != null ) { if ( p . getSize ( ) > 0 ) pageIndex = 0 ; while ( p . getLeft ( ) != null ) p = p . getLeft ( ) ; } return p ;
public class CommerceWishListItemPersistenceImpl { /** * Returns the number of commerce wish list items where commerceWishListId = & # 63 ; and CPInstanceUuid = & # 63 ; and CProductId = & # 63 ; . * @ param commerceWishListId the commerce wish list ID * @ param CPInstanceUuid the cp instance uuid * @ param CProd...
FinderPath finderPath = FINDER_PATH_COUNT_BY_CW_CPI_CP ; Object [ ] finderArgs = new Object [ ] { commerceWishListId , CPInstanceUuid , CProductId } ; Long count = ( Long ) finderCache . getResult ( finderPath , finderArgs , this ) ; if ( count == null ) { StringBundler query = new StringBundler ( 4 ) ; query . append ...
public class JHelpPane { /** * Do some applet - wide action . * For example , submit or reset . * Here are how actions are handled : * When a BasePanel receives a command it calls it ' s doAction method . If the doAction * doesn ' t handle the action , it is passed to the parent ' s doAction method , until it ...
if ( source == this . getParent ( ) ) return false ; // Don ' t handle commands coming from the outside if ( source . getParent ( ) == this ) source = this . getParent ( ) ; // This will keep my commands from being passed to my parent return super . handleAction ( strAction , source , iOptions ) ;
public class CoreNaviRpcProcessor { /** * 处理请求并且响应结果 * @ param request * 请求 * @ param callback * 结果Callback * @ see com . baidu . beidou . navi . server . processor . NaviRpcProcessor # service ( com . baidu . beidou . navi . server . vo . NaviRpcRequest , * com . baidu . beidou . navi . server . callback ....
Object result = null ; long traceId = 0L ; try { RequestDTO requestDTO = request . getRequestDTO ( ) ; Preconditions . checkNotNull ( requestDTO , "Please ensure serialize filter works before the core processor!" ) ; traceId = requestDTO . getTraceId ( ) ; result = execute ( request . getExporter ( ) . getServiceInterf...
public class ChannelFinderClientImpl { /** * Remove the tag < tt > tag < / tt > from all the channels < tt > channelNames < / tt > * @ param tag * - the tag to be deleted . * @ param channelNames * - the channels from which to delete the tag < tt > tag < / tt > * @ throws ChannelFinderException - throws excep...
// TODO optimize using the / tags / < name > payload with list of channels for ( String channelName : channelNames ) { delete ( tag , channelName ) ; }
public class PoolListUsageMetricsHeaders { /** * Set the time at which the resource was last modified . * @ param lastModified the lastModified value to set * @ return the PoolListUsageMetricsHeaders object itself . */ public PoolListUsageMetricsHeaders withLastModified ( DateTime lastModified ) { } }
if ( lastModified == null ) { this . lastModified = null ; } else { this . lastModified = new DateTimeRfc1123 ( lastModified ) ; } return this ;
public class Types { /** * Transforming internal name to vm name . Note that in case of array , e . g . , * " [ L / java / lang / Type ; " , the method returns element type , i . e . , * " java / lang / Type " . */ public static String descToInternalName ( String name ) { } }
if ( name . endsWith ( ";" ) ) { int lIndex = name . indexOf ( "L" ) ; name = name . substring ( lIndex + 1 , name . length ( ) - 1 ) ; } return name ;
public class JettyHttpServer { /** * Adds a directory for resources such as files containing html , images , etc . * to be served up automatically be this server . < br > * CAUTION : A resource base can only be added BEFORE the server is started . * @ param resourceBaseDir The directory containing resources ( bas...
// handles resources like images , files , etc . . logger . info ( "HttpServer [{}] adding resource base dir [{}]" , configuration . safeGetName ( ) , resourceBaseDir ) ; ResourceHandler resourceHandler = new ResourceHandler ( ) ; resourceHandler . setResourceBase ( resourceBaseDir ) ; handlers . addHandler ( resourceH...
public class ContentStoreImpl { /** * { @ inheritDoc } */ @ Override public String moveContent ( String srcSpaceId , String srcContentId , String destStoreId , String destSpaceId , String destContentId ) throws ContentStoreException { } }
String md5 = copyContent ( srcSpaceId , srcContentId , destStoreId , destSpaceId , destContentId ) ; deleteContent ( srcSpaceId , srcContentId ) ; return md5 ;
public class AssessmentRun { /** * A list of the assessment run state changes . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setStateChanges ( java . util . Collection ) } or { @ link # withStateChanges ( java . util . Collection ) } if you want to * ove...
if ( this . stateChanges == null ) { setStateChanges ( new java . util . ArrayList < AssessmentRunStateChange > ( stateChanges . length ) ) ; } for ( AssessmentRunStateChange ele : stateChanges ) { this . stateChanges . add ( ele ) ; } return this ;
public class KeyManagerConfigurer { /** * Alternative to { @ link # keyPasswords } when only 1 ( one ) key is present in the { @ link KeyStore } . * Alternatively use property : * < pre > * saml . sso . key - manager . key - passwords * < / pre > * @ param key the key name . * @ param password the key passw...
if ( keyPasswords == null ) { keyPasswords = new HashMap < > ( ) ; } keyPasswords . put ( key , password ) ; return this ;
public class JBaseToolbar { /** * Add a button to this window . * Convert this param to the local string and call addButton . * @ param The key for this button . * @ return TODO */ public JButton addButton ( String strParam ) { } }
String strDesc = strParam ; BaseApplet applet = this . getBaseApplet ( ) ; if ( applet != null ) strDesc = applet . getString ( strParam ) ; return this . addButton ( strDesc , strParam ) ;
public class MSPDIWriter { /** * Write the work weeks associated with this calendar . * @ param xmlCalendar XML calendar instance * @ param mpxjCalendar MPXJ calendar instance */ private void writeWorkWeeks ( Project . Calendars . Calendar xmlCalendar , ProjectCalendar mpxjCalendar ) { } }
List < ProjectCalendarWeek > weeks = mpxjCalendar . getWorkWeeks ( ) ; if ( ! weeks . isEmpty ( ) ) { WorkWeeks xmlWorkWeeks = m_factory . createProjectCalendarsCalendarWorkWeeks ( ) ; xmlCalendar . setWorkWeeks ( xmlWorkWeeks ) ; List < WorkWeek > xmlWorkWeekList = xmlWorkWeeks . getWorkWeek ( ) ; for ( ProjectCalenda...
public class HldSeSelEntityProcNms { /** * < p > Get processor name for delete . < / p > * @ param pClass a Class * @ return a thing */ protected final String getForDelete ( final Class < ? > pClass ) { } }
if ( this . sharedEntities . contains ( pClass ) ) { return null ; } else if ( IHasSeSeller . class . isAssignableFrom ( pClass ) ) { return PrcHasSeSellerDel . class . getSimpleName ( ) ; } return null ;