text
stringlengths
63
450k
public List < TItemValue > get ( TKey key ) { //todo immutable return mKeyToValuesMap . get ( mIDMapper . keyToKeyId ( key ) ) ; }
static URL getAndVerifySigningCertificateChainUrl ( final String signingCertificateChainUrl ) throws CertificateException { try { URL url = new URI ( signingCertificateChainUrl ) . normalize ( ) . toURL ( ) ; // Validate the hostname if ( ! VALID_SIGNING_CERT_CHAIN_URL_HOST_NAME . equalsIgnoreCase ( url . getHost ( ) ) ) { throw new CertificateException ( String . format ( "SigningCertificateChainUrl [%s] does not contain the required hostname" + " of [%s]" , signingCertificateChainUrl , VALID_SIGNING_CERT_CHAIN_URL_HOST_NAME ) ) ; } // Validate the path prefix String path = url . getPath ( ) ; if ( ! path . startsWith ( VALID_SIGNING_CERT_CHAIN_URL_PATH_PREFIX ) ) { throw new CertificateException ( String . format ( "SigningCertificateChainUrl path [%s] is invalid. Expecting path to " + "start with [%s]" , signingCertificateChainUrl , VALID_SIGNING_CERT_CHAIN_URL_PATH_PREFIX ) ) ; } // Validate the protocol String urlProtocol = url . getProtocol ( ) ; if ( ! VALID_SIGNING_CERT_CHAIN_PROTOCOL . equalsIgnoreCase ( urlProtocol ) ) { throw new CertificateException ( String . format ( "SigningCertificateChainUrl [%s] contains an unsupported protocol [%s]" , signingCertificateChainUrl , urlProtocol ) ) ; } // Validate the port uses the default of 443 for HTTPS if explicitly defined in the URL int urlPort = url . getPort ( ) ; if ( ( urlPort != UNSPECIFIED_SIGNING_CERT_CHAIN_URL_PORT_VALUE ) && ( urlPort != url . getDefaultPort ( ) ) ) { throw new CertificateException ( String . format ( "SigningCertificateChainUrl [%s] contains an invalid port [%d]" , signingCertificateChainUrl , urlPort ) ) ; } return url ; } catch ( IllegalArgumentException | MalformedURLException | URISyntaxException ex ) { throw new CertificateException ( String . format ( "SigningCertificateChainUrl [%s] is malformed" , signingCertificateChainUrl ) , ex ) ; } }
@ Override public synchronized boolean setNotificationOptions ( long interval , boolean useMBean ) { //return false if current settings match args. Long compareInterval = Long . valueOf ( interval ) ; if ( compareInterval . equals ( this . interval ) && ( ( useMBean && FileMonitor . MONITOR_TYPE_EXTERNAL . equals ( this . notificationType ) ) || ( ! useMBean && FileMonitor . MONITOR_TYPE_TIMED . equals ( this . notificationType ) ) ) ) { return true ; } this . interval = compareInterval ; this . notificationType = useMBean ? FileMonitor . MONITOR_TYPE_EXTERNAL : FileMonitor . MONITOR_TYPE_TIMED ; //only issue the update if we have a service registered. if ( this . service != null ) { updateFileMonitorService ( ) ; updateNonRecurseFileMonitorService ( ) ; } return true ; }
public static void METHOD_1 ( TYPE_1 VAR_1 , TYPE_2 VAR_2 , long VAR_3 ) throws TYPE_3 { TYPE_4 VAR_4 = VAR_1 . get ( VAR_2 , TYPE_4 . class ) ; TYPE_5 VAR_5 = new TYPE_5 ( ) ; VAR_5 . METHOD_2 ( STRING_1 ) ; VAR_5 . METHOD_3 ( STRING_2 ) ; VAR_5 . METHOD_4 ( STRING_3 ) ; VAR_5 . METHOD_5 ( STRING_4 ) ; TYPE_6 VAR_6 = new TYPE_6 ( ) ; VAR_6 . METHOD_6 ( STRING_5 ) ; VAR_6 . setValue ( STRING_6 ) ; TYPE_6 VAR_7 = new TYPE_6 ( ) ; VAR_7 . METHOD_6 ( STRING_7 ) ; VAR_7 . setValue ( STRING_8 ) ; TYPE_7 VAR_8 = new TYPE_7 ( ) ; VAR_8 . METHOD_7 ( new TYPE_6 [ ] { VAR_6 , VAR_7 } ) ; VAR_5 . METHOD_8 ( VAR_8 ) ; VAR_5 . METHOD_9 ( new String [ ] { STRING_9 , STRING_10 } ) ; VAR_5 . METHOD_10 ( new String [ ] { STRING_11 , STRING_12 } ) ; TYPE_8 VAR_9 = new TYPE_8 ( ) ; VAR_9 . METHOD_11 ( VAR_3 ) ; VAR_9 . METHOD_12 ( VAR_5 ) ; VAR_9 . METHOD_13 ( VAR_10 . VAR_11 ) ; TYPE_9 VAR_12 = new TYPE_9 ( ) ; VAR_12 . METHOD_14 ( VAR_9 ) ; VAR_12 . METHOD_15 ( VAR_13 . VAR_14 ) ; TYPE_9 [ ] VAR_15 = new TYPE_9 [ ] { VAR_12 } ; TYPE_8 VAR_16 = VAR_4 . METHOD_16 ( VAR_15 ) . getValue ( 0 ) ; VAR_17 . out . METHOD_17 ( STRING_13 , VAR_16 . METHOD_18 ( ) . getId ( ) , VAR_16 . METHOD_18 ( ) . METHOD_19 ( ) ) ; }
public static < E > Queue < E > newQueue ( ConcurrentQueueSpec qs ) { if ( qs . isBounded ( ) ) { // SPSC if ( qs . isSpsc ( ) ) { return new SpscAtomicArrayQueue < E > ( qs . capacity ) ; } // MPSC else if ( qs . isMpsc ( ) ) { return new MpscAtomicArrayQueue < E > ( qs . capacity ) ; } // SPMC else if ( qs . isSpmc ( ) ) { return new SpmcAtomicArrayQueue < E > ( qs . capacity ) ; } // MPMC else { return new MpmcAtomicArrayQueue < E > ( qs . capacity ) ; } } else { // SPSC if ( qs . isSpsc ( ) ) { return new SpscLinkedAtomicQueue < E > ( ) ; } // MPSC else if ( qs . isMpsc ( ) ) { return new MpscLinkedAtomicQueue < E > ( ) ; } } return new ConcurrentLinkedQueue < E > ( ) ; }
public static boolean evalPP ( String ClassName , Long fnr ) { try { Class < ? > c = Class . forName ( ClassName ) ; Method m = c . getDeclaredMethod ( "evaluatePP" , Number . class ) ; Object o = m . invoke ( c . newInstance ( ) , fnr ) ; return ( Boolean ) o ; } catch ( ClassNotFoundException e ) { System . out . println ( "class not found!!" ) ; } catch ( NoSuchMethodException e ) { System . out . println ( "method not found!!" ) ; } catch ( SecurityException e ) { System . out . println ( "alla not found!!" ) ; } catch ( IllegalAccessException e ) { System . out . println ( "invoke did not work!!" ) ; } catch ( IllegalArgumentException e ) { System . out . println ( "false arguments!!" ) ; } catch ( InvocationTargetException e ) { System . out . println ( "invocation target not found!!" ) ; } catch ( InstantiationException e ) { System . out . println ( "new instance not applied!!" ) ; } return true ; }
protected void loadOptionalPool ( final String poolBinder ) { try { final Method bindPool = OrientModule . class . getDeclaredMethod ( "bindPool" , Class . class , Class . class ) ; bindPool . setAccessible ( true ) ; try { Class . forName ( poolBinder ) . getConstructor ( OrientModule . class , Method . class , Binder . class ) . newInstance ( this , bindPool , binder ( ) ) ; } finally { bindPool . setAccessible ( false ) ; } } catch ( Exception ignored ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Failed to process pool loader " + poolBinder , ignored ) ; } } }
private boolean advanceYear ( Calendar cal , int year ) { year = years . nextSetBit ( year + 1 - ScheduleExpressionParser . MINIMUM_YEAR ) ; // d665298 if ( year >= 0 ) { cal . set ( Calendar . YEAR , year + ScheduleExpressionParser . MINIMUM_YEAR ) ; // d665298 return true ; } return false ; }
public void remove ( UIComponent component ) { if ( component . getParent ( ) != this ) return ; content . components . remove ( component ) ; component . setParent ( null ) ; component . unregister ( this ) ; onContentUpdate ( ) ; }
public static ListValue < Long , TypeList < Long , Type < Long > > > froms ( final Collection < Long > values ) { return new ListValue < Long , TypeList < Long , Type < Long > > > ( new Long [ values . size ( ) ] , TypeList . getLong ( ) ) ; }
final void end ( ) { final Thread thread = this . threadRef ; this . keepRunning . set ( false ) ; if ( thread != null ) { // thread.interrupt(); try { thread . join ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } } this . threadRef = null ; }
private void inflateContentContainer ( ) { if ( contentContainer == null ) { contentContainer = new RelativeLayout ( getContext ( ) ) ; contentContainer . setId ( R . id . content_container ) ; LinearLayout . LayoutParams layoutParams = new LinearLayout . LayoutParams ( LinearLayout . LayoutParams . MATCH_PARENT , 0 ) ; layoutParams . weight = 1 ; contentContainer . setLayoutParams ( layoutParams ) ; } else { contentContainer . removeAllViews ( ) ; } }
private BigInteger getCodeBytesAsBigInt ( Method method , int [ ] switchPos , int i , int endPos ) { byte [ ] clause = getCodeBytes ( method , switchPos [ i ] , endPos ) ; BigInteger clauseAsInt ; if ( clause . length == 0 ) { clauseAsInt = BigInteger . ZERO ; } else { clauseAsInt = new BigInteger ( clause ) ; } return clauseAsInt ; }
ANNOTATION_1 ( "unchecked" ) ANNOTATION_2 public < TYPE_1 > TYPE_1 get ( TYPE_2 name , TYPE_3 < TYPE_1 > VAR_1 ) { TYPE_4 value = get ( name ) ; if ( value == null ) return null ; if ( VAR_1 . METHOD_1 ( value . getClass ( ) ) ) return ( TYPE_1 ) value ; throw new TYPE_5 ( STRING_1 + value . getClass ( ) . getName ( ) + STRING_2 + VAR_1 . getName ( ) ) ; }
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { switch ( featureID ) { case AfplibPackage . EDM__DM_NAME : return getDMName ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; }
public static boolean vectorContainsIgnoreCaseFirstLetter ( Vector v , String value ) { for ( int i = 0 ; i < v . size ( ) ; i ++ ) { String s = ( String ) v . elementAt ( i ) ; if ( equalsIgnoreCaseFirstLetter ( s , value ) ) return true ; } return false ; }
public DescribeEnvironmentManagedActionsResult withManagedActions ( ManagedAction ... managedActions ) { if ( this . managedActions == null ) { setManagedActions ( new com . amazonaws . internal . SdkInternalList < ManagedAction > ( managedActions . length ) ) ; } for ( ManagedAction ele : managedActions ) { this . managedActions . add ( ele ) ; } return this ; }
ANNOTATION_1 public < TYPE_1 extends TYPE_2 > TYPE_3 < TYPE_1 > METHOD_1 ( ANNOTATION_2 TYPE_4 VAR_1 , ANNOTATION_2 TYPE_5 < TYPE_1 > VAR_2 ) { TYPE_3 < TYPE_1 > list = METHOD_2 ( VAR_2 ) ; for ( TYPE_6 < TYPE_1 > iterator = list . iterator ( ) ; iterator . VAR_3 ( ) ; ) { TYPE_1 VAR_4 = iterator . VAR_5 ( ) ; if ( ! VAR_4 . METHOD_3 ( VAR_1 ) ) { if ( VAR_6 . VAR_7 ) VAR_6 . VAR_8 . METHOD_4 ( VAR_9 , STRING_1 + VAR_4 ) ; iterator . remove ( ) ; } } return list ; }
static public String METHOD_1 ( int VAR_1 ) { if ( VAR_2 == null ) init ( ) ; String result = VAR_2 . get ( VAR_1 ) ; return result != null ? result : STRING_1 + VAR_1 ; }
@ Override protected Map < String , Object > computeNext ( ) { String line ; try { line = _reader . readLine ( ) ; } catch ( IOException e ) { throw Throwables . propagate ( e ) ; } if ( line == null ) { try { close ( ) ; } catch ( IOException ignore ) { // Don't worry about this, we're done iterating anyway } return endOfData ( ) ; } //noinspection unchecked return JsonHelper . fromJson ( line , Map . class ) ; }
protected final String renderNameAndId ( HttpServletRequest request , AbstractHtmlState state , Form parentForm ) { // if id is not set then we need to exit if ( state . id == null ) return null ; // check to see if this is an instance of a HTML Control boolean ctrlState = ( state instanceof AbstractHtmlControlState ) ; // form keeps track of this so that it can add this control to it's focus map if ( parentForm != null && ctrlState ) { AbstractHtmlControlState hcs = ( AbstractHtmlControlState ) state ; if ( hcs . name == null && parentForm . isFocusSet ( ) ) hcs . name = state . id ; parentForm . addTagID ( state . id , ( ( AbstractHtmlControlState ) state ) . name ) ; } // rewrite the id, save the original value so it can be used in maps String id = state . id ; state . id = getIdForTagId ( id ) ; // Legacy Java Script support -- This writes out a single table with both the id and names // mixed. This is legacy support to match the pre beehive behavior. String idScript = null ; if ( TagConfig . isLegacyJavaScript ( ) ) { ScriptRequestState srs = ScriptRequestState . getScriptRequestState ( request ) ; if ( ! ctrlState ) { idScript = srs . mapLegacyTagId ( getScriptReporter ( ) , id , state . id ) ; } else { AbstractHtmlControlState cState = ( AbstractHtmlControlState ) state ; if ( cState . name != null ) idScript = srs . mapLegacyTagId ( getScriptReporter ( ) , id , cState . name ) ; else idScript = srs . mapLegacyTagId ( getScriptReporter ( ) , id , state . id ) ; } } // map the tagId to the real id String name = null ; if ( ctrlState ) { AbstractHtmlControlState cState = ( AbstractHtmlControlState ) state ; name = cState . name ; } String script = renderDefaultNameAndId ( ( HttpServletRequest ) request , state , id , name ) ; if ( script != null ) { if ( idScript != null ) idScript = idScript + script ; else idScript = script ; } return idScript ; }
ANNOTATION_1 public TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_3 VAR_1 ) throws TYPE_4 { TYPE_5 < TYPE_2 > VAR_2 = new TYPE_6 < > ( ) ; if ( ! ( VAR_1 instanceof TYPE_7 ) ) { return VAR_2 ; } TYPE_7 VAR_3 = ( TYPE_7 ) VAR_1 ; this . VAR_4 = VAR_3 . METHOD_2 ( ) ; TYPE_8 . METHOD_3 ( ! this . VAR_5 . isEmpty ( ) , STRING_1 + VAR_1 . METHOD_4 ( ) ) ; VAR_2 . METHOD_5 ( METHOD_6 ( VAR_3 . getName ( ) , VAR_3 . METHOD_4 ( ) ) ) ; return VAR_2 ; }
public static void registerDriver ( Class < ? extends WebcamDriver > clazz ) { if ( clazz == null ) { throw new IllegalArgumentException ( "Webcam driver class to register cannot be null!" ) ; } DRIVERS_CLASS_LIST . add ( clazz ) ; registerDriver ( clazz . getCanonicalName ( ) ) ; }
private void readGroup ( NetcdfFile ncfile , Group parent , Element groupElem ) throws IOException { String name = groupElem . getAttributeValue ( "name" ) ; Group g ; if ( parent == ncfile . getRootGroup ( ) ) { // special handling g = parent ; } else { if ( name == null ) { errlog . format ( "NcML Group name is required (%s)%n" , groupElem ) ; return ; } g = new Group ( ncfile , parent , name ) ; parent . addGroup ( g ) ; } // look for attributes java . util . List < Element > attList = groupElem . getChildren ( "attribute" , Catalog . ncmlNS ) ; for ( Element attElem : attList ) { readAtt ( g , attElem ) ; } // look for dimensions java . util . List < Element > dimList = groupElem . getChildren ( "dimension" , Catalog . ncmlNS ) ; for ( Element dimElem : dimList ) { readDim ( g , dimElem ) ; } // look for variables java . util . List < Element > varList = groupElem . getChildren ( "variable" , Catalog . ncmlNS ) ; for ( Element varElem : varList ) { readVariable ( ncfile , g , null , varElem ) ; } // LOOK for typedef enums // look for nested groups java . util . List < Element > groupList = groupElem . getChildren ( "group" , Catalog . ncmlNS ) ; for ( Element gElem : groupList ) { readGroup ( ncfile , g , gElem ) ; } }
static void METHOD_1 ( TYPE_1 out , TYPE_2 < String > VAR_1 ) { for ( int i = 0 , size = VAR_1 . size ( ) ; i < size ; i += INT_1 ) { String name = VAR_1 . get ( i ) ; String value = VAR_1 . get ( i + 1 ) ; if ( i > 0 ) out . append ( CHAR_1 ) ; out . append ( name ) ; if ( value != null ) { out . append ( CHAR_2 ) ; out . append ( value ) ; } } }
@ SuppressWarnings ( "Duplicates" ) @ Override public void onComplete ( ) { if ( done ) { return ; } done = true ; Runnable onComplete = downstream :: onComplete ; for ( RunnableInstrumenter instrumentation : instrumentations ) { onComplete = instrumentation . instrument ( onComplete ) ; } onComplete . run ( ) ; }
protected TYPE_1 METHOD_1 ( TYPE_2 VAR_1 , TYPE_3 < String , TYPE_1 > VAR_2 ) { TYPE_4 VAR_3 = VAR_1 . METHOD_2 ( ) ; switch ( VAR_3 ) { case VAR_4 : TYPE_5 VAR_5 = ( TYPE_5 ) VAR_1 ; String name = VAR_5 . toString ( ) ; if ( VAR_2 . METHOD_3 ( name ) ) { return VAR_2 . get ( name ) ; } else { return VAR_6 . METHOD_1 ( VAR_1 ) ; } case VAR_7 : TYPE_6 VAR_8 = ( TYPE_6 ) VAR_1 ; TYPE_2 VAR_9 = VAR_8 . METHOD_4 ( ) ; TYPE_2 VAR_10 = VAR_8 . METHOD_5 ( ) ; if ( VAR_9 == null && VAR_10 == null ) { return TYPE_1 . class . getName ( ) ; } else if ( VAR_9 != null ) { return METHOD_1 ( VAR_11 . METHOD_6 ( VAR_9 ) , VAR_2 ) ; } else if ( VAR_10 != null ) { return METHOD_1 ( VAR_10 , VAR_2 ) ; } else { return METHOD_1 ( VAR_11 . METHOD_7 ( VAR_9 , VAR_10 ) , VAR_2 ) ; } case VAR_12 : TYPE_7 VAR_13 = ( TYPE_7 ) VAR_1 ; TYPE_1 VAR_14 = METHOD_1 ( VAR_13 . METHOD_8 ( ) , VAR_2 ) ; if ( VAR_14 instanceof TYPE_8 ) { TYPE_8 VAR_15 = ( TYPE_8 ) VAR_14 ; return TYPE_9 . METHOD_9 ( VAR_15 , 0 ) . getClass ( ) ; } else if ( VAR_14 instanceof String ) { return VAR_14 + STRING_1 ; } else { return VAR_6 . METHOD_1 ( VAR_1 ) ; } case VAR_16 : case VAR_17 : case VAR_18 : case VAR_19 : case VAR_20 : case VAR_21 : case VAR_22 : case VAR_23 : TYPE_10 < TYPE_8 > type = TYPE_11 . METHOD_10 ( VAR_1 . toString ( ) ) ; if ( type . VAR_24 ( ) ) { return type . get ( ) ; } else { throw new TYPE_12 ( STRING_2 + VAR_1 . toString ( ) ) ; } default : return VAR_6 . METHOD_1 ( VAR_1 ) ; } }
@ Override public void writeModel ( OutputStream os , MealyMachine < ? , String , ? , ? > model , Alphabet < String > alphabet ) throws IOException { try ( Writer w = IOUtil . asBufferedUTF8Writer ( os ) ) { TAFWriter . writeMealy ( model , alphabet , w ) ; } }
private static void _toSettings ( List list , Log log , String str , boolean valueAsString ) { try { Object res = DeserializeJSON . call ( null , str ) ; // only a single row if ( ! Decision . isArray ( res ) && Decision . isStruct ( res ) ) { _toSetting ( list , Caster . toMap ( res ) , valueAsString ) ; return ; } // multiple rows if ( Decision . isArray ( res ) ) { List tmpList = Caster . toList ( res ) ; Iterator it = tmpList . iterator ( ) ; while ( it . hasNext ( ) ) { _toSetting ( list , Caster . toMap ( it . next ( ) ) , valueAsString ) ; } return ; } } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; log . error ( "Extension Installation" , t ) ; } return ; }
@ BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups ( String project ) { AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest . newBuilder ( ) . setProject ( project ) . build ( ) ; return aggregatedListInstanceGroups ( request ) ; }
private void stripLinkDefinitions ( TextEditor text ) { Pattern p = Pattern . compile ( "^[ ]{0,3}\\[(.+)\\]:" + // ID = $1 "[ \\t]*\\n?[ \\t]*" + // Space "<?(\\S+?)>?" + // URL = $2 "[ \\t]*\\n?[ \\t]*" + // Space "(?:[\"(](.+?)[\")][ \\t]*)?" + // Optional title = $3 "(?:\\n+|\\Z)" , Pattern . MULTILINE ) ; text . replaceAll ( p , new Replacement ( ) { public String replacement ( Matcher m ) { String id = m . group ( 1 ) . toLowerCase ( ) ; String url = encodeAmpsAndAngles ( new TextEditor ( m . group ( 2 ) ) ) . toString ( ) ; String title = m . group ( 3 ) ; if ( title == null ) { title = "" ; } title = replaceAll ( title , "\"" , "&quot;" ) ; linkDefinitions . put ( id , new LinkDefinition ( url , title ) ) ; return "" ; } } ) ; }
ANNOTATION_1 public TYPE_1 setValue ( int id , int value , boolean VAR_1 , boolean VAR_2 ) { if ( id < 0 || id > VAR_3 . VAR_4 ) { throw new TYPE_2 ( STRING_1 + id ) ; } final TYPE_3 key = TYPE_3 . METHOD_1 ( id ) ; final TYPE_4 VAR_5 = VAR_6 . get ( key ) ; if ( VAR_5 != null ) { VAR_5 . setValue ( value ) ; VAR_5 . METHOD_2 ( VAR_1 ) ; VAR_5 . METHOD_3 ( VAR_2 ) ; } else { VAR_6 . put ( key , new TYPE_4 ( value , VAR_1 , VAR_2 ) ) ; } return this ; }
public void setObjectLabel ( String v ) { if ( TextObject_Type . featOkTst && ( ( TextObject_Type ) jcasType ) . casFeat_objectLabel == null ) jcasType . jcas . throwFeatMissing ( "objectLabel" , "de.julielab.jules.types.TextObject" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( TextObject_Type ) jcasType ) . casFeatCode_objectLabel , v ) ; }
@ Override public ClientHandshakeBuilder postProcessHandshakeRequestAsClient ( ClientHandshakeBuilder request ) { request . put ( UPGRADE , "websocket" ) ; request . put ( CONNECTION , UPGRADE ) ; // to respond to a Connection keep alives byte [ ] random = new byte [ 16 ] ; reuseableRandom . nextBytes ( random ) ; request . put ( SEC_WEB_SOCKET_KEY , Base64 . encodeBytes ( random ) ) ; request . put ( "Sec-WebSocket-Version" , "13" ) ; // overwriting the previous StringBuilder requestedExtensions = new StringBuilder ( ) ; for ( IExtension knownExtension : knownExtensions ) { if ( knownExtension . getProvidedExtensionAsClient ( ) != null && knownExtension . getProvidedExtensionAsClient ( ) . length ( ) != 0 ) { if ( requestedExtensions . length ( ) > 0 ) { requestedExtensions . append ( ", " ) ; } requestedExtensions . append ( knownExtension . getProvidedExtensionAsClient ( ) ) ; } } if ( requestedExtensions . length ( ) != 0 ) { request . put ( SEC_WEB_SOCKET_EXTENSIONS , requestedExtensions . toString ( ) ) ; } StringBuilder requestedProtocols = new StringBuilder ( ) ; for ( IProtocol knownProtocol : knownProtocols ) { if ( knownProtocol . getProvidedProtocol ( ) . length ( ) != 0 ) { if ( requestedProtocols . length ( ) > 0 ) { requestedProtocols . append ( ", " ) ; } requestedProtocols . append ( knownProtocol . getProvidedProtocol ( ) ) ; } } if ( requestedProtocols . length ( ) != 0 ) { request . put ( SEC_WEB_SOCKET_PROTOCOL , requestedProtocols . toString ( ) ) ; } return request ; }
protected boolean isWorkerInState ( final String workerName , final WorkerInfo . State requestedState , final Jedis jedis ) throws IOException { boolean proceed = true ; if ( requestedState != null ) { final String statusPayload = jedis . get ( key ( WORKER , workerName ) ) ; final WorkerStatus status = ( statusPayload == null ) ? null : ObjectMapperFactory . get ( ) . readValue ( statusPayload , WorkerStatus . class ) ; switch ( requestedState ) { case IDLE : proceed = ( status == null ) ; break ; case PAUSED : proceed = ( status == null ) ? true : status . isPaused ( ) ; break ; case WORKING : proceed = ( status == null ) ? false : ! status . isPaused ( ) ; break ; } } return proceed ; }
private boolean discardDone ( INodeFileUnderConstruction pendingFile , String src ) throws IOException { Block [ ] blocks = pendingFile . getBlocks ( ) ; if ( blocks == null || blocks . length == 0 ) { return false ; } Block last = blocks [ blocks . length - 1 ] ; if ( last . getNumBytes ( ) == 0 ) { dir . removeBlock ( src , pendingFile , last ) ; finalizeINodeFileUnderConstruction ( src , pendingFile ) ; NameNode . stateChangeLog . warn ( "BLOCK*" + " internalReleaseLease: discarded last block " + last + " , lease removed for " + src ) ; return true ; } return false ; }
private Class findServiceClass ( Object service ) { for ( Class sc : _serviceProviders . keySet ( ) ) { if ( sc . isInstance ( service ) ) { return sc ; } } throw new IllegalArgumentException ( "Cannot find service provider for: " + service . getClass ( ) . getCanonicalName ( ) ) ; }
public static Object getConvertedUIOutputValue ( FacesContext facesContext , UIOutput output , Object submittedValue ) throws ConverterException { if ( submittedValue != null && ! ( submittedValue instanceof String ) ) { submittedValue = submittedValue . toString ( ) ; } Converter converter ; try { converter = findUIOutputConverter ( facesContext , output ) ; } catch ( FacesException e ) { throw new ConverterException ( e ) ; } return converter == null ? submittedValue : converter . getAsObject ( facesContext , output , ( String ) submittedValue ) ; }
ANNOTATION_1 ( STRING_1 ) void METHOD_1 ( int VAR_1 ) { int VAR_2 = VAR_3 ; TYPE_1 < TYPE_2 , TYPE_3 > VAR_4 = METHOD_2 ( ) . METHOD_3 ( ) ; TYPE_1 < TYPE_2 , TYPE_3 > VAR_5 = METHOD_2 ( ) . METHOD_4 ( ) ; while ( METHOD_5 ( ) > METHOD_6 ( ) ) { if ( VAR_1 == 0 ) { VAR_5 = null ; } if ( ( VAR_5 == null ) && ( VAR_4 == null ) ) { if ( VAR_2 == VAR_3 ) { VAR_4 = METHOD_7 ( ) . METHOD_3 ( ) ; VAR_2 = VAR_6 ; continue ; } else if ( VAR_2 == VAR_6 ) { VAR_4 = METHOD_8 ( ) . METHOD_3 ( ) ; VAR_2 = VAR_7 ; continue ; } break ; } if ( ( VAR_4 != null ) && ( VAR_4 . METHOD_9 ( ) == 0 ) ) { VAR_4 = VAR_4 . METHOD_10 ( ) ; continue ; } else if ( ( VAR_5 != null ) && ( VAR_5 . METHOD_9 ( ) == 0 ) ) { VAR_5 = VAR_5 . METHOD_11 ( ) ; VAR_1 -- ; continue ; } if ( VAR_4 == null ) { ANNOTATION_2 ( STRING_2 ) TYPE_1 < TYPE_2 , TYPE_3 > VAR_8 = VAR_5 . METHOD_11 ( ) ; TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_5 ; VAR_5 = VAR_8 ; VAR_1 -- ; METHOD_12 ( VAR_9 , VAR_10 . VAR_11 , 0L ) ; continue ; } else if ( VAR_5 == null ) { TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_4 ; VAR_4 = VAR_4 . METHOD_10 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_11 , 0L ) ; continue ; } TYPE_2 VAR_12 = VAR_4 . METHOD_13 ( ) ; TYPE_2 VAR_13 = VAR_5 . METHOD_13 ( ) ; if ( VAR_12 == null ) { ANNOTATION_3 TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_4 ; VAR_4 = VAR_4 . METHOD_10 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_14 , 0L ) ; continue ; } else if ( VAR_13 == null ) { VAR_1 -- ; ANNOTATION_3 TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_5 ; VAR_5 = VAR_5 . METHOD_11 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_14 , 0L ) ; continue ; } if ( VAR_5 . METHOD_9 ( ) > METHOD_6 ( ) ) { VAR_1 -- ; TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_5 ; VAR_5 = VAR_5 . METHOD_11 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_11 , 0L ) ; continue ; } VAR_1 -- ; if ( METHOD_14 ( VAR_13 , VAR_12 ) ) { TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_4 ; VAR_4 = VAR_4 . METHOD_10 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_11 , 0L ) ; VAR_5 = VAR_5 . METHOD_11 ( ) ; } else { TYPE_1 < TYPE_2 , TYPE_3 > VAR_9 = VAR_5 ; VAR_5 = VAR_5 . METHOD_11 ( ) ; METHOD_12 ( VAR_9 , VAR_10 . VAR_11 , 0L ) ; } } }
public void METHOD_1 ( boolean VAR_1 , TYPE_1 t ) throws TYPE_2 { if ( VAR_1 ) { this . VAR_2 = VAR_3 . VAR_4 . VAR_5 ; } else if ( t == null ) { this . VAR_2 = VAR_3 . VAR_4 . VAR_6 ; } else { VAR_7 . error ( STRING_1 , TYPE_3 . METHOD_2 ( t ) ) ; this . VAR_2 = VAR_3 . VAR_4 . VAR_6 ; } }
public StringField < T > conditionalTextColor ( BooleanExtractor < T > extractor , int colorIfTrue , int colorIfFalse ) { if ( extractor == null ) throw new IllegalArgumentException ( "boolean extractor cannot be null" ) ; conditionalTextColorEntry = new SimpleEntry < BooleanExtractor < T > , Integer [ ] > ( extractor , new Integer [ ] { colorIfTrue , colorIfFalse } ) ; return this ; }
ANNOTATION_1 public int compareTo ( TYPE_1 < TYPE_2 > index ) { final String name = index . getName ( ) ; return this . name . compareTo ( name ) ; }
public IResponse options ( ILocator locator , IContext userContext ) throws IOException { Assert . isNotNull ( locator ) ; Assert . isNotNull ( userContext ) ; IContext context = newContext ( userContext , locator ) ; Request request = newRequest ( locator , context , "OPTIONS" ) ; //$NON-NLS-1$ return httpClient . invoke ( request ) ; }
ANNOTATION_1 ( STRING_1 ) public void METHOD_1 ( TYPE_1 event ) { TYPE_2 VAR_1 = new TYPE_2 ( - INT_1 , - INT_2 , INT_3 , INT_4 ) ; VAR_1 . METHOD_2 ( STRING_2 ) ; VAR_1 . METHOD_3 ( 1 ) ; VAR_1 . METHOD_4 ( 0 ) ; VAR_2 . add ( VAR_1 ) ; }
public static void runServer ( Module ... modules ) { Injector injector = Guice . createInjector ( modules ) ; PresentsServer server = injector . getInstance ( PresentsServer . class ) ; try { // initialize the server server . init ( injector ) ; // check to see if we should load and invoke a test module before running the server String testmod = System . getProperty ( "test_module" ) ; if ( testmod != null ) { try { log . info ( "Invoking test module" , "mod" , testmod ) ; Class < ? > tmclass = Class . forName ( testmod ) ; Runnable trun = ( Runnable ) tmclass . newInstance ( ) ; trun . run ( ) ; } catch ( Exception e ) { log . warning ( "Unable to invoke test module '" + testmod + "'." , e ) ; } } // start the server to running (this method call won't return until the server is shut // down) server . run ( ) ; } catch ( Throwable t ) { log . warning ( "Unable to initialize server." , t ) ; System . exit ( - 1 ) ; } }
ANNOTATION_1 ANNOTATION_2 ( STRING_1 ) public int compareTo ( final TYPE_1 VAR_1 ) { if ( VAR_1 . VAR_2 . length == 0 && this . VAR_2 . length == 0 ) { return 0 ; } if ( VAR_1 . VAR_2 . length == 0 ) { return - 1 ; } if ( this . VAR_2 . length == 0 ) { return 1 ; } final boolean VAR_3 = VAR_1 . VAR_2 . length == this . VAR_2 . length ; if ( VAR_3 ) { for ( int i = 0 ; i < this . VAR_2 . length ; i ++ ) { final int VAR_4 = VAR_1 . VAR_2 [ i ] ; final int VAR_5 = this . VAR_2 [ i ] ; if ( VAR_4 != VAR_5 ) { return VAR_4 > VAR_5 ? - 1 : 1 ; } } return 0 ; } if ( VAR_1 . VAR_2 . length > this . VAR_2 . length ) { return - 1 ; } return 1 ; }
@ Override public void putString ( String key , String v ) { key = convertKey ( key ) ; if ( v == null ) { storage . removeItem ( key ) ; } else { storage . setItem ( key , v ) ; } }
@ Override protected void writePropertyValue ( JsonGenerator jsonGenerator , Double propertyValue ) throws IOException { jsonGenerator . writeNumber ( propertyValue ) ; }
private String METHOD_1 ( final TYPE_1 VAR_1 ) { TYPE_2 VAR_2 = VAR_3 . METHOD_2 ( VAR_1 ) ; if ( VAR_2 == null ) { throw new TYPE_3 ( STRING_1 + VAR_2 + STRING_2 ) ; } return VAR_2 . METHOD_3 ( ) ; }
ANNOTATION_1 void METHOD_1 ( final TYPE_1 VAR_1 , final TYPE_2 VAR_2 ) { synchronized ( VAR_3 ) { final TYPE_3 < TYPE_2 , TYPE_4 > VAR_4 = VAR_5 . get ( VAR_2 . METHOD_2 ( ) ) ; TYPE_4 VAR_6 = VAR_4 != null ? VAR_4 . get ( VAR_2 ) : null ; if ( VAR_6 == null ) { final long VAR_7 = VAR_1 . METHOD_3 ( ) ? 0 : 1 ; final TYPE_5 < String > VAR_8 = TYPE_6 . METHOD_4 ( VAR_1 . getName ( ) ) ; VAR_6 = TYPE_4 . METHOD_5 ( VAR_2 . getId ( ) , VAR_7 , VAR_8 , null , VAR_9 ) . build ( ) ; METHOD_6 ( VAR_2 , VAR_6 ) ; VAR_10 . add ( VAR_2 ) ; if ( ! VAR_1 . METHOD_3 ( ) ) { VAR_11 . METHOD_7 ( STRING_1 , VAR_2 . getId ( ) ) ; VAR_12 . add ( VAR_2 ) ; } else { VAR_11 . METHOD_7 ( STRING_2 , VAR_2 . getId ( ) ) ; } } else { final TYPE_5 < String > VAR_13 = VAR_6 . METHOD_8 ( ) ; final TYPE_6 < String > VAR_8 = new TYPE_7 < String > ( ) . METHOD_9 ( VAR_13 ) . add ( VAR_1 . getName ( ) ) . build ( ) ; final TYPE_4 VAR_14 = TYPE_4 . METHOD_10 ( VAR_6 ) . METHOD_11 ( VAR_8 ) . build ( ) ; VAR_4 . put ( VAR_2 , VAR_14 ) ; if ( VAR_1 . METHOD_3 ( ) ) { VAR_12 . remove ( VAR_2 ) ; VAR_11 . METHOD_7 ( STRING_3 , VAR_2 . getId ( ) ) ; } } if ( ! VAR_15 . METHOD_12 ( VAR_2 . METHOD_2 ( ) ) ) { VAR_16 = true ; } VAR_3 . METHOD_13 ( ) ; } }
public void METHOD_1 ( TYPE_1 < ? extends TYPE_2 > c , String state ) { this . VAR_1 . put ( c , state ) ; }
public void init ( ) { TYPE_1 VAR_1 = new TYPE_1 ( TYPE_1 . VAR_2 , INT_1 ) ; VAR_1 . VAR_3 = VAR_4 . VAR_5 | VAR_4 . VAR_6 ; TYPE_1 VAR_7 = new TYPE_1 ( TYPE_1 . VAR_2 , TYPE_1 . VAR_2 ) ; VAR_7 . VAR_3 = VAR_4 . VAR_5 | VAR_4 . VAR_6 ; TYPE_2 view = new TYPE_2 ( getContext ( ) ) ; view . setText ( STRING_1 ) ; METHOD_1 ( VAR_1 ) ; view . VAR_8 ( VAR_7 ) ; METHOD_2 ( view ) ; }
public Standstill findNearestStandstill ( AirLocation clickLocation ) { TspSolution tspSolution = getSolution ( ) ; Standstill standstill = tspSolution . getDomicile ( ) ; double minimumAirDistance = standstill . getLocation ( ) . getAirDistanceDoubleTo ( clickLocation ) ; for ( Visit selectedVisit : tspSolution . getVisitList ( ) ) { double airDistance = selectedVisit . getLocation ( ) . getAirDistanceDoubleTo ( clickLocation ) ; if ( airDistance < minimumAirDistance ) { standstill = selectedVisit ; minimumAirDistance = airDistance ; } } return standstill ; }
public static String METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_1 == null ) { return STRING_1 ; } TYPE_1 t = VAR_1 ; while ( t . VAR_2 ( ) != null ) { t = t . VAR_2 ( ) ; } TYPE_2 VAR_3 = new TYPE_2 ( ) ; TYPE_3 VAR_4 = new TYPE_3 ( VAR_3 ) ; t . VAR_5 ( VAR_4 ) ; VAR_4 . METHOD_2 ( ) ; return VAR_3 . toString ( ) ; }
public static boolean jmolInClassPath ( ) { try { Class . forName ( viewer ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; return false ; } return true ; }
@ Override public void beforeStory ( Story story , boolean givenStory ) { failure = null ; super . beforeStory ( story , givenStory ) ; }
ANNOTATION_1 protected void METHOD_1 ( ) { TYPE_1 . info ( STRING_1 ) ; if ( VAR_1 != null ) { VAR_1 . METHOD_2 ( ) ; } try { if ( VAR_1 == null ) { VAR_1 = new TYPE_2 ( this , VAR_2 ) ; } TYPE_3 . METHOD_3 ( VAR_1 , VAR_3 ) ; } catch ( TYPE_4 VAR_4 ) { TYPE_1 . error ( STRING_2 , VAR_4 ) ; throw new TYPE_5 ( STRING_3 ) ; } }
protected long METHOD_1 ( ) { if ( METHOD_2 ( ) ) { long VAR_1 = METHOD_3 ( ) ; long VAR_2 = METHOD_4 ( ) ; long VAR_3 = TYPE_1 . METHOD_5 ( ) - VAR_1 ; long VAR_4 = VAR_2 - VAR_3 ; if ( VAR_1 != 0 && VAR_2 > 0 ) { if ( VAR_4 <= 0 ) { try { METHOD_6 ( new TYPE_2 ( STRING_1 + VAR_3 + STRING_2 + VAR_2 + STRING_3 ) ) ; } finally { METHOD_7 ( ) ; } } } return VAR_4 >= 0 ? VAR_4 : 0 ; } return - 1 ; }
private void initialize ( ) { this . bLock = new ReentrantReadWriteLock ( ) ; // non-fair this . cond = bLock . writeLock ( ) . newCondition ( ) ; this . hasRwLock = getFSNamesystem ( ) . hasRwLock ; }
public static Intent createStartActivityIntent ( Context context , String mainActivityName ) { Intent intent = new Intent ( ) ; intent . setClassName ( context , mainActivityName ) ; intent . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK | Intent . FLAG_ACTIVITY_REORDER_TO_FRONT | Intent . FLAG_ACTIVITY_SINGLE_TOP | Intent . FLAG_ACTIVITY_CLEAR_TOP ) ; intent . setAction ( Intent . ACTION_MAIN ) ; intent . addCategory ( Intent . CATEGORY_LAUNCHER ) ; return intent ; }
@ Override public Object apply ( final ActionContext ctx , final Object caller , final Object [ ] sources ) { if ( sources != null && sources . length == 1 ) { if ( sources [ 0 ] instanceof GraphObject ) { ( ( RenderContext ) ctx ) . setDetailsDataObject ( ( GraphObject ) sources [ 0 ] ) ; } else { logger . warn ( "Error: Parameter 1 is not a graph object. Parameters: {}" , getParametersAsString ( sources ) ) ; } return "" ; } else { logParameterError ( caller , sources , ctx . isJavaScriptContext ( ) ) ; return usage ( ctx . isJavaScriptContext ( ) ) ; } }
public void METHOD_1 ( TYPE_1 VAR_1 ) { if ( VAR_2 != VAR_1 . METHOD_2 ( ) || height != VAR_1 . METHOD_3 ( ) || VAR_3 != VAR_1 . METHOD_4 ( ) ) { throw new TYPE_2 ( STRING_1 ) ; } TYPE_3 VAR_4 = new TYPE_3 ( VAR_2 ) ; for ( int y = 0 ; y < height ; y ++ ) { int offset = y * VAR_3 ; int [ ] VAR_5 = VAR_1 . METHOD_5 ( y , VAR_4 ) . METHOD_6 ( ) ; for ( int x = 0 ; x < VAR_3 ; x ++ ) { VAR_6 [ offset + x ] ^= VAR_5 [ x ] ; } } }
private void addMethodNodes ( ITypeInfo beanInfo ) { List < ? extends IMethodInfo > methods = beanInfo instanceof IRelativeTypeInfo ? ( ( IRelativeTypeInfo ) beanInfo ) . getMethods ( _whosaskin ) : beanInfo . getMethods ( ) ; Set < String > signatures = new CaseInsensitiveSet < String > ( ) ; if ( ! methods . isEmpty ( ) ) { for ( IMethodInfo method : methods ) { if ( shouldFilter ( method . getDisplayName ( ) ) ) { // Filter this method -- it doesn't match the name constraint. continue ; } if ( isHidden ( beanInfo , method ) ) { // Don't expose hidden methods in the composer. continue ; } if ( ! mutualExclusiveStaticFilter ( beanInfo , method ) ) { continue ; } String signature = TypeInfoUtil . getMethodSignature ( method ) ; if ( ! signatures . contains ( signature ) ) { _children . add ( new BeanTree ( method , this ) ) ; signatures . add ( signature ) ; } } } }
private static TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_3 VAR_1 , TYPE_4 VAR_2 ) { TYPE_5 < TYPE_2 > VAR_3 = new TYPE_5 < TYPE_2 > ( ) ; VAR_3 . METHOD_2 ( VAR_1 . METHOD_3 ( ) ) ; VAR_3 . METHOD_4 ( STRING_1 ) ; VAR_3 . METHOD_5 ( VAR_2 ) ; TYPE_6 VAR_4 = new TYPE_6 ( ) ; VAR_4 . METHOD_6 ( VAR_1 . METHOD_3 ( ) + STRING_2 ) ; VAR_4 . METHOD_7 ( VAR_5 . VAR_6 ) ; VAR_4 . METHOD_5 ( VAR_2 ) ; VAR_4 . METHOD_8 ( VAR_3 ) ; TYPE_7 < TYPE_2 > VAR_7 = new TYPE_7 < TYPE_2 > ( ) ; VAR_7 . METHOD_9 ( VAR_5 . VAR_8 ) ; VAR_7 . METHOD_5 ( VAR_2 ) ; VAR_3 . METHOD_10 ( VAR_4 ) ; VAR_3 . METHOD_11 ( VAR_7 ) ; VAR_7 . start ( ) ; VAR_4 . start ( ) ; VAR_9 . out . METHOD_12 ( STRING_3 + VAR_1 ) ; return VAR_3 ; }
ANNOTATION_1 public String METHOD_1 ( TYPE_1 VAR_1 , String VAR_2 ) { String VAR_3 = this . VAR_4 + STRING_1 + VAR_2 ; VAR_1 . append ( STRING_2 ) ; VAR_1 . append ( VAR_3 ) ; return VAR_3 ; }
private TYPE_1 [ ] METHOD_1 ( TYPE_2 VAR_1 , String VAR_2 ) { TYPE_3 < String , TYPE_1 > VAR_3 = new TYPE_4 ( VAR_1 . METHOD_2 ( ) ) ; TYPE_5 < String > VAR_4 = ( TYPE_5 < String > ) VAR_3 . remove ( VAR_5 ) ; String VAR_6 ; try { VAR_6 = TYPE_6 . METHOD_3 ( VAR_3 ) ; } catch ( TYPE_7 VAR_7 ) { VAR_8 . METHOD_4 ( STRING_1 + VAR_1 , VAR_7 ) ; throw new TYPE_8 ( STRING_2 + VAR_1 . METHOD_5 ( ) , VAR_7 ) ; } return new TYPE_1 [ ] { METHOD_6 ( VAR_1 . METHOD_7 ( ) ) , METHOD_6 ( VAR_1 . METHOD_8 ( ) ) , METHOD_6 ( VAR_1 . METHOD_9 ( ) ) , METHOD_6 ( VAR_1 . METHOD_10 ( ) ) , METHOD_6 ( VAR_1 . METHOD_11 ( ) ) , VAR_1 . METHOD_12 ( ) , VAR_1 . METHOD_13 ( ) , VAR_6 , METHOD_14 ( VAR_1 ) , new TYPE_9 ( TYPE_10 . METHOD_15 ( ) ) , METHOD_6 ( VAR_4 ) , VAR_1 . METHOD_5 ( ) , VAR_2 } ; }
public UploadFile getUploadFile ( HttpServletRequest request , String id ) { UploadFile uploadFile = null ; Debug . logVerbose ( "[JdonFramework]--> getUploadFile session filter id=" + id , module ) ; try { uploadFile = getUploadFileFromSession ( request , id ) ; if ( uploadFile == null ) { uploadFile = imageFilter . getUploadFile ( request , id ) ; } } catch ( Exception ex ) { Debug . logWarning ( " getUploadFile error" + ex , module ) ; } return uploadFile ; }
@ com . amazonaws . annotation . SdkInternalApi @ Override public void marshall ( ProtocolMarshaller protocolMarshaller ) { com . amazonaws . services . organizations . model . transform . HandshakeMarshaller . getInstance ( ) . marshall ( this , protocolMarshaller ) ; }
public static double METHOD_1 ( String VAR_1 ) { if ( STRING_1 . equals ( VAR_1 ) || STRING_2 . equals ( VAR_1 ) ) { return TYPE_1 . VAR_2 ; } if ( STRING_3 . equals ( VAR_1 ) ) { return TYPE_1 . VAR_3 ; } return TYPE_1 . METHOD_2 ( VAR_1 ) ; }
ANNOTATION_1 public TYPE_1 < TYPE_2 > METHOD_1 ( TYPE_3 VAR_1 ) { METHOD_2 ( VAR_1 , STRING_1 ) ; return VAR_1 . METHOD_3 ( VAR_2 - > { if ( METHOD_4 ( VAR_2 ) && VAR_2 . METHOD_5 ( ) . size ( ) > 0 ) { return VAR_2 . METHOD_5 ( ) . METHOD_6 ( ) . METHOD_7 ( METHOD_8 ( VAR_3 - > VAR_4 . METHOD_9 ( VAR_3 ) ) ) . METHOD_10 ( METHOD_11 ( ) ) ; } TYPE_4 < String > VAR_5 = VAR_6 . METHOD_1 ( VAR_2 . METHOD_12 ( ) ) . METHOD_7 ( TYPE_5 : : getId ) . METHOD_7 ( String : : toUpperCase ) . METHOD_13 ( METHOD_14 ( ) ) ; return VAR_4 . METHOD_15 ( ) . METHOD_6 ( ) . METHOD_10 ( VAR_2 . METHOD_16 ( ) ) . METHOD_10 ( ( VAR_5 . size ( ) > 0 ) ? METHOD_17 ( TYPE_2 : : METHOD_18 , METHOD_19 ( VAR_5 ) ) : METHOD_20 ( ) ) . METHOD_10 ( ( VAR_2 . METHOD_5 ( ) . size ( ) > 0 ) ? METHOD_17 ( TYPE_2 : : getId , METHOD_19 ( VAR_2 . METHOD_5 ( ) ) ) : METHOD_20 ( ) ) ; } ) ; }
public boolean consume ( HttpServletRequest httpRequest , HttpServletResponse httpResponse ) throws IOException { try { if ( consumeWithFileResourceHandlers ( httpRequest , httpResponse ) ) { return true ; } } catch ( DirectoryTraversal . DirectoryTraversalDetection directoryTraversalDetection ) { httpResponse . setStatus ( 400 ) ; httpResponse . getWriter ( ) . write ( "Bad request" ) ; httpResponse . getWriter ( ) . flush ( ) ; LOG . warn ( directoryTraversalDetection . getMessage ( ) + " directory traversal detection for path: " + httpRequest . getPathInfo ( ) ) ; } return false ; }
protected void markBoundary ( ) { if ( inCorrect ) { inCorrect = false ; correctGuesses . incrementCount ( getTypeLabel ( prevCorrect ) ) ; } prevGuess = null ; prevCorrect = null ; }
@ Override public boolean contains ( Object key ) { FileEntry entry = entries . get ( key ) ; return entry != null && ! entry . isExpired ( timeService . wallClockTime ( ) ) ; }
public boolean tryLock ( ) { boolean success = false ; try { if ( channel != null && channel . isOpen ( ) ) { return false ; } channel = randomAccessFile . getChannel ( ) ; lock = channel . tryLock ( ) ; if ( lock != null ) { success = true ; return true ; } } catch ( Exception e ) { return false ; } finally { if ( ! success ) { if ( channel != null ) { try { channel . close ( ) ; } catch ( IOException ignored ) { } } } } return false ; }
public static < T1 extends Comparable < T1 > , T2 extends Comparable < T2 > > LObjIntObjTriple . MutCompObjIntObjTriple < T1 , T2 > comparable ( T1 a1 , int a2 , T2 a3 ) { return LObjIntObjTriple . MutCompObjIntObjTriple . of ( a1 , a2 , a3 ) ; }
protected String computeSloKey ( final String sessionIndex , final NameID nameId ) { if ( sessionIndex != null ) { return sessionIndex ; } else if ( nameId != null ) { return nameId . getValue ( ) ; } return null ; }
private CacheOpType getCacheOpType ( Cache cache , Object [ ] arguments ) { CacheOpType opType = cache . opType ( ) ; CacheOpType tmpOpType = CacheHelper . getCacheOpType ( ) ; if ( null != tmpOpType ) { opType = tmpOpType ; } if ( null != arguments && arguments . length > 0 ) { for ( Object tmp : arguments ) { if ( null != tmp && tmp instanceof CacheOpType ) { opType = ( CacheOpType ) tmp ; break ; } } } if ( null == opType ) { opType = CacheOpType . READ_WRITE ; } return opType ; }
@ Override public Stream < T > takeWhile ( final Predicate < ? super T > predicate ) { assertNotClosed ( ) ; if ( maxThreadNum <= 1 || toIndex - fromIndex <= 1 ) { return super . takeWhile ( predicate ) ; } final int threadNum = N . min ( maxThreadNum , ( toIndex - fromIndex ) ) ; final List < Iterator < T > > iters = new ArrayList <> ( threadNum ) ; final MutableBoolean hasMore = MutableBoolean . of ( true ) ; final MutableInt cursor = MutableInt . of ( fromIndex ) ; for ( int i = 0 ; i < threadNum ; i ++ ) { iters . add ( new ObjIteratorEx < T > ( ) { private T next = null ; private boolean hasNext = false ; @ Override public boolean hasNext ( ) { if ( hasNext == false && hasMore . isTrue ( ) ) { synchronized ( elements ) { if ( cursor . intValue ( ) < toIndex ) { next = elements [ cursor . getAndIncrement ( ) ] ; hasNext = true ; } else { hasMore . setFalse ( ) ; } } if ( hasNext && predicate . test ( next ) == false ) { hasNext = false ; hasMore . setFalse ( ) ; } } return hasNext ; } @ Override public T next ( ) { if ( hasNext == false && hasNext ( ) == false ) { throw new NoSuchElementException ( ) ; } hasNext = false ; return next ; } } ) ; } return new ParallelIteratorStream <> ( Stream . parallelConcatt ( iters , iters . size ( ) ) , false , null , maxThreadNum , splitor , asyncExecutor , closeHandlers ) ; }
ANNOTATION_1 ( STRING_1 ) ANNOTATION_2 public TYPE_1 list ( TYPE_2 VAR_1 , TYPE_3 VAR_2 ) throws TYPE_4 { return target . list ( VAR_1 , VAR_2 ) ; }
@ Override public XsAnyURIExpr resolveUri ( ServerExpression relative , ServerExpression base ) { if ( base == null ) { throw new IllegalArgumentException ( "base parameter for resolveUri() cannot be null" ) ; } return new XsExprImpl . AnyURICallImpl ( "fn" , "resolve-uri" , new Object [ ] { relative , base } ) ; }
@ Override public Base [ ] getProperty ( int hash , String name , boolean checkValid ) throws FHIRException { switch ( hash ) { case - 1618432855 : /*identifier*/ return this . identifier == null ? new Base [ 0 ] : this . identifier . toArray ( new Base [ this . identifier . size ( ) ] ) ; // Identifier case - 892481550 : /*status*/ return this . status == null ? new Base [ 0 ] : new Base [ ] { this . status } ; // Enumeration<DiagnosticOrderStatus> case - 1165461084 : /*priority*/ return this . priority == null ? new Base [ 0 ] : new Base [ ] { this . priority } ; // Enumeration<DiagnosticOrderPriority> case - 1867885268 : /*subject*/ return this . subject == null ? new Base [ 0 ] : new Base [ ] { this . subject } ; // Reference case 1524132147 : /*encounter*/ return this . encounter == null ? new Base [ 0 ] : new Base [ ] { this . encounter } ; // Reference case - 1207109509 : /*orderer*/ return this . orderer == null ? new Base [ 0 ] : new Base [ ] { this . orderer } ; // Reference case - 934964668 : /*reason*/ return this . reason == null ? new Base [ 0 ] : this . reason . toArray ( new Base [ this . reason . size ( ) ] ) ; // CodeableConcept case - 1248768647 : /*supportingInformation*/ return this . supportingInformation == null ? new Base [ 0 ] : this . supportingInformation . toArray ( new Base [ this . supportingInformation . size ( ) ] ) ; // Reference case - 2132868344 : /*specimen*/ return this . specimen == null ? new Base [ 0 ] : this . specimen . toArray ( new Base [ this . specimen . size ( ) ] ) ; // Reference case 96891546 : /*event*/ return this . event == null ? new Base [ 0 ] : this . event . toArray ( new Base [ this . event . size ( ) ] ) ; // DiagnosticOrderEventComponent case 3242771 : /*item*/ return this . item == null ? new Base [ 0 ] : this . item . toArray ( new Base [ this . item . size ( ) ] ) ; // DiagnosticOrderItemComponent case 3387378 : /*note*/ return this . note == null ? new Base [ 0 ] : this . note . toArray ( new Base [ this . note . size ( ) ] ) ; // Annotation default : return super . getProperty ( hash , name , checkValid ) ; } }
public static < TYPE_1 > TYPE_1 METHOD_1 ( TYPE_2 < TYPE_1 > f , TYPE_3 < String , TYPE_4 > VAR_1 , TYPE_5 errors , TYPE_1 VAR_2 ) { try { return f . get ( ) ; } catch ( TYPE_6 | TYPE_7 VAR_3 ) { errors . VAR_4 ( ) ; VAR_1 . METHOD_2 ( VAR_3 . METHOD_3 ( ) , ( VAR_5 , i ) - > i == null ? 1 : i + 1 ) ; return VAR_2 ; } }
@ Override public List < RecordStructure > getChildren ( long sessionId , long parentId ) throws DatabaseException { SqlPreparedStatementWrapper psGetChildren = null ; try { psGetChildren = DbSQL . getSingleton ( ) . getPreparedStatement ( "structure.ps.getchildren" ) ; psGetChildren . getPs ( ) . setLong ( 1 , sessionId ) ; psGetChildren . getPs ( ) . setLong ( 2 , parentId ) ; List < RecordStructure > result = new ArrayList <> ( ) ; try ( ResultSet rs = psGetChildren . getPs ( ) . executeQuery ( ) ) { while ( rs . next ( ) ) { result . add ( build ( rs ) ) ; } } return result ; } catch ( SQLException e ) { throw new DatabaseException ( e ) ; } finally { DbSQL . getSingleton ( ) . releasePreparedStatement ( psGetChildren ) ; } }
protected final void attachNar ( final ArchiverManager archiverManager , final MavenProjectHelper projectHelper , final MavenProject project , final String classifier , final File dir , final String include ) throws MojoExecutionException { final File narFile = new File ( project . getBuild ( ) . getDirectory ( ) , project . getBuild ( ) . getFinalName ( ) + "-" + classifier + "." + NarConstants . NAR_EXTENSION ) ; if ( narFile . exists ( ) ) { narFile . delete ( ) ; } try { final Archiver archiver = archiverManager . getArchiver ( NarConstants . NAR_ROLE_HINT ) ; archiver . addDirectory ( dir , new String [ ] { include } , null ) ; archiver . setDestFile ( narFile ) ; archiver . createArchive ( ) ; } catch ( final NoSuchArchiverException e ) { throw new MojoExecutionException ( "NAR: cannot find archiver" , e ) ; } catch ( final ArchiverException | IOException e ) { throw new MojoExecutionException ( "NAR: cannot create NAR archive '" + narFile + "'" , e ) ; } projectHelper . attachArtifact ( project , NarConstants . NAR_TYPE , classifier , narFile ) ; }
private static TYPE_1 METHOD_1 ( ) throws TYPE_2 , TYPE_3 { TYPE_1 VAR_1 = new TYPE_1 ( ) ; VAR_1 . METHOD_2 ( true ) ; VAR_1 . METHOD_3 ( new TYPE_4 ( ) { ANNOTATION_1 public void METHOD_4 ( TYPE_5 VAR_2 ) throws TYPE_6 { throw new TYPE_6 ( STRING_1 , VAR_2 ) ; } ANNOTATION_1 public void error ( TYPE_5 VAR_2 ) throws TYPE_6 { throw new TYPE_6 ( STRING_1 , VAR_2 ) ; } ANNOTATION_1 public void METHOD_5 ( TYPE_5 VAR_2 ) throws TYPE_6 { throw new TYPE_6 ( STRING_1 , VAR_2 ) ; } } ) ; VAR_1 . METHOD_6 ( STRING_2 , VAR_3 . VAR_4 ) ; VAR_1 . METHOD_6 ( STRING_3 , TYPE_7 . class . METHOD_7 ( STRING_4 ) ) ; return VAR_1 ; }
public void writeXml ( String path , XMLOutputter doc ) throws IOException { doc . startTag ( RemoteException . class . getSimpleName ( ) ) ; doc . attribute ( "path" , path ) ; doc . attribute ( "class" , getClassName ( ) ) ; String msg = getLocalizedMessage ( ) ; int i = msg . indexOf ( "\n" ) ; if ( i >= 0 ) { msg = msg . substring ( 0 , i ) ; } doc . attribute ( "message" , msg . substring ( msg . indexOf ( ":" ) + 1 ) . trim ( ) ) ; doc . endTag ( ) ; }
ANNOTATION_1 public static TYPE_1 METHOD_1 ( ANNOTATION_1 final TYPE_2 < String , String > VAR_1 , ANNOTATION_2 final TYPE_3 VAR_2 ) { TYPE_4 . METHOD_2 ( VAR_2 , STRING_1 ) ; if ( VAR_1 == null || VAR_1 . isEmpty ( ) ) return null ; try ( final TYPE_5 VAR_3 = new TYPE_5 ( INT_1 ) ) { final TYPE_6 VAR_4 = new TYPE_6 ( ) ; boolean VAR_5 = true ; for ( final TYPE_7 < String , String > VAR_6 : VAR_1 . METHOD_3 ( ) ) { if ( VAR_5 ) VAR_5 = false ; else VAR_3 . METHOD_4 ( CHAR_1 ) ; final String VAR_7 = VAR_6 . METHOD_5 ( ) ; VAR_4 . METHOD_6 ( VAR_7 . METHOD_7 ( VAR_2 ) , VAR_3 ) ; final String VAR_8 = VAR_6 . getValue ( ) ; if ( TYPE_8 . METHOD_8 ( VAR_8 ) ) { VAR_3 . METHOD_4 ( CHAR_2 ) ; VAR_4 . METHOD_6 ( VAR_8 . METHOD_7 ( VAR_2 ) , VAR_3 ) ; } } return new TYPE_9 ( VAR_3 . METHOD_9 ( ) ) ; } }
@ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { model = new PrefsModel ( ) ; parseBindType ( roundEnv ) ; // Put all @BindSharedPreferences elements in beanElements for ( Element item : roundEnv . getElementsAnnotatedWith ( BindSharedPreferences . class ) ) { AssertKripton . assertTrueOrInvalidKindForAnnotationException ( item . getKind ( ) == ElementKind . CLASS , item , BindSharedPreferences . class ) ; analyzeSharedPreferences ( ( TypeElement ) item ) ; } return true ; }
private void writeAnnotated ( Object obj , BytesObjectOutput out , Externalizer ext ) throws IOException { out . writeByte ( ID_ANNOTATED ) ; out . writeObject ( ext . getClass ( ) ) ; ext . writeObject ( out , obj ) ; }
public void METHOD_1 ( ) throws TYPE_1 , TYPE_2 { TYPE_3 VAR_1 = METHOD_2 ( ) . METHOD_3 ( ) . METHOD_4 ( ) ; TYPE_4 VAR_2 = VAR_1 . VAR_2 != null ? VAR_1 . VAR_2 : 0 ; if ( VAR_2 > 0 ) { if ( ! VAR_3 . METHOD_5 ( VAR_2 . METHOD_6 ( ) , VAR_4 . VAR_5 ) ) { throw new TYPE_2 ( STRING_1 ) ; } } else { VAR_3 . METHOD_5 ( ) ; } }
protected int METHOD_1 ( int VAR_1 ) { VAR_2 . info ( STRING_1 , VAR_1 ) ; TYPE_1 VAR_3 = TYPE_1 . METHOD_2 ( ) ; int VAR_4 = VAR_3 . get ( TYPE_1 . VAR_5 ) ; return VAR_4 < VAR_1 ? ( VAR_1 - VAR_4 ) : ( VAR_1 + INT_1 - VAR_4 ) ; }
ANNOTATION_1 public void METHOD_1 ( String VAR_1 , byte [ ] key , byte [ ] value , int index , int length , TYPE_1 VAR_2 ) throws TYPE_2 , TYPE_3 , TYPE_4 { TYPE_5 VAR_3 = new TYPE_5 ( key ) ; TYPE_5 VAR_4 = new TYPE_5 ( value , index , length ) ; try { TYPE_6 VAR_5 = METHOD_2 ( VAR_1 ) ; TYPE_7 VAR_6 = VAR_5 . METHOD_3 ( ) . METHOD_4 ( METHOD_5 ( VAR_2 , VAR_5 ) , VAR_3 , VAR_4 ) ; if ( VAR_6 == TYPE_7 . VAR_7 ) { VAR_5 . METHOD_3 ( ) . put ( METHOD_5 ( VAR_2 , VAR_5 ) , VAR_3 , VAR_4 ) ; TYPE_8 VAR_8 = TYPE_8 . METHOD_6 ( key ) ; if ( key . length == INT_1 ) { int VAR_9 = VAR_8 . getInt ( ) ; long VAR_10 = VAR_8 . METHOD_7 ( ) ; int VAR_11 = - VAR_8 . getInt ( ) ; throw new TYPE_4 ( STRING_1 + VAR_9 + STRING_2 + VAR_10 + STRING_3 + VAR_11 ) ; } else { TYPE_9 . METHOD_8 ( STRING_4 ) ; } } } catch ( TYPE_10 VAR_12 ) { throw new TYPE_3 ( VAR_12 ) ; } catch ( TYPE_11 VAR_12 ) { throw new TYPE_2 ( STRING_5 , VAR_12 ) ; } }
public JavaType create ( ClassIndex index , ClassPlan plan ) { // base class JavaInterfaceSource type = Roaster . parse ( JavaInterfaceSource . class , "public interface " + plan . getClassName ( ) + "Consumer<T extends " + plan . getClassName ( ) + "<T>> {}" ) ; type . setPackage ( plan . getPackageName ( ) ) ; type . addImport ( plan . getPackageName ( ) + "." + plan . getClassName ( ) ) ; type . addAnnotation ( FunctionalInterface . class ) ; addAccept ( type , plan ) ; addAndThen ( type , plan ) ; return type ; }
public void setLocaleCountry ( final String iValue ) { lock . acquireWriteLock ( ) ; try { localeCountry = iValue ; localeInstance = null ; } finally { lock . releaseWriteLock ( ) ; } }
ANNOTATION_1 ( STRING_1 ) private TYPE_1 METHOD_1 ( String VAR_1 , String VAR_2 ) { METHOD_2 ( ) ; METHOD_3 ( ) ; TYPE_2 < TYPE_3 > VAR_3 = VAR_4 . get ( new TYPE_4 ( VAR_1 , VAR_2 ) ) ; if ( VAR_3 == null ) { return TYPE_1 . VAR_5 ; } switch ( VAR_3 . getType ( ) ) { case VAR_6 : return TYPE_1 . VAR_7 ; case VAR_8 : throw new TYPE_5 ( STRING_2 ) ; case VAR_9 : throw new TYPE_6 ( new TYPE_4 ( VAR_1 , VAR_2 ) ) ; case VAR_10 : return TYPE_1 . VAR_5 ; default : throw new TYPE_5 ( STRING_3 ) ; } }
public static void findClasspathOrder ( final ClassLoader classLoader , final ClasspathOrder classpathOrder , final ScanSpec scanSpec , final LogNode log ) { // ClassRealm extends URLClassLoader URLClassLoaderHandler . findClasspathOrder ( classLoader , classpathOrder , scanSpec , log ) ; }
protected String METHOD_1 ( final String VAR_1 , final long VAR_2 ) { return TYPE_1 . METHOD_2 ( VAR_3 . get ( VAR_1 , TYPE_2 . toString ( VAR_2 ) ) ) ; }
@ Override public List < Class < ? > > getAllowableParamAnnotations ( ) { ArrayList < Class < ? > > retVal = new ArrayList < Class < ? > > ( ) ; retVal . add ( IdParam . class ) ; retVal . add ( Elements . class ) ; return retVal ; }
@ Override public CompletableFuture < Void > processCommitTxnRequest ( CommitEvent event ) { return withCompletion ( this , event , event . getScope ( ) , event . getStream ( ) , OPERATION_NOT_ALLOWED_PREDICATE ) ; }
public static Optional < Long > getSplitsPerNode ( ConnectorSession session ) { return Optional . ofNullable ( session . getProperty ( SPLITS_PER_NODE , Long . class ) ) ; }