text
stringlengths
63
450k
@ Override public synchronized Object get ( Object key ) { return key instanceof String ? getProperty ( ( String ) key ) : super . get ( key ) ; }
public boolean bool ( ) throws javax . xml . transform . TransformerException { error ( XPATHErrorResources . ER_CANT_CONVERT_TO_NUMBER , new Object [ ] { getTypeString ( ) } ) ; //"Can not convert "+getTypeString()+" to a number"); return false ; }
@ SdkInternalApi final SetIdentityPoolRolesResult executeSetIdentityPoolRoles ( SetIdentityPoolRolesRequest setIdentityPoolRolesRequest ) { ExecutionContext executionContext = createExecutionContext ( setIdentityPoolRolesRequest ) ; AWSRequestMetrics awsRequestMetrics = executionContext . getAwsRequestMetrics ( ) ; awsRequestMetrics . startEvent ( Field . ClientExecuteTime ) ; Request < SetIdentityPoolRolesRequest > request = null ; Response < SetIdentityPoolRolesResult > response = null ; try { awsRequestMetrics . startEvent ( Field . RequestMarshallTime ) ; try { request = new SetIdentityPoolRolesRequestProtocolMarshaller ( protocolFactory ) . marshall ( super . beforeMarshalling ( setIdentityPoolRolesRequest ) ) ; // Binds the request metrics to the current request. request . setAWSRequestMetrics ( awsRequestMetrics ) ; request . addHandlerContext ( HandlerContextKey . SIGNING_REGION , getSigningRegion ( ) ) ; request . addHandlerContext ( HandlerContextKey . SERVICE_ID , "Cognito Identity" ) ; request . addHandlerContext ( HandlerContextKey . OPERATION_NAME , "SetIdentityPoolRoles" ) ; request . addHandlerContext ( HandlerContextKey . ADVANCED_CONFIG , advancedConfig ) ; } finally { awsRequestMetrics . endEvent ( Field . RequestMarshallTime ) ; } HttpResponseHandler < AmazonWebServiceResponse < SetIdentityPoolRolesResult > > responseHandler = protocolFactory . createResponseHandler ( new JsonOperationMetadata ( ) . withPayloadJson ( true ) . withHasStreamingSuccessResponse ( false ) , new SetIdentityPoolRolesResultJsonUnmarshaller ( ) ) ; response = invoke ( request , responseHandler , executionContext ) ; return response . getAwsResponse ( ) ; } finally { endClientExecution ( awsRequestMetrics , request , response ) ; } }
public T1 getTypeDefByGuid ( String guid ) { return guid != null ? typeDefGuidMap . get ( guid ) : null ; }
public Date deserialize ( JsonElement json , Type typeOfT , JsonDeserializationContext context ) throws JsonParseException { return new Date ( json . getAsJsonPrimitive ( ) . getAsLong ( ) ) ; }
public Location getInfo ( String placeId , String woeId ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_INFO ) ; if ( placeId != null ) { parameters . put ( "place_id" , placeId ) ; } if ( woeId != null ) { parameters . put ( "woe_id" , woeId ) ; } Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Element locationElement = response . getPayload ( ) ; return parseLocation ( locationElement ) ; }
private static PrimitiveSoyType soyTypeFromProto ( SoyProtoType soyType ) { return new PrimitiveSoyType ( soyType , protoType ( soyType . getDescriptor ( ) ) , BytecodeUtils . SOY_PROTO_VALUE_TYPE ) ; }
protected List < String > trim ( List < String > comments ) { List < String > trimComments = new ArrayList <> ( ) ; int n = 0 ; boolean tryRemoveWhitespace = true ; while ( tryRemoveWhitespace ) { boolean allLinesAreShorter = true ; for ( String comment : comments ) { if ( comment . length ( ) <= n ) { continue ; } if ( comment . charAt ( n ) != ' ' ) { tryRemoveWhitespace = false ; } allLinesAreShorter = false ; } if ( allLinesAreShorter ) { break ; } if ( tryRemoveWhitespace ) { n ++ ; } } for ( String comment : comments ) { if ( comment . length ( ) > n ) { String substring = comment . substring ( n ) ; trimComments . add ( substring ) ; } else { trimComments . add ( "" ) ; } } return trimComments ; }
public int indexOf ( String str ) { int i ; for ( i = 0 ; i < size ; i ++ ) { if ( data [ i ] . equals ( str ) ) { return i ; } } return - 1 ; }
private static String format ( final String VAR_1 , final String message , final TYPE_1 ... args ) { TYPE_1 [ ] values = args ; TYPE_2 x = null ; if ( args.length > 0 ) { if ( args [ args.length - 1 ] instanceof TYPE_2 ) { x = ( TYPE_2 ) args [ args.length - 1 ] ; values = new TYPE_1 [ args.length - 1 ] ; TYPE_3 . METHOD_1 ( args , 0 , values , 0 , values . length ) ; } } String msg = String . format ( message , values ) ; TYPE_4 VAR_2 = new TYPE_4 ( ) ; VAR_2 . append ( STRING_1 ) . append ( VAR_1 ) . append ( STRING_2 ) . append ( TYPE_5 . METHOD_2 ( ) . getName ( ) ) . append ( STRING_3 ) . append ( msg ) ; if ( x != null ) { VAR_2 . append ( "\n" ) ; TYPE_6 writer = new TYPE_6 ( ) ; x . VAR_3 ( new TYPE_7 ( writer ) ) ; VAR_2 . append ( writer ) ; } return VAR_2 . toString ( ) ; }
public String METHOD_1 ( final TYPE_1 url ) { if ( this . METHOD_2 ( ) || url . VAR_1 ( ) ) { return url . toString ( ) ; } if ( ! this . METHOD_3 ( ) . equals ( url . VAR_2 ( ) ) ) { return url . toString ( ) ; } if ( this . METHOD_4 ( ) == null ^ url . VAR_3 ( ) == null ) { return url . toString ( ) ; } if ( this . METHOD_4 ( ) != null && ! this . METHOD_4 ( ) . equals ( url . VAR_3 ( ) ) ) { return url . toString ( ) ; } String VAR_4 = ( this . path ( ) . METHOD_5 ( STRING_1 ) ) ? this . path : this . path ( ) + STRING_1 ; if ( ! url . path ( ) . startsWith ( VAR_4 ) && ! this . path ( ) . equals ( url . path ( ) ) ) { return url . toString ( ) ; } TYPE_2 output = new TYPE_2 ( ) ; if ( ! this . path ( ) . equals ( url . path ( ) ) ) { output . append ( url . path ( ) . METHOD_6 ( VAR_4 , STRING_2 ) ) ; } if ( url . query ( ) != null ) { output . append ( CHAR_1 ) . append ( url . query ( ) ) ; } if ( url . VAR_5 ( ) != null ) { output . append ( CHAR_2 ) . append ( url . VAR_5 ( ) ) ; } return output . toString ( ) ; }
@ POST @ Path ( "/{uniqueId}/{serviceName}/properties" ) @ Produces ( { MediaType . TEXT_HTML , "application/json" } ) @ ApiOperation ( value = "Add a new property to the service" , notes = "Returns a message which confirms the property storage" ) @ ApiResponses ( value = { @ ApiResponse ( code = 201 , message = "Stored property" ) , @ ApiResponse ( code = 403 , message = "You have not got the appropriate permissions for storing the property" ) , @ ApiResponse ( code = 500 , message = "Internal error" ) } ) public Response setProperties ( @ ApiParam ( value = "JSON document that specifies the graphURI and the subject-property-object updates" , required = true ) String jsonReq , @ ApiParam ( value = "Service ID" , required = true ) @ PathParam ( "uniqueId" ) String uniqueId , @ ApiParam ( value = "Service name" , required = true ) @ PathParam ( "serviceName" ) String serviceName , @ ApiParam ( value = "Response message media type" , allowableValues = "application/json,text/html" ) @ HeaderParam ( "Accept" ) String accept ) { JsonElement jsonSpoEntries = new JsonParser ( ) . parse ( jsonReq ) ; // Obtain the graphUri URI graphUri = uriInfo . getBaseUri ( ) . resolve ( "services/" + uniqueId ) ; List < Triplet < URI , URI , Object > > spoEntries = parseSpoUpdates ( jsonSpoEntries ) ; log . debug ( "Uploading {} properties to graph" , spoEntries . size ( ) ) ; if ( graphUri != null && spoEntries != null && ! spoEntries . isEmpty ( ) ) { try { nfpManager . createPropertyValues ( graphUri , spoEntries ) ; } catch ( SalException e ) { return Response . status ( Status . BAD_REQUEST ) . entity ( buildErrorMessageByMediaType ( e . getMessage ( ) , accept ) ) . build ( ) ; } return Response . status ( Status . CREATED ) . entity ( buildSuccessMessageForPropertiesStorage ( graphUri , spoEntries , accept ) ) . build ( ) ; } else { return Response . status ( Status . BAD_REQUEST ) . entity ( buildErrorMessageByMediaType ( "No content to update." , accept ) ) . build ( ) ; } }
@ Override public DelayPathable < ReturnOrWebsocketable < TimesOnceableOrHttpHeaderable < Void > > > get ( ) { return new MockServerExpectationImpl ( context , HttpMethod . GET , path , bodyProvider , chunksProvider , delay , delayUnit , times , responses ) ; }
@ Override public final void bytesWritten ( @ Nullable Void metric , @ NotNull SocketAddress remoteAddress , long numberOfBytes ) { bytes . written ( numberOfBytes ) ; }
public static void main ( String [ ] args ) throws Exception { StringUtils . printErrInvocationString ( "MultiClassChunkEvalStats" , args ) ; Properties props = StringUtils . argsToProperties ( args ) ; String boundary = props . getProperty ( "b" , "-X-" ) ; String delimiter = props . getProperty ( "d" , "\t" ) ; String defaultPosTag = props . getProperty ( "t" , "I" ) ; boolean raw = Boolean . valueOf ( props . getProperty ( "r" , "false" ) ) ; boolean ignoreProvidedTag = Boolean . valueOf ( props . getProperty ( "ignoreProvidedTag" , "false" ) ) ; String format = props . getProperty ( "format" , "conll" ) ; String filename = props . getProperty ( "i" ) ; String backgroundLabel = props . getProperty ( "k" , "O" ) ; try { MultiClassPrecisionRecallExtendedStats stats ; if ( raw ) { stats = new MultiClassStringLabelStats ( backgroundLabel ) ; } else { MultiClassChunkEvalStats mstats = new MultiClassChunkEvalStats ( backgroundLabel ) ; mstats . getChunker ( ) . setDefaultPosTag ( defaultPosTag ) ; mstats . getChunker ( ) . setIgnoreProvidedTag ( ignoreProvidedTag ) ; stats = mstats ; } if ( filename != null ) { stats . score ( filename , delimiter , boundary ) ; } else { stats . score ( new BufferedReader ( new InputStreamReader ( System . in ) ) , delimiter , boundary ) ; } if ( "conll" . equalsIgnoreCase ( format ) ) { System . out . println ( stats . getConllEvalString ( ) ) ; } else { System . out . println ( stats . getDescription ( 6 ) ) ; } } catch ( IOException ex ) { System . err . println ( "Error processing file: " + ex . toString ( ) ) ; ex . printStackTrace ( System . err ) ; } }
protected void populateResponseHeaders ( Set < String > requestHeaderKeys , Map < String , String > metaInfo , HttpServletResponse response ) { for ( String key : metaInfo . keySet ( ) ) { if ( ! Listener . AUTHENTICATED_USER_HEADER . equals ( key ) && ! Listener . AUTHENTICATED_JWT . equals ( key ) && ! Listener . METAINFO_HTTP_STATUS_CODE . equals ( key ) && ! Listener . METAINFO_ACCEPT . equals ( key ) && ! Listener . METAINFO_CONTENT_TYPE . equals ( key ) && ! Listener . METAINFO_DOWNLOAD_FORMAT . equals ( key ) && ! Listener . METAINFO_MDW_REQUEST_ID . equals ( key ) && ! requestHeaderKeys . contains ( key ) ) response . setHeader ( key , metaInfo . get ( key ) ) ; } // these always get populated if present if ( metaInfo . get ( Listener . METAINFO_REQUEST_ID ) != null ) response . setHeader ( Listener . METAINFO_REQUEST_ID , metaInfo . get ( Listener . METAINFO_REQUEST_ID ) ) ; if ( metaInfo . get ( Listener . METAINFO_MDW_REQUEST_ID ) != null && ! metaInfo . get ( Listener . METAINFO_MDW_REQUEST_ID ) . equals ( "0" ) ) response . setHeader ( Listener . METAINFO_MDW_REQUEST_ID , metaInfo . get ( Listener . METAINFO_MDW_REQUEST_ID ) ) ; if ( metaInfo . get ( Listener . METAINFO_CORRELATION_ID ) != null ) response . setHeader ( Listener . METAINFO_CORRELATION_ID , metaInfo . get ( Listener . METAINFO_CORRELATION_ID ) ) ; if ( metaInfo . get ( Listener . METAINFO_DOCUMENT_ID ) != null ) response . setHeader ( Listener . METAINFO_DOCUMENT_ID , metaInfo . get ( Listener . METAINFO_DOCUMENT_ID ) ) ; }
ANNOTATION_1 public TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_3 VAR_1 ) { return METHOD_1 ( VAR_1 , new TYPE_3 ( VAR_2 . VAR_3 + STRING_1 ) ) ; }
public static int calculateDataSize ( Xid xid ) { int dataSize = 0 ; dataSize += Bits . INT_SIZE_IN_BYTES ; dataSize += ParameterUtil . calculateDataSize ( xid . getGlobalTransactionId ( ) ) ; dataSize += ParameterUtil . calculateDataSize ( xid . getBranchQualifier ( ) ) ; return dataSize ; }
public T watchAndFollow ( DeterministicKey accountKey ) { checkState ( accountPath == null , "either watchAndFollow or accountPath" ) ; this . watchingKey = accountKey ; this . isFollowing = true ; return self ( ) ; }
public String getId ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getId" ) ; String id = consumerDispatcher . getSubscriptionUuid ( ) . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getId" , id ) ; return id ; }
@ Override public SqlAction [ ] getActions ( ) { return new SqlAction [ ] { new UpdateAction ( ) { private Table table ; private Table getTable ( Map map ) { if ( table != null ) { return table ; } Object tableName = map . get ( "$tableName" ) ; if ( tableName instanceof String ) { table = TableHeader . getTable ( map . get ( "$tableName" ) . toString ( ) ) ; if ( table . getType ( ) . equals ( Table . Type . view ) ) { throw new RuntimeException ( String . format ( "视图:%s,不允许操作 BaseUpdateDB", table.getNam e ))); } return table ; } return null ; } @ Override public String tableName ( ) { Table table = getTable ( getMap ( ) ) ; return table == null ? "" : table . getName ( ) ; } @ Override protected String [ ] searchConditions ( ) { Object tableName = getMap ( ) . get ( "$tableName" ) ; if ( tableName instanceof String ) { Table table = TableHeader . getTable ( getMap ( ) . get ( "$tableName" ) . toString ( ) ) ; if ( table != null ) { String [ ] pkKeys = table . getPrimaryKey ( ) ; if ( pkKeys != null ) { List < String > pkList = new ArrayList <> ( ) ; for ( String pk : pkKeys ) { pkList . add ( String . format ( "%s = {%s}" , pk , StringUtil . underlineToCamel ( pk ) ) ) ; } return pkList . toArray ( new String [ ] { } ) ; } } } return new String [ ] { "1 < 0" } ; } } } ; }
@ Override @ NonNull protected Animator getAnimator ( @ NonNull ViewGroup container , View from , View to , boolean isPush , boolean toAddedToContainer ) { final float radius = ( float ) Math . hypot ( cx , cy ) ; Animator animator = null ; if ( isPush && to != null ) { animator = ViewAnimationUtils . createCircularReveal ( to , cx , cy , 0 , radius ) ; } else if ( ! isPush && from != null ) { animator = ViewAnimationUtils . createCircularReveal ( from , cx , cy , radius , 0 ) ; } return animator ; }
protected ColumnConfig getSingleColumnConfig ( PropertyConfig propertyConfig ) { if ( propertyConfig != null ) { List < ColumnConfig > columns = propertyConfig . getColumns ( ) ; if ( columns != null && ! columns . isEmpty ( ) ) { return columns . get ( 0 ) ; } } return null ; }
ANNOTATION_1 protected TYPE_1 < TYPE_2 > METHOD_1 ( ) { if ( TYPE_3 . METHOD_2 ( VAR_1 ) ) { if ( METHOD_3 ( ) ) { final TYPE_4 VAR_2 = METHOD_4 ( ) ; return new TYPE_5 ( VAR_2 , METHOD_5 ( ) , VAR_3 , this ) ; } else { final TYPE_6 VAR_4 = METHOD_6 ( ) ; final TYPE_2 VAR_5 = new TYPE_7 ( VAR_4 , METHOD_5 ( ) , VAR_3 ) ; return new TYPE_8 < TYPE_2 > ( VAR_5 , this ) ; } } else { try { TYPE_9 VAR_6 = METHOD_7 ( ) ; TYPE_4 VAR_2 = ( TYPE_4 ) VAR_6 . METHOD_8 ( VAR_1 ) ; return new TYPE_5 ( VAR_2 , METHOD_5 ( ) , VAR_3 , this ) ; } catch ( TYPE_10 VAR_7 ) { VAR_8 . error ( STRING_1 , VAR_1 ) ; throw new TYPE_11 ( VAR_7 ) ; } } }
public static ArrayList < Synonym > create ( String [ ] args ) { ArrayList < Synonym > synonymList = new ArrayList < Synonym > ( args . length - 1 ) ; String idString = args [ 0 ] ; Type type ; switch ( idString . charAt ( idString . length ( ) - 1 ) ) { case ' ' : type = Type . EQUAL ; break ; case ' ' : type = Type . LIKE ; break ; default : type = Type . SINGLE ; break ; } long startId = SynonymHelper . convertString2IdWithIndex ( idString , 0 ) ; // id从这里开始 for ( int i = 1 ; i < args . length ; ++ i ) { if ( type == Type . LIKE ) { synonymList . add ( new Synonym ( args [ i ] , startId + i , type ) ) ; // 如果不同则id递增 } else { synonymList . add ( new Synonym ( args [ i ] , startId , type ) ) ; // 如果相同则不变 } } return synonymList ; }
public void registerAggregator ( String name , Aggregator < ? > aggregator ) { if ( name == null || aggregator == null ) { throw new IllegalArgumentException ( "Name and aggregator must not be null" ) ; } if ( this . registry . containsKey ( name ) ) { throw new RuntimeException ( "An aggregator is already registered under the given name." ) ; } this . registry . put ( name , aggregator ) ; }
public String METHOD_1 ( String name ) { String VAR_1 = VAR_2 . METHOD_2 ( name ) ; if ( ! VAR_3 . METHOD_3 ( ) ) { try { VAR_1 = new String ( VAR_1 . METHOD_4 ( VAR_4 . VAR_5 ) , VAR_3 . METHOD_5 ( ) ) ; } catch ( TYPE_1 VAR_6 ) { } } return VAR_1 ; }
private void initHideAnimation ( TypedArray attr ) { int resourceId = attr . getResourceId ( R . styleable . FloatingActionButton_fab_hideAnimation , R . anim . fab_scale_down ) ; mHideAnimation = AnimationUtils . loadAnimation ( getContext ( ) , resourceId ) ; }
public MessageMgr build ( ) { if ( this . messageHandlers . size ( ) == 0 ) { this . buildErrors . addError ( "no message handlers set" ) ; return null ; } return new MessageMgr ( this . appID , this . messageHandlers , this . doCollectMessages ) ; }
public void setMetonymy_mention ( int addr , String v ) { if ( featOkTst && casFeat_metonymy_mention == null ) jcas . throwFeatMissing ( "metonymy_mention" , "de.julielab.jules.types.ace.EntityMention" ) ; ll_cas . ll_setStringValue ( addr , casFeatCode_metonymy_mention , v ) ; }
protected TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_3 response ) { TYPE_4 VAR_1 = response . VAR_2 ( ) . METHOD_2 ( ) . METHOD_3 ( VAR_3 - > VAR_3 . METHOD_4 ( VAR_4 . VAR_5 ) || VAR_3 . METHOD_4 ( VAR_6 ) ) . METHOD_5 ( false ) ; TYPE_2 VAR_7 = this . METHOD_6 ( response . VAR_8 ( ) , METHOD_7 ( ) ) ; if ( VAR_1 ) { return response . VAR_9 ( VAR_10 ) . METHOD_3 ( VAR_11 - > { if ( VAR_11 . get ( STRING_1 ) instanceof String ) { return TYPE_2 . METHOD_8 ( VAR_11 ) ; } return METHOD_6 ( response . VAR_8 ( ) , VAR_11 ) ; } ) . METHOD_9 ( VAR_7 ) ; } return response . VAR_9 ( TYPE_5 . class ) . METHOD_10 ( TYPE_1 . METHOD_11 ( VAR_7 ) ) ; }
private void checkCommands ( ) { List < String > argList = cmdLineParser . getCommandLine ( ) . get ( ) . getArgList ( ) ; if ( ! argList . isEmpty ( ) ) { String unrecognizedCommands = argList . stream ( ) . map ( s -> String . format ( "<%s>" , s ) ) . reduce ( ( s1 , s2 ) -> s1 + ", " + s2 ) . get ( ) ; String message = "Unrecognized commands give :" + unrecognizedCommands + "\n" + cmdLineParser . getHelpText ( ) ; System . out . println ( message ) ; exitHelper . exit ( 1 ) ; } }
private static String METHOD_1 ( String pattern , int [ ] VAR_1 ) { TYPE_1 buf = new TYPE_1 ( ) ; int i = VAR_1 [ 0 ] ; int length = pattern . length ( ) ; char c = pattern . VAR_2 ( i ) ; if ( c >= CHAR_1 && c <= CHAR_2 || c >= CHAR_3 && c <= CHAR_4 ) { buf . append ( c ) ; while ( i + 1 < length ) { char VAR_3 = pattern . VAR_2 ( i + 1 ) ; if ( VAR_3 == c ) { buf . append ( c ) ; i ++ ; } else { break ; } } } else { buf . append ( CHAR_5 ) ; boolean VAR_4 = false ; for ( ; i < length ; i ++ ) { c = pattern . VAR_2 ( i ) ; if ( c == CHAR_5 ) { if ( i + 1 < length && pattern . VAR_2 ( i + 1 ) == CHAR_5 ) { i ++ ; buf . append ( c ) ; } else { VAR_4 = ! VAR_4 ; } } else if ( ! VAR_4 && ( c >= CHAR_1 && c <= CHAR_2 || c >= CHAR_3 && c <= CHAR_4 ) ) { i -- ; break ; } else { buf . append ( c ) ; } } } VAR_1 [ 0 ] = i ; return buf . toString ( ) ; }
static ServerSettings server ( final Config dbconf ) { ServerSettings . Builder server = ServerSettings . builder ( ) ; withConf ( "server" , dbconf , c -> { withMs ( "heartbeatFrequency" , c , s -> server . heartbeatFrequency ( s . intValue ( ) , TimeUnit . MILLISECONDS ) ) ; withMs ( "minHeartbeatFrequency" , c , s -> server . minHeartbeatFrequency ( s . intValue ( ) , TimeUnit . MILLISECONDS ) ) ; } ) ; return server . build ( ) ; }
public TYPE_1 < String > METHOD_1 ( TYPE_1 < String > words ) { return VAR_1 . METHOD_2 ( ) . METHOD_3 ( index - > words . get ( index ) ) . METHOD_4 ( TYPE_2 . METHOD_5 ( ) ) ; }
private void replaceDeclarations ( DeclarationScopeResolver resolver , Accumulate accumulate ) { Declaration [ ] decl = accumulate . getRequiredDeclarations ( ) ; for ( Declaration aDecl : decl ) { Declaration resolved = resolver . getDeclaration ( aDecl . getIdentifier ( ) ) ; if ( resolved != null && resolved != aDecl ) { accumulate . replaceDeclaration ( aDecl , resolved ) ; } else if ( resolved == null ) { // it is probably an implicit declaration, so find the corresponding pattern Pattern old = aDecl . getPattern ( ) ; Pattern current = resolver . findPatternByIndex ( old . getIndex ( ) ) ; if ( current != null && old != current ) { resolved = new Declaration ( aDecl . getIdentifier ( ) , aDecl . getExtractor ( ) , current ) ; accumulate . replaceDeclaration ( aDecl , resolved ) ; } } } }
protected Tried < R > oneCall ( ) { Tried < R > target = null ; try { target = Tried . of ( this . getTimelimiter ( ) . call ( this . delegate . get ( ) ) ) ; } catch ( Throwable t ) { target = Tried . of ( t ) ; } return target ; }
ANNOTATION_1 public void METHOD_1 ( int length ) { TYPE_1 . METHOD_2 ( STRING_1 ) ; TYPE_2 VAR_1 = null ; try { VAR_1 = METHOD_3 ( ) ; VAR_1 . METHOD_4 ( ) . METHOD_5 ( STRING_2 , VAR_2 . VAR_3 ) ; VAR_1 . METHOD_4 ( ) . METHOD_5 ( STRING_3 , length ) ; VAR_1 . METHOD_4 ( ) . METHOD_6 ( STRING_4 ) ; ; METHOD_7 ( ) . METHOD_8 ( VAR_1 ) ; } catch ( TYPE_3 VAR_4 ) { METHOD_9 ( ) . METHOD_10 ( STRING_5 , VAR_1 , VAR_4 ) ; } finally { if ( VAR_1 != null && VAR_1 . METHOD_11 ( ) != null ) { METHOD_9 ( ) . METHOD_10 ( STRING_5 , VAR_1 , VAR_1 . METHOD_11 ( ) ) ; } } }
private String printEnforcementJobToXML ( IEnforcementJob enforcementJob ) throws JAXBException { EnforcementJob enforcementJobXML = modelConverter . getEnforcementJobXML ( enforcementJob ) ; JAXBContext jaxbContext = JAXBContext . newInstance ( EnforcementJob . class ) ; Marshaller marshaller = jaxbContext . createMarshaller ( ) ; marshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , Boolean . TRUE ) ; marshaller . setProperty ( Marshaller . JAXB_FRAGMENT , Boolean . TRUE ) ; ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; marshaller . marshal ( enforcementJobXML , out ) ; return out . toString ( ) ; }
static Object [ ] buildParameters ( Class < ? > [ ] parameterTypes , boolean isVarArgs , Object [ ] params ) { ExpressionFactory factory = getExpressionFactory ( ) ; Object [ ] parameters = null ; if ( parameterTypes . length > 0 ) { parameters = new Object [ parameterTypes . length ] ; int paramCount = params . length ; if ( isVarArgs ) { int varArgIndex = parameterTypes . length - 1 ; // First argCount-1 parameters are standard for ( int i = 0 ; ( i < varArgIndex ) ; i ++ ) { parameters [ i ] = factory . coerceToType ( params [ i ] , parameterTypes [ i ] ) ; } // Last parameter is the varargs Class < ? > varArgClass = parameterTypes [ varArgIndex ] . getComponentType ( ) ; final Object varargs = Array . newInstance ( varArgClass , ( paramCount - varArgIndex ) ) ; for ( int i = ( varArgIndex ) ; i < paramCount ; i ++ ) { Array . set ( varargs , i - varArgIndex , factory . coerceToType ( params [ i ] , varArgClass ) ) ; } parameters [ varArgIndex ] = varargs ; } else { parameters = new Object [ parameterTypes . length ] ; for ( int i = 0 ; i < parameterTypes . length ; i ++ ) { parameters [ i ] = factory . coerceToType ( params [ i ] , parameterTypes [ i ] ) ; } } } return parameters ; }
private boolean METHOD_1 ( TYPE_1 VAR_1 ) throws TYPE_2 { TYPE_3 VAR_2 = METHOD_2 ( VAR_1 ) ; final TYPE_4 VAR_3 = VAR_2 . iterator ( ) ; boolean VAR_4 = false ; TYPE_5 VAR_5 = null ; while ( VAR_3 . METHOD_3 ( ) ) { if ( TYPE_6 . METHOD_4 ( ) != null ) { try { VAR_5 = ( TYPE_5 ) TYPE_7 . METHOD_5 ( new TYPE_8 ( ) { ANNOTATION_1 public TYPE_9 METHOD_6 ( ) throws TYPE_10 { return VAR_3 . METHOD_7 ( ) ; } } ) ; } catch ( TYPE_11 . VAR_6 VAR_7 ) { TYPE_12 . METHOD_8 ( VAR_7 , STRING_1 , STRING_2 , this ) ; TYPE_13 . error ( VAR_8 , STRING_3 , VAR_7 ) ; TYPE_10 VAR_9 = VAR_7 . METHOD_9 ( ) ; TYPE_2 VAR_10 = new TYPE_2 ( STRING_4 ) ; VAR_10 . METHOD_10 ( VAR_9 ) ; throw VAR_10 ; } } else { VAR_5 = ( TYPE_5 ) VAR_3 . METHOD_7 ( ) ; } if ( VAR_5 . METHOD_11 ( ) . equals ( STRING_5 ) ) { VAR_4 = true ; break ; } } return VAR_4 ; }
public int METHOD_1 ( ) throws TYPE_1 { boolean VAR_1 = false ; boolean VAR_2 = false ; String VAR_3 = null ; TYPE_2 VAR_4 = VAR_5 . METHOD_2 ( ) ; TYPE_3 VAR_6 = null ; String VAR_7 = null ; if ( VAR_8 != null ) VAR_6 = VAR_8 ; else { if ( VAR_9 != null ) { VAR_6 = VAR_9 ; VAR_2 = TYPE_4 . METHOD_3 ( VAR_9 . toString ( ) ) ; } else { VAR_10 . METHOD_4 ( TYPE_5 . getString ( STRING_1 , VAR_8 ) ) ; VAR_6 = VAR_11 ; } VAR_1 = true ; } if ( VAR_12 . id != null ) { VAR_3 = METHOD_5 ( ( TYPE_6 ) VAR_4 , VAR_12 , null ) ; } VAR_7 = ( VAR_1 && ! VAR_13 ) ? VAR_6 . toString ( ) : METHOD_6 ( VAR_6 ) ; if ( METHOD_7 ( ) ) return METHOD_8 ( VAR_14 ) ; if ( VAR_12 . VAR_15 != null ) { VAR_12 . VAR_15 = METHOD_9 ( VAR_12 . VAR_15 ) ; } TYPE_7 writer = new TYPE_7 ( VAR_5 ) ; TYPE_8 VAR_16 = TYPE_9 . METHOD_10 ( TYPE_8 . VAR_17 , VAR_4 ) ; VAR_16 . METHOD_11 ( writer , VAR_12 ) ; if ( ! VAR_2 ) METHOD_12 ( VAR_7 , writer , VAR_18 ) ; else METHOD_13 ( VAR_7 ) ; VAR_16 . METHOD_1 ( writer ) ; if ( VAR_3 != null ) METHOD_13 ( VAR_3 ) ; METHOD_14 ( ) ; return VAR_14 ; }
public < T extends View > boolean waitForView ( final Class < T > viewClass ) { if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "waitForView(" + viewClass + ")" ) ; } return waiter . waitForView ( viewClass , 0 , Timeout . getLargeTimeout ( ) , true ) ; }
public boolean METHOD_1 ( ) { if ( this . VAR_1 ) { return false ; } if ( this . VAR_2 != null ) { try { return ! this . VAR_2 . METHOD_2 ( ) ; } catch ( final TYPE_1 VAR_3 ) { throw new TYPE_2 ( STRING_1 , VAR_3 ) ; } } return true ; }
private void METHOD_1 ( TYPE_1 VAR_1 ) { String op ; switch ( VAR_1 . METHOD_2 ( ) ) { case VAR_2 : op = STRING_1 ; break ; case VAR_3 : op = STRING_2 ; break ; case VAR_4 : op = STRING_3 ; break ; case VAR_5 : op = STRING_4 ; break ; default : throw new TYPE_2 ( STRING_5 + VAR_1 . METHOD_2 ( ) ) ; } METHOD_3 ( VAR_1 . METHOD_4 ( ) ) ; VAR_6 . append ( op ) ; METHOD_3 ( VAR_1 . METHOD_5 ( ) ) ; }
@ Override public void publish ( String channel , Tree message ) { if ( client != null ) { try { int pos = channel . indexOf ( ' ' ) ; if ( channel . indexOf ( ' ' , pos + 1 ) > - 1 ) { // Send to queue directly if ( debug && ( debugHeartbeats || ! channel . endsWith ( heartbeatChannel ) ) ) { logger . info ( "Submitting message to queue \"" + channel + "\":\r\n" + message . toString ( ) ) ; } this . channel . basicPublish ( "" , channel , mandatory , immediate , messageProperties , serializer . write ( message ) ) ; } else { // Send to exchange if ( debug && ( debugHeartbeats || ! channel . endsWith ( heartbeatChannel ) ) ) { logger . info ( "Submitting message to exchange \"" + channel + "\":\r\n" + message . toString ( ) ) ; } this . channel . basicPublish ( channel , "" , mandatory , immediate , messageProperties , serializer . write ( message ) ) ; } } catch ( Exception cause ) { logger . warn ( "Unable to send message to AMQP server!" , cause ) ; } } }
@ Override public FSEntry getChild ( String name ) { FSEntry result = null ; if ( file . exists ( ) && file . isDirectory ( ) ) { File childFile = new File ( file , name ) ; if ( childFile . exists ( ) ) { result = new FSEntryFile ( _Internal . INTERNAL , childFile ) ; } } return result ; }
final public void JoinParameter ( ) throws ParseException { /*@bgen(jjtree) JoinParameter */ ASTJoinParameter jjtn000 = new ASTJoinParameter ( JJTJOINPARAMETER ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; jjtn000 . jjtSetFirstToken ( getToken ( 1 ) ) ; Token t ; try { t = jj_consume_token ( JOIN_PARAMETER ) ; jjtree . closeNodeScope ( jjtn000 , true ) ; jjtc000 = false ; jjtn000 . jjtSetLastToken ( getToken ( 0 ) ) ; jjtn000 . init ( t . image ) ; } finally { if ( jjtc000 ) { jjtree . closeNodeScope ( jjtn000 , true ) ; jjtn000 . jjtSetLastToken ( getToken ( 0 ) ) ; } } }
@ Override public RegionOrientation copy ( ) { ImplOrientationSlidingWindow_F32 alg = new ImplOrientationSlidingWindow_F32 ( objectRadiusToScale , numAngles , windowSize , isWeighted ) ; alg . setObjectRadius ( objRadius ) ; return alg ; }
public TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_1 p , TYPE_3 VAR_2 , TYPE_4 VAR_3 ) throws TYPE_5 { String VAR_4 = VAR_5 . METHOD_2 ( VAR_1 ) ; if ( VAR_4 != null ) error ( VAR_4 , VAR_2 ) ; return VAR_6 . METHOD_1 ( VAR_1 , p , VAR_2 ) ; }
Object rebind ( WSName relativeName , Object o ) throws InvalidNameException , NameNotFoundException , NotContextException { WSName subname = normalize ( relativeName ) ; ContextNode target = getTargetNode ( subname ) ; String lastName = subname . getLast ( ) ; return target . children . put ( lastName , o ) ; }
public static void METHOD_1 ( TYPE_1 VAR_1 , String path ) { if ( ! METHOD_2 ( VAR_1 , path , VAR_2 ) ) { METHOD_3 ( STRING_1 + path + STRING_2 ) ; } }
private void createFilters ( ) { ColorMatrix grayscaleMatrix = new ColorMatrix ( ) ; grayscaleMatrix . setSaturation ( 0 ) ; grayscaleFilter = new ColorMatrixColorFilter ( grayscaleMatrix ) ; ColorMatrix grayscaleInvertMatrix = new ColorMatrix ( ) ; grayscaleInvertMatrix . setSaturation ( 0 ) ; grayscaleInvertMatrix . postConcat ( new ColorMatrix ( INVERT_MATRIX ) ) ; grayscaleInvertFilter = new ColorMatrixColorFilter ( grayscaleInvertMatrix ) ; invertFilter = new ColorMatrixColorFilter ( INVERT_MATRIX ) ; }
private void parse ( ) { values = new ArrayList < String > ( ) ; for ( String value : this . getInput ( ) . getValue ( ) . trim ( ) . split ( "(?<!\\\\);" ) ) { if ( ! value . trim ( ) . equals ( "" ) ) { values . add ( value . trim ( ) ) ; } } }
private void validateSingletonRel ( String unvalidatedRel ) { rels . get ( unvalidatedRel ) . forEach ( rel -> { // Rel is register, check for duplicate singleton if ( isSingleton ( rel ) && ( ! getLinksByRel ( rel ) . isEmpty ( ) || ! getResourcesByRel ( rel ) . isEmpty ( ) ) ) { throw new IllegalStateException ( String . format ( "%s is registered as a single rel and already exists." , rel ) ) ; } } ) ; }
@ SafeVarargs public static double [ ] removeAll ( final double [ ] a , final double ... elements ) { if ( N . isNullOrEmpty ( a ) ) { return N . EMPTY_DOUBLE_ARRAY ; } else if ( N . isNullOrEmpty ( elements ) ) { return a . clone ( ) ; } else if ( elements . length == 1 ) { return removeAllOccurrences ( a , elements [ 0 ] ) ; } final DoubleList list = DoubleList . of ( a . clone ( ) ) ; list . removeAll ( DoubleList . of ( elements ) ) ; return list . trimToSize ( ) . array ( ) ; }
public TYPE_1 execute ( String VAR_1 , TYPE_2 ... VAR_2 ) { return TYPE_3 . execute ( METHOD_1 ( ) , VAR_1 , VAR_2 ) ; }
ANNOTATION_1 public TYPE_1 METHOD_1 ( TYPE_2 ... VAR_1 ) { TYPE_3 < String , TYPE_2 > VAR_2 = new TYPE_4 < > ( ) ; for ( TYPE_2 VAR_3 : VAR_1 ) { VAR_2 . put ( VAR_3 . getName ( ) , VAR_3 ) ; TYPE_5 VAR_4 = VAR_3 . METHOD_2 ( ) ; if ( VAR_5 != null && VAR_4 != null && ! VAR_5 . equals ( VAR_4 ) ) { throw new TYPE_6 ( STRING_1 + VAR_3 . getName ( ) + STRING_2 ) ; } } TYPE_7 VAR_6 = METHOD_3 ( ) ; VAR_6 . VAR_2 . METHOD_4 ( VAR_2 ) ; return VAR_6 ; }
public TYPE_1 METHOD_1 ( String key ) { if ( key != null ) { VAR_1 . put ( key , null ) ; } return this ; }
protected final void runTestMethod ( FrameworkMethod method , EachTestNotifier notifier , int retriesLeft ) { Statement statement = methodBlock ( method ) ; try { statement . evaluate ( ) ; } catch ( AssumptionViolatedException e ) { notifier . addFailedAssumption ( e ) ; } catch ( TimeoutException e ) { /* TimeoutException thrown by ThrowOnTimeout statement. Handling is kept in this class since this is where the retry needs to be triggered in order to get the right tear down and test setup between retries. */ if ( -- retriesLeft >= 0 ) { LOGGER . warn ( "Test case timed out. Will attempt retry {} more times. Turn on log level DEBUG for stacktrace" , retriesLeft ) ; LOGGER . debug ( e . getMessage ( ) , e ) ; tearDown ( ) ; runTestMethod ( method , notifier , retriesLeft ) ; } else { notifier . addFailure ( e ) ; } } catch ( Throwable e ) { notifier . addFailure ( e ) ; } }
private String METHOD_1 ( final TYPE_1 VAR_1 , final TYPE_2 VAR_2 , int i ) throws TYPE_3 { if ( METHOD_2 ( VAR_2 . METHOD_3 ( i ) ) ) { return METHOD_4 ( VAR_1 . METHOD_5 ( i ) ) ; } if ( METHOD_6 ( VAR_2 . METHOD_3 ( i ) ) ) { return METHOD_7 ( VAR_1 . METHOD_8 ( i ) ) ; } if ( ( VAR_2 . METHOD_3 ( i ) == VAR_3 . VAR_4 || VAR_2 . METHOD_3 ( i ) == VAR_3 . VAR_5 ) && METHOD_9 ( ) ) { return TYPE_4 . toString ( VAR_1 . getBoolean ( i ) ) ; } return VAR_1 . getString ( i ) ; }
private void visit ( String id , String cls , LineElement elem ) { double [ ] points = new double [ ] { elem . firstPointX , elem . firstPointY , elem . secondPointX , elem . secondPointY } ; transform ( points , 2 ) ; appendIdent ( ) ; sb . append ( "<line" ) ; if ( id != null ) sb . append ( " id='" ) . append ( id ) . append ( "'" ) ; if ( cls != null ) sb . append ( " class='" ) . append ( cls ) . append ( "'" ) ; sb . append ( " x1='" ) . append ( toStr ( points [ 0 ] ) ) . append ( "'" ) . append ( " y1='" ) . append ( toStr ( points [ 1 ] ) ) . append ( "'" ) . append ( " x2='" ) . append ( toStr ( points [ 2 ] ) ) . append ( "'" ) . append ( " y2='" ) . append ( toStr ( points [ 3 ] ) ) . append ( "'" ) ; if ( defaultStroke == null || ! defaultStroke . equals ( elem . color ) ) sb . append ( " stroke='" ) . append ( toStr ( elem . color ) ) . append ( "'" ) ; if ( defaultStroke == null || ! defaultStrokeWidth . equals ( toStr ( scaled ( elem . width ) ) ) ) sb . append ( " stroke-width='" ) . append ( toStr ( scaled ( elem . width ) ) ) . append ( "'" ) ; sb . append ( "/>\n" ) ; }
private static int getInt ( String name , int VAR_1 , TYPE_1 VAR_2 ) { return TYPE_2 . METHOD_1 ( METHOD_2 ( name , String . VAR_3 ( VAR_1 ) , value - > { try { return VAR_2 . METHOD_3 ( TYPE_2 . METHOD_1 ( value ) ) ; } catch ( TYPE_3 VAR_4 ) { return false ; } } ) ) ; }
public static TYPE_1 METHOD_1 ( int VAR_1 ) { if ( VAR_2 . VAR_3 == VAR_1 || VAR_2 . VAR_4 == VAR_1 || VAR_2 . VAR_5 == VAR_1 || VAR_2 . VAR_6 == VAR_1 || VAR_2 . VAR_7 == VAR_1 ) { return TYPE_2 . class ; } else if ( VAR_2 . VAR_8 == VAR_1 || VAR_2 . VAR_9 == VAR_1 || VAR_2 . VAR_10 == VAR_1 || VAR_2 . VAR_11 == VAR_1 || VAR_2 . VAR_12 == VAR_1 ) { return TYPE_3 . class ; } else if ( VAR_2 . VAR_13 == VAR_1 ) { return TYPE_4 . VAR_14 . class ; } else if ( VAR_2 . VAR_15 == VAR_1 ) { return TYPE_4 . VAR_16 . class ; } else if ( VAR_2 . VAR_17 == VAR_1 ) { return TYPE_4 . VAR_18 . class ; } return String . VAR_19 ; }
@ Override protected Observable < ExpressRouteGatewayInner > getInnerAsync ( String resourceGroupName , String name ) { ExpressRouteGatewaysInner client = this . inner ( ) ; return client . getByResourceGroupAsync ( resourceGroupName , name ) ; }
private Packet newResponsePacket ( byte [ ] bytes , boolean urgent ) { Packet packet = new Packet ( bytes , - 1 ) . setPacketType ( OPERATION ) . raiseFlags ( FLAG_OP_RESPONSE ) ; if ( urgent ) { packet . raiseFlags ( FLAG_URGENT ) ; } return packet ; }
boolean matchesLetter ( ) { if ( isEmpty ( ) ) return false ; char c = charBuf [ bufPos ] ; return ( c >= ' ' && c <= ' ' ) || ( c >= ' ' && c <= ' ' ) || Character . isLetter ( c ) ; }
public Incident createIncident ( IncidentContext context , String message ) { IncidentEntity newIncident = IncidentEntity . createAndInsertIncident ( type , context , message ) ; if ( context . getExecutionId ( ) != null ) { newIncident . createRecursiveIncidents ( ) ; } return newIncident ; }
public void onLeafClick ( LeafClickEvent event ) { LayerTreeTreeNode layerTreeNode ; if ( event . getLeaf ( ) instanceof LayerTreeLegendItemNode ) { layerTreeNode = ( ( LayerTreeLegendItemNode ) event . getLeaf ( ) ) . parent ; treeGrid . deselectRecord ( event . getLeaf ( ) ) ; treeGrid . selectRecord ( layerTreeNode ) ; } else { layerTreeNode = ( LayerTreeTreeNode ) event . getLeaf ( ) ; } // -- update model mapModel . selectLayer ( layerTreeNode . getLayer ( ) ) ; }
@ Override public void resetStats ( ) { smoothedSum = 0.0 ; smoothedSqr = 0.0 ; smoothedCount = 0.0 ; smoothedMin = 0.0 ; smoothedMax = 0.0 ; lastMaxInteger = Integer . MIN_VALUE ; lastMinInteger = Integer . MAX_VALUE ; lastSumInteger = 0 ; lastSqrInteger = 0 ; lastCountInteger = 0 ; lastValueInteger = 0 ; lastMaxDouble = - Double . MAX_VALUE ; lastMinDouble = Double . MAX_VALUE ; lastSumDouble = 0.0 ; lastSqrDouble = 0.0 ; lastCountDouble = 0 ; lastValueDouble = 0.0 ; lastTimestampMillis = 0L ; smoothedRate = 0 ; smoothedTimeSeconds = 0 ; totalSum = 0.0 ; totalCount = 0 ; if ( histogramLevels != null ) { for ( int i = 0 ; i < histogramValues . length ; i ++ ) { histogramValues [ i ] = 0 ; } } }
private void collectExtensions ( Enumeration < URL > urls , Set < String > bucket ) throws IOException { while ( urls . hasMoreElements ( ) ) { URL url = urls . nextElement ( ) ; log . debug ( "Read '{}'" , url . getFile ( ) ) ; try ( Reader reader = new InputStreamReader ( url . openStream ( ) , StandardCharsets . UTF_8 ) ) { LegacyExtensionStorage . read ( reader , bucket ) ; } } }
public void generateInitialization ( final JvmField it , final ITreeAppendable appendable , final GeneratorConfig config ) { Procedure1 < ? super ITreeAppendable > _compilationStrategy = this . _jvmTypeExtensions . getCompilationStrategy ( it ) ; boolean _tripleNotEquals = ( _compilationStrategy != null ) ; if ( _tripleNotEquals ) { final Iterable < Issue > errors = this . getDirectErrorsOrLogicallyContainedErrors ( it ) ; boolean _isEmpty = IterableExtensions . isEmpty ( errors ) ; if ( _isEmpty ) { appendable . append ( " = " ) ; appendable . increaseIndentation ( ) ; this . _jvmTypeExtensions . getCompilationStrategy ( it ) . apply ( appendable ) ; appendable . decreaseIndentation ( ) ; } else { appendable . append ( " /* Skipped initializer because of errors */" ) ; } } else { StringConcatenationClient _compilationTemplate = this . _jvmTypeExtensions . getCompilationTemplate ( it ) ; boolean _tripleNotEquals_1 = ( _compilationTemplate != null ) ; if ( _tripleNotEquals_1 ) { final Iterable < Issue > errors_1 = this . getDirectErrorsOrLogicallyContainedErrors ( it ) ; boolean _isEmpty_1 = IterableExtensions . isEmpty ( errors_1 ) ; if ( _isEmpty_1 ) { appendable . append ( " = " ) . increaseIndentation ( ) ; this . appendCompilationTemplate ( appendable , it ) ; appendable . decreaseIndentation ( ) ; } else { appendable . append ( " /* Skipped initializer because of errors */" ) ; } } else { final XExpression expression = this . _iLogicalContainerProvider . getAssociatedExpression ( it ) ; if ( ( ( expression != null ) && config . isGenerateExpressions ( ) ) ) { boolean _hasErrors = this . _errorSafeExtensions . hasErrors ( expression ) ; if ( _hasErrors ) { appendable . append ( " /* Skipped initializer because of errors */" ) ; } else { appendable . append ( " = " ) ; this . compiler . compileAsJavaExpression ( expression , appendable , it . getType ( ) ) ; } } } } }
ANNOTATION_1 protected TYPE_1 METHOD_1 ( TYPE_1 response ) { if ( VAR_1 . METHOD_2 ( ) ) { VAR_1 . METHOD_3 ( STRING_1 + VAR_2 ) ; } return METHOD_4 ( ) ; }
private void seekToRestartPosition ( int restartPosition ) { checkPositionIndex ( restartPosition , restartCount , "restartPosition" ) ; // seek data readIndex to the beginning of the restart block int offset = restartPositions . getInt ( restartPosition * SIZE_OF_INT ) ; data . setPosition ( offset ) ; // clear the entries to assure key is not prefixed nextEntry = null ; // read the entry nextEntry = readEntry ( data , null ) ; }
private LinkedHashMap < Integer , Coordinate > getCoordinate ( int nStaz , SimpleFeatureCollection collection , String idField ) throws Exception { LinkedHashMap < Integer , Coordinate > id2CoordinatesMap = new LinkedHashMap < Integer , Coordinate > ( ) ; FeatureIterator < SimpleFeature > iterator = collection . features ( ) ; Coordinate coordinate = null ; try { while ( iterator . hasNext ( ) ) { SimpleFeature feature = iterator . next ( ) ; int name = ( ( Number ) feature . getAttribute ( idField ) ) . intValue ( ) ; coordinate = ( ( Geometry ) feature . getDefaultGeometry ( ) ) . getCentroid ( ) . getCoordinate ( ) ; double z = 0 ; if ( fPointZ != null ) { try { z = ( ( Number ) feature . getAttribute ( fPointZ ) ) . doubleValue ( ) ; } catch ( NullPointerException e ) { pm . errorMessage ( msg . message ( "kriging.noPointZ" ) ) ; throw new Exception ( msg . message ( "kriging.noPointZ" ) ) ; } } coordinate . z = z ; id2CoordinatesMap . put ( name , coordinate ) ; } } finally { iterator . close ( ) ; } return id2CoordinatesMap ; }
public Graph < K , VV , EV > removeEdges ( List < Edge < K , EV > > edgesToBeRemoved ) { DataSet < Edge < K , EV > > newEdges = getEdges ( ) . coGroup ( this . context . fromCollection ( edgesToBeRemoved ) ) . where ( 0 , 1 ) . equalTo ( 0 , 1 ) . with ( new EdgeRemovalCoGroup <> ( ) ) . name ( "Remove edges" ) ; return new Graph <> ( this . vertices , newEdges , context ) ; }
public int next ( ) { int index = getIndex ( ) ; // offset = getOffset() in ICU4C int matchindex = search_ . matchedIndex_ ; int matchlength = search_ . matchedLength ( ) ; search_ . reset_ = false ; if ( search_ . isForwardSearching_ ) { int endIdx = search_ . endIndex ( ) ; if ( index == endIdx || matchindex == endIdx || ( matchindex != DONE && matchindex + matchlength >= endIdx ) ) { setMatchNotFound ( ) ; return DONE ; } } else { // switching direction. // if matchedIndex == DONE, it means that either a // setIndex (setOffset in C) has been called or that previous ran off the text // string. the iterator would have been set to offset 0 if a // match is not found. search_ . isForwardSearching_ = true ; if ( search_ . matchedIndex_ != DONE ) { // there's no need to set the collation element iterator // the next call to next will set the offset. return matchindex ; } } if ( matchlength > 0 ) { // if matchlength is 0 we are at the start of the iteration if ( search_ . isOverlap_ ) { index ++ ; } else { index += matchlength ; } } return handleNext ( index ) ; }
public static boolean METHOD_1 ( String VAR_1 , TYPE_1 < TYPE_2 > VAR_2 ) { for ( TYPE_2 VAR_3 : VAR_2 ) { if ( VAR_3 . METHOD_2 ( VAR_1 . toLowerCase ( ) ) . METHOD_3 ( ) ) { return true ; } } return false ; }
@ Override protected void handleOptionWithArgument ( String option , String argument ) throws IOException { if ( "-f" . equals ( option ) ) { try { fontSize = Float . parseFloat ( argument ) ; fontSizeSpecified = true ; } catch ( NumberFormatException e ) { // ignore } } else if ( "-priority" . equals ( option ) ) { try { priority = Integer . parseInt ( argument ) ; } catch ( NumberFormatException e ) { // ignore } } else if ( "-loadBugs" . equals ( option ) || "-loadbugs" . equals ( option ) ) { saveFile = new File ( argument ) ; if ( ! saveFile . exists ( ) ) { System . err . println ( "Bugs file \"" + argument + "\" could not be found" ) ; System . exit ( 1 ) ; } } else { super . handleOptionWithArgument ( option , argument ) ; } }
public String METHOD_1 ( ) { TYPE_1 VAR_1 = VAR_2 . METHOD_2 ( ) ; String VAR_3 = VAR_1 == null ? VAR_4 : VAR_1 . METHOD_3 ( ) ; return TYPE_2 . METHOD_4 ( VAR_3 ) ? message : String . format ( STRING_1 , message , VAR_3 ) ; }
protected < T > T create ( Class < T > type , Map < String , String > config ) { try { Constructor < T > constructor = type . getConstructor ( Map . class ) ; return constructor . newInstance ( config ) ; } catch ( NoSuchMethodException e ) { } catch ( Exception e ) { throw new RuntimeException ( e ) ; } try { return type . newInstance ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
@ SuppressWarnings ( "unchecked" ) @ Override public EList < Revision > getRevisions ( ) { return ( EList < Revision > ) eGet ( StorePackage . Literals . PROJECT__REVISIONS , true ) ; }
public static HttpNfcLeaseInfo getHttpNfcLeaseInfo ( final ConnectionResources connectionResources , final ManagedObjectReference httpNfcLease ) throws Exception { final ObjectContent objectContent = GetObjectProperties . getObjectProperty ( connectionResources , httpNfcLease , "info" ) ; final List < DynamicProperty > dynamicProperties = objectContent . getPropSet ( ) ; if ( firstElementIsOfClass ( dynamicProperties , HttpNfcLeaseInfo . class ) ) { return ( HttpNfcLeaseInfo ) dynamicProperties . get ( 0 ) . getVal ( ) ; } throw new RuntimeException ( LEASE_COULD_NOT_BE_OBTAINED ) ; }
public void setMaxDaysToFinish ( JsonObject maxDaysToFinish ) { if ( maxDaysToFinish != null ) { this . maxDaysToFinish = maxDaysToFinish . toString ( ) ; } else { this . maxDaysToFinish = null ; } }
private void createDesignDocumentAndViewIfNeeded ( ) { if ( this . views != null && this . designDocument != null ) { LOGGER . debug ( "Ensure that indexes exist in bucket [{}]" , this . bucket . name ( ) ) ; val bucketManager = this . bucket . bucketManager ( ) ; val newDocument = DesignDocument . create ( this . designDocument , new ArrayList <> ( views ) ) ; try { if ( ! newDocument . equals ( bucketManager . getDesignDocument ( this . designDocument ) ) ) { LOGGER . warn ( "Missing indexes in bucket [{}] for document [{}]" , this . bucket . name ( ) , this . designDocument ) ; bucketManager . upsertDesignDocument ( newDocument ) ; } } catch ( final DesignDocumentDoesNotExistException e ) { LOGGER . debug ( "Design document in bucket [{}] for document [{}] should be created" , this . bucket . name ( ) , this . designDocument ) ; bucketManager . upsertDesignDocument ( newDocument ) ; } catch ( final Exception e ) { throw new IllegalArgumentException ( e . getMessage ( ) , e ) ; } } }
public static boolean compareValues ( PrimitiveType e1 , PrimitiveType e2 , boolean allowNull ) { if ( e1 == null && e2 == null && allowNull ) return true ; if ( e1 == null || e2 == null ) return false ; return e1 . equalsShallow ( e2 ) ; }
@ Override public T nameResolverFactory ( NameResolver . Factory resolverFactory ) { delegate ( ) . nameResolverFactory ( resolverFactory ) ; return thisT ( ) ; }
public static void printMatrix ( double [ ] [ ] matrix ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( ' ' ) . append ( ' ' ) ; for ( double [ ] line : matrix ) { for ( double column : line ) { sb . append ( column ) . append ( ", " ) ; } sb . append ( ' ' ) ; } sb . append ( ' ' ) ; System . out . println ( sb . toString ( ) ) ; }
static void METHOD_1 ( String VAR_1 , TYPE_1 file ) throws TYPE_2 { METHOD_1 ( VAR_1 , file , null ) ; }
ANNOTATION_1 public void METHOD_1 ( final TYPE_1 VAR_1 ) { final TYPE_2 VAR_2 = TYPE_3 . METHOD_2 ( VAR_1 ) ; METHOD_3 ( VAR_2 , VAR_3 , VAR_4 . VAR_5 , VAR_6 , STRING_1 ) ; METHOD_3 ( VAR_2 , VAR_7 , VAR_4 . VAR_8 , VAR_9 , STRING_2 ) ; METHOD_3 ( VAR_2 , VAR_10 , VAR_4 . VAR_8 , VAR_11 , STRING_3 ) ; METHOD_3 ( VAR_2 , VAR_12 , VAR_4 . VAR_5 , VAR_13 , STRING_4 ) ; }
@ Override public int getNotationAttrIndex ( ) { /* If necessary, we could find this index when resolving the * element, could avoid linear search. But who knows how often * it's really needed... */ for ( int i = 0 , len = mAttrCount ; i < len ; ++ i ) { if ( mAttrSpecs [ i ] . typeIsNotation ( ) ) { return i ; } } return - 1 ; }
private boolean METHOD_1 ( String filename ) { boolean result = true ; TYPE_1 file = new TYPE_1 ( filename ) ; if ( ( result = file . VAR_1 ( ) ) == false ) { VAR_2 . VAR_3 . METHOD_2 ( STRING_1 + filename ) ; } else if ( ( result = file . VAR_4 ( ) ) == false ) { VAR_2 . VAR_3 . METHOD_2 ( STRING_2 + filename ) ; } else if ( ( result = file . VAR_5 ( ) ) == false ) { VAR_2 . VAR_3 . METHOD_2 ( STRING_3 + filename ) ; } else { VAR_6 = file ; } return result ; }
public static TYPE_1 METHOD_1 ( final TYPE_2 VAR_1 ) { METHOD_2 ( VAR_2 . VAR_3 , VAR_1 ) ; METHOD_2 ( VAR_2 . VAR_4 , VAR_1 ) ; final TYPE_2 VAR_5 ; if ( VAR_1 . METHOD_3 ( VAR_2 . VAR_6 ) ) { final TYPE_3 VAR_7 = VAR_1 . get ( VAR_2 . VAR_6 ) ; if ( VAR_7 . METHOD_4 ( ) ) { VAR_5 = VAR_7 . METHOD_5 ( ) ; } else { VAR_5 = null ; } } else { VAR_5 = null ; } final TYPE_4 VAR_8 ; if ( VAR_1 . METHOD_3 ( VAR_2 . VAR_9 ) ) { VAR_8 = TYPE_4 . METHOD_1 ( VAR_1 . METHOD_6 ( VAR_2 . VAR_9 ) ) ; } else { VAR_8 = null ; } final TYPE_5 VAR_10 ; if ( VAR_1 . METHOD_3 ( VAR_2 . VAR_11 ) ) { VAR_10 = TYPE_5 . METHOD_1 ( VAR_1 . METHOD_6 ( VAR_2 . VAR_11 ) ) ; } else { VAR_10 = null ; } final TYPE_6 VAR_12 ; if ( VAR_1 . METHOD_3 ( VAR_2 . VAR_13 ) ) { VAR_12 = VAR_1 . METHOD_7 ( VAR_2 . VAR_13 ) . getValue ( ) ; } else { VAR_12 = null ; } return new TYPE_1 < > ( TYPE_7 . METHOD_8 ( VAR_1 . getString ( VAR_2 . VAR_3 ) . getValue ( ) ) , VAR_5 , VAR_1 . METHOD_6 ( VAR_2 . VAR_4 ) , VAR_8 , VAR_10 , VAR_12 , VAR_1 . getBoolean ( VAR_2 . VAR_14 , VAR_15 . VAR_16 ) . getValue ( ) ) ; }
ANNOTATION_1 public TYPE_1 < String , TYPE_2 < TYPE_3 > > METHOD_1 ( TYPE_4 VAR_1 , TYPE_2 < String > VAR_2 ) throws TYPE_5 { return METHOD_1 ( VAR_1 , VAR_2 , new TYPE_6 ( ) ) ; }
ANNOTATION_1 protected void METHOD_1 ( int attribute ) throws TYPE_1 { switch ( attribute ) { case VAR_1 : METHOD_2 ( STRING_1 ) ; VAR_2 = true ; break ; case VAR_3 : METHOD_3 ( STRING_2 ) ; break ; case VAR_4 : METHOD_4 ( ) ; break ; case VAR_5 : METHOD_3 ( STRING_3 ) ; break ; case VAR_6 : METHOD_4 ( ) ; break ; case VAR_7 : break ; case VAR_8 : break ; default : break ; } }
public void setOvertypeMode ( boolean isOvertypeMode ) { TextEditor . isOvertypeMode = isOvertypeMode ; int pos = getCaretPosition ( ) ; setCaret ( isOvertypeMode ( ) ? overtypeCaret : defaultCaret ) ; setCaretPosition ( pos ) ; }
ANNOTATION_1 public void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 < TYPE_3 > VAR_2 , TYPE_4 type ) throws TYPE_5 { TYPE_6 VAR_3 = VAR_4 . get ( type ) ; if ( VAR_3 != null ) { VAR_3 . METHOD_1 ( VAR_1 , VAR_2 , type ) ; } else { throw new TYPE_7 ( STRING_1 + type ) ; } }
public static long getLastModified ( ServletContext servletContext , HttpServletRequest request , String path ) { return getLastModified ( servletContext , request , path , FileUtils . getExtension ( path ) ) ; }
private TYPE_1 < ? > METHOD_1 ( String VAR_1 ) { try { final TYPE_2 VAR_2 = TYPE_3 . METHOD_2 ( ) . METHOD_3 ( ) ; return VAR_2 . METHOD_4 ( VAR_1 ) ; } catch ( TYPE_4 VAR_3 ) { TYPE_5 . METHOD_5 ( STRING_1 + VAR_1 + STRING_2 ) ; if ( TYPE_5 . METHOD_6 ( ) ) { TYPE_5 . METHOD_7 ( VAR_3 . METHOD_8 ( ) , VAR_3 ) ; } } return null ; }
void METHOD_1 ( TYPE_1 node , String name ) { boolean VAR_1 = METHOD_2 ( METHOD_3 ( node , STRING_1 ) ) ; TYPE_2 VAR_2 ; try { VAR_2 = TYPE_2 . METHOD_4 ( name ) ; } catch ( TYPE_3 VAR_3 ) { throw new TYPE_4 ( STRING_2 + name + STRING_3 + TYPE_5 . toString ( TYPE_2 . values ( ) ) ) ; } TYPE_6 VAR_4 = VAR_5 . METHOD_5 ( ) . METHOD_6 ( ) ; if ( VAR_1 ) { VAR_4 . METHOD_7 ( VAR_2 ) ; } else { VAR_4 . METHOD_8 ( VAR_2 ) ; } }