signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class I18nSpecificsOfItemGroup { /** * < p > Setter for itsId . < / p > * @ param pItsId reference */ @ Override public final void setItsId ( final IdI18nSpecificsOfItemGroup pItsId ) { } }
this . itsId = pItsId ; if ( this . itsId == null ) { this . lang = null ; this . hasName = null ; } else { this . lang = this . itsId . getLang ( ) ; this . hasName = this . itsId . getHasName ( ) ; }
public class DataBinder { /** * Loads parameters from a Properties object . */ public DataBinder load ( Properties props ) { } }
Enumeration < ? > enumeration = props . propertyNames ( ) ; while ( enumeration . hasMoreElements ( ) ) { String key = ( String ) enumeration . nextElement ( ) ; put ( key , props . getProperty ( key ) ) ; } return this ;
public class ByteCodeUtils { /** * 获取Class类型的byte code标识 , 例如int对应的是I , String对应的是Ljava / lang / String , 注意 : 只要不是原生类型肯定是以 ' L ' 开头 * 或者N个 ' [ ' 后跟一个 ' L ' , ' [ ' 标识数组 * @ param clazz Class对象 * @ return 对应的byte code类型 , 结尾如果是对象会以 ' ; ' 结尾 , 如果是放在返回值时需要删除 */ public static String getByteCodeType ( Class < ? > clazz ) { } }
Assert . notNull ( clazz ) ; if ( byte . class == clazz ) { return "B" ; } else if ( short . class == clazz ) { return "S" ; } else if ( int . class == clazz ) { return "I" ; } else if ( long . class == clazz ) { return "J" ; } else if ( double . class == clazz ) { return "D" ; } else if ( float . class == clazz ) { return "F" ; } else if ( boolean . class == clazz ) { return "Z" ; } else if ( char . class == clazz ) { return "C" ; } else if ( void . class == clazz ) { // void只有在返回值中才会有 return "V" ; } else if ( StringUtils . trim ( clazz . getName ( ) , "[" ) . startsWith ( "L" ) ) { // 是对象数组 ( 这里的对象指的是非原生类型 ) return clazz . getName ( ) . replace ( "." , "/" ) ; } else if ( ! JavaTypeUtil . isGeneralType ( clazz ) ) { // 是对象 ( 这里的对象指的是非原生类型 ) return "L" + clazz . getName ( ) . replace ( "." , "/" ) + ";" ; } else { return clazz . getName ( ) . replace ( "." , "/" ) ; }
public class Validators { /** * Creates and returns a validator , which allows to validate texts to ensure , that they * represent valid IPv6 addresses . Empty texts are also accepted . * @ param context * The context , which should be used to retrieve the error message , as an instance of * the class { @ link Context } . The context may not be null * @ param resourceId * The resource ID of the string resource , which contains the error message , which * should be set , as an { @ link Integer } value . The resource ID must correspond to a * valid string resource * @ return The validator , which has been created , as an instance of the type { @ link Validator } */ public static Validator < CharSequence > iPv6Address ( @ NonNull final Context context , @ StringRes final int resourceId ) { } }
return new IPv6AddressValidator ( context , resourceId ) ;
public class Optional { /** * Returns an { @ code Optional } describing the specified value , if non - null , * otherwise returns an empty { @ code Optional } . * @ param < T > the class of the value * @ param value the possibly - null value to describe * @ return an { @ code Optional } with a present value if the specified value * is non - null , otherwise an empty { @ code Optional } */ public static < T > Optional < T > ofNullable ( T value ) { } }
return value == null ? empty ( ) : of ( value ) ;
public class EntitlementMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Entitlement entitlement , ProtocolMarshaller protocolMarshaller ) { } }
if ( entitlement == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( entitlement . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( entitlement . getEncryption ( ) , ENCRYPTION_BINDING ) ; protocolMarshaller . marshall ( entitlement . getEntitlementArn ( ) , ENTITLEMENTARN_BINDING ) ; protocolMarshaller . marshall ( entitlement . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( entitlement . getSubscribers ( ) , SUBSCRIBERS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ServerConfigDocument { /** * Get the file from configDrectory if it exists ; * otherwise return def only if it exists , or null if not */ private File getFileFromConfigDirectory ( String file , File def ) { } }
File f = new File ( configDirectory , file ) ; if ( configDirectory != null && f . exists ( ) ) { return f ; } if ( def != null && def . exists ( ) ) { return def ; } return null ;
public class JMElasticsearchSearchAndCount { /** * Gets search request builder . * @ param isSetExplain the is set explain * @ param indices the indices * @ param types the types * @ param queryBuilder the query builder * @ param aggregationBuilders the aggregation builders * @ return the search request builder */ public SearchRequestBuilder getSearchRequestBuilder ( boolean isSetExplain , String [ ] indices , String [ ] types , QueryBuilder queryBuilder , AggregationBuilder [ ] aggregationBuilders ) { } }
SearchRequestBuilder searchRequestBuilder = getSearchRequestBuilder ( esClient . prepareSearch ( indices ) . setSearchType ( SearchType . DFS_QUERY_THEN_FETCH ) . setSize ( defaultHitsCount ) . setExplain ( isSetExplain ) , aggregationBuilders ) ; ifNotNull ( types , searchRequestBuilder :: setTypes ) ; ifNotNull ( queryBuilder , searchRequestBuilder :: setQuery ) ; return searchRequestBuilder ;
public class JobControl { /** * Add a new job . * @ param aJob the new job */ synchronized public String addJob ( Job aJob ) { } }
String id = this . getNextJobID ( ) ; aJob . setJobID ( id ) ; aJob . setState ( Job . WAITING ) ; this . addToQueue ( aJob ) ; return id ;
public class AppServiceEnvironmentsInner { /** * Delete an App Service Environment . * Delete an App Service Environment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service Environment . * @ param forceDelete Specify & lt ; code & gt ; true & lt ; / code & gt ; to force the deletion even if the App Service Environment contains resources . The default is & lt ; code & gt ; false & lt ; / code & gt ; . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void delete ( String resourceGroupName , String name , Boolean forceDelete ) { } }
deleteWithServiceResponseAsync ( resourceGroupName , name , forceDelete ) . toBlocking ( ) . last ( ) . body ( ) ;
public class SqlQuery { /** * Constructs a query with named arguments , using given map for resolving the values of arguments . * @ see # namedQuery ( String , VariableResolver ) * @ see VariableResolver # forMap ( Map ) */ public static @ NotNull SqlQuery namedQuery ( @ NotNull @ SQL String sql , @ NotNull Map < String , ? > valueMap ) { } }
return namedQuery ( sql , VariableResolver . forMap ( valueMap ) ) ;
public class CircleProgressBar { /** * Update the background color of the mBgCircle image view . */ public void setBackgroundColor ( int colorRes ) { } }
if ( getBackground ( ) instanceof ShapeDrawable ) { final Resources res = getResources ( ) ; ( ( ShapeDrawable ) getBackground ( ) ) . getPaint ( ) . setColor ( res . getColor ( colorRes ) ) ; }
public class A_CmsSearchIndex { /** * Checks if the provided resource should be excluded from this search index . < p > * @ param cms the OpenCms context used for building the search index * @ param resource the resource to index * @ return true if the resource should be excluded , false if it should be included in this index */ public boolean excludeFromIndex ( CmsObject cms , CmsResource resource ) { } }
// check if this resource should be excluded from the index , if so skip it boolean excludeFromIndex = false ; if ( resource . isInternal ( ) || resource . isFolder ( ) || resource . isTemporaryFile ( ) || ( resource . getDateExpired ( ) <= System . currentTimeMillis ( ) ) ) { // don ' t index internal resources , folders or temporary files or resources with expire date in the past return true ; } try { // do property lookup with folder search String propValue = cms . readPropertyObject ( resource , CmsPropertyDefinition . PROPERTY_SEARCH_EXCLUDE , true ) . getValue ( ) ; excludeFromIndex = Boolean . valueOf ( propValue ) . booleanValue ( ) ; if ( ! excludeFromIndex && ( propValue != null ) ) { // property value was neither " true " nor null , must check for " all " excludeFromIndex = PROPERTY_SEARCH_EXCLUDE_VALUE_ALL . equalsIgnoreCase ( propValue . trim ( ) ) ; } } catch ( CmsException e ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_UNABLE_TO_READ_PROPERTY_1 , resource . getRootPath ( ) ) ) ; } } if ( ! excludeFromIndex && ! USE_ALL_LOCALE . equalsIgnoreCase ( getLocale ( ) . getLanguage ( ) ) ) { // check if any resource default locale has a match with the index locale , if not skip resource List < Locale > locales = OpenCms . getLocaleManager ( ) . getDefaultLocales ( cms , resource ) ; Locale match = OpenCms . getLocaleManager ( ) . getFirstMatchingLocale ( Collections . singletonList ( getLocale ( ) ) , locales ) ; excludeFromIndex = ( match == null ) ; } return excludeFromIndex ;
public class Http4K { /** * creates or gets an undertow web server instance mapped by port . * hostname must be given in case a new server instance has to be instantiated * @ param port * @ param hostName * @ return */ public synchronized Pair < PathHandler , Undertow > getServer ( int port , String hostName ) { } }
return getServer ( port , hostName , null ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link DerivationUnitTermType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link DerivationUnitTermType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "derivationUnitTerm" ) public JAXBElement < DerivationUnitTermType > createDerivationUnitTerm ( DerivationUnitTermType value ) { } }
return new JAXBElement < DerivationUnitTermType > ( _DerivationUnitTerm_QNAME , DerivationUnitTermType . class , null , value ) ;
public class InternalPureXbaseLexer { /** * $ ANTLR start " T _ _ 72" */ public final void mT__72 ( ) throws RecognitionException { } }
try { int _type = T__72 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalPureXbase . g : 70:7 : ( ' throw ' ) // InternalPureXbase . g : 70:9 : ' throw ' { match ( "throw" ) ; } state . type = _type ; state . channel = _channel ; } finally { }
public class JSONObject { /** * Add a { @ link JSONBoolean } representing the supplied { @ code boolean } to the * { @ code JSONObject } . * @ param key the key to use when storing the value * @ param value the value * @ return { @ code this } ( for chaining ) * @ throws NullPointerException if key is { @ code null } */ public JSONObject putValue ( String key , boolean value ) { } }
put ( key , JSONBoolean . valueOf ( value ) ) ; return this ;
public class VelocityTemplate { /** * 加载可用的Velocity中预定义的编码 */ private void loadEncoding ( ) { } }
final String charset = ( String ) Velocity . getProperty ( Velocity . INPUT_ENCODING ) ; this . charset = StrUtil . isEmpty ( charset ) ? CharsetUtil . UTF_8 : charset ;
public class Decompiler { /** * Decompile the source information associated with this js * function / script back into a string . For the most part , this * just means translating tokens back to their string * representations ; there ' s a little bit of lookahead logic to * decide the proper spacing / indentation . Most of the work in * mapping the original source to the prettyprinted decompiled * version is done by the parser . * @ param source encoded source tree presentation * @ param flags flags to select output format * @ param properties indentation properties */ public static String decompile ( String source , int flags , UintMap properties ) { } }
int length = source . length ( ) ; if ( length == 0 ) { return "" ; } int indent = properties . getInt ( INITIAL_INDENT_PROP , 0 ) ; if ( indent < 0 ) throw new IllegalArgumentException ( ) ; int indentGap = properties . getInt ( INDENT_GAP_PROP , 4 ) ; if ( indentGap < 0 ) throw new IllegalArgumentException ( ) ; int caseGap = properties . getInt ( CASE_GAP_PROP , 2 ) ; if ( caseGap < 0 ) throw new IllegalArgumentException ( ) ; StringBuilder result = new StringBuilder ( ) ; boolean justFunctionBody = ( 0 != ( flags & Decompiler . ONLY_BODY_FLAG ) ) ; boolean toSource = ( 0 != ( flags & Decompiler . TO_SOURCE_FLAG ) ) ; // Spew tokens in source , for debugging . // as TYPE number char if ( printSource ) { System . err . println ( "length:" + length ) ; for ( int i = 0 ; i < length ; ++ i ) { // Note that tokenToName will fail unless Context . printTrees // is true . String tokenname = null ; if ( Token . printNames ) { tokenname = Token . name ( source . charAt ( i ) ) ; } if ( tokenname == null ) { tokenname = "---" ; } String pad = tokenname . length ( ) > 7 ? "\t" : "\t\t" ; System . err . println ( tokenname + pad + ( int ) source . charAt ( i ) + "\t'" + ScriptRuntime . escapeString ( source . substring ( i , i + 1 ) ) + "'" ) ; } System . err . println ( ) ; } int braceNesting = 0 ; boolean afterFirstEOL = false ; int i = 0 ; int topFunctionType ; if ( source . charAt ( i ) == Token . SCRIPT ) { ++ i ; topFunctionType = - 1 ; } else { topFunctionType = source . charAt ( i + 1 ) ; } if ( ! toSource ) { // add an initial newline to exactly match js . result . append ( '\n' ) ; for ( int j = 0 ; j < indent ; j ++ ) result . append ( ' ' ) ; } else { if ( topFunctionType == FunctionNode . FUNCTION_EXPRESSION ) { result . append ( '(' ) ; } } while ( i < length ) { switch ( source . charAt ( i ) ) { case Token . GET : case Token . SET : case Token . METHOD : if ( source . charAt ( i ) == Token . GET ) { result . append ( "get " ) ; } else if ( source . charAt ( i ) == Token . SET ) { result . append ( "set " ) ; } ++ i ; i = printSourceString ( source , i + 1 , false , result ) ; // Now increment one more to get past the FUNCTION token ++ i ; break ; case Token . NAME : case Token . REGEXP : // re - wrapped in ' / ' s in parser . . . i = printSourceString ( source , i + 1 , false , result ) ; continue ; case Token . STRING : i = printSourceString ( source , i + 1 , true , result ) ; continue ; case Token . NUMBER : i = printSourceNumber ( source , i + 1 , result ) ; continue ; case Token . TRUE : result . append ( "true" ) ; break ; case Token . FALSE : result . append ( "false" ) ; break ; case Token . NULL : result . append ( "null" ) ; break ; case Token . THIS : result . append ( "this" ) ; break ; case Token . FUNCTION : ++ i ; // skip function type result . append ( "function " ) ; break ; case FUNCTION_END : // Do nothing break ; case Token . COMMA : result . append ( ", " ) ; break ; case Token . LC : ++ braceNesting ; if ( Token . EOL == getNext ( source , length , i ) ) indent += indentGap ; result . append ( '{' ) ; break ; case Token . RC : { -- braceNesting ; /* don ' t print the closing RC if it closes the * toplevel function and we ' re called from * decompileFunctionBody . */ if ( justFunctionBody && braceNesting == 0 ) break ; result . append ( '}' ) ; switch ( getNext ( source , length , i ) ) { case Token . EOL : case FUNCTION_END : indent -= indentGap ; break ; case Token . WHILE : case Token . ELSE : indent -= indentGap ; result . append ( ' ' ) ; break ; } break ; } case Token . LP : result . append ( '(' ) ; break ; case Token . RP : result . append ( ')' ) ; if ( Token . LC == getNext ( source , length , i ) ) result . append ( ' ' ) ; break ; case Token . LB : result . append ( '[' ) ; break ; case Token . RB : result . append ( ']' ) ; break ; case Token . EOL : { if ( toSource ) break ; boolean newLine = true ; if ( ! afterFirstEOL ) { afterFirstEOL = true ; if ( justFunctionBody ) { /* throw away just added ' function name ( . . . ) { ' * and restore the original indent */ result . setLength ( 0 ) ; indent -= indentGap ; newLine = false ; } } if ( newLine ) { result . append ( '\n' ) ; } /* add indent if any tokens remain , * less setback if next token is * a label , case or default . */ if ( i + 1 < length ) { int less = 0 ; int nextToken = source . charAt ( i + 1 ) ; if ( nextToken == Token . CASE || nextToken == Token . DEFAULT ) { less = indentGap - caseGap ; } else if ( nextToken == Token . RC ) { less = indentGap ; } /* elaborate check against label . . . skip past a * following inlined NAME and look for a COLON . */ else if ( nextToken == Token . NAME ) { int afterName = getSourceStringEnd ( source , i + 2 ) ; if ( source . charAt ( afterName ) == Token . COLON ) less = indentGap ; } for ( ; less < indent ; less ++ ) result . append ( ' ' ) ; } break ; } case Token . DOT : result . append ( '.' ) ; break ; case Token . NEW : result . append ( "new " ) ; break ; case Token . DELPROP : result . append ( "delete " ) ; break ; case Token . IF : result . append ( "if " ) ; break ; case Token . ELSE : result . append ( "else " ) ; break ; case Token . FOR : result . append ( "for " ) ; break ; case Token . IN : result . append ( " in " ) ; break ; case Token . WITH : result . append ( "with " ) ; break ; case Token . WHILE : result . append ( "while " ) ; break ; case Token . DO : result . append ( "do " ) ; break ; case Token . TRY : result . append ( "try " ) ; break ; case Token . CATCH : result . append ( "catch " ) ; break ; case Token . FINALLY : result . append ( "finally " ) ; break ; case Token . THROW : result . append ( "throw " ) ; break ; case Token . SWITCH : result . append ( "switch " ) ; break ; case Token . BREAK : result . append ( "break" ) ; if ( Token . NAME == getNext ( source , length , i ) ) result . append ( ' ' ) ; break ; case Token . CONTINUE : result . append ( "continue" ) ; if ( Token . NAME == getNext ( source , length , i ) ) result . append ( ' ' ) ; break ; case Token . CASE : result . append ( "case " ) ; break ; case Token . DEFAULT : result . append ( "default" ) ; break ; case Token . RETURN : result . append ( "return" ) ; if ( Token . SEMI != getNext ( source , length , i ) ) result . append ( ' ' ) ; break ; case Token . VAR : result . append ( "var " ) ; break ; case Token . LET : result . append ( "let " ) ; break ; case Token . SEMI : result . append ( ';' ) ; if ( Token . EOL != getNext ( source , length , i ) ) { // separators in FOR result . append ( ' ' ) ; } break ; case Token . ASSIGN : result . append ( " = " ) ; break ; case Token . ASSIGN_ADD : result . append ( " += " ) ; break ; case Token . ASSIGN_SUB : result . append ( " -= " ) ; break ; case Token . ASSIGN_MUL : result . append ( " *= " ) ; break ; case Token . ASSIGN_DIV : result . append ( " /= " ) ; break ; case Token . ASSIGN_MOD : result . append ( " %= " ) ; break ; case Token . ASSIGN_BITOR : result . append ( " |= " ) ; break ; case Token . ASSIGN_BITXOR : result . append ( " ^= " ) ; break ; case Token . ASSIGN_BITAND : result . append ( " &= " ) ; break ; case Token . ASSIGN_LSH : result . append ( " <<= " ) ; break ; case Token . ASSIGN_RSH : result . append ( " >>= " ) ; break ; case Token . ASSIGN_URSH : result . append ( " >>>= " ) ; break ; case Token . HOOK : result . append ( " ? " ) ; break ; case Token . OBJECTLIT : // pun OBJECTLIT to mean colon in objlit property // initialization . // This needs to be distinct from COLON in the general case // to distinguish from the colon in a ternary . . . which needs // different spacing . result . append ( ": " ) ; break ; case Token . COLON : if ( Token . EOL == getNext ( source , length , i ) ) // it ' s the end of a label result . append ( ':' ) ; else // it ' s the middle part of a ternary result . append ( " : " ) ; break ; case Token . OR : result . append ( " || " ) ; break ; case Token . AND : result . append ( " && " ) ; break ; case Token . BITOR : result . append ( " | " ) ; break ; case Token . BITXOR : result . append ( " ^ " ) ; break ; case Token . BITAND : result . append ( " & " ) ; break ; case Token . SHEQ : result . append ( " === " ) ; break ; case Token . SHNE : result . append ( " !== " ) ; break ; case Token . EQ : result . append ( " == " ) ; break ; case Token . NE : result . append ( " != " ) ; break ; case Token . LE : result . append ( " <= " ) ; break ; case Token . LT : result . append ( " < " ) ; break ; case Token . GE : result . append ( " >= " ) ; break ; case Token . GT : result . append ( " > " ) ; break ; case Token . INSTANCEOF : result . append ( " instanceof " ) ; break ; case Token . LSH : result . append ( " << " ) ; break ; case Token . RSH : result . append ( " >> " ) ; break ; case Token . URSH : result . append ( " >>> " ) ; break ; case Token . TYPEOF : result . append ( "typeof " ) ; break ; case Token . VOID : result . append ( "void " ) ; break ; case Token . CONST : result . append ( "const " ) ; break ; case Token . YIELD : result . append ( "yield " ) ; break ; case Token . NOT : result . append ( '!' ) ; break ; case Token . BITNOT : result . append ( '~' ) ; break ; case Token . POS : result . append ( '+' ) ; break ; case Token . NEG : result . append ( '-' ) ; break ; case Token . INC : result . append ( "++" ) ; break ; case Token . DEC : result . append ( "--" ) ; break ; case Token . ADD : result . append ( " + " ) ; break ; case Token . SUB : result . append ( " - " ) ; break ; case Token . MUL : result . append ( " * " ) ; break ; case Token . DIV : result . append ( " / " ) ; break ; case Token . MOD : result . append ( " % " ) ; break ; case Token . COLONCOLON : result . append ( "::" ) ; break ; case Token . DOTDOT : result . append ( ".." ) ; break ; case Token . DOTQUERY : result . append ( ".(" ) ; break ; case Token . XMLATTR : result . append ( '@' ) ; break ; case Token . DEBUGGER : result . append ( "debugger;\n" ) ; break ; case Token . ARROW : result . append ( " => " ) ; break ; default : // If we don ' t know how to decompile it , raise an exception . throw new RuntimeException ( "Token: " + Token . name ( source . charAt ( i ) ) ) ; } ++ i ; } if ( ! toSource ) { // add that trailing newline if it ' s an outermost function . if ( ! justFunctionBody ) result . append ( '\n' ) ; } else { if ( topFunctionType == FunctionNode . FUNCTION_EXPRESSION ) { result . append ( ')' ) ; } } return result . toString ( ) ;
public class CodedConstant { /** * get required field check java expression . * @ param order field order * @ param field java field * @ return full java expression */ public static String getRequiredCheck ( int order , Field field ) { } }
String fieldName = getFieldName ( order ) ; String code = "if (" + fieldName + "== null) {\n" ; code += "throw new UninitializedMessageException(CodedConstant.asList(\"" + field . getName ( ) + "\"))" + ClassCode . JAVA_LINE_BREAK ; code += "}\n" ; return code ;
public class HttpOutboundServiceContextImpl { /** * @ see com . ibm . ws . http . channel . internal . HttpServiceContextImpl # getBuffList ( ) */ @ Override protected WsByteBuffer [ ] getBuffList ( ) { } }
if ( ! getLink ( ) . isReconnectAllowed ( ) ) { // reconnects not allowed , skip the special logic below return super . getBuffList ( ) ; } int stop = getPendingStop ( ) ; int start = getPendingStart ( ) ; int size = stop - start ; if ( 0 == size ) { return null ; } WsByteBuffer [ ] buffs = getPendingBuffers ( ) ; WsByteBuffer [ ] list = new WsByteBuffer [ size ] ; // expand the position list array if we need to if ( this . positionList . length < buffs . length ) { int [ ] newList = new int [ buffs . length ] ; System . arraycopy ( this . positionList , 0 , newList , 0 , this . positionList . length ) ; this . positionList = newList ; } for ( int x = 0 , i = start ; x < size ; i ++ , x ++ ) { list [ x ] = buffs [ i ] ; this . positionList [ i ] = buffs [ i ] . position ( ) ; } setPendingStart ( stop ) ; return list ;
public class UcsApi { /** * Set the call as being completed * @ param id id of the Interaction ( required ) * @ param callCompletedData ( required ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < ApiSuccessResponse > setCallCompletedWithHttpInfo ( String id , CallCompletedData callCompletedData ) throws ApiException { } }
com . squareup . okhttp . Call call = setCallCompletedValidateBeforeCall ( id , callCompletedData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getExtensionFont ( ) { } }
if ( extensionFontEClass == null ) { extensionFontEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 522 ) ; } return extensionFontEClass ;
public class TrifocalExtractGeometries { /** * Extract the camera matrices up to a common projective transform . * < p > P2 = [ [ T1 . T2 . T3 ] e3 | e2 ] and P3 = [ ( e3 * e2 < sup > T < / sup > - I ) [ T1 ' , T2 ' , T3 ' | e2 | e3 ] < / p > * NOTE : The camera matrix for the first view is assumed to be P1 = [ I | 0 ] . * @ param P2 Output : 3x4 camera matrix for views 2 . Modified . * @ param P3 Output : 3x4 camera matrix for views 3 . Modified . */ public void extractCamera ( DMatrixRMaj P2 , DMatrixRMaj P3 ) { } }
// temp1 = [ e3 * e3 ^ T - I ] for ( int i = 0 ; i < 3 ; i ++ ) { for ( int j = 0 ; j < 3 ; j ++ ) { temp1 . set ( i , j , e3 . getIdx ( i ) * e3 . getIdx ( j ) ) ; } temp1 . set ( i , i , temp1 . get ( i , i ) - 1 ) ; } // compute the camera matrices one column at a time for ( int i = 0 ; i < 3 ; i ++ ) { DMatrixRMaj T = tensor . getT ( i ) ; GeometryMath_F64 . mult ( T , e3 , column ) ; P2 . set ( 0 , i , column . x ) ; P2 . set ( 1 , i , column . y ) ; P2 . set ( 2 , i , column . z ) ; P2 . set ( i , 3 , e2 . getIdx ( i ) ) ; GeometryMath_F64 . multTran ( T , e2 , temp0 ) ; GeometryMath_F64 . mult ( temp1 , temp0 , column ) ; P3 . set ( 0 , i , column . x ) ; P3 . set ( 1 , i , column . y ) ; P3 . set ( 2 , i , column . z ) ; P3 . set ( i , 3 , e3 . getIdx ( i ) ) ; }
public class VirtualMachineScaleSetsInner { /** * Reimages ( upgrade the operating system ) one or more virtual machines in a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < OperationStatusResponseInner > reimageAsync ( String resourceGroupName , String vmScaleSetName , final ServiceCallback < OperationStatusResponseInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( reimageWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) , serviceCallback ) ;
public class FSM2MealyParserAlternating { /** * Converts all the transitions from the FSM to transitions in a { @ link MealyMachine } . * This method will for each new state make transitions . * This is done by switching behavior between input , and output transitions in the FSM source . * This is a recursive DFS . * @ param currentState * the current state to make transitions for . * @ param inputTrans * when { @ code null } , this means outgoing transitions from { @ code currentState } will be output , * otherwise input . * @ param newStates * the set of states that still need to be visited . * @ param inputLength * the current number of inputs on the DFS stack . * @ param wb * the word builder containing all the input symbols on the DFS stack . * @ throws FSMParseException * when non - determinism is detected . */ private void makeTransitions ( Integer currentState , Pair < Integer , I > inputTrans , Set < Integer > newStates , int inputLength , @ Nullable WordBuilder < I > wb , StreamTokenizer streamTokenizer ) throws FSMParseException { } }
// indicate we have seen currentState newStates . remove ( currentState ) ; // collect all outgoing transitions from currentState final Collection < Pair < String , Integer > > targets = transitionsFSM . get ( currentState ) ; // check if we need to compute an undefined output . if ( inputTrans != null && targets . isEmpty ( ) ) { if ( wb != null ) { assert output != null ; final O o = output . computeOutput ( wb ) . lastSymbol ( ) ; // create an actual Mealy machine transition final Pair < O , Integer > prev = getTransitions ( ) . put ( inputTrans , Pair . of ( o , getStates ( ) . size ( ) ) ) ; // check for non - determinism if ( prev != null ) { throw new FSMParseException ( String . format ( NON_DETERMINISM_DETECTED , prev ) , streamTokenizer ) ; } } else { throw new FSMParseException ( String . format ( INPUT_HAS_NO_OUTPUT , inputTrans . getSecond ( ) , inputTrans . getFirst ( ) ) , streamTokenizer ) ; } } // iterate over all outgoing transitions for ( Pair < String , Integer > target : targets ) { // the letter on the transition in the FSM source final String letter = target . getFirst ( ) ; // the target state index in the FSM source final Integer to = target . getSecond ( ) ; // check whether the transition is input , or output if ( inputTrans == null ) { // the transition is input // transform the string from the FSM source to actual input final I i = getInputParser ( ) . apply ( letter ) ; // add the input to the set of inputs getInputs ( ) . add ( i ) ; // Append the input symbol , but only if we need it for computing undefined outputs . if ( wb != null ) { assert wb . size ( ) == inputLength ; wb . append ( i ) ; } // recursive call to makeTransitions ( we continue with output ) makeTransitions ( to , Pair . of ( currentState , i ) , newStates , inputLength + 1 , wb , streamTokenizer ) ; // truncate the word builder , but only if we need it for computing undefined outputs . if ( wb != null ) { assert wb . size ( ) > inputLength ; wb . truncate ( inputLength ) ; } } else { // the transition is output // transform the string from the FSM to actual output final O o = getOutputParser ( ) . apply ( letter ) ; // create an actual Mealy machine transition final Pair < O , Integer > prev = getTransitions ( ) . put ( inputTrans , Pair . of ( o , to ) ) ; // check for non - determinism if ( prev != null ) { throw new FSMParseException ( String . format ( NON_DETERMINISM_DETECTED , prev ) , streamTokenizer ) ; } // continue if we have not seen the target state yet if ( newStates . contains ( to ) ) { makeTransitions ( to , null , newStates , inputLength , wb , streamTokenizer ) ; } } }
public class ResourceXMLGenerator { /** * Add Node object * @ param node node */ public void addNode ( final INodeEntry node ) { } }
// convert to entity final ResourceXMLParser . Entity entity = createEntity ( node ) ; addEntity ( entity ) ;
public class JerseyEnvironment { /** * Gets the given Jersey property . * @ param name the name of the Jersey property * @ see org . glassfish . jersey . server . ResourceConfig */ @ SuppressWarnings ( { } }
"unchecked" , "TypeParameterUnusedInFormals" } ) @ Nullable public < T > T getProperty ( String name ) { return ( T ) config . getProperties ( ) . get ( name ) ;
public class RTMPConnection { /** * Return stream by given channel id . * @ param channelId * Channel id * @ return Stream that channel belongs to */ public IClientStream getStreamByChannelId ( int channelId ) { } }
// channels 2 and 3 are " special " and don ' t have an IClientStream associated if ( channelId < 4 ) { return null ; } Number streamId = getStreamIdForChannelId ( channelId ) ; if ( log . isTraceEnabled ( ) ) { log . trace ( "Stream requested for channel id: {} stream id: {} streams: {}" , channelId , streamId , streams ) ; } return getStreamById ( streamId ) ;
public class CelebrityDetail { /** * An array of URLs pointing to additional celebrity information . * @ param urls * An array of URLs pointing to additional celebrity information . */ public void setUrls ( java . util . Collection < String > urls ) { } }
if ( urls == null ) { this . urls = null ; return ; } this . urls = new java . util . ArrayList < String > ( urls ) ;
public class BpmnModelValidator { /** * Returns ' true ' if at least one process definition in the { @ link BpmnModel } is executable . */ protected boolean validateAtLeastOneExecutable ( BpmnModel bpmnModel , List < ValidationError > errors ) { } }
int nrOfExecutableDefinitions = 0 ; for ( Process process : bpmnModel . getProcesses ( ) ) { if ( process . isExecutable ( ) ) { nrOfExecutableDefinitions ++ ; } } if ( nrOfExecutableDefinitions == 0 ) { addError ( errors , Problems . ALL_PROCESS_DEFINITIONS_NOT_EXECUTABLE , "All process definition are set to be non-executable (property 'isExecutable' on process). This is not allowed." ) ; } return nrOfExecutableDefinitions > 0 ;
public class SchemaFactory { /** * Specifies whether to perform checking of ID / IDREF / IDREFS attributes in accordance with * RELAX NG DTD Compatibility . * @ param checkIdIdref < code > true < / code > if ID / IDREF / IDREFS checking should be performed ; * < code > false < / code > otherwise * @ see # getCheckIdIdref * @ see < a href = " http : / / www . oasis - open . org / committees / relax - ng / compatibility . html # id " > RELAX NG DTD Compatibility < / a > */ public void setCheckIdIdref ( boolean checkIdIdref ) { } }
properties . put ( RngProperty . CHECK_ID_IDREF , checkIdIdref ? Flag . PRESENT : null ) ;
public class ListThingRegistrationTaskReportsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListThingRegistrationTaskReportsRequest listThingRegistrationTaskReportsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listThingRegistrationTaskReportsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequest . getTaskId ( ) , TASKID_BINDING ) ; protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequest . getReportType ( ) , REPORTTYPE_BINDING ) ; protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class CPTaxCategoryPersistenceImpl { /** * Returns a range of all the cp tax categories where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CPTaxCategoryModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param groupId the group ID * @ param start the lower bound of the range of cp tax categories * @ param end the upper bound of the range of cp tax categories ( not inclusive ) * @ return the range of matching cp tax categories */ @ Override public List < CPTaxCategory > findByGroupId ( long groupId , int start , int end ) { } }
return findByGroupId ( groupId , start , end , null ) ;
public class TableCellCheckboxEditor { /** * { @ inheritDoc } */ @ Override public Object getCellEditorValue ( ) { } }
if ( isClicked ( ) ) { JOptionPane . showMessageDialog ( button , "You clicked the button with the value " + this . value + " in row index " + row + " and in colunm index " + column + "." ) ; } setClicked ( false ) ; String text = "" ; if ( getValue ( ) != null ) { text = getValue ( ) . toString ( ) ; } return text ;
public class MetricRegistry { /** * Return the { @ link Gauge } registered under this name ; or create and register * a new { @ link Gauge } using the provided MetricSupplier if none is registered . * @ param name the name of the metric * @ param supplier a MetricSupplier that can be used to manufacture a Gauge * @ return a new or pre - existing { @ link Gauge } */ @ SuppressWarnings ( "rawtypes" ) public Gauge gauge ( String name , final MetricSupplier < Gauge > supplier ) { } }
return getOrAdd ( name , new MetricBuilder < Gauge > ( ) { @ Override public Gauge newMetric ( ) { return supplier . newMetric ( ) ; } @ Override public boolean isInstance ( Metric metric ) { return Gauge . class . isInstance ( metric ) ; } } ) ;
public class ServerSidePreparedStatement { /** * < p > Releases this < code > Statement < / code > object ' s database and JDBC resources immediately * instead of waiting for this to happen when it is automatically closed . It is generally good * practice to release resources as soon as you are finished with them to avoid tying up database * resources . < / p > * < p > Calling the method < code > close < / code > on a < code > Statement < / code > object that is already * closed has no effect . < / p > * < p > < B > Note : < / B > When a < code > Statement < / code > object is closed , its current * < code > ResultSet < / code > object , if one * exists , is also closed . < / p > * @ throws SQLException if a database access error occurs */ @ Override public void close ( ) throws SQLException { } }
lock . lock ( ) ; try { closed = true ; if ( results != null ) { if ( results . getFetchSize ( ) != 0 ) { skipMoreResults ( ) ; } results . close ( ) ; } // No possible future use for the cached results , so these can be cleared // This makes the cache eligible for garbage collection earlier if the statement is not // immediately garbage collected if ( protocol != null ) { try { serverPrepareResult . getUnProxiedProtocol ( ) . releasePrepareStatement ( serverPrepareResult ) ; } catch ( SQLException e ) { // if ( log . isDebugEnabled ( ) ) log . debug ( " Error releasing preparedStatement " , e ) ; } } protocol = null ; if ( connection == null || connection . pooledConnection == null || connection . pooledConnection . noStmtEventListeners ( ) ) { return ; } connection . pooledConnection . fireStatementClosed ( this ) ; connection = null ; } finally { lock . unlock ( ) ; }
public class CleverTapAPI { /** * Use this method to enable device network - related information tracking , including IP address . * This reporting is disabled by default . To re - disable tracking call this method with enabled set to false . * @ param value boolean Whether device network info reporting should be enabled / disabled . */ @ SuppressWarnings ( { } }
"unused" , "WeakerAccess" } ) public void enableDeviceNetworkInfoReporting ( boolean value ) { enableNetworkInfoReporting = value ; StorageHelper . putBoolean ( context , storageKeyWithSuffix ( Constants . NETWORK_INFO ) , enableNetworkInfoReporting ) ; getConfigLogger ( ) . verbose ( getAccountId ( ) , "Device Network Information reporting set to " + enableNetworkInfoReporting ) ;
public class BandLU { /** * Creates an LU decomposition of the given matrix * @ param A * Matrix to decompose . If the decomposition is in - place , its * number of superdiagonals must equal < code > kl + ku < / code > * @ param inplace * Wheter or not the decomposition should overwrite the passed * matrix * @ return The current decomposition */ public BandLU factor ( BandMatrix A , boolean inplace ) { } }
if ( inplace ) return factor ( A ) ; else return factor ( new BandMatrix ( A , kl , kl + ku ) ) ;
public class AlertPolicyFilter { /** * Method allow to filter policies by its references . * @ param policies is not null list of policy references * @ return { @ link AlertPolicyFilter } */ public AlertPolicyFilter policies ( AlertPolicy ... policies ) { } }
allItemsNotNull ( policies , "Anti-affinity Policies" ) ; evaluation = new AndEvaluation < > ( evaluation , Filter . or ( Streams . map ( policies , AlertPolicy :: asFilter ) ) , AlertPolicyMetadata :: getId ) ; return this ;
public class TimerMethodData { /** * Adds an automatic timer to this metadata . * @ param timer the automatic timer */ void addAutomaticTimer ( AutomaticTimer timer ) { } }
timer . ivMethod = this ; ivAutomaticTimers . add ( timer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "added automatic timer: " + timer ) ;
public class AnalysisLog { /** * Log that this record has been added . * Call this from the end of record . init * @ param record the record that is being added . */ public void logAddRecord ( Rec record , int iSystemID ) { } }
try { this . getTable ( ) . setProperty ( DBParams . SUPRESSREMOTEDBMESSAGES , DBConstants . TRUE ) ; this . getTable ( ) . getDatabase ( ) . setProperty ( DBParams . MESSAGES_TO_REMOTE , DBConstants . FALSE ) ; this . addNew ( ) ; this . getField ( AnalysisLog . SYSTEM_ID ) . setValue ( iSystemID ) ; this . getField ( AnalysisLog . OBJECT_ID ) . setValue ( Debug . getObjectID ( record , false ) ) ; this . getField ( AnalysisLog . CLASS_NAME ) . setString ( Debug . getClassName ( record ) ) ; this . getField ( AnalysisLog . DATABASE_NAME ) . setString ( record . getDatabaseName ( ) ) ; ( ( DateTimeField ) this . getField ( AnalysisLog . INIT_TIME ) ) . setValue ( DateTimeField . currentTime ( ) ) ; this . getField ( AnalysisLog . RECORD_OWNER ) . setString ( Debug . getClassName ( ( ( Record ) record ) . getRecordOwner ( ) ) ) ; this . getField ( AnalysisLog . STACK_TRACE ) . setString ( Debug . getStackTrace ( ) ) ; this . add ( ) ; } catch ( DBException ex ) { ex . printStackTrace ( ) ; }
public class ResourceDescriptionsProvider { /** * / * @ NonNull */ @ Override public IResourceDescriptions getResourceDescriptions ( /* @ NonNull */ ResourceSet resourceSet ) { } }
String flag = getFlagFromLoadOptions ( resourceSet ) ; IResourceDescriptions result ; if ( NAMED_BUILDER_SCOPE . equals ( flag ) ) { result = createBuilderScopeResourceDescriptions ( ) ; } else if ( LIVE_SCOPE . equals ( flag ) ) { result = createLiveScopeResourceDescriptions ( ) ; } else if ( PERSISTED_DESCRIPTIONS . equals ( flag ) ) { result = createPersistedResourceDescriptions ( ) ; } else { result = ChunkedResourceDescriptions . findInEmfObject ( resourceSet ) ; if ( result == null ) { result = createResourceDescriptions ( ) ; } } if ( result instanceof IResourceDescriptions . IContextAware ) { ( ( IResourceDescriptions . IContextAware ) result ) . setContext ( resourceSet ) ; } return result ;
public class CreateWSDL11 { /** * AddSchema Method . */ public void addSchema ( String version , TTypes types , MessageInfo recMessageInfo ) { } }
String name = this . fixName ( recMessageInfo . getField ( MessageInfo . DESCRIPTION ) . toString ( ) ) ; Import importel = schemaFactory . createImport ( ) ; org . w3 . _2001 . xmlschema . Schema schema = ( org . w3 . _2001 . xmlschema . Schema ) types . getAny ( ) . get ( 0 ) ; // LAME schema . getIncludeOrImportOrRedefine ( ) . add ( importel ) ; String code = recMessageInfo . getField ( MessageInfo . CODE ) . toString ( ) ; if ( code == null ) code = name ; String namespace = ( ( PropertiesField ) recMessageInfo . getField ( MessageInfo . MESSAGE_PROPERTIES ) ) . getProperty ( MessageInfo . NAMESPACE ) ; String element = ( ( PropertiesField ) recMessageInfo . getField ( MessageInfo . MESSAGE_PROPERTIES ) ) . getProperty ( MessageInfo . ELEMENT ) ; String schemaLocation = ( ( PropertiesField ) recMessageInfo . getField ( MessageInfo . MESSAGE_PROPERTIES ) ) . getProperty ( MessageInfo . SCHEMA_LOCATION ) ; if ( namespace == null ) namespace = this . getMessageControl ( ) . getNamespaceFromVersion ( version ) ; if ( element == null ) if ( code != null ) element = code ; if ( schemaLocation == null ) if ( code != null ) schemaLocation = code + ".xsd" ; schemaLocation = this . getMessageControl ( ) . getSchemaLocation ( version , schemaLocation ) ; if ( namespace != null ) importel . setNamespace ( namespace ) ; importel . setSchemaLocation ( schemaLocation ) ;
public class StandardResourceDescriptionResolver { /** * { @ inheritDoc } */ @ Override public String getOperationDeprecatedDescription ( String operationName , Locale locale , ResourceBundle bundle ) { } }
return bundle . getString ( getBundleKey ( operationName , DEPRECATED ) ) ;
public class AbstractModule { /** * Registers an object / data structure to the module . Objects registered by * this method are accessible by services and controllers via { @ link Inject } * annotation within the same module , or to a module during configuration . * For example , * < pre > * MyModule module = new MyModule ( ) ; * Angular . module ( module ) ; * module . constant ( " myConstant " , " Hello , World ! " ) ; * { @ code module . configure ( MyServiceProvider . class , Configurator < MyServiceProvider > ( ) } { * public void configure ( MyServiceProvider provider ) { * / / configure provider * class MyServiceProvider implements Provider { * { @ code @ Injector . Inject ( " myConstant " ) } * String myConstant ; / / injector assigns " Hello , World ! " * < / pre > * The concept of value in AngularJS is a useful way to manage objects * that are of module scope . With GWT , however , we can accomplish the same * thing by simply using the Java package name with { @ code public static } , * if the value is used exclusively in GWT . The method is nevertheless * useful if your module is expected to be a hybrid of GWT and JavaScript . * @ param name Name of the object . * @ param object The instance of the object . */ public AbstractModule constant ( String name , Object value ) { } }
ngo . constant ( name , value ) ; return this ;
public class systemuser { /** * Use this API to delete systemuser of given name . */ public static base_response delete ( nitro_service client , String username ) throws Exception { } }
systemuser deleteresource = new systemuser ( ) ; deleteresource . username = username ; return deleteresource . delete_resource ( client ) ;
public class RelationalOperator { /** * Gets the RelationalOperator performing less than comparisons to determine whether all provided values are less than * the given upper bound value . * @ param lowerBound the Comparable upper bounded value . * @ param < T > the expected Class type for the object used in the less than comparison . * @ return a RelationalOperator for the less than comparison . */ public static < T extends Comparable < T > > RelationalOperator < T > lessThan ( T lowerBound ) { } }
return new LessThanOperator < > ( lowerBound ) ;
public class RedoLog { /** * Reads the log file and calls back { @ link RedoLog . ActionCollector } . * @ param collector called back for each { @ link MultiIndex . Action } read . * @ throws IOException if an error occurs while reading from the * log file . */ private void read ( final ActionCollector collector ) throws IOException { } }
if ( ! dir . fileExists ( REDO_LOG ) ) { return ; } InputStream in = new IndexInputStream ( dir . openInput ( REDO_LOG ) ) ; BufferedReader reader = null ; try { reader = new BufferedReader ( new InputStreamReader ( in ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { try { collector . collect ( MultiIndex . Action . fromString ( line ) ) ; } catch ( IllegalArgumentException e ) { log . warn ( "Malformed redo entry: " + e . getMessage ( ) ) ; } } } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( IOException e ) { log . warn ( "Exception while closing redo log: " + e . toString ( ) ) ; } } if ( in != null ) { try { in . close ( ) ; } catch ( IOException e ) { log . warn ( "Exception while closing redo log: " + e . toString ( ) ) ; } } }
public class CPDefinitionPersistenceImpl { /** * Removes all the cp definitions where uuid = & # 63 ; from the database . * @ param uuid the uuid */ @ Override public void removeByUuid ( String uuid ) { } }
for ( CPDefinition cpDefinition : findByUuid ( uuid , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpDefinition ) ; }
public class ExecutorBoss { /** * The start the work threads * @ param queue the queue * @ param background determine to while for futures to complete * @ return the collection of futures */ public Collection < Future < ? > > startWorking ( WorkQueue queue , boolean background ) { } }
ArrayList < Future < ? > > futures = new ArrayList < Future < ? > > ( queue . size ( ) ) ; while ( queue . hasMoreTasks ( ) ) { futures . add ( executor . submit ( queue . nextTask ( ) ) ) ; } if ( background ) return futures ; try { for ( Future < ? > future : futures ) { future . get ( ) ; // join submitted thread } return futures ; } catch ( InterruptedException e ) { throw new SystemException ( e ) ; } catch ( ExecutionException e ) { throw new SystemException ( e ) ; }
public class Logger { /** * Logs an important information message * @ param correlationId ( optional ) transaction id to trace execution through * call chain . * @ param message a human - readable message to log . * @ param args arguments to parameterize the message . */ public void info ( String correlationId , String message , Object ... args ) { } }
formatAndWrite ( LogLevel . Info , correlationId , null , message , args ) ;
public class ParserUtils { /** * Converts a String to the given timezone . * @ param date Date to format * @ param zoneId Zone id to convert from sherdog ' s time * @ param formatter Formatter for exotic date format * @ return the converted zonedatetime */ static ZonedDateTime getDateFromStringToZoneId ( String date , ZoneId zoneId , DateTimeFormatter formatter ) throws DateTimeParseException { } }
try { // noticed that date not parsed with non - US locale . For me this fix is helpful LocalDate localDate = LocalDate . parse ( date , formatter ) ; ZonedDateTime usDate = localDate . atStartOfDay ( zoneId ) ; return usDate . withZoneSameInstant ( zoneId ) ; } catch ( Exception e ) { // In case the parsing fail , we try without time try { ZonedDateTime usDate = LocalDate . parse ( date , formatter ) . atStartOfDay ( ZoneId . of ( Constants . SHERDOG_TIME_ZONE ) ) ; return usDate . withZoneSameInstant ( zoneId ) ; } catch ( DateTimeParseException e2 ) { return null ; } }
public class RemoteService { /** * Calls a remote service with non - static member values in the given DataObject as arguments . */ public static Response call ( String server , String service , DataObject data , String ... params ) { } }
return call ( server , service , false , data , params ) ;
public class DualInputOperator { /** * Add to the first input the union of the given operators . * @ param input The operator ( s ) to be unioned with the first input . * @ deprecated This method will be removed in future versions . Use the { @ link Union } operator instead . */ @ Deprecated public void addFirstInput ( Operator < IN1 > ... input ) { } }
this . input1 = Operator . createUnionCascade ( this . input1 , input ) ;
public class WebhookCluster { /** * Sends the provided { @ link java . io . File File } * to all registered { @ link net . dv8tion . jda . webhook . WebhookClient WebhookClients } . * < br > Use { @ link WebhookMessage # files ( String , Object , Object . . . ) } to send up to 10 files ! * < p > < b > The provided data should not exceed 8MB in size ! < / b > * @ param file * The file that should be sent to the clients * @ throws java . lang . IllegalArgumentException * If the provided file is { @ code null } , does not exist or ist not readable * @ throws java . util . concurrent . RejectedExecutionException * If any of the receivers has been shutdown * @ return A list of { @ link java . util . concurrent . Future Future } instances * representing all message tasks . */ public List < RequestFuture < ? > > broadcast ( File file ) { } }
Checks . notNull ( file , "File" ) ; return broadcast ( file , file . getName ( ) ) ;
public class LoopFrameSkipping { /** * Check if screen has sync locked . * @ param screen The screen reference . * @ return < code > true < / code > if sync enabled , < code > false < / code > else . */ private static boolean hasSync ( Screen screen ) { } }
final Config config = screen . getConfig ( ) ; final Resolution output = config . getOutput ( ) ; return config . isWindowed ( ) && output . getRate ( ) > 0 ;
public class InboundNatRulesInner { /** * Creates or updates a load balancer inbound nat rule . * @ param resourceGroupName The name of the resource group . * @ param loadBalancerName The name of the load balancer . * @ param inboundNatRuleName The name of the inbound nat rule . * @ param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule operation . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < InboundNatRuleInner > createOrUpdateAsync ( String resourceGroupName , String loadBalancerName , String inboundNatRuleName , InboundNatRuleInner inboundNatRuleParameters , final ServiceCallback < InboundNatRuleInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , loadBalancerName , inboundNatRuleName , inboundNatRuleParameters ) , serviceCallback ) ;
public class AsciiSet { /** * Returns a new set that will match characters iff they are included this set and in the * set that is provided . */ public AsciiSet intersection ( AsciiSet set ) { } }
final boolean [ ] intersectionMembers = new boolean [ 128 ] ; for ( int i = 0 ; i < intersectionMembers . length ; ++ i ) { intersectionMembers [ i ] = members [ i ] && set . members [ i ] ; } return new AsciiSet ( intersectionMembers ) ;
public class ClasspathFolder { /** * @ see # navigate ( String ) * @ param path the { @ link ResourcePathNode } . * @ param create - { @ code true } if non existing ressources should be created as fake resources , * { @ code false } oterhwise . * @ return the { @ link AbstractBrowsableClasspathResource } . May be { @ code null } if the given { @ code path } * does not exist and { @ code create } is { @ code false } . */ AbstractBrowsableClasspathResource navigate ( ResourcePathNode < Void > path , boolean create ) { } }
ClasspathFolder folder = this ; List < ResourcePathNode < Void > > pathList = path . asList ( ) ; for ( ResourcePathNode < Void > node : pathList ) { String nodeName = node . getName ( ) ; if ( node . isRoot ( ) ) { if ( node . isAbsolute ( ) ) { if ( node == ResourcePathNode . ROOT_ABSOLUTE ) { folder = getRoot ( ) ; } else { throw new IllegalArgumentException ( nodeName ) ; } } } else if ( node . isParentDirectory ( ) ) { if ( ! folder . isRoot ( ) ) { folder = folder . getParent ( ) ; } } else { AbstractBrowsableClasspathResource childResource = folder . getChildResource ( nodeName ) ; if ( childResource == null ) { if ( ! create ) { return null ; } if ( ( node == path ) && ( nodeName . indexOf ( '.' ) >= 0 ) ) { childResource = new ClasspathFile ( folder , nodeName ) ; } else { childResource = new ClasspathFolder ( folder , nodeName ) ; } } if ( childResource . isFolder ( ) ) { folder = ( ClasspathFolder ) childResource ; } else if ( node == path ) { return childResource ; } else { // actually illegal classpath return null ; } } } return folder ;
public class SemanticProperties { /** * Adds , to the existing information , field ( s ) that are written in * the destination record ( s ) . * @ param writtenFields the position ( s ) in the destination record ( s ) */ public void addWrittenFields ( FieldSet writtenFields ) { } }
if ( this . writtenFields == null ) { this . writtenFields = new FieldSet ( writtenFields ) ; } else { this . writtenFields . addAll ( writtenFields ) ; }
public class PySrcMain { /** * Generate the manifest file by finding the output file paths and converting them into a Python * import format . */ private static ImmutableMap < String , String > generateManifest ( List < String > soyNamespaces , Multimap < String , Integer > outputs ) { } }
ImmutableMap . Builder < String , String > manifest = new ImmutableMap . Builder < > ( ) ; for ( String outputFilePath : outputs . keySet ( ) ) { for ( int inputFileIndex : outputs . get ( outputFilePath ) ) { String pythonPath = outputFilePath . replace ( ".py" , "" ) . replace ( '/' , '.' ) ; manifest . put ( soyNamespaces . get ( inputFileIndex ) , pythonPath ) ; } } return manifest . build ( ) ;
public class TrackerClient { /** * Fire the announce response event to all listeners . * @ param complete The number of seeders on this torrent . * @ param incomplete The number of leechers on this torrent . * @ param interval The announce interval requested by the tracker . */ protected void fireAnnounceResponseEvent ( int complete , int incomplete , int interval , String hexInfoHash ) { } }
for ( AnnounceResponseListener listener : this . listeners ) { listener . handleAnnounceResponse ( interval , complete , incomplete , hexInfoHash ) ; }
public class GGradientToEdgeFeatures { /** * Sets edge intensities to zero if the pixel has an intensity which is less than any of * the two adjacent pixels . Pixel adjacency is determined based upon the sign of the image gradient . Less precise * than other methods , but faster . * @ param intensity Edge intensities . Not modified . * @ param derivX Image derivative along x - axis . * @ param derivY Image derivative along y - axis . * @ param output Filtered intensity . Modified . */ static public < D extends ImageGray < D > > void nonMaxSuppressionCrude4 ( GrayF32 intensity , D derivX , D derivY , GrayF32 output ) { } }
if ( derivX instanceof GrayF32 ) { GradientToEdgeFeatures . nonMaxSuppressionCrude4 ( intensity , ( GrayF32 ) derivX , ( GrayF32 ) derivY , output ) ; } else if ( derivX instanceof GrayS16 ) { GradientToEdgeFeatures . nonMaxSuppressionCrude4 ( intensity , ( GrayS16 ) derivX , ( GrayS16 ) derivY , output ) ; } else if ( derivX instanceof GrayS32 ) { GradientToEdgeFeatures . nonMaxSuppressionCrude4 ( intensity , ( GrayS32 ) derivX , ( GrayS32 ) derivY , output ) ; } else { throw new IllegalArgumentException ( "Unknown input type" ) ; }
public class ConfigFactory { /** * Like { @ link # load ( Config ) } but allows you to specify * { @ link ConfigResolveOptions } . * @ param config * the application ' s portion of the configuration * @ param resolveOptions * options for resolving the assembled typesafe stack * @ return resolved configuration with overrides and fallbacks added */ public static Config load ( Config config , ConfigResolveOptions resolveOptions ) { } }
return load ( Thread . currentThread ( ) . getContextClassLoader ( ) , config , resolveOptions ) ;
public class Params { /** * Bridging method between flags and params , provided for efficient checks . */ public long toFlagsBitSet ( ) { } }
PersistenceMode persistenceMode = ( PersistenceMode ) params [ PersistenceMode . ID ] . get ( ) ; LockingMode lockingMode = ( LockingMode ) params [ LockingMode . ID ] . get ( ) ; ExecutionMode executionMode = ( ExecutionMode ) params [ ExecutionMode . ID ] . get ( ) ; StatisticsMode statisticsMode = ( StatisticsMode ) params [ StatisticsMode . ID ] . get ( ) ; ReplicationMode replicationMode = ( ReplicationMode ) params [ ReplicationMode . ID ] . get ( ) ; long flagsBitSet = 0 ; switch ( persistenceMode ) { case SKIP_PERSIST : flagsBitSet |= FlagBitSets . SKIP_CACHE_STORE ; break ; case SKIP_LOAD : flagsBitSet |= FlagBitSets . SKIP_CACHE_LOAD ; break ; case SKIP : flagsBitSet |= FlagBitSets . SKIP_CACHE_LOAD | FlagBitSets . SKIP_CACHE_STORE ; break ; } switch ( lockingMode ) { case SKIP : flagsBitSet |= FlagBitSets . SKIP_LOCKING ; break ; case TRY_LOCK : flagsBitSet |= FlagBitSets . ZERO_LOCK_ACQUISITION_TIMEOUT ; break ; } switch ( executionMode ) { case LOCAL : flagsBitSet |= FlagBitSets . CACHE_MODE_LOCAL ; break ; case LOCAL_SITE : flagsBitSet |= FlagBitSets . SKIP_XSITE_BACKUP ; break ; } if ( statisticsMode == StatisticsMode . SKIP ) { flagsBitSet |= FlagBitSets . SKIP_STATISTICS ; } switch ( replicationMode ) { case SYNC : flagsBitSet |= FlagBitSets . FORCE_SYNCHRONOUS ; break ; case ASYNC : flagsBitSet |= FlagBitSets . FORCE_ASYNCHRONOUS ; break ; } return flagsBitSet ;
public class BingSpellCheckOperationsImpl { /** * The Bing Spell Check API lets you perform contextual grammar and spell checking . Bing has developed a web - based spell - checker that leverages machine learning and statistical machine translation to dynamically train a constantly evolving and highly contextual algorithm . The spell - checker is based on a massive corpus of web searches and documents . * @ param text The text string to check for spelling and grammar errors . The combined length of the text string , preContextText string , and postContextText string may not exceed 10,000 characters . You may specify this parameter in the query string of a GET request or in the body of a POST request . Because of the query string length limit , you ' ll typically use a POST request unless you ' re checking only short strings . * @ param spellCheckerOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws ErrorResponseException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the SpellCheck object if successful . */ public SpellCheck spellChecker ( String text , SpellCheckerOptionalParameter spellCheckerOptionalParameter ) { } }
return spellCheckerWithServiceResponseAsync ( text , spellCheckerOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PemPrivateKey { /** * Creates a { @ link PemEncoded } value from the { @ link PrivateKey } . */ static PemEncoded toPEM ( ByteBufAllocator allocator , boolean useDirect , PrivateKey key ) { } }
// We can take a shortcut if the private key happens to be already // PEM / PKCS # 8 encoded . This is the ideal case and reason why all // this exists . It allows the user to pass pre - encoded bytes straight // into OpenSSL without having to do any of the extra work . if ( key instanceof PemEncoded ) { return ( ( PemEncoded ) key ) . retain ( ) ; } byte [ ] bytes = key . getEncoded ( ) ; if ( bytes == null ) { throw new IllegalArgumentException ( key . getClass ( ) . getName ( ) + " does not support encoding" ) ; } return toPEM ( allocator , useDirect , bytes ) ;
public class EmbeddedJavaProcessExecutor { /** * Resolves the Java { @ link Class } containing the { @ literal main } method to the Java program to execute * from the given array of { @ link String arguments } . * @ param < T > { @ link Class } type of the main Java program . * @ param args array of { @ link String arguments } from which to extract the main Java { @ link Class } * of the Java program . * @ return the Java { @ link Class } containing the { @ literal main } method to the Java program . * @ see java . lang . Class */ protected < T > Class < T > resolveJavaClassFrom ( String ... args ) { } }
return Arrays . stream ( nullSafeArray ( args , String . class ) ) . filter ( ObjectUtils :: isPresent ) . findFirst ( ) . < Class < T > > map ( ObjectUtils :: loadClass ) . orElse ( null ) ;
public class Organizer { /** * Get element by index * @ param < T > the input type * @ param i the index * @ param args the input argument * @ return the object at the index */ public static < T > T at ( int i , T [ ] args ) { } }
if ( args == null || i < 0 ) return null ; if ( i >= args . length ) return null ; return args [ i ] ;
public class Utils { /** * Load dependencies from a resource . * @ param clasz * Class to use for loading the resource - Cannot be < code > null < / code > . * @ param resourcePathAndName * Name and path of the XML file ( in the class path ) - Cannot be < code > null < / code > . * @ return New dependencies instance . */ public static Dependencies load ( final Class < ? > clasz , final String resourcePathAndName ) { } }
Utils4J . checkNotNull ( "clasz" , clasz ) ; Utils4J . checkNotNull ( "resourcePathAndName" , resourcePathAndName ) ; try { final URL url = clasz . getResource ( resourcePathAndName ) ; if ( url == null ) { throw new RuntimeException ( "Resource '" + resourcePathAndName + "' not found!" ) ; } final InputStream in = url . openStream ( ) ; try { return load ( in ) ; } finally { in . close ( ) ; } } catch ( final IOException ex ) { throw new RuntimeException ( ex ) ; }
public class VirtualMachineScaleSetsInner { /** * Deletes a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable for the request */ public Observable < OperationStatusResponseInner > deleteAsync ( String resourceGroupName , String vmScaleSetName ) { } }
return deleteWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { @ Override public OperationStatusResponseInner call ( ServiceResponse < OperationStatusResponseInner > response ) { return response . body ( ) ; } } ) ;
public class ZipFileIndex { private byte [ ] getHeader ( Entry entry ) throws IOException { } }
zipRandomFile . seek ( entry . offset ) ; byte [ ] header = new byte [ 30 ] ; zipRandomFile . readFully ( header ) ; if ( get4ByteLittleEndian ( header , 0 ) != 0x04034b50 ) throw new ZipException ( "corrupted zip file" ) ; if ( ( get2ByteLittleEndian ( header , 6 ) & 1 ) != 0 ) throw new ZipException ( "encrypted zip file" ) ; // offset 6 in the header of the ZipFileEntry return header ;
public class JCudaDriver { /** * Returns information about the device . * < pre > * CUresult cuDeviceGetAttribute ( * int * pi , * CUdevice _ attribute attrib , * CUdevice dev ) * < / pre > * < div > * < p > Returns information about the device . * Returns in < tt > * pi < / tt > the integer value of the attribute < tt > attrib < / tt > on device < tt > dev < / tt > . The supported attributes are : * < ul > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ THREADS _ PER _ BLOCK : Maximum number of threads * per block ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ BLOCK _ DIM _ X : * Maximum x - dimension of a block ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ BLOCK _ DIM _ Y : * Maximum y - dimension of a block ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ BLOCK _ DIM _ Z : * Maximum z - dimension of a block ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ GRID _ DIM _ X : * Maximum x - dimension of a grid ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ GRID _ DIM _ Y : * Maximum y - dimension of a grid ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ GRID _ DIM _ Z : * Maximum z - dimension of a grid ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ SHARED _ MEMORY _ PER _ BLOCK : Maximum amount of * shared memory available to a thread block in bytes ; this amount is * shared by all thread blocks simultaneously * resident on a multiprocessor ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ TOTAL _ CONSTANT _ MEMORY : Memory available on device * for _ _ constant _ _ variables in a CUDA C kernel in bytes ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ WARP _ SIZE : * Warp size in threads ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ PITCH : * Maximum pitch in bytes allowed by the memory copy functions that * involve memory regions allocated through cuMemAllocPitch ( ) ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE1D _ WIDTH : Maximum 1D texture * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE1D _ LINEAR _ WIDTH : Maximum width for * a 1D texture bound to linear memory ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE1D _ MIPMAPPED _ WIDTH : Maximum * mipmapped 1D texture width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ WIDTH : Maximum 2D texture * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ HEIGHT : Maximum 2D texture * height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LINEAR _ WIDTH : Maximum width for * a 2D texture bound to linear memory ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LINEAR _ HEIGHT : Maximum height * for a 2D texture bound to linear memory ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LINEAR _ PITCH : Maximum pitch in * bytes for a 2D texture bound to linear memory ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ MIPMAPPED _ WIDTH : Maximum * mipmapped 2D texture width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ MIPMAPPED _ HEIGHT : Maximum * mipmapped 2D texture height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ WIDTH : Maximum 3D texture * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ HEIGHT : Maximum 3D texture * height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ DEPTH : Maximum 3D texture * depth ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ WIDTH _ ALTERNATE : Alternate * maximum 3D texture width , 0 if no alternate maximum 3D texture size is * supported ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ HEIGHT _ ALTERNATE : Alternate * maximum 3D texture height , 0 if no alternate maximum 3D texture size * is supported ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE3D _ DEPTH _ ALTERNATE : Alternate * maximum 3D texture depth , 0 if no alternate maximum 3D texture size is * supported ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURECUBEMAP _ WIDTH : Maximum cubemap * texture width or height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE1D _ LAYERED _ WIDTH : Maximum 1D * layered texture width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE1D _ LAYERED _ LAYERS : Maximum layers * in a 1D layered texture ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LAYERED _ WIDTH : Maximum 2D * layered texture width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LAYERED _ HEIGHT : Maximum 2D * layered texture height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURE2D _ LAYERED _ LAYERS : Maximum layers * in a 2D layered texture ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURECUBEMAP _ LAYERED _ WIDTH : Maximum * cubemap layered texture width or height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ TEXTURECUBEMAP _ LAYERED _ LAYERS : Maximum * layers in a cubemap layered texture ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE1D _ WIDTH : Maximum 1D surface * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE2D _ WIDTH : Maximum 2D surface * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE2D _ HEIGHT : Maximum 2D surface * height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE3D _ WIDTH : Maximum 3D surface * width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE3D _ HEIGHT : Maximum 3D surface * height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE3D _ DEPTH : Maximum 3D surface * depth ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE1D _ LAYERED _ WIDTH : Maximum 1D * layered surface width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE1D _ LAYERED _ LAYERS : Maximum layers * in a 1D layered surface ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE2D _ LAYERED _ WIDTH : Maximum 2D * layered surface width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE2D _ LAYERED _ HEIGHT : Maximum 2D * layered surface height ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACE2D _ LAYERED _ LAYERS : Maximum layers * in a 2D layered surface ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACECUBEMAP _ WIDTH : Maximum cubemap * surface width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACECUBEMAP _ LAYERED _ WIDTH : Maximum * cubemap layered surface width ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAXIMUM _ SURFACECUBEMAP _ LAYERED _ LAYERS : Maximum * layers in a cubemap layered surface ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ REGISTERS _ PER _ BLOCK : Maximum number of 32 - bit * registers available to a thread block ; this number is shared by all * thread blocks simultaneously * resident on a multiprocessor ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ CLOCK _ RATE : * Typical clock frequency in kilohertz ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ TEXTURE _ ALIGNMENT : * Alignment requirement ; texture base addresses aligned to textureAlign * bytes do not need an offset applied to texture fetches ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ TEXTURE _ PITCH _ ALIGNMENT : Pitch alignment * requirement for 2D texture references bound to pitched memory ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ GPU _ OVERLAP : * 1 if the device can concurrently copy memory between host and device * while executing a kernel , or 0 if not ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MULTIPROCESSOR _ COUNT : Number of multiprocessors * on the device ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ KERNEL _ EXEC _ TIMEOUT : * 1 if there is a run time limit for kernels executed on the device , or * 0 if not ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ INTEGRATED : * 1 if the device is integrated with the memory subsystem , or 0 if not ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ CAN _ MAP _ HOST _ MEMORY : * 1 if the device can map host memory into the CUDA address space , or 0 * if not ; * < / li > * < li > * < div > * CU _ DEVICE _ ATTRIBUTE _ COMPUTE _ MODE : * Compute mode that device is currently in . Available modes are as * follows : * < ul > * < li > * < p > CU _ COMPUTEMODE _ DEFAULT : * Default mode - Device is not restricted and can have multiple CUDA * contexts present at a single time . * < / li > * < li > * < p > CU _ COMPUTEMODE _ EXCLUSIVE : * Compute - exclusive mode - Device can have only one CUDA context present * on it at a time . * < / li > * < li > * < p > CU _ COMPUTEMODE _ PROHIBITED : * Compute - prohibited mode - Device is prohibited from creating new CUDA * contexts . * < / li > * < li > * < p > CU _ COMPUTEMODE _ EXCLUSIVE _ PROCESS : Compute - exclusive - process mode - * Device can have only one context used by a single process at a time . * < / li > * < / ul > * < / div > * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ CONCURRENT _ KERNELS : * 1 if the device supports executing multiple kernels within the same * context simultaneously , or 0 if not . It is not guaranteed * that multiple kernels will be * resident on the device concurrently so this feature should not be * relied upon for correctness ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ ECC _ ENABLED : * 1 if error correction is enabled on the device , 0 if error correction * is disabled or not supported by the device ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ PCI _ BUS _ ID : * PCI bus identifier of the device ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ PCI _ DEVICE _ ID : * PCI device ( also known as slot ) identifier of the device ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ PCI _ DOMAIN _ ID : * PCI domain identifier of the device * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ TCC _ DRIVER : * 1 if the device is using a TCC driver . TCC is only available on Tesla * hardware running Windows Vista or later ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MEMORY _ CLOCK _ RATE : * Peak memory clock frequency in kilohertz ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ GLOBAL _ MEMORY _ BUS _ WIDTH : Global memory bus width * in bits ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ L2 _ CACHE _ SIZE : * Size of L2 cache in bytes . 0 if the device doesn ' t have L2 cache ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ THREADS _ PER _ MULTIPROCESSOR : Maximum resident * threads per multiprocessor ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ UNIFIED _ ADDRESSING : * 1 if the device shares a unified address space with the host , or 0 if * not ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ COMPUTE _ CAPABILITY _ MAJOR : Major compute capability * version number ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ COMPUTE _ CAPABILITY _ MINOR : Minor compute capability * version number ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ GLOBAL _ L1 _ CACHE _ SUPPORTED : 1 if device supports caching globals * in L1 cache , 0 if caching globals in L1 cache is not supported by the device * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ LOCAL _ L1 _ CACHE _ SUPPORTED : 1 if device supports caching locals * in L1 cache , 0 if caching locals in L1 cache is not supported by the device ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ SHARED _ MEMORY _ PER _ MULTIPROCESSOR : Maximum amount of * shared memory available to a multiprocessor in bytes ; this amount is shared * by all thread blocks simultaneously resident on a multiprocessor ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ REGISTERS _ PER _ MULTIPROCESSOR : Maximum number of 32 - bit * registers available to a multiprocessor ; this number is shared by all thread * blocks simultaneously resident on a multiprocessor ; * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MANAGED _ MEMORY : 1 if device supports allocating managed memory * on this system , 0 if allocating managed memory is not supported by the device on this system . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MULTI _ GPU _ BOARD : 1 if device is on a multi - GPU board , 0 if not . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MULTI _ GPU _ BOARD _ GROUP _ ID : Unique identifier for a group of devices * associated with the same board . Devices on the same multi - GPU board will share the same identifier . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ HOST _ NATIVE _ ATOMIC _ SUPPORTED : 1 if Link between the device and the host * supports native atomic operations . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ SINGLE _ TO _ DOUBLE _ PRECISION _ PERF _ RATIO : Ratio of single precision performance * ( in floating - point operations per second ) to double precision performance . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ PAGEABLE _ MEMORY _ ACCESS : Device suppports coherently accessing * pageable memory without calling cudaHostRegister on it . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ CONCURRENT _ MANAGED _ ACCESS : Device can coherently access managed memory * concurrently with the CPU . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ COMPUTE _ PREEMPTION _ SUPPORTED : Device supports Compute Preemption . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ CAN _ USE _ HOST _ POINTER _ FOR _ REGISTERED _ MEM : Device can access host registered * memory at the same virtual address as the CPU . * < / li > * < li > * < p > CU _ DEVICE _ ATTRIBUTE _ MAX _ SHARED _ MEMORY _ PER _ BLOCK _ OPTIN : The maximum per block shared memory size * suported on this device . This is the maximum value that can be opted into when using the cuFuncSetAttribute ( ) call . * For more details see : : CU _ FUNC _ ATTRIBUTE _ MAX _ DYNAMIC _ SHARED _ SIZE _ BYTES * < / li > * < / ul > * < div > * < span > Note : < / span > * < p > Note that this * function may also return error codes from previous , asynchronous * launches . * < / div > * < / div > * @ param pi Returned device attribute value * @ param attrib Device attribute to query * @ param dev Device handle * @ return CUDA _ SUCCESS , CUDA _ ERROR _ DEINITIALIZED , CUDA _ ERROR _ NOT _ INITIALIZED , * CUDA _ ERROR _ INVALID _ CONTEXT , CUDA _ ERROR _ INVALID _ VALUE , * CUDA _ ERROR _ INVALID _ DEVICE * @ see JCudaDriver # cuDeviceGetCount * @ see JCudaDriver # cuDeviceGetName * @ see JCudaDriver # cuDeviceGet * @ see JCudaDriver # cuDeviceTotalMem */ public static int cuDeviceGetAttribute ( int pi [ ] , int attrib , CUdevice dev ) { } }
return checkResult ( cuDeviceGetAttributeNative ( pi , attrib , dev ) ) ;
public class JDBCStoreResource { /** * Sets the current transaction timeout value for this XAResource instance . * @ param _ seconds number of seconds * @ return always < i > true < / i > */ @ Override public boolean setTransactionTimeout ( final int _seconds ) { } }
if ( JDBCStoreResource . LOG . isDebugEnabled ( ) ) { JDBCStoreResource . LOG . debug ( "setTransactionTimeout (seconds = " + _seconds + ")" ) ; } return true ;
public class PresentsDObjectMgr { /** * Performs the processing associated with a compound event , notifying listeners and the like . */ protected void processCompoundEvent ( CompoundEvent event ) { } }
List < DEvent > events = event . getEvents ( ) ; int ecount = events . size ( ) ; // look up the target object DObject target = _objects . get ( event . getTargetOid ( ) ) ; if ( target == null ) { log . debug ( "Compound event target no longer exists" , "event" , event ) ; return ; } // check the permissions on all of the events for ( int ii = 0 ; ii < ecount ; ii ++ ) { DEvent sevent = events . get ( ii ) ; if ( ! target . checkPermissions ( sevent ) ) { log . warning ( "Event failed permissions check" , "event" , sevent , "target" , target ) ; return ; } } // dispatch the events for ( int ii = 0 ; ii < ecount ; ii ++ ) { dispatchEvent ( events . get ( ii ) , target ) ; } // always notify proxies of compound events target . notifyProxies ( event ) ;
public class ApiOvhDomain { /** * Delete a whois obfuscator * REST : DELETE / domain / { serviceName } / owo / { field } * @ param serviceName [ required ] The internal name of your domain * @ param field [ required ] Obfuscated field */ public void serviceName_owo_field_DELETE ( String serviceName , net . minidev . ovh . api . domain . OvhWhoisObfuscatorFieldsEnum field ) throws IOException { } }
String qPath = "/domain/{serviceName}/owo/{field}" ; StringBuilder sb = path ( qPath , serviceName , field ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ;
public class EventFeedbackTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EventFeedbackType eventFeedbackType , ProtocolMarshaller protocolMarshaller ) { } }
if ( eventFeedbackType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( eventFeedbackType . getFeedbackValue ( ) , FEEDBACKVALUE_BINDING ) ; protocolMarshaller . marshall ( eventFeedbackType . getProvider ( ) , PROVIDER_BINDING ) ; protocolMarshaller . marshall ( eventFeedbackType . getFeedbackDate ( ) , FEEDBACKDATE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class PropertiesManager { /** * Determine whether or not one property holds references to another property . * @ param property1 * the property to check for references * @ param property2 * the target referenced property * @ return < code > true < / code > if the first property references the second ; * < code > false < / code > otherwise */ public boolean isReferencing ( T property1 , T property2 ) { } }
return getEvaluator ( ) . isReferencing ( getRawProperty ( property1 ) , getTranslator ( ) . getPropertyName ( property2 ) , getRetriever ( ) ) ;
public class GreenPepperXmlRpcClient { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public Reference getReference ( Reference reference , String identifier ) throws GreenPepperServerException { } }
Vector params = CollectionUtil . toVector ( reference . marshallize ( ) ) ; log . debug ( "Retrieving Reference: " + reference . getRequirement ( ) . getName ( ) + "," + reference . getSpecification ( ) . getName ( ) ) ; Vector < Object > referenceParams = ( Vector < Object > ) execute ( XmlRpcMethodName . getReference , params , identifier ) ; return XmlRpcDataMarshaller . toReference ( referenceParams ) ;
public class ListenerFactory { /** * Creates a list of adapters for the given object , based on the legacy * listener interfaces it implements . * @ param provider * An object that implements zero or more legacy listener interfaces . * @ return * The list of listeners represented by the given provider class . */ @ SuppressWarnings ( "deprecation" ) private static List < Listener > createListenerAdapters ( Object provider ) { } }
final List < Listener > listeners = new ArrayList < Listener > ( ) ; if ( provider instanceof AuthenticationSuccessListener ) { listeners . add ( new AuthenticationSuccessListenerAdapter ( ( AuthenticationSuccessListener ) provider ) ) ; } if ( provider instanceof AuthenticationFailureListener ) { listeners . add ( new AuthenticationFailureListenerAdapter ( ( AuthenticationFailureListener ) provider ) ) ; } if ( provider instanceof TunnelConnectListener ) { listeners . add ( new TunnelConnectListenerAdapter ( ( TunnelConnectListener ) provider ) ) ; } if ( provider instanceof TunnelCloseListener ) { listeners . add ( new TunnelCloseListenerAdapter ( ( TunnelCloseListener ) provider ) ) ; } return listeners ;
public class MailRequest { /** * Creates a MimeMessage containing given Multipart . * Subject , sender and content and session will be set . * @ param session current mail session * @ return MimeMessage without recipients * @ throws MessagingException */ public MimeMessage createMimeMessage ( Session session ) throws MessagingException { } }
if ( isEmpty ( htmlPart ) && isEmpty ( textPart ) ) { throw new IllegalArgumentException ( "Missing email content" ) ; } final MimeMessage msg = new MimeMessage ( session ) ; msg . setSubject ( subject ) ; msg . setFrom ( new InternetAddress ( from ) ) ; msg . setContent ( createMultiPart ( ) ) ; msg . setRecipients ( Message . RecipientType . TO , InternetAddress . parse ( recipients , false ) ) ; return msg ;
public class AWSACMPCAClient { /** * Adds one or more tags to your private CA . Tags are labels that you can use to identify and organize your AWS * resources . Each tag consists of a key and an optional value . You specify the private CA on input by its Amazon * Resource Name ( ARN ) . You specify the tag by using a key - value pair . You can apply a tag to just one private CA if * you want to identify a specific characteristic of that CA , or you can apply the same tag to multiple private CAs * if you want to filter for a common relationship among those CAs . To remove one or more tags , use the * < a > UntagCertificateAuthority < / a > operation . Call the < a > ListTags < / a > operation to see what tags are associated * with your CA . * @ param tagCertificateAuthorityRequest * @ return Result of the TagCertificateAuthority operation returned by the service . * @ throws ResourceNotFoundException * A resource such as a private CA , S3 bucket , certificate , or audit report cannot be found . * @ throws InvalidArnException * The requested Amazon Resource Name ( ARN ) does not refer to an existing resource . * @ throws InvalidStateException * The private CA is in a state during which a report or certificate cannot be generated . * @ throws InvalidTagException * The tag associated with the CA is not valid . The invalid argument is contained in the message field . * @ throws TooManyTagsException * You can associate up to 50 tags with a private CA . Exception information is contained in the exception * message field . * @ sample AWSACMPCA . TagCertificateAuthority * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / acm - pca - 2017-08-22 / TagCertificateAuthority " * target = " _ top " > AWS API Documentation < / a > */ @ Override public TagCertificateAuthorityResult tagCertificateAuthority ( TagCertificateAuthorityRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeTagCertificateAuthority ( request ) ;
public class ThriftFunction { /** * Sets the success field of the specified { @ code result } to the specified { @ code value } . */ public void setSuccess ( TBase < ? , ? > result , Object value ) { } }
if ( successField != null ) { ThriftFieldAccess . set ( result , successField , value ) ; }
public class SyntaxCtr { public static String getName ( String x ) { } }
String ret = null ; if ( x . equals ( "280" ) ) { ret = "DE" ; } else if ( x . equals ( "040" ) ) { ret = "AT" ; } else if ( x . equals ( "250" ) ) { ret = "FR" ; } else if ( x . equals ( "056" ) ) { ret = "BE" ; } else if ( x . equals ( "100" ) ) { ret = "BG" ; } else if ( x . equals ( "208" ) ) { ret = "DK" ; } else if ( x . equals ( "246" ) ) { ret = "FI" ; } else if ( x . equals ( "300" ) ) { ret = "GR" ; } else if ( x . equals ( "826" ) ) { ret = "GB" ; } else if ( x . equals ( "372" ) ) { ret = "IE" ; } else if ( x . equals ( "352" ) ) { ret = "IS" ; } else if ( x . equals ( "380" ) ) { ret = "IT" ; } else if ( x . equals ( "392" ) ) { ret = "JP" ; } else if ( x . equals ( "124" ) ) { ret = "CA" ; } else if ( x . equals ( "191" ) ) { ret = "HR" ; } else if ( x . equals ( "438" ) ) { ret = "LI" ; } else if ( x . equals ( "442" ) ) { ret = "LU" ; } else if ( x . equals ( "528" ) ) { ret = "NL" ; } else if ( x . equals ( "578" ) ) { ret = "NO" ; } else if ( x . equals ( "616" ) ) { ret = "PL" ; } else if ( x . equals ( "620" ) ) { ret = "PT" ; } else if ( x . equals ( "642" ) ) { ret = "RO" ; } else if ( x . equals ( "643" ) ) { ret = "RU" ; } else if ( x . equals ( "752" ) ) { ret = "SE" ; } else if ( x . equals ( "756" ) ) { ret = "CH" ; } else if ( x . equals ( "703" ) ) { ret = "SK" ; } else if ( x . equals ( "705" ) ) { ret = "SI" ; } else if ( x . equals ( "724" ) ) { ret = "ES" ; } else if ( x . equals ( "203" ) ) { ret = "CZ" ; } else if ( x . equals ( "792" ) ) { ret = "TR" ; } else if ( x . equals ( "348" ) ) { ret = "HU" ; } else if ( x . equals ( "840" ) ) { ret = "US" ; } else if ( x . equals ( "978" ) ) { ret = "EU" ; } else { throw new InvalidArgumentException ( HBCIUtils . getLocMsg ( "EXC_DT_UNNKOWN_CTR" , x ) ) ; } return ret ;
public class DataSiftApiClient { /** * To support futures being passed as parameters , this method adds a listener to the unprocessed future that has * been passed as a parameter . Once that listener is invoked , the response of the unprocessed future is examined * to see if the response was successful , if it was not then the expected future is passed the failed response * If the result of the unprocessed future is successful then the response callback is applied . * @ param futureToUnwrap the unprocessed future which needs to be unwrapped * @ param futureReturnedToUser the future that has been returned to the user and which callbacks need to be * triggered on * @ param expectedInstance the instance of the result type to use in failure scenarios * @ param responseToExecuteOnSuccess a future response object which contains the code which will execute once the * wrapped future has been unwrapped and its result is successful * @ param < T > * @ param < A > */ protected < T extends DataSiftResult , A extends DataSiftResult > void unwrapFuture ( FutureData < T > futureToUnwrap , final FutureData < A > futureReturnedToUser , final A expectedInstance , final FutureResponse < T > responseToExecuteOnSuccess ) { } }
futureToUnwrap . onData ( new FutureResponse < T > ( ) { public void apply ( T stream ) { if ( stream . isSuccessful ( ) ) { responseToExecuteOnSuccess . apply ( stream ) ; } else { expectedInstance . setResponse ( stream . getResponse ( ) ) ; futureReturnedToUser . received ( expectedInstance ) ; } } } ) ;
public class WaveformDetailComponent { /** * Set the zoom scale of the view . a value of 1 ( the smallest allowed ) draws the waveform at full scale . * Larger values combine more and more segments into a single column of pixels , zooming out to see more at once . * @ param scale the number of waveform segments that should be averaged into a single column of pixels * @ throws IllegalArgumentException if scale is less than 1 or greater than 256 */ public void setScale ( int scale ) { } }
if ( ( scale < 1 ) || ( scale > 256 ) ) { throw new IllegalArgumentException ( "Scale must be between 1 and 256" ) ; } int oldScale = this . scale . getAndSet ( scale ) ; if ( oldScale != scale ) { repaint ( ) ; if ( ! autoScroll . get ( ) ) { setSize ( getPreferredSize ( ) ) ; } }
public class BlockDataHandler { /** * Removes the custom data stored at the { @ link BlockPos } for the specified identifier . * @ param < T > the generic type * @ param identifier the identifier * @ param world the world * @ param pos the pos */ public static < T > void removeData ( String identifier , IBlockAccess world , BlockPos pos ) { } }
removeData ( identifier , world , pos , false ) ;
public class MethodUtil { /** * Bounce through the trampoline . */ public static Object invoke ( Method m , Object obj , Object [ ] params ) throws InvocationTargetException , IllegalAccessException { } }
try { return bounce . invoke ( null , new Object [ ] { m , obj , params } ) ; } catch ( InvocationTargetException ie ) { Throwable t = ie . getCause ( ) ; if ( t instanceof InvocationTargetException ) { throw ( InvocationTargetException ) t ; } else if ( t instanceof IllegalAccessException ) { throw ( IllegalAccessException ) t ; } else if ( t instanceof RuntimeException ) { throw ( RuntimeException ) t ; } else if ( t instanceof Error ) { throw ( Error ) t ; } else { throw new Error ( "Unexpected invocation error" , t ) ; } } catch ( IllegalAccessException iae ) { // this can ' t happen throw new Error ( "Unexpected invocation error" , iae ) ; }
public class KnownDurableSubscription { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPKnownDurableSubscriptionControllable # getDurableHome ( ) */ public String getDurableHome ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDurableHome" ) ; String home = subscriptionControl . getDurableHome ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDurableHome" , home ) ; return home ;
public class UrlBuilder { /** * Set the host that will be used to build the final URL . * @ param host The host that will be used to build the final URL . * @ return This UrlBuilder so that multiple setters can be chained together . */ public UrlBuilder withHost ( String host ) { } }
if ( host == null || host . isEmpty ( ) ) { this . host = null ; } else { with ( host , UrlTokenizerState . SCHEME_OR_HOST ) ; } return this ;
public class InfinispanEmbeddedStoredProceduresManager { /** * Returns the result of a stored procedure executed on the backend . * @ param embeddedCacheManager embedded cache manager * @ param storedProcedureName name of stored procedure * @ param queryParameters parameters passed for this query * @ param classLoaderService the class loader service * @ return a { @ link ClosableIterator } with the result of the query */ public ClosableIterator < Tuple > callStoredProcedure ( EmbeddedCacheManager embeddedCacheManager , String storedProcedureName , ProcedureQueryParameters queryParameters , ClassLoaderService classLoaderService ) { } }
validate ( queryParameters ) ; Cache < String , String > cache = embeddedCacheManager . getCache ( STORED_PROCEDURES_CACHE_NAME , true ) ; String className = cache . getOrDefault ( storedProcedureName , storedProcedureName ) ; Callable < ? > callable = instantiate ( storedProcedureName , className , classLoaderService ) ; setParams ( storedProcedureName , queryParameters , callable ) ; Object res = execute ( storedProcedureName , embeddedCacheManager , callable ) ; return extractResultSet ( storedProcedureName , res ) ;
public class BaseHttpServletAwareSamlObjectEncoder { /** * Build encoder message context . * @ param request the authn request * @ param samlObject the saml response * @ param relayState the relay state * @ return the message context */ protected MessageContext getEncoderMessageContext ( final RequestAbstractType request , final T samlObject , final String relayState ) { } }
val ctx = new MessageContext < SAMLObject > ( ) ; ctx . setMessage ( samlObject ) ; SAMLBindingSupport . setRelayState ( ctx , relayState ) ; SamlIdPUtils . preparePeerEntitySamlEndpointContext ( request , ctx , adaptor , getBinding ( ) ) ; val self = ctx . getSubcontext ( SAMLSelfEntityContext . class , true ) ; self . setEntityId ( SamlIdPUtils . getIssuerFromSamlObject ( samlObject ) ) ; return ctx ;
public class MD5FileUtils { /** * Verify that the previously saved md5 for the given file matches * expectedMd5. * @ throws IOException */ public static void verifySavedMD5 ( File dataFile , MD5Hash expectedMD5 ) throws IOException { } }
MD5Hash storedHash = readStoredMd5ForFile ( dataFile ) ; // Check the hash itself if ( ! expectedMD5 . equals ( storedHash ) ) { throw new IOException ( "File " + dataFile + " did not match stored MD5 checksum " + " (stored: " + storedHash + ", computed: " + expectedMD5 ) ; }
public class Language { /** * Get a list of rules that require a { @ link Word2VecModel } . Returns an empty list for * languages that don ' t have such rules . * @ since 4.0 */ public List < Rule > getRelevantWord2VecModelRules ( ResourceBundle messages , Word2VecModel word2vecModel ) throws IOException { } }
return Collections . emptyList ( ) ;
public class CommerceNotificationTemplatePersistenceImpl { /** * Returns the first commerce notification template in the ordered set where groupId = & # 63 ; and type = & # 63 ; and enabled = & # 63 ; . * @ param groupId the group ID * @ param type the type * @ param enabled the enabled * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce notification template , or < code > null < / code > if a matching commerce notification template could not be found */ @ Override public CommerceNotificationTemplate fetchByG_T_E_First ( long groupId , String type , boolean enabled , OrderByComparator < CommerceNotificationTemplate > orderByComparator ) { } }
List < CommerceNotificationTemplate > list = findByG_T_E ( groupId , type , enabled , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class LZ4CompressorWithLength { /** * Compresses < code > src < / code > into < code > dest < / code > . Calling this method * will update the positions of both { @ link ByteBuffer } s . * @ param src the source data * @ param dest the destination buffer * @ throws LZ4Exception if dest is too small */ public void compress ( ByteBuffer src , ByteBuffer dest ) { } }
final int compressedLength = compress ( src , src . position ( ) , src . remaining ( ) , dest , dest . position ( ) , dest . remaining ( ) ) ; src . position ( src . limit ( ) ) ; dest . position ( dest . position ( ) + compressedLength ) ;
public class UploadWorkerThread { /** * " waiting for upload " * Assigns attachmentName , originalName , submitter , uploadId , * " original " structure and " data " structure . * Upload id document is deleted from document database . * - > " submitted " when upload id is found . * " submitted " * Assigns value to " original " structure : size , mime type , encoding type . Set file * class on attachment . * - > " analyzed " * " submitted _ inline " * The state " submitted _ inline " was implemented for the iPad application , where the * file was attached to the document , but no action from the robot has been taken . * In that case , download file to disk and move to regular queue ( submitted ) * - > " submitted " * " analyzed " * In this phase , the plug - ins are allowed to run . In the case of the multi - media * attachments , the thumbnail is created . Conversions are performed . * - > " approved " if submitted by a vetter * - > " waiting for approval " if submitted by anyone else * " waiting for approval " * This phase waits for user intervention . * - > " approved " * - > " denied " * " approved " * In this phase , the plug - ins are allowed to run . For GPX files , the points are * uploaded to the document database . * In general , the uploaded file is attached to the document . * - > " attached " */ private void performWork ( Work work ) throws Exception { } }
logger . info ( "Upload worker processing: " + work ) ; String state = work . getState ( ) ; if ( UploadConstants . UPLOAD_STATUS_WAITING_FOR_UPLOAD . equals ( state ) ) { performWaitingForUploadWork ( work ) ; } else if ( UploadConstants . UPLOAD_STATUS_SUBMITTED . equals ( state ) ) { performSubmittedWork ( work ) ; } else if ( UploadConstants . UPLOAD_STATUS_SUBMITTED_INLINE . equals ( state ) ) { performSubmittedInlineWork ( work ) ; } else if ( UploadConstants . UPLOAD_STATUS_ANALYZED . equals ( state ) ) { performAnalyzedWork ( work ) ; } else if ( UploadConstants . UPLOAD_STATUS_APPROVED . equals ( state ) ) { performApprovedWork ( work ) ; } else if ( UploadConstants . UPLOAD_WORK_ORIENTATION . equals ( state ) ) { performOrientationWork ( work ) ; } else if ( UploadConstants . UPLOAD_WORK_THUMBNAIL . equals ( state ) ) { performThumbnailWork ( work ) ; } else if ( UploadConstants . UPLOAD_WORK_UPLOAD_ORIGINAL_IMAGE . equals ( state ) ) { performUploadOriginalImageWork ( work ) ; } else if ( UploadConstants . UPLOAD_WORK_ROTATE_CW . equals ( state ) ) { performRotateWork ( FileConversionPlugin . WORK_ROTATE_CW , work ) ; } else if ( UploadConstants . UPLOAD_WORK_ROTATE_CCW . equals ( state ) ) { performRotateWork ( FileConversionPlugin . WORK_ROTATE_CCW , work ) ; } else if ( UploadConstants . UPLOAD_WORK_ROTATE_180 . equals ( state ) ) { performRotateWork ( FileConversionPlugin . WORK_ROTATE_180 , work ) ; } else if ( UploadConstants . UPLOAD_WORK_SIMPLIFY_GEOMETRY . equals ( state ) ) { performSimplifyGeometryWork ( work ) ; } else if ( UploadConstants . UPLOAD_WORK_INREACH_SUBMIT . equals ( state ) ) { performInReachSubmit ( work ) ; } else { throw new Exception ( "Unrecognized state: " + state ) ; } logger . info ( "Upload worker completed: " + work ) ;
public class RuleCharacterIterator { /** * Returns the current 32 - bit code point without parsing escapes , parsing * variables , or skipping whitespace . * @ return the current 32 - bit code point */ private int _current ( ) { } }
if ( buf != null ) { return UTF16 . charAt ( buf , 0 , buf . length , bufPos ) ; } else { int i = pos . getIndex ( ) ; return ( i < text . length ( ) ) ? UTF16 . charAt ( text , i ) : DONE ; }
public class TriangularSolver_ZDRM { /** * This is a forward substitution solver for non - singular upper triangular matrices . * < br > * b = U < sup > - 1 < / sup > b < br > * < br > * where b is a vector , U is an n by n matrix . < br > * @ param U An n by n non - singular upper triangular matrix . Not modified . * @ param b A vector of length n . Modified . * @ param n The size of the matrices . */ public static void solveU ( double U [ ] , double [ ] b , int n ) { } }
// for ( int i = n - 1 ; i > = 0 ; i - - ) { // double sum = b [ i ] ; // for ( int j = i + 1 ; j < n ; j + + ) { // sum - = U [ i * n + j ] * b [ j ] ; // b [ i ] = sum / U [ i * n + i ] ; int stride = n * 2 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { double sumReal = b [ i * 2 ] ; double sumImg = b [ i * 2 + 1 ] ; int indexU = i * stride + i * 2 + 2 ; for ( int j = i + 1 ; j < n ; j ++ ) { double realB = b [ j * 2 ] ; double imgB = b [ j * 2 + 1 ] ; double realU = U [ indexU ++ ] ; double imgU = U [ indexU ++ ] ; sumReal -= realB * realU - imgB * imgU ; sumImg -= realB * imgU + imgB * realU ; } // b = sum / U double realU = U [ i * stride + i * 2 ] ; double imgU = U [ i * stride + i * 2 + 1 ] ; double normU = realU * realU + imgU * imgU ; b [ i * 2 ] = ( sumReal * realU + sumImg * imgU ) / normU ; b [ i * 2 + 1 ] = ( sumImg * realU - sumReal * imgU ) / normU ; }