signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class RecommendationRunner { /** * Run recommendations based on an already instantiated recommender . * @ param rr abstract recommender already initialized */ public static void run ( final AbstractRunner rr ) { } }
time = System . currentTimeMillis ( ) ; boolean statsExist = false ; statPath = rr . getCanonicalFileName ( ) ; statsExist = rr . isAlreadyRecommended ( ) ; try { rr . run ( AbstractRunner . RUN_OPTIONS . OUTPUT_RECS ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } time = System . currentTimeMillis ( ) - time ; if ( ! statsExist ) { writeStats ( statPath , "time" , time ) ; }
public class LambdaSafe { /** * Start a call to a single callback instance , dealing with common generic type * concerns and exceptions . * @ param callbackType the callback type ( a { @ link FunctionalInterface functional * interface } ) * @ param callbackInstance the callback instance ( may be a lambda ) * @ param argument the primary argument passed to the callback * @ param additionalArguments any additional arguments passed to the callback * @ param < C > the callback type * @ param < A > the primary argument type * @ return a { @ link Callback } instance that can be invoked . */ public static < C , A > Callback < C , A > callback ( Class < C > callbackType , C callbackInstance , A argument , Object ... additionalArguments ) { } }
Assert . notNull ( callbackType , "CallbackType must not be null" ) ; Assert . notNull ( callbackInstance , "CallbackInstance must not be null" ) ; return new Callback < > ( callbackType , callbackInstance , argument , additionalArguments ) ;
public class CHFWBundle { /** * Access the scheduled executor service . * @ return ScheduledEventService - null if not found */ public static ScheduledExecutorService getScheduledExecutorService ( ) { } }
CHFWBundle c = instance . get ( ) . get ( ) ; if ( null != c ) { return c . scheduledExecutor ; } return null ;
public class CmsDataTypeUtil { /** * Returns the import data object . < p > * @ param value the exported value * @ param type the expected data type * @ return the import data object * @ throws ClassNotFoundException if something goes wrong * @ throws IOException if something goes wrong */ public static Object dataImport ( String value , String type ) throws ClassNotFoundException , IOException { } }
Class < ? > clazz = Class . forName ( type ) ; if ( CmsDataTypeUtil . isParseable ( clazz ) ) { return CmsDataTypeUtil . parse ( value , clazz ) ; } byte [ ] data = Base64 . decodeBase64 ( value . getBytes ( ) ) ; return dataDeserialize ( data , type ) ;
public class BusHub { /** * Remove all the bus stops from the current hub . */ public void removeAllBusStops ( ) { } }
for ( final BusStop busStop : this . busStops ) { busStop . removeBusHub ( this ) ; } this . busStops . clear ( ) ; resetBoundingBox ( ) ; firePrimitiveChanged ( new BusChangeEvent ( this , BusChangeEventType . ALL_STOPS_REMOVED , null , - 1 , null , null , null ) ) ; checkPrimitiveValidity ( ) ;
public class Base64 { /** * This method decodes the byte array in base 64 encoding into a char array Base 64 encoding has to be according to * the specification given by the RFC 1521 ( 5.2 ) . * @ param data * the encoded byte array * @ return the decoded byte array */ public static byte [ ] decode ( byte [ ] data ) { } }
if ( data . length == 0 ) { return data ; } int lastRealDataIndex = data . length - 1 ; while ( data [ lastRealDataIndex ] == equalSign ) { lastRealDataIndex -- ; } // original data digit is 8 bits long , but base64 digit is 6 bits long int padBytes = data . length - 1 - lastRealDataIndex ; int byteLength = data . length * 6 / 8 - padBytes ; byte [ ] result = new byte [ byteLength ] ; // Each 4 bytes of input ( encoded ) we end up with 3 bytes of output int dataIndex = 0 ; int resultIndex = 0 ; int allBits = 0 ; // how many result chunks we can process before getting to pad bytes int resultChunks = ( lastRealDataIndex + 1 ) / 4 ; for ( int i = 0 ; i < resultChunks ; i ++ ) { allBits = 0 ; // Loop 4 times gathering input bits ( 4 * 6 = 24) for ( int j = 0 ; j < 4 ; j ++ ) { allBits = allBits << 6 | decodeDigit ( data [ dataIndex ++ ] ) ; } // Loop 3 times generating output bits ( 3 * 8 = 24) for ( int j = resultIndex + 2 ; j >= resultIndex ; j -- ) { result [ j ] = ( byte ) ( allBits & 0xff ) ; // Bottom 8 bits allBits = allBits >>> 8 ; } resultIndex += 3 ; // processed 3 result bytes } // Now we do the extra bytes in case the original ( non - encoded ) data // was not multiple of 3 bytes switch ( padBytes ) { case 1 : // 1 pad byte means 3 ( 4-1 ) extra Base64 bytes of input , 18 // bits , of which only 16 are meaningful // Or : 2 bytes of result data allBits = 0 ; // Loop 3 times gathering input bits for ( int j = 0 ; j < 3 ; j ++ ) { allBits = allBits << 6 | decodeDigit ( data [ dataIndex ++ ] ) ; } // NOTE - The code below ends up being equivalent to allBits = // allBits > > > 2 // But we code it in a non - optimized way for clarity // The 4th , missing 6 bits are all 0 allBits = allBits << 6 ; // The 3rd , missing 8 bits are all 0 allBits = allBits >>> 8 ; // Loop 2 times generating output bits for ( int j = resultIndex + 1 ; j >= resultIndex ; j -- ) { result [ j ] = ( byte ) ( allBits & 0xff ) ; // Bottom 8 // bits allBits = allBits >>> 8 ; } break ; case 2 : // 2 pad bytes mean 2 ( 4-2 ) extra Base64 bytes of input , 12 bits // of data , of which only 8 are meaningful // Or : 1 byte of result data allBits = 0 ; // Loop 2 times gathering input bits for ( int j = 0 ; j < 2 ; j ++ ) { allBits = allBits << 6 | decodeDigit ( data [ dataIndex ++ ] ) ; } // NOTE - The code below ends up being equivalent to allBits = // allBits > > > 4 // But we code it in a non - optimized way for clarity // The 3rd and 4th , missing 6 bits are all 0 allBits = allBits << 6 ; allBits = allBits << 6 ; // The 3rd and 4th , missing 8 bits are all 0 allBits = allBits >>> 8 ; allBits = allBits >>> 8 ; result [ resultIndex ] = ( byte ) ( allBits & 0xff ) ; // Bottom // bits break ; } return result ;
public class MulticastJournalWriter { /** * Write a journal entry . * If we are shutdown , ignore this request . Otherwise , get an output stream * from each Transport in turn , and write the entry . If this puts the file * size over the limit , close them . * @ see org . fcrepo . server . journal . JournalWriter # writeJournalEntry ( org . fcrepo . server . journal . entry . CreatorJournalEntry ) */ @ Override public void writeJournalEntry ( CreatorJournalEntry journalEntry ) throws JournalException { } }
synchronized ( JournalWriter . SYNCHRONIZER ) { if ( state == SHUTDOWN ) { return ; } logger . debug ( "Writing journal entry." ) ; sendRequestToAllTransports ( new WriteEntryRequest ( this , journalEntry ) ) ; currentSize += sizeEstimator . estimateSize ( journalEntry ) ; if ( state == FILE_OPEN ) { closeFileIfAppropriate ( ) ; } }
public class DataModelSerializer { /** * Reads every field from a JsonObject , and creates an instance of typeOfObject , and sets the data into that object . * @ param json JsonObject from JSONP * @ param typeOfObject The class of the object to create * @ param verify Specifies if we should check the JSON is something we know how to process * @ return The object we created * @ throws IOException * @ throws BadVersionException */ private static < T > T processJsonObjectBackIntoDataModelInstance ( JsonObject json , Class < ? extends T > typeOfObject , Verification verify ) throws IOException , BadVersionException { } }
Set < Map . Entry < String , JsonValue > > jsonSet = json . entrySet ( ) ; // Make a new instance and make sure we know how to process it T targetObject = null ; try { targetObject = typeOfObject . newInstance ( ) ; } catch ( InstantiationException e ) { throw new IllegalStateException ( "Data Model Error: unable to instantiate data model element " + typeOfObject . getName ( ) , e ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( "Data Model Error: unable to instantiate data model element " + typeOfObject . getName ( ) , e ) ; } if ( verify . equals ( Verification . VERIFY ) && targetObject instanceof VersionableContent ) { String version = null ; try { version = json . getString ( ( ( VersionableContent ) targetObject ) . nameOfVersionAttribute ( ) , null ) ; } catch ( NullPointerException e ) { // Ignore } if ( version != null ) { ( ( VersionableContent ) targetObject ) . validate ( version ) ; } } for ( Map . Entry < String , JsonValue > keyEntry : jsonSet ) { String keyString = keyEntry . getKey ( ) ; JsonValue value = keyEntry . getValue ( ) ; if ( value == null || value . getValueType ( ) . equals ( ValueType . NULL ) ) continue ; // When calling toString ( ) on a JsonString the value is returned in quotation marks , so we need to call getString ( ) on JsonString to avoid this String valueString = null ; if ( value . getValueType ( ) . equals ( ValueType . STRING ) ) { valueString = ( ( JsonString ) value ) . getString ( ) ; } else { valueString = value . toString ( ) ; } // values in the JsonValue can be ; JsonObject , JsonArray , or simple data . // each is handled with an instanceof block . if ( value instanceof JsonObject ) { // easy one , just find out the type for the new child , instantiate it , populate it , and set it . ClassAndMethod fieldType = getClassForFieldName ( keyString , targetObject . getClass ( ) ) ; if ( fieldType != null ) { if ( HasBreakingChanges . class . isAssignableFrom ( fieldType . cls ) ) { // It ' s something with a breaking change so see if we have a matching " 2 " element JsonObject incompatibleFields = json . getJsonObject ( keyString + "2" ) ; if ( incompatibleFields != null ) { JsonObjectBuilder jsonObjectBuilder = Json . createObjectBuilder ( ) ; Set < Map . Entry < String , JsonValue > > valueSet = ( ( JsonObject ) value ) . entrySet ( ) ; for ( Map . Entry < String , JsonValue > entry : valueSet ) { jsonObjectBuilder . add ( entry . getKey ( ) , entry . getValue ( ) ) ; } Set < Map . Entry < String , JsonValue > > incompatibleFieldsSet = incompatibleFields . entrySet ( ) ; for ( Map . Entry < String , JsonValue > entry : incompatibleFieldsSet ) { jsonObjectBuilder . add ( entry . getKey ( ) , entry . getValue ( ) ) ; } value = jsonObjectBuilder . build ( ) ; } } Object newChild = processJsonObjectBackIntoDataModelInstance ( ( JsonObject ) value , fieldType . cls , verify ) ; invokeSetter ( fieldType . m , targetObject , newChild ) ; } } else if ( value instanceof JsonArray ) { // slightly more tricky , we must determine the type for the collection to hold the data , instantiate a collection // then process each element in the array into the collection , and set that into the targetObject . ClassAndMethod fieldType = getClassForFieldName ( keyString , targetObject . getClass ( ) ) ; if ( fieldType != null ) { if ( fieldType . cls . equals ( Collection . class ) || fieldType . cls . equals ( List . class ) ) { List < Object > newList = new ArrayList < Object > ( ) ; // this entry in the json object was an array we need to look at the targetObject to determine type information . ClassAndMethod listElementType = getClassForCollectionOfFieldName ( keyString , targetObject . getClass ( ) ) ; if ( listElementType == null ) { throw new IllegalStateException ( "Data Model Error: unable to deserialize a JSON array into a field with no generic information. " + keyString ) ; } // Process the nested array and tell it to throw any bad version exceptions as this is a nested array so if this is a get single by ID we may want to throw it processJsonArray ( ( JsonArray ) value , newList , listElementType . cls , verify , ListVersionHandling . THROW_EXCEPTION ) ; invokeSetter ( fieldType . m , targetObject , newList ) ; } else { throw new IllegalStateException ( "Data Model Error: unable to deserialize a JSON array into a field that is not of type List/Collection " + keyString ) ; } } } else { // this entry in the json object was a normal value , if it ' s not an enum , it ' s easy , if it ' s an enum . . well . . ClassAndMethod fieldType = getClassForFieldName ( keyString , targetObject . getClass ( ) ) ; if ( fieldType != null ) { if ( fieldType . cls . isEnum ( ) ) { // enums are kind of tricky . . cannot set the value directly , must build the correct enum instance . // approach 1 . . uppercase value , and look for matching enum . Object o = null ; if ( keyString . indexOf ( ' ' ) == - 1 ) { try { Field enumInstance = fieldType . cls . getField ( valueString . toUpperCase ( ) ) ; if ( enumInstance != null ) { o = enumInstance . get ( null ) ; } } catch ( NoSuchFieldException e ) { // handled later } catch ( SecurityException e ) { // handled later } catch ( IllegalArgumentException e ) { // handled later } catch ( IllegalAccessException e ) { // handled later } } if ( o == null ) { // approach 2 . . look for a method on enum taking string . . for ( Method m : fieldType . cls . getMethods ( ) ) { if ( Modifier . isStatic ( m . getModifiers ( ) ) && m . getParameterTypes ( ) . length == 1 && m . getParameterTypes ( ) [ 0 ] . equals ( String . class ) ) { // enums have a valueOf method . . which may work . . but if not . . // there may be another method to use yet . if ( "valueOf" . equals ( m . getName ( ) ) ) { try { o = m . invoke ( null , valueString ) ; } catch ( IllegalArgumentException e ) { // ignore . . maybe another method will work ? } catch ( InvocationTargetException e ) { // ignore . . maybe another method will work ? } catch ( IllegalAccessException e ) { // ignore . . maybe another method will work ? } } else { try { o = m . invoke ( null , valueString ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( "Data Model Error: unable to invoke setter " + fieldType . m . getName ( ) + " for data model element " + fieldType . cls . getName ( ) + " on " + targetObject . getClass ( ) . getName ( ) , e ) ; } catch ( IllegalArgumentException e ) { throw new IllegalStateException ( "Data Model Error: unable to invoke setter " + fieldType . m . getName ( ) + " for data model element " + fieldType . cls . getName ( ) + " on " + targetObject . getClass ( ) . getName ( ) , e ) ; } catch ( InvocationTargetException e ) { throw new IllegalStateException ( "Data Model Error: unable to invoke setter " + fieldType . m . getName ( ) + " for data model element " + fieldType . cls . getName ( ) + " on " + targetObject . getClass ( ) . getName ( ) , e ) ; } } if ( o != null ) break ; } } } if ( o == null ) { throw new IllegalStateException ( "Data Model Error: unable to handle Enum value of " + value + " for enum " + fieldType . cls . getName ( ) ) ; } invokeSetter ( fieldType . m , targetObject , o ) ; } else if ( fieldType . cls . isPrimitive ( ) ) { // primitives need more careful handling . . // all primitives in the current data model are numbers . . String type = fieldType . cls . getName ( ) ; if ( "int" . equals ( type ) ) { JsonNumber n = ( JsonNumber ) value ; invokeSetter ( fieldType . m , targetObject , n . intValue ( ) ) ; } else if ( "byte" . equals ( type ) ) { JsonNumber n = ( JsonNumber ) value ; invokeSetter ( fieldType . m , targetObject , ( byte ) n . intValue ( ) ) ; } else if ( "short" . equals ( type ) ) { JsonNumber n = ( JsonNumber ) value ; invokeSetter ( fieldType . m , targetObject , ( short ) n . intValue ( ) ) ; } else if ( "long" . equals ( type ) ) { JsonNumber n = ( JsonNumber ) value ; invokeSetter ( fieldType . m , targetObject , n . longValue ( ) ) ; } else if ( "boolean" . equals ( type ) ) { Boolean b = Boolean . valueOf ( valueString ) ; invokeSetter ( fieldType . m , targetObject , b ) ; } else { throw new IllegalStateException ( "Data Model Error: unsupported primitive type used " + type + " in setter " + fieldType . m . getName ( ) ) ; } } else if ( fieldType . cls . equals ( Calendar . class ) ) { try { Date d = getDateFormat ( ) . parse ( valueString ) ; Calendar c = Calendar . getInstance ( ) ; c . setTime ( d ) ; invokeSetter ( fieldType . m , targetObject , c ) ; } catch ( ParseException e ) { throw new IllegalStateException ( "JSON Error: date was not correctly formatted, got " + value , e ) ; } } else if ( fieldType . cls . equals ( Date . class ) ) { try { Date d = getDateFormat ( ) . parse ( valueString ) ; invokeSetter ( fieldType . m , targetObject , d ) ; } catch ( ParseException e ) { throw new IllegalStateException ( "JSON Error: date was not correctly formatted, got " + value , e ) ; } } else if ( fieldType . cls . equals ( Locale . class ) ) { Locale l = RepositoryCommonUtils . localeForString ( valueString ) ; invokeSetter ( fieldType . m , targetObject , l ) ; } else if ( fieldType . cls . equals ( String . class ) ) { invokeSetter ( fieldType . m , targetObject , valueString ) ; } else { throw new IllegalArgumentException ( "Data Model Error: unable to invoke setter for data model element " + fieldType . m . getName ( ) + " on " + targetObject . getClass ( ) . getName ( ) ) ; } } } } return targetObject ;
public class DescribePlayerSessionsResult { /** * Collection of objects containing properties for each player session that matches the request . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setPlayerSessions ( java . util . Collection ) } or { @ link # withPlayerSessions ( java . util . Collection ) } if you want * to override the existing values . * @ param playerSessions * Collection of objects containing properties for each player session that matches the request . * @ return Returns a reference to this object so that method calls can be chained together . */ public DescribePlayerSessionsResult withPlayerSessions ( PlayerSession ... playerSessions ) { } }
if ( this . playerSessions == null ) { setPlayerSessions ( new java . util . ArrayList < PlayerSession > ( playerSessions . length ) ) ; } for ( PlayerSession ele : playerSessions ) { this . playerSessions . add ( ele ) ; } return this ;
public class ConstructorRef { /** * Returns an expression that constructs a new instance of { @ link # instanceClass ( ) } by calling * this constructor . */ public Expression construct ( final Iterable < ? extends Expression > args ) { } }
Expression . checkTypes ( argTypes ( ) , args ) ; return new Expression ( instanceClass ( ) . type ( ) , Feature . NON_NULLABLE ) { @ Override protected void doGen ( CodeBuilder mv ) { mv . newInstance ( instanceClass ( ) . type ( ) ) ; // push a second reference onto the stack so there is still a reference to the new object // after invoking the constructor ( constructors are void methods ) mv . dup ( ) ; for ( Expression arg : args ) { arg . gen ( mv ) ; } mv . invokeConstructor ( instanceClass ( ) . type ( ) , method ( ) ) ; } } ;
public class SearchFilter { /** * Change the search filter to one that specifies a set of elements and their values * that must match , and the operator to use to combine the elements . * Each element name is compared for an equal match to the value , and all * comparisons are combined by the specified logical operator ( OR or AND ) . * The old search filter is deleted . * @ param ElementNames is an array of names of elements to be tested * @ param ElementValues is an array of values for the corresponding element * @ param op is the logical operator to be used to combine the comparisons * @ exception DBException */ public void matchSet ( String [ ] ElementNames , String [ ] ElementValues , int op ) throws DBException { } }
// Delete the old search filter m_filter = null ; // If this is not a logical operator , throw an exception if ( ( op & LOGICAL_OPER_MASK ) == 0 ) { throw new DBException ( ) ; // Create a vector that will hold the leaf nodes for all elements in the hashtable } Vector leafVector = new Vector ( ) ; // For each of the elements in the array , create a leaf node for the match int numnames = ElementNames . length ; for ( int i = 0 ; i < numnames ; i ++ ) { // Create a leaf node for this list and store it as the filter SearchBaseLeaf leafnode = new SearchBaseLeaf ( ElementNames [ i ] , IN , ElementValues [ i ] ) ; // Add this leaf node to the vector leafVector . addElement ( leafnode ) ; } // Now return a node that holds this set of leaf nodes m_filter = new SearchBaseNode ( op , leafVector ) ;
public class CmsSitemapNavPosCalculator { /** * Gets the position info bean for a given position . < p > * @ param navigation the navigation element list * @ param index the index in the navigation element list * @ return the position info bean for a given position */ private PositionInfo getPositionInfo ( List < CmsJspNavElement > navigation , int index ) { } }
if ( ( index < 0 ) || ( index >= navigation . size ( ) ) ) { return new PositionInfo ( false , - 1 ) ; } float navPos = navigation . get ( index ) . getNavPosition ( ) ; return new PositionInfo ( true , navPos ) ;
public class LayoutParser { /** * Parse the XML specifying the layout of the documentation . * @ param root the name of the desired node * @ return the list of XML elements parsed . * @ throws DocFileIOException if there is a problem reading a user - supplied build file * @ throws SimpleDocletException if there is a problem reading the system build file */ public XMLNode parseXML ( String root ) throws DocFileIOException , SimpleDocletException { } }
if ( ! xmlElementsMap . containsKey ( root ) ) { try { currentRoot = root ; isParsing = false ; SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; SAXParser saxParser = factory . newSAXParser ( ) ; InputStream in = configuration . getBuilderXML ( ) ; saxParser . parse ( in , this ) ; } catch ( IOException | ParserConfigurationException | SAXException e ) { String message = ( configuration . builderXMLPath == null ) ? configuration . getResources ( ) . getText ( "doclet.exception.read.resource" , Configuration . DEFAULT_BUILDER_XML , e ) : configuration . getResources ( ) . getText ( "doclet.exception.read.file" , configuration . builderXMLPath , e ) ; throw new SimpleDocletException ( message , e ) ; } } return xmlElementsMap . get ( root ) ;
public class MiniSatBackbone { /** * Refines the upper bound by optional checks ( UP zero literal , complement model literal , rotatable literal ) . */ private void refineUpperBound ( ) { } }
for ( final Integer lit : new ArrayList < > ( this . candidates ) ) { final int var = var ( lit ) ; if ( isUPZeroLit ( var ) ) { this . candidates . remove ( lit ) ; addBackboneLiteral ( lit ) ; } else if ( this . config . isCheckForComplementModelLiterals ( ) && this . model . get ( var ) == sign ( lit ) ) { this . candidates . remove ( lit ) ; } else if ( this . config . isCheckForRotatableLiterals ( ) && isRotatable ( lit ) ) { this . candidates . remove ( lit ) ; } }
public class OsgiUtils { /** * returns a filter that matches services with the given class and location in both the current context and the * root - context * @ throws IllegalArgumentException if the location contains special characters that prevent the filter from * compiling */ public static Filter getFilterForLocation ( Class < ? > clazz , String location ) throws IllegalArgumentException { } }
return getFilterForLocation ( clazz , location , ContextHolder . get ( ) . getCurrentContextId ( ) ) ;
public class Normalizer { /** * Decompose a string . * The string will be decomposed to according to the specified mode . * @ param src The char array to compose . * @ param srcStart Start index of the source * @ param srcLimit Limit index of the source * @ param dest The char buffer to fill in * @ param destStart Start index of the destination buffer * @ param destLimit End index of the destination buffer * @ param compat If true the char array will be decomposed according to NFKD * rules and if false will be decomposed according to * NFD rules . * @ param options The normalization options , ORed together ( 0 for no options ) . * @ return int The total buffer size needed ; if greater than length of * result , the output was truncated . * @ exception IndexOutOfBoundsException if the target capacity is less than * the required length * @ deprecated ICU 56 Use { @ link Normalizer2 } instead . * @ hide original deprecated declaration */ @ Deprecated public static int decompose ( char [ ] src , int srcStart , int srcLimit , char [ ] dest , int destStart , int destLimit , boolean compat , int options ) { } }
CharBuffer srcBuffer = CharBuffer . wrap ( src , srcStart , srcLimit - srcStart ) ; CharsAppendable app = new CharsAppendable ( dest , destStart , destLimit ) ; getDecomposeNormalizer2 ( compat , options ) . normalize ( srcBuffer , app ) ; return app . length ( ) ;
public class BasicOperationsBenchmark { /** * End a span . */ @ Benchmark @ BenchmarkMode ( Mode . AverageTime ) @ OutputTimeUnit ( TimeUnit . NANOSECONDS ) public Span endSpan ( Data data ) { } }
data . spanToEnd . end ( ) ; return data . spanToEnd ;
public class ResourceAssignment { /** * Set a baseline value . * @ param baselineNumber baseline index ( 1-10) * @ param value baseline value */ public void setBaselineStart ( int baselineNumber , Date value ) { } }
set ( selectField ( AssignmentFieldLists . BASELINE_STARTS , baselineNumber ) , value ) ;
public class BodyContentImpl { /** * Write the contents of this BodyJspWriter into a Writer . * Subclasses are likely to do interesting things with the * implementation so some things are extra efficient . * @ param out The writer into which to place the contents of this body * evaluation */ public void writeOut ( Writer out ) throws IOException { } }
if ( writer == null ) { out . write ( strBuffer . toString ( ) ) ; // PK33136 // Flush not called as the writer passed could be a BodyContent and // it doesn ' t allow to flush . }
public class Pubsub { /** * Modify the ack deadline for a list of received messages . * @ param canonicalSubscriptionName The canonical ( including project name ) subscription of the received message to * modify the ack deadline on . * @ param ackDeadlineSeconds The new ack deadline . * @ param ackIds List of message ID ' s to modify the ack deadline on . * @ return A future that is completed when this request is completed . */ public PubsubFuture < Void > modifyAckDeadline ( final String canonicalSubscriptionName , final int ackDeadlineSeconds , final List < String > ackIds ) { } }
final String path = canonicalSubscriptionName + ":modifyAckDeadline" ; final ModifyAckDeadlineRequest req = ModifyAckDeadlineRequest . builder ( ) . ackDeadlineSeconds ( ackDeadlineSeconds ) . ackIds ( ackIds ) . build ( ) ; return post ( "modify ack deadline" , path , req , VOID ) ;
public class Section { /** * indexed getter for textObjects - gets an indexed value - the text objects ( figure , table , boxed text etc . ) that are associated with a particular section * @ generated * @ param i index in the array to get * @ return value of the element at index i */ public TextObject getTextObjects ( int i ) { } }
if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_textObjects == null ) jcasType . jcas . throwFeatMissing ( "textObjects" , "de.julielab.jules.types.Section" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Section_Type ) jcasType ) . casFeatCode_textObjects ) , i ) ; return ( TextObject ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Section_Type ) jcasType ) . casFeatCode_textObjects ) , i ) ) ) ;
public class Unchecked { /** * Wrap a { @ link CheckedLongPredicate } in a { @ link LongPredicate } with a custom handler for checked exceptions . * Example : * < code > < pre > * LongStream . of ( 1L , 2L , 3L ) . filter ( Unchecked . longPredicate ( * if ( l & lt ; 0L ) * throw new Exception ( " Only positive numbers allowed " ) ; * return true ; * throw new IllegalStateException ( e ) ; * < / pre > < / code > */ public static LongPredicate longPredicate ( CheckedLongPredicate function , Consumer < Throwable > handler ) { } }
return l -> { try { return function . test ( l ) ; } catch ( Throwable e ) { handler . accept ( e ) ; throw new IllegalStateException ( "Exception handler must throw a RuntimeException" , e ) ; } } ;
public class DeleteServiceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteServiceRequest deleteServiceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteServiceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteServiceRequest . getCluster ( ) , CLUSTER_BINDING ) ; protocolMarshaller . marshall ( deleteServiceRequest . getService ( ) , SERVICE_BINDING ) ; protocolMarshaller . marshall ( deleteServiceRequest . getForce ( ) , FORCE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Element { /** * Find elements whose text matches the supplied regular expression . * @ param regex regular expression to match text against . You can use < a href = " http : / / java . sun . com / docs / books / tutorial / essential / regex / pattern . html # embedded " > embedded flags < / a > ( such as ( ? i ) and ( ? m ) to control regex options . * @ return elements matching the supplied regular expression . * @ see Element # text ( ) */ public Elements getElementsMatchingText ( String regex ) { } }
Pattern pattern ; try { pattern = Pattern . compile ( regex ) ; } catch ( PatternSyntaxException e ) { throw new IllegalArgumentException ( "Pattern syntax error: " + regex , e ) ; } return getElementsMatchingText ( pattern ) ;
public class TransactionOutPoint { /** * An outpoint is a part of a transaction input that points to the output of another transaction . If we have both * sides in memory , and they have been linked together , this returns a pointer to the connected output , or null * if there is no such connection . */ @ Nullable public TransactionOutput getConnectedOutput ( ) { } }
if ( fromTx != null ) { return fromTx . getOutputs ( ) . get ( ( int ) index ) ; } else if ( connectedOutput != null ) { return connectedOutput ; } return null ;
public class PactDslJsonArray { /** * Element that can be any string */ public PactDslJsonArray stringType ( ) { } }
body . put ( "string" ) ; generators . addGenerator ( Category . BODY , rootPath + appendArrayIndex ( 0 ) , new RandomStringGenerator ( 20 ) ) ; matchers . addRule ( rootPath + appendArrayIndex ( 0 ) , TypeMatcher . INSTANCE ) ; return this ;
public class NodeInstanceImpl { /** * This method is used in both instances of the { @ link ExtendedNodeInstanceImpl } * and { @ link ActionNodeInstance } instances in order to handle * exceptions thrown when executing actions . * @ param action An { @ link Action } instance . */ protected void executeAction ( Action action ) { } }
ProcessContext context = new ProcessContext ( getProcessInstance ( ) . getKnowledgeRuntime ( ) ) ; context . setNodeInstance ( this ) ; try { action . execute ( context ) ; } catch ( Exception e ) { String exceptionName = e . getClass ( ) . getName ( ) ; ExceptionScopeInstance exceptionScopeInstance = ( ExceptionScopeInstance ) resolveContextInstance ( ExceptionScope . EXCEPTION_SCOPE , exceptionName ) ; if ( exceptionScopeInstance == null ) { throw new WorkflowRuntimeException ( this , getProcessInstance ( ) , "Unable to execute Action: " + e . getMessage ( ) , e ) ; } exceptionScopeInstance . handleException ( exceptionName , e ) ; cancel ( ) ; }
public class PMContext { /** * Look for a parameter in the context with the given name . * @ param paramid parameter id * @ return parameter value */ public Object getParameter ( String paramid ) { } }
final Object v = get ( PARAM_PREFIX + paramid ) ; if ( v == null ) { return null ; } else { if ( v instanceof String [ ] ) { String [ ] s = ( String [ ] ) v ; if ( s . length == 1 ) { return s [ 0 ] ; } else { return s ; } } return v ; }
public class Parcels { /** * Wraps the input ` @ Parcel ` annotated class with a ` Parcelable ` wrapper . * @ throws ParcelerRuntimeException if there was an error looking up the wrapped Parceler $ Parcels class . * @ param input Parcel * @ return Parcelable wrapper */ @ SuppressWarnings ( "unchecked" ) public static < T > Parcelable wrap ( T input ) { } }
if ( input == null ) { return null ; } return wrap ( input . getClass ( ) , input ) ;
public class AggregatorImpl { /** * Command handler to create a cache primer bundle containing the contents of the cache * directory . * @ param bundleSymbolicName * the symbolic name of the bundle to be created * @ param bundleFileName * the filename of the bundle to be created * @ return the string to be displayed in the console ( the fully qualified filename of the * bundle if successful or an error message otherwise ) * @ throws IOException */ public String createCacheBundle ( String bundleSymbolicName , String bundleFileName ) throws IOException { } }
final String sourceMethod = "createCacheBundle" ; // $ NON - NLS - 1 $ final boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( sourceClass , sourceMethod , new Object [ ] { bundleSymbolicName , bundleFileName } ) ; } // Serialize the cache getCacheManager ( ) . serializeCache ( ) ; // De - serialize the control file to obtain the cache control data File controlFile = new File ( getWorkingDirectory ( ) , CacheControl . CONTROL_SERIALIZATION_FILENAME ) ; CacheControl control = null ; ObjectInputStream ois = new ObjectInputStream ( new FileInputStream ( controlFile ) ) ; ; try { control = ( CacheControl ) ois . readObject ( ) ; } catch ( Exception ex ) { throw new IOException ( ex ) ; } finally { IOUtils . closeQuietly ( ois ) ; } if ( control . getInitStamp ( ) != 0 ) { return Messages . AggregatorImpl_3 ; } // create the bundle manifest InputStream is = AggregatorImpl . class . getClassLoader ( ) . getResourceAsStream ( MANIFEST_TEMPLATE ) ; StringWriter writer = new StringWriter ( ) ; CopyUtil . copy ( is , writer ) ; String template = writer . toString ( ) ; String manifest = MessageFormat . format ( template , new Object [ ] { Long . toString ( new Date ( ) . getTime ( ) ) , getContributingBundle ( ) . getHeaders ( ) . get ( "Bundle-Version" ) , // $ NON - NLS - 1 $ bundleSymbolicName , AggregatorUtil . getCacheBust ( this ) } ) ; // create the jar File bundleFile = new File ( bundleFileName ) ; ZipUtil . Packer packer = new ZipUtil . Packer ( ) ; packer . open ( bundleFile ) ; try { packer . packEntryFromStream ( "META-INF/MANIFEST.MF" , new ByteArrayInputStream ( manifest . getBytes ( "UTF-8" ) ) , new Date ( ) . getTime ( ) ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $ packer . packDirectory ( getWorkingDirectory ( ) , JAGGR_CACHE_DIRECTORY ) ; } finally { packer . close ( ) ; } String result = bundleFile . getCanonicalPath ( ) ; if ( isTraceLogging ) { log . exiting ( sourceClass , sourceMethod , result ) ; } return result ;
public class AllureResultsUtils { /** * Remove attachment form { @ link # resultsDirectory } * @ param attachment to remove * @ return true , if attachment removed successfully , false otherwise */ public static boolean deleteAttachment ( Attachment attachment ) { } }
File attachmentFile = new File ( getResultsDirectory ( ) , attachment . getSource ( ) ) ; return attachmentFile . exists ( ) && attachmentFile . canWrite ( ) && attachmentFile . delete ( ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcVoidingFeatureTypeEnum ( ) { } }
if ( ifcVoidingFeatureTypeEnumEEnum == null ) { ifcVoidingFeatureTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1099 ) ; } return ifcVoidingFeatureTypeEnumEEnum ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcProjectedOrTrueLengthEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class SelectResultSet { /** * { inheritDoc } . */ public void updateBlob ( String columnLabel , InputStream inputStream , long length ) throws SQLException { } }
throw ExceptionMapper . getFeatureNotSupportedException ( NOT_UPDATABLE_ERROR ) ;
public class CRFModel { /** * 加载CRF + + 模型 < br > * 如果存在缓存的话 , 优先读取缓存 , 否则读取txt , 并且建立缓存 * @ param path txt的路径 , 即使不存在 . txt , 只存在 . bin , 也应传入txt的路径 , 方法内部会自动加 . bin后缀 * @ return */ public static CRFModel load ( String path ) { } }
CRFModel model = loadBin ( path + BIN_EXT ) ; if ( model != null ) return model ; return loadTxt ( path , new CRFModel ( new DoubleArrayTrie < FeatureFunction > ( ) ) ) ;
public class ClassScreener { /** * replace the dots in a fully - qualified class / package name to a regular * expression fragment that will match file names . * @ param dotsName * such as " java . io " or " java . io . File " * @ return regex fragment such as " java [ / \ \ \ \ ] io " ( single backslash escaped * twice ) */ private static String dotsToRegex ( String dotsName ) { } }
/* * oops , next line requires JDK 1.5 return dotsName . replace ( " $ " , * " \ \ $ " ) . replace ( " . " , SEP ) ; could use String . replaceAll ( regex , repl ) * but that can be problematic - - javadoc says " Note that backslashes ( \ ) * and dollar signs ( $ ) in the replacement string may cause the results * to be different than if it were being treated as a literal * replacement " */ String tmp = dotsName . replace ( "$" , "\\$" ) ; return tmp . replace ( "." , SEP ) ; // note : The original code used the \ Q and \ E regex quoting constructs // to escape $ .
public class DifferentSubtreeTempEntryRenamingStrategy { /** * @ see org . springframework . ldap . support . transaction . TempEntryRenamingStrategy # getTemporaryName ( javax . naming . Name ) */ public Name getTemporaryName ( Name originalName ) { } }
int thisSequenceNo = NEXT_SEQUENCE_NO . getAndIncrement ( ) ; LdapName tempName = LdapUtils . newLdapName ( originalName ) ; try { String leafNode = tempName . get ( tempName . size ( ) - 1 ) + thisSequenceNo ; LdapName newName = LdapUtils . newLdapName ( subtreeNode ) ; newName . add ( leafNode ) ; return newName ; } catch ( InvalidNameException e ) { throw new org . springframework . ldap . InvalidNameException ( e ) ; }
public class AnnotationInfo { /** * アノテーションの属性名の一覧を取得する 。 * @ return 属性名の一覧情報 。 */ public String [ ] getAttributeKeys ( ) { } }
final List < String > list = new ArrayList < > ( attributes . size ( ) ) ; for ( AttributeInfo item : attributes ) { list . add ( item . name ) ; } return list . toArray ( new String [ list . size ( ) ] ) ;
public class DataSetUtil { /** * Merge the specified time series ( 3d ) arrays and masks . See { @ link # mergeFeatures ( INDArray [ ] , INDArray [ ] ) } * and { @ link # mergeLabels ( INDArray [ ] , INDArray [ ] ) } * @ param arrays Arrays to merge * @ param masks Mask arrays to merge * @ param inOutIdx Index to extract out before merging * @ return Merged arrays and mask */ public static Pair < INDArray , INDArray > mergeTimeSeries ( INDArray [ ] [ ] arrays , INDArray [ ] [ ] masks , int inOutIdx ) { } }
Pair < INDArray [ ] , INDArray [ ] > p = selectColumnFromMDSData ( arrays , masks , inOutIdx ) ; return mergeTimeSeries ( p . getFirst ( ) , p . getSecond ( ) ) ;
public class I18NConnector { /** * Returns the valur for this label ( section | idInsection ) for this lang * @ param lang * @ param section * @ param idInSection * @ return */ public static String getLabel ( Language lang , String section , String idInSection ) { } }
if ( idInSection == null || "" . equals ( idInSection ) ) { log . warn ( "Empty label for section:" + section + " and lang:" + lang ) ; return "" ; } else if ( lang . isDebug ( ) ) { return lang . getLanguageId ( ) + "|" + idInSection + "|" + section ; } else { return connector . i18nLabel ( lang , section , idInSection ) ; }
public class KeytabIdentityFactoryService { /** * SubjectIdentity factory method . */ SubjectIdentity getSubjectIdentity ( final String protocol , final String forHost ) { } }
KeytabService selectedService = null ; final String hostName = forHost == null ? null : forHost . toLowerCase ( Locale . ENGLISH ) ; String name = protocol + "/" + hostName ; selectedService = hostServiceMap . get ( name ) ; if ( selectedService == null ) { SECURITY_LOGGER . tracef ( "No mapping for name '%s' to KeytabService, attempting to use host only match." , name ) ; selectedService = hostServiceMap . get ( hostName ) ; if ( selectedService == null ) { SECURITY_LOGGER . tracef ( "No mapping for host '%s' to KeytabService, attempting to use default." , forHost ) ; selectedService = defaultService ; } } if ( selectedService != null ) { if ( SECURITY_LOGGER . isTraceEnabled ( ) ) { SECURITY_LOGGER . tracef ( "Selected KeytabService with principal '%s' for host '%s'" , selectedService . getPrincipal ( ) , forHost ) ; } try { return selectedService . createSubjectIdentity ( false ) ; } catch ( LoginException e ) { SECURITY_LOGGER . keytabLoginFailed ( selectedService . getPrincipal ( ) , forHost , e ) ; /* * Allow to continue and return null , i . e . we have an error preventing Kerberos authentication so log that but * other mechanisms may be available leaving the server still accessible . */ } } else { SECURITY_LOGGER . tracef ( "No KeytabService available for host '%s' unable to return SubjectIdentity." , forHost ) ; } return null ;
public class ShareableResource { /** * Set the resource consumption of nodes . * @ param val the value to set * @ param nodes the nodes * @ return the current resource */ public ShareableResource setCapacity ( int val , Node ... nodes ) { } }
Stream . of ( nodes ) . forEach ( n -> this . setCapacity ( n , val ) ) ; return this ;
public class VATManager { /** * Get the VAT data of the passed country . * @ param aLocale * The locale to use . May not be < code > null < / code > . * @ return < code > null < / code > if no such country data is present . */ @ Nullable public VATCountryData getVATCountryData ( @ Nonnull final Locale aLocale ) { } }
ValueEnforcer . notNull ( aLocale , "Locale" ) ; final Locale aCountry = CountryCache . getInstance ( ) . getCountry ( aLocale ) ; return m_aVATItemsPerCountry . get ( aCountry ) ;
public class KTypeArrayDeque { /** * { @ inheritDoc } */ @ Override public < T extends KTypePredicate < ? super KType > > T descendingForEach ( T predicate ) { } }
descendingForEach ( predicate , head , tail ) ; return predicate ;
public class WsLocationAdminImpl { /** * { @ inheritDoc } */ @ Override public InternalWsResource resolveResource ( String resourceURI ) { } }
if ( resourceURI == null || resourceURI . length ( ) == 0 ) return null ; String normalPath = PathUtils . normalize ( resourceURI ) ; if ( PathUtils . containsSymbol ( normalPath ) ) { return SymbolRegistry . getRegistry ( ) . resolveSymbolicResource ( normalPath ) ; } // * nix absolute path : / something - - implies file if ( normalPath . length ( ) >= 1 && normalPath . charAt ( 0 ) == '/' ) { SymbolicRootResource root = resolveRoot ( normalPath ) ; return LocalFileResource . newResource ( normalPath , null , root ) ; } // Absolute windows pathname : c : / something - - implies file if ( normalPath . length ( ) > 2 && normalPath . charAt ( 1 ) == ':' ) { SymbolicRootResource root = resolveRoot ( normalPath ) ; return LocalFileResource . newResource ( normalPath , null , root ) ; } // resolve relative paths against server root if ( ! PathUtils . pathIsAbsolute ( normalPath ) ) return serverConfigDir . createDescendantResource ( normalPath ) ; // Use URI to determine type of resource URI uri = null ; // check for valid URI try { // try straight construction of a URI ( will fail on spaces , illegal // characters , etc ) uri = new URI ( normalPath ) ; } catch ( URISyntaxException e ) { try { // try constructing a no - scheme URI based on the given string // ( relative path version ) uri = new URI ( null , null , normalPath , null ) ; } catch ( URISyntaxException e1 ) { MalformedLocationException e3 ; e3 = new MalformedLocationException ( "Could not construct URI to resolve resource (path=" + normalPath + ")" ) ; e3 . initCause ( e1 ) ; // report the original problem with the URI string throw e3 ; } } return resolveResource ( uri ) ;
public class ModuleItem { /** * recursively return PerfLevelDescriptor */ public ArrayList getTreePerfLevelDescriptors ( int parentLevel ) { } }
ArrayList res = new ArrayList ( ) ; int thisLevel = level ; if ( instance == null ) { // should be root res . add ( new PerfLevelDescriptor ( new String [ ] { "pmi" } , thisLevel ) ) ; } else { PmiModule instance = getInstance ( ) ; thisLevel = instance . getInstrumentationLevel ( ) ; // if the level is same as parent , do not add to the list if ( ( thisLevel != LEVEL_UNDEFINED ) && ( thisLevel != parentLevel ) ) { res . add ( new PerfLevelDescriptor ( instance . getPath ( ) , thisLevel , instance . getModuleID ( ) ) ) ; } } // get from children ModuleItem [ ] items = children ( ) ; if ( items == null ) return res ; for ( int i = 0 ; i < items . length ; i ++ ) { ArrayList childrenLevels = items [ i ] . getTreePerfLevelDescriptors ( thisLevel ) ; for ( int j = 0 ; j < childrenLevels . size ( ) ; j ++ ) res . add ( childrenLevels . get ( j ) ) ; } return res ;
public class ResponseDownloadResource { public void header ( String name , String [ ] values ) { } }
assertArgumentNotNull ( "name" , name ) ; assertArgumentNotNull ( "values" , values ) ; headerMap . put ( name , values ) ;
public class PeerGroup { /** * Configures the stall speed : the speed at which a peer is considered to be serving us the block chain * unacceptably slowly . Once a peer has served us data slower than the given data rate for the given * number of seconds , it is considered stalled and will be disconnected , forcing the chain download to continue * from a different peer . The defaults are chosen conservatively , but if you are running on a platform that is * CPU constrained or on a very slow network e . g . EDGE , the default settings may need adjustment to * avoid false stalls . * @ param periodSecs How many seconds the download speed must be below blocksPerSec , defaults to 10. * @ param bytesPerSecond Download speed ( only blocks / txns count ) must be consistently below this for a stall , defaults to the bandwidth required for 10 block headers per second . */ public void setStallThreshold ( int periodSecs , int bytesPerSecond ) { } }
lock . lock ( ) ; try { stallPeriodSeconds = periodSecs ; stallMinSpeedBytesSec = bytesPerSecond ; } finally { lock . unlock ( ) ; }
public class WebhookMessageBuilder { /** * Appends to the currently set content of the resulting message . * @ param content * The content to append * @ throws java . lang . IllegalArgumentException * If the provided content is { @ code null } or * the resulting content would exceed { @ code 2000 } characters in length * @ return The current WebhookMessageBuilder for chaining convenience */ public WebhookMessageBuilder append ( String content ) { } }
Checks . notNull ( content , "Content" ) ; Checks . check ( this . content . length ( ) + content . length ( ) <= 2000 , "Content may not exceed 2000 characters!" ) ; this . content . append ( content ) ; return this ;
public class ScanResult { /** * Get all interface classes found during the scan ( not including annotations , which are also technically * interfaces ) . See also { @ link # getAllInterfacesAndAnnotations ( ) } . * @ return A list of all whitelisted interfaces found during the scan , or the empty list if none . */ public ClassInfoList getAllInterfaces ( ) { } }
if ( closed . get ( ) ) { throw new IllegalArgumentException ( "Cannot use a ScanResult after it has been closed" ) ; } if ( ! scanSpec . enableClassInfo ) { throw new IllegalArgumentException ( "Please call ClassGraph#enableClassInfo() before #scan()" ) ; } return ClassInfo . getAllImplementedInterfaceClasses ( classNameToClassInfo . values ( ) , scanSpec ) ;
public class BuildWidgetScore { /** * Calculate builds that completed successfully within threshold time * Only builds with status as Success , Unstable is included for calculation * @ param builds iterable builds * @ param thresholdInMillis threshold for build times in milliseconds * @ return percentage of builds within threshold */ private Double fetchBuildDurationWithinThresholdRatio ( Iterable < Build > builds , long thresholdInMillis ) { } }
int totalBuilds = 0 , totalBelowThreshold = 0 ; for ( Build build : builds ) { if ( ! Constants . SUCCESS_STATUS . contains ( build . getBuildStatus ( ) ) ) { continue ; } totalBuilds ++ ; if ( build . getDuration ( ) < thresholdInMillis ) { totalBelowThreshold ++ ; } } if ( totalBuilds == 0 ) { return 0.0d ; } return ( ( totalBelowThreshold * 100 ) / ( double ) totalBuilds ) ;
public class ConstraintSolver { /** * Get the component of a given { @ link Variable } . A component is a { @ link String } labeling of { @ link Variable } s . * @ param v The { @ link Variable } of which to get the component . * @ return A { @ link String } representing the component of the given { @ link Variable } . */ public String getComponent ( Variable v ) { } }
for ( String s : components . keySet ( ) ) { if ( components . get ( s ) . contains ( v ) ) return s ; } return null ;
public class FreeMarkerRequestHandler { /** * Provides a resource bundle for localization . * The default implementation looks up a bundle using the * package name plus " l10n " as base name . * @ return the resource bundle */ protected ResourceBundle resourceBundle ( Locale locale ) { } }
return ResourceBundle . getBundle ( contentPath . replace ( '/' , '.' ) + ".l10n" , locale , contentLoader , ResourceBundle . Control . getNoFallbackControl ( ResourceBundle . Control . FORMAT_DEFAULT ) ) ;
public class vrid6 { /** * Use this API to fetch vrid6 resource of given name . */ public static vrid6 get ( nitro_service service , Long id ) throws Exception { } }
vrid6 obj = new vrid6 ( ) ; obj . set_id ( id ) ; vrid6 response = ( vrid6 ) obj . get_resource ( service ) ; return response ;
public class PrimaryBackupServiceContext { /** * Opens the service context . * @ return a future to be completed once the service context has been opened */ public CompletableFuture < Void > open ( ) { } }
return primaryElection . getTerm ( ) . thenAccept ( this :: changeRole ) . thenRun ( ( ) -> service . init ( this ) ) ;
public class VersionParser { /** * Parses the version core . * @ param versionCore the version core string to parse * @ return a valid normal version object * @ throws IllegalArgumentException if the input string is { @ code NULL } or empty * @ throws ParseException when there is a grammar error * @ throws UnexpectedCharacterException when encounters an unexpected character type */ static NormalVersion parseVersionCore ( String versionCore ) { } }
VersionParser parser = new VersionParser ( versionCore ) ; return parser . parseVersionCore ( ) ;
public class ParibuAdapters { /** * Adapts a ParibuTicker to a Ticker Object * @ param paribuTicker The exchange specific ticker * @ param currencyPair * @ return The ticker */ public static Ticker adaptTicker ( ParibuTicker paribuTicker , CurrencyPair currencyPair ) { } }
if ( ! currencyPair . equals ( new CurrencyPair ( BTC , TRY ) ) ) { throw new NotAvailableFromExchangeException ( ) ; } BTC_TL btcTL = paribuTicker . getBtcTL ( ) ; if ( btcTL != null ) { BigDecimal last = btcTL . getLast ( ) ; BigDecimal lowestAsk = btcTL . getLowestAsk ( ) ; BigDecimal highestBid = btcTL . getHighestBid ( ) ; BigDecimal volume = btcTL . getVolume ( ) ; BigDecimal high24hr = btcTL . getHigh24hr ( ) ; BigDecimal low24hr = btcTL . getLow24hr ( ) ; return new Ticker . Builder ( ) . currencyPair ( new CurrencyPair ( BTC , Currency . TRY ) ) . last ( last ) . bid ( highestBid ) . ask ( lowestAsk ) . high ( high24hr ) . low ( low24hr ) . volume ( volume ) . build ( ) ; } return null ;
public class CmsDefaultLinkSubstitutionHandler { /** * Gets the root path without taking into account detail page links . < p > * @ param cms - see the getRootPath ( ) method * @ param targetUri - see the getRootPath ( ) method * @ param basePath - see the getRootPath ( ) method * @ return - see the getRootPath ( ) method */ protected String getSimpleRootPath ( CmsObject cms , String targetUri , String basePath ) { } }
if ( cms == null ) { // required by unit test cases return targetUri ; } URI uri ; String path ; String suffix = "" ; // malformed uri try { uri = new URI ( targetUri ) ; path = uri . getPath ( ) ; suffix = getSuffix ( uri ) ; } catch ( Exception e ) { if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_MALFORMED_URI_1 , targetUri ) , e ) ; } return null ; } // opaque URI if ( uri . isOpaque ( ) ) { return null ; } // in case the target is the workplace UI if ( CmsLinkManager . isWorkplaceUri ( uri ) ) { return null ; } // in case the target is a static resource served from the class path if ( CmsStaticResourceHandler . isStaticResourceUri ( uri ) ) { return CmsStringUtil . joinPaths ( CmsStaticResourceHandler . STATIC_RESOURCE_PREFIX , CmsStaticResourceHandler . removeStaticResourcePrefix ( path ) ) ; } CmsStaticExportManager exportManager = OpenCms . getStaticExportManager ( ) ; if ( exportManager . isValidRfsName ( path ) ) { String originalSiteRoot = cms . getRequestContext ( ) . getSiteRoot ( ) ; String vfsName = null ; try { cms . getRequestContext ( ) . setSiteRoot ( "" ) ; vfsName = exportManager . getVfsName ( cms , path ) ; if ( vfsName != null ) { return vfsName ; } } finally { cms . getRequestContext ( ) . setSiteRoot ( originalSiteRoot ) ; } } // absolute URI ( i . e . URI has a scheme component like http : / / . . . ) if ( uri . isAbsolute ( ) ) { CmsSiteMatcher targetMatcher = new CmsSiteMatcher ( targetUri ) ; if ( OpenCms . getSiteManager ( ) . isMatching ( targetMatcher ) || targetMatcher . equals ( cms . getRequestContext ( ) . getRequestMatcher ( ) ) ) { path = CmsLinkManager . removeOpenCmsContext ( path ) ; boolean isWorkplaceServer = OpenCms . getSiteManager ( ) . isWorkplaceRequest ( targetMatcher ) || targetMatcher . equals ( cms . getRequestContext ( ) . getRequestMatcher ( ) ) ; if ( isWorkplaceServer ) { String selectedPath ; String targetSiteRoot = OpenCms . getSiteManager ( ) . getSiteRoot ( path ) ; if ( targetSiteRoot != null ) { selectedPath = getRootPathForSite ( cms , path , targetSiteRoot , true ) ; } else { // set selectedPath with the path for the current site selectedPath = getRootPathForSite ( cms , path , cms . getRequestContext ( ) . getSiteRoot ( ) , false ) ; String pathForMatchedSite = getRootPathForSite ( cms , path , OpenCms . getSiteManager ( ) . matchSite ( targetMatcher ) . getSiteRoot ( ) , false ) ; String originalSiteRoot = cms . getRequestContext ( ) . getSiteRoot ( ) ; try { cms . getRequestContext ( ) . setSiteRoot ( "" ) ; // the path for the current site normally is preferred , but if it doesn ' t exist and the path for the matched site // does exist , then use the path for the matched site if ( ! cms . existsResource ( selectedPath , CmsResourceFilter . ALL ) && cms . existsResource ( pathForMatchedSite , CmsResourceFilter . ALL ) ) { selectedPath = pathForMatchedSite ; } } finally { cms . getRequestContext ( ) . setSiteRoot ( originalSiteRoot ) ; } } return selectedPath + suffix ; } else { // add the site root of the matching site return getRootPathForSite ( cms , path + suffix , OpenCms . getSiteManager ( ) . matchSite ( targetMatcher ) . getSiteRoot ( ) , false ) ; } } else { return null ; } } // relative URI ( i . e . no scheme component , but filename can still start with " / " ) String context = OpenCms . getSystemInfo ( ) . getOpenCmsContext ( ) ; String vfsPrefix = OpenCms . getStaticExportManager ( ) . getVfsPrefix ( ) ; if ( ( context != null ) && ( path . startsWith ( context + "/" ) || ( path . startsWith ( vfsPrefix + "/" ) ) ) ) { // URI is starting with opencms context // cut context from path path = CmsLinkManager . removeOpenCmsContext ( path ) ; String targetSiteRoot = getTargetSiteRoot ( cms , path , basePath ) ; return getRootPathForSite ( cms , path + suffix , targetSiteRoot , ( targetSiteRoot != null ) && path . startsWith ( targetSiteRoot ) ) ; } // URI with relative path is relative to the given relativePath if available and in a site , // otherwise invalid if ( CmsStringUtil . isNotEmpty ( path ) && ( path . charAt ( 0 ) != '/' ) ) { if ( basePath != null ) { String absolutePath ; int pos = path . indexOf ( "../../galleries/pics/" ) ; if ( pos >= 0 ) { // HACK : mixed up editor path to system gallery image folder return CmsWorkplace . VFS_PATH_SYSTEM + path . substring ( pos + 6 ) + suffix ; } absolutePath = CmsLinkManager . getAbsoluteUri ( path , cms . getRequestContext ( ) . addSiteRoot ( basePath ) ) ; if ( OpenCms . getSiteManager ( ) . getSiteRoot ( absolutePath ) != null ) { return absolutePath + suffix ; } // HACK : some editor components ( e . g . HtmlArea ) mix up the editor URL with the current request URL absolutePath = CmsLinkManager . getAbsoluteUri ( path , cms . getRequestContext ( ) . getSiteRoot ( ) + CmsWorkplace . VFS_PATH_EDITORS ) ; if ( OpenCms . getSiteManager ( ) . getSiteRoot ( absolutePath ) != null ) { return absolutePath + suffix ; } // HACK : same as above , but XmlContent editor has one path element more absolutePath = CmsLinkManager . getAbsoluteUri ( path , cms . getRequestContext ( ) . getSiteRoot ( ) + CmsWorkplace . VFS_PATH_EDITORS + "xmlcontent/" ) ; if ( OpenCms . getSiteManager ( ) . getSiteRoot ( absolutePath ) != null ) { return absolutePath + suffix ; } } return null ; } if ( CmsStringUtil . isNotEmpty ( path ) ) { String targetSiteRoot = getTargetSiteRoot ( cms , path , basePath ) ; return getRootPathForSite ( cms , path + suffix , targetSiteRoot , ( targetSiteRoot != null ) && path . startsWith ( targetSiteRoot ) ) ; } // URI without path ( typically local link ) return suffix ;
public class ClassDescriptor { /** * Get an CollectionDescriptor by name BRJ * @ param name * @ return CollectionDescriptor or null */ public CollectionDescriptor getCollectionDescriptorByName ( String name ) { } }
if ( name == null ) { return null ; } CollectionDescriptor cod = ( CollectionDescriptor ) getCollectionDescriptorNameMap ( ) . get ( name ) ; // BRJ : if the CollectionDescriptor is not found // look in the ClassDescriptor referenced by ' super ' for it if ( cod == null ) { ClassDescriptor superCld = getSuperClassDescriptor ( ) ; if ( superCld != null ) { cod = superCld . getCollectionDescriptorByName ( name ) ; } } return cod ;
public class Utils { /** * This will be called in order to create view , if the given view is not null , * it will be used directly , otherwise it will check the resourceId * @ return null if both resourceId and view is not set */ @ Nullable static View getView ( Context context , int resourceId , View view ) { } }
LayoutInflater inflater = LayoutInflater . from ( context ) ; if ( view != null ) { return view ; } if ( resourceId != INVALID ) { view = inflater . inflate ( resourceId , null ) ; } return view ;
public class ChannelPool { /** * Gets or creates a pooled channel to the given address for the given message type . * @ param address the address for which to get the channel * @ param messageType the message type for which to get the channel * @ return a future to be completed with a channel from the pool */ CompletableFuture < Channel > getChannel ( Address address , String messageType ) { } }
List < CompletableFuture < Channel > > channelPool = getChannelPool ( address ) ; int offset = getChannelOffset ( messageType ) ; CompletableFuture < Channel > channelFuture = channelPool . get ( offset ) ; if ( channelFuture == null || channelFuture . isCompletedExceptionally ( ) ) { synchronized ( channelPool ) { channelFuture = channelPool . get ( offset ) ; if ( channelFuture == null || channelFuture . isCompletedExceptionally ( ) ) { LOGGER . debug ( "Connecting to {}" , address ) ; channelFuture = factory . apply ( address ) ; channelFuture . whenComplete ( ( channel , error ) -> { if ( error == null ) { LOGGER . debug ( "Connected to {}" , channel . remoteAddress ( ) ) ; } else { LOGGER . debug ( "Failed to connect to {}" , address , error ) ; } } ) ; channelPool . set ( offset , channelFuture ) ; } } } final CompletableFuture < Channel > future = new CompletableFuture < > ( ) ; final CompletableFuture < Channel > finalFuture = channelFuture ; finalFuture . whenComplete ( ( channel , error ) -> { if ( error == null ) { if ( ! channel . isActive ( ) ) { CompletableFuture < Channel > currentFuture ; synchronized ( channelPool ) { currentFuture = channelPool . get ( offset ) ; if ( currentFuture == finalFuture ) { channelPool . set ( offset , null ) ; } else if ( currentFuture == null ) { currentFuture = factory . apply ( address ) ; currentFuture . whenComplete ( ( c , e ) -> { if ( e == null ) { LOGGER . debug ( "Connected to {}" , channel . remoteAddress ( ) ) ; } else { LOGGER . debug ( "Failed to connect to {}" , channel . remoteAddress ( ) , e ) ; } } ) ; channelPool . set ( offset , currentFuture ) ; } } if ( currentFuture == finalFuture ) { getChannel ( address , messageType ) . whenComplete ( ( recursiveResult , recursiveError ) -> { if ( recursiveError == null ) { future . complete ( recursiveResult ) ; } else { future . completeExceptionally ( recursiveError ) ; } } ) ; } else { currentFuture . whenComplete ( ( recursiveResult , recursiveError ) -> { if ( recursiveError == null ) { future . complete ( recursiveResult ) ; } else { future . completeExceptionally ( recursiveError ) ; } } ) ; } } else { future . complete ( channel ) ; } } else { future . completeExceptionally ( error ) ; } } ) ; return future ;
public class LeftAligner { /** * Only accepts as a valid base A , C , G and T * or IUPAC ambiguous if enabled * @ param base * @ return */ static boolean isValidBase ( char base , boolean acceptAmbiguous ) { } }
boolean isValidBase = PRECISE_BASES . contains ( base ) ; if ( ! isValidBase && acceptAmbiguous ) { isValidBase = N . equals ( base ) || AMBIGUOUS_BASES . contains ( base ) ; } return isValidBase ;
public class GetAutomationExecutionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetAutomationExecutionRequest getAutomationExecutionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getAutomationExecutionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getAutomationExecutionRequest . getAutomationExecutionId ( ) , AUTOMATIONEXECUTIONID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Configuration { /** * Reads the given configuration file in memory and creates a DOM representation . * @ throws SAXException If this operation is supported but failed for some reason . * @ throws ParserConfigurationException If a { @ link DocumentBuilder } cannot be created which satisfies the * configuration requested . * @ throws IOException If any IO errors occur . */ public static Configuration create ( final InputStream schemaLocation , final InputStream configFile , final String pTargetAddress ) throws SAXException , ParserConfigurationException , IOException { } }
final SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; final Schema schema = schemaFactory . newSchema ( new StreamSource ( schemaLocation ) ) ; // create a validator for the document final Validator validator = schema . newValidator ( ) ; final DocumentBuilderFactory domFactory = DocumentBuilderFactory . newInstance ( ) ; domFactory . setNamespaceAware ( true ) ; // never forget this final DocumentBuilder builder = domFactory . newDocumentBuilder ( ) ; final Document doc = builder . parse ( configFile ) ; final DOMSource source = new DOMSource ( doc ) ; final DOMResult result = new DOMResult ( ) ; validator . validate ( source , result ) ; Document root = ( Document ) result . getNode ( ) ; // TargetName Configuration returnConfiguration = new Configuration ( pTargetAddress ) ; Element targetListNode = ( Element ) root . getElementsByTagName ( ELEMENT_TARGET_LIST ) . item ( 0 ) ; NodeList targetList = targetListNode . getElementsByTagName ( ELEMENT_TARGET ) ; for ( int curTargetNum = 0 ; curTargetNum < targetList . getLength ( ) ; curTargetNum ++ ) { Target curTargetInfo = parseTargetElement ( ( Element ) targetList . item ( curTargetNum ) ) ; synchronized ( returnConfiguration . targets ) { returnConfiguration . targets . add ( curTargetInfo ) ; } } // else it is null // port NodeList portTags = root . getElementsByTagName ( ELEMENT_PORT ) ; if ( portTags . getLength ( ) > 0 ) { returnConfiguration . port = Integer . parseInt ( portTags . item ( 0 ) . getTextContent ( ) ) ; } else { returnConfiguration . port = 3260 ; } // external port NodeList externalPortTags = root . getElementsByTagName ( ELEMENT_EXTERNAL_PORT ) ; if ( externalPortTags . getLength ( ) > 0 ) { returnConfiguration . externalPort = Integer . parseInt ( externalPortTags . item ( 0 ) . getTextContent ( ) ) ; } else { returnConfiguration . externalPort = returnConfiguration . port ; } // external address NodeList externalAddressTAgs = root . getElementsByTagName ( ELEMENT_EXTERNAL_ADDRESS ) ; if ( externalAddressTAgs . getLength ( ) > 0 ) { returnConfiguration . externalTargetAddress = externalAddressTAgs . item ( 0 ) . getTextContent ( ) ; } else { returnConfiguration . externalTargetAddress = pTargetAddress ; } // support sloppy text parameter negotiation ( i . e . the jSCSI Initiator ) ? final Node allowSloppyNegotiationNode = root . getElementsByTagName ( ELEMENT_ALLOWSLOPPYNEGOTIATION ) . item ( 0 ) ; if ( allowSloppyNegotiationNode == null ) returnConfiguration . allowSloppyNegotiation = false ; else returnConfiguration . allowSloppyNegotiation = Boolean . parseBoolean ( allowSloppyNegotiationNode . getTextContent ( ) ) ; return returnConfiguration ;
public class LocationAttributes { /** * Returns the URI of an element ( SAX flavor ) * @ param attrs * the element ' s attributes that hold the location information * @ return the element ' s URI or " < code > [ unknown location ] < / code > " if * < code > attrs < / code > has no location information . */ public static String getURI ( Attributes attrs ) { } }
String src = attrs . getValue ( URI , SRC_ATTR ) ; return src != null ? src : LocationUtils . UNKNOWN_STRING ;
public class MediaClient { /** * Retrieve the status of a job . * @ param jobId The ID of a job . * @ return The status of a job . * @ deprecated As of release 0.8.5 , replaced by { @ link # getTranscodingJob ( String ) } */ @ Deprecated public GetJobResponse getJob ( String jobId ) { } }
GetJobRequest request = new GetJobRequest ( ) ; request . setJobId ( jobId ) ; return getJob ( request ) ;
public class AccountHeaderBuilder { /** * add single ore more DrawerItems to the Drawer * @ param profiles * @ return */ public AccountHeaderBuilder addProfiles ( @ NonNull IProfile ... profiles ) { } }
if ( this . mProfiles == null ) { this . mProfiles = new ArrayList < > ( ) ; } if ( mDrawer != null ) { mDrawer . mDrawerBuilder . idDistributor . checkIds ( profiles ) ; } Collections . addAll ( this . mProfiles , profiles ) ; return this ;
public class CacheManager { /** * Creates a cache for a given cache specification . If the name in the specification is a known cache , then * it will return that cache . * @ param < K > The key type * @ param < V > The value type * @ param specification The specification * @ return A cache for the specification */ public static < K , V > Cache < K , V > register ( @ NonNull CacheSpec < K , V > specification ) { } }
return Cast . as ( caches . computeIfAbsent ( specification . getName ( ) , name -> Cast . as ( specification . getEngine ( ) . create ( specification ) ) ) ) ;
public class Segment3dfx { /** * Replies the property that is the x coordinate of the first segment point . * @ return the x1 property . */ @ Pure public DoubleProperty x1Property ( ) { } }
if ( this . p1 . x == null ) { this . p1 . x = new SimpleDoubleProperty ( this , MathFXAttributeNames . X1 ) ; } return this . p1 . x ;
public class ChangeRequestHttpSyncer { /** * This method returns the debugging information for printing , must not be used for any other purpose . */ public Map < String , Object > getDebugInfo ( ) { } }
long currTime = System . currentTimeMillis ( ) ; Object notSuccessfullySyncedFor ; if ( lastSuccessfulSyncTime == 0 ) { notSuccessfullySyncedFor = "Never Successfully Synced" ; } else { notSuccessfullySyncedFor = ( currTime - lastSuccessfulSyncTime ) / 1000 ; } return ImmutableMap . of ( "notSyncedForSecs" , lastSyncTime == 0 ? "Never Synced" : ( currTime - lastSyncTime ) / 1000 , "notSuccessfullySyncedFor" , notSuccessfullySyncedFor , "consecutiveFailedAttemptCount" , consecutiveFailedAttemptCount , "syncScheduled" , startStopLock . isStarted ( ) ) ;
public class RuleUpdater { /** * Update manual rules and custom rules ( rules instantiated from templates ) */ public boolean update ( DbSession dbSession , RuleUpdate update , OrganizationDto organization , UserSession userSession ) { } }
if ( update . isEmpty ( ) ) { return false ; } RuleDto rule = getRuleDto ( update ) ; // validate only the changes , not all the rule fields apply ( update , rule , userSession ) ; update ( dbSession , rule ) ; updateParameters ( dbSession , organization , update , rule ) ; ruleIndexer . commitAndIndex ( dbSession , rule . getId ( ) , organization ) ; return true ;
public class NumberPath { /** * Method to construct the equals expression for short * @ param value the short * @ return Expression */ public Expression < Short > eq ( short value ) { } }
String valueString = "'" + value + "'" ; return new Expression < Short > ( this , Operation . eq , valueString ) ;
public class I18nObject { /** * Gets the internationalized value for the supplied message key , using an object array as additional information . * @ param aMessageKey A message key * @ param aObjArray Additional details for the message * @ return The internationalized message */ protected String getI18n ( final String aMessageKey , final Object ... aObjArray ) { } }
final String [ ] strings = new String [ aObjArray . length ] ; for ( int index = 0 ; index < aObjArray . length ; index ++ ) { if ( aObjArray [ index ] instanceof File ) { strings [ index ] = ( ( File ) aObjArray [ index ] ) . getAbsolutePath ( ) ; } else { strings [ index ] = aObjArray [ index ] . toString ( ) ; } } return StringUtils . normalizeWS ( myBundle . get ( aMessageKey , strings ) ) ;
public class Helpers { /** * Optimized form of : key + " = " + val */ static String mapEntryToString ( Object key , Object val ) { } }
final String k , v ; final int klen , vlen ; final char [ ] chars = new char [ ( klen = ( k = objectToString ( key ) ) . length ( ) ) + ( vlen = ( v = objectToString ( val ) ) . length ( ) ) + 1 ] ; k . getChars ( 0 , klen , chars , 0 ) ; chars [ klen ] = '=' ; v . getChars ( 0 , vlen , chars , klen + 1 ) ; return new String ( chars ) ;
public class SimpleRadioButtonControl { /** * Sets up bindings for all radio buttons . */ private void setupRadioButtonBindings ( ) { } }
for ( RadioButton radio : radioButtons ) { radio . disableProperty ( ) . bind ( field . editableProperty ( ) . not ( ) ) ; }
public class GetBackupVaultNotificationsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetBackupVaultNotificationsRequest getBackupVaultNotificationsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getBackupVaultNotificationsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getBackupVaultNotificationsRequest . getBackupVaultName ( ) , BACKUPVAULTNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Task { @ Override public void triggerPartitionProducerStateCheck ( JobID jobId , final IntermediateDataSetID intermediateDataSetId , final ResultPartitionID resultPartitionId ) { } }
CompletableFuture < ExecutionState > futurePartitionState = partitionProducerStateChecker . requestPartitionProducerState ( jobId , intermediateDataSetId , resultPartitionId ) ; futurePartitionState . whenCompleteAsync ( ( ExecutionState executionState , Throwable throwable ) -> { try { if ( executionState != null ) { onPartitionStateUpdate ( intermediateDataSetId , resultPartitionId , executionState ) ; } else if ( throwable instanceof TimeoutException ) { // our request timed out , assume we ' re still running and try again onPartitionStateUpdate ( intermediateDataSetId , resultPartitionId , ExecutionState . RUNNING ) ; } else if ( throwable instanceof PartitionProducerDisposedException ) { String msg = String . format ( "Producer %s of partition %s disposed. Cancelling execution." , resultPartitionId . getProducerId ( ) , resultPartitionId . getPartitionId ( ) ) ; LOG . info ( msg , throwable ) ; cancelExecution ( ) ; } else { failExternally ( throwable ) ; } } catch ( IOException | InterruptedException e ) { failExternally ( e ) ; } } , executor ) ;
public class PageFlowContextListener { /** * Remove the NetUI related attributes from the { @ link ServletContext } . * @ param servletContext the servelt context */ private void removeAttributesNetUI ( ServletContext servletContext ) { } }
try { LinkedList list = new LinkedList ( ) ; Enumeration enumeration = servletContext . getAttributeNames ( ) ; while ( enumeration . hasMoreElements ( ) ) { String string = ( String ) enumeration . nextElement ( ) ; if ( string . startsWith ( InternalConstants . ATTR_PREFIX ) ) list . add ( string ) ; } for ( int i = 0 ; i < list . size ( ) ; i ++ ) { Object key = list . get ( i ) ; assert key != null ; assert key instanceof String ; LOG . trace ( "Removing ServletContext attribute named \"" + key + "\"" ) ; servletContext . removeAttribute ( ( String ) key ) ; } } catch ( Exception e ) { LOG . error ( "Caught error removing NetUI attribute from ServletContext. Cause: " + e , e ) ; }
public class ApplicationsImpl { /** * Lists all of the applications available in the specified account . * This operation returns only applications and versions that are available for use on compute nodes ; that is , that can be used in an application package reference . For administrator information about applications and versions that are not yet available to compute nodes , use the Azure portal or the Azure Resource Manager API . * @ param applicationListOptions Additional parameters for the operation * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; ApplicationSummary & gt ; object */ public Observable < Page < ApplicationSummary > > listAsync ( final ApplicationListOptions applicationListOptions ) { } }
return listWithServiceResponseAsync ( applicationListOptions ) . map ( new Func1 < ServiceResponseWithHeaders < Page < ApplicationSummary > , ApplicationListHeaders > , Page < ApplicationSummary > > ( ) { @ Override public Page < ApplicationSummary > call ( ServiceResponseWithHeaders < Page < ApplicationSummary > , ApplicationListHeaders > response ) { return response . body ( ) ; } } ) ;
public class JsSnapService { /** * Add a new snapping rules to the list . Each new rule provides information on how snapping should occur . * The added rule will use algorithm { @ link NearestVertexSnapAlgorithm } . * @ param snapLayer * The layer id that will provide the target geometries where to snap . * @ param distance * The maximum distance to bridge during snapping . unit = meters . */ public void addNearestEdgeSnappingRule ( String snapLayer , double distance ) { } }
SnapSourceProvider snapSourceProvider = new VectorLayerSourceProvider ( editor . getMapWidget ( ) . getMapModel ( ) . getVectorLayer ( snapLayer ) ) ; delegate . addSnappingRule ( new SnappingRule ( new NearestEdgeSnapAlgorithm ( ) , snapSourceProvider , distance ) ) ;
public class ServerCommunicationLinksInner { /** * Creates a server communication link . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param communicationLinkName The name of the server communication link . * @ param partnerServer The name of the partner server . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the ServerCommunicationLinkInner object if successful . */ public ServerCommunicationLinkInner beginCreateOrUpdate ( String resourceGroupName , String serverName , String communicationLinkName , String partnerServer ) { } }
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , communicationLinkName , partnerServer ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ThreadLocalUserProvider { /** * Store the supplied FeatureUser in the thread context . After calling this method all calls of { @ link # getCurrentUser ( ) } * from the active thread will return this feature user . Please don ' t forget to call { @ link # release ( ) } before the thread is * put back to a thread pool to prevent memory leaks . * @ param featureUser The feature user to store */ public static void bind ( FeatureUser featureUser ) { } }
if ( featureUser != null && threadLocal . get ( ) != null ) { throw new IllegalStateException ( "setFeatureUser() called for a " + "thread that already has one associated with it. It's likely that the FeatureUser " + "is not correctly removed from the thread before it is put back into the thread pool." ) ; } threadLocal . set ( featureUser ) ;
public class FramedGraphTraversal { /** * / * public FramedGraphTraversal < S , E , F > except ( String variable ) { * traversal . except ( variable ) ; * return this ; * public FramedGraphTraversal < S , E , F > except ( E exceptionObject ) { * traversal . except ( exceptionObject instanceof FramedElement ? ( E ) ( ( FramedElement ) exceptionObject ) . element ( ) : exceptionObject ) ; * return this ; * public FramedGraphTraversal < S , E , F > except ( Collection < E > exceptionCollection ) { * traversal . except ( exceptionCollection . stream ( ) . map ( e - > e instanceof FramedElement ? ( E ) ( ( FramedElement ) e ) . element ( ) : e ) . collect ( Collectors . toList ( ) ) ) ; * return this ; */ public List < F > toList ( ) { } }
if ( lastFramingClass == null ) { return ( List < F > ) traversal . toList ( ) ; } else { return traversal . toList ( ) . stream ( ) . map ( this :: frame ) . collect ( Collectors . toList ( ) ) ; }
public class CacheLoader { /** * Keep last n cycle start times for diagnostic dump . * @ param time the time this cycle started . * @ return the log index used for this entry . */ private int saveStartTime ( long time ) { } }
int indexUsed = diagIndex ; cycleTime [ diagIndex ++ ] = time ; if ( diagIndex >= MAX_DIAG_LOG ) { diagIndex = 0 ; } return indexUsed ;
public class NumberFormat { /** * Sets the minimum number of digits allowed in the integer portion of a * number . This must be & lt ; = maximumIntegerDigits . If the * new value for minimumIntegerDigits is more than the current value * of maximumIntegerDigits , then maximumIntegerDigits will also be set to * the new value . * @ param newValue the minimum number of integer digits to be shown ; if * less than zero , then zero is used . Subclasses might enforce an * upper limit to this value appropriate to the numeric type being formatted . * @ see # getMinimumIntegerDigits */ public void setMinimumIntegerDigits ( int newValue ) { } }
minimumIntegerDigits = Math . max ( 0 , newValue ) ; if ( minimumIntegerDigits > maximumIntegerDigits ) maximumIntegerDigits = minimumIntegerDigits ;
public class MercadoBitcoinAdapters { /** * Adapts a org . knowm . xchange . mercadobitcoin . dto . marketdata . OrderBook to a OrderBook Object * @ param currencyPair ( e . g . BTC / BRL or LTC / BRL ) * @ return The XChange OrderBook */ public static OrderBook adaptOrderBook ( MercadoBitcoinOrderBook mercadoBitcoinOrderBook , CurrencyPair currencyPair ) { } }
List < LimitOrder > asks = createOrders ( currencyPair , OrderType . ASK , mercadoBitcoinOrderBook . getAsks ( ) ) ; List < LimitOrder > bids = createOrders ( currencyPair , OrderType . BID , mercadoBitcoinOrderBook . getBids ( ) ) ; return new OrderBook ( null , asks , bids ) ;
public class FilePathUtil { /** * Return the relative path . Path elements are separated with / char . * @ param baseDir * a parent directory of { @ code file } * @ param file * the file to get the relative path * @ return the relative path */ public static String relativize ( Path baseDir , Path file ) { } }
String path = baseDir . toUri ( ) . relativize ( file . toUri ( ) ) . getPath ( ) ; if ( ! "/" . equals ( baseDir . getFileSystem ( ) . getSeparator ( ) ) ) { // For windows return path . replace ( baseDir . getFileSystem ( ) . getSeparator ( ) , "/" ) ; } else { return path ; }
public class ImageDownloader { /** * Calls the downloadFromUrlsFile . * @ param args * @ throws Exception */ public static void main ( String [ ] args ) throws Exception { } }
String dowloadFolder = "images/" ; String urlsFile = "urls.txt" ; int numUrls = 1000 ; int urlsToSkip = 0 ; downloadFromUrlsFile ( dowloadFolder , urlsFile , numUrls , urlsToSkip ) ;
public class AjcReportMojo { /** * Executes this ajdoc - report generation . */ @ SuppressWarnings ( "unchecked" ) protected void executeReport ( Locale locale ) throws MavenReportException { } }
getLog ( ) . info ( "Starting generating ajdoc" ) ; project . getCompileSourceRoots ( ) . add ( basedir . getAbsolutePath ( ) + "/" + aspectDirectory ) ; project . getTestCompileSourceRoots ( ) . add ( basedir . getAbsolutePath ( ) + "/" + testAspectDirectory ) ; List < String > arguments = new ArrayList < String > ( ) ; // Add classpath arguments . add ( "-classpath" ) ; arguments . add ( AjcHelper . createClassPath ( project , pluginArtifacts , getClasspathDirectories ( ) ) ) ; arguments . addAll ( ajcOptions ) ; Set < String > includes ; try { if ( null != ajdtBuildDefFile ) { includes = AjcHelper . getBuildFilesForAjdtFile ( ajdtBuildDefFile , basedir ) ; } else { includes = AjcHelper . getBuildFilesForSourceDirs ( getSourceDirectories ( ) , this . includes , this . excludes ) ; } } catch ( MojoExecutionException e ) { throw new MavenReportException ( "AspectJ Report failed" , e ) ; } // add target dir argument arguments . add ( "-d" ) ; arguments . add ( StringUtils . replace ( getOutputDirectory ( ) , "//" , "/" ) ) ; arguments . addAll ( includes ) ; if ( getLog ( ) . isDebugEnabled ( ) ) { StringBuilder command = new StringBuilder ( "Running : ajdoc " ) ; for ( String argument : arguments ) { command . append ( ' ' ) . append ( argument ) ; } getLog ( ) . debug ( command ) ; } // There seems to be a difference in classloading when calling ' mvn site ' or ' mvn aspectj : aspectj - report ' . // When calling mvn site , without the contextClassLoader set , you might see the next message : // javadoc : error - Cannot find doclet class com . sun . tools . doclets . standard . Standard ClassLoader oldContextClassLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; try { Thread . currentThread ( ) . setContextClassLoader ( this . getClass ( ) . getClassLoader ( ) ) ; // MASPECTJ - 11 : Make the ajdoc use the $ { project . build . directory } directory for its intermediate folder . // The argument should be the absolute path to the parent directory of the " ajdocworkingdir " folder . Main . setOutputWorkingDir ( buildDirectory . getAbsolutePath ( ) ) ; // Now produce the JavaDoc . Main . main ( ( String [ ] ) arguments . toArray ( new String [ 0 ] ) ) ; } finally { Thread . currentThread ( ) . setContextClassLoader ( oldContextClassLoader ) ; }
public class GenericMap { /** * Removes the mapping for a key from this map if it is present More * formally , if this map contains a mapping from key k to value v such that * ( key = = null ? k = = null : key . equals ( k ) ) , that mapping is removed . ( The map * can contain at most one such mapping . ) * @ param key * @ return the object that is being removed */ public Object remove ( String key ) { } }
Object last = null ; int index = keys . indexOf ( key ) ; if ( keys . remove ( key ) ) { last = values . remove ( index ) . value ; size -- ; if ( size < 1 ) isEmpty = true ; } return last ;
public class AbcParserAbstract { /** * / * private Chord parseChord ( AbcNode chord ) { * chord . getValue ( ) can contain extra chars * " non - quote " in grammar , but all childs are valid * component for a Chord , concat them and give it to * Chord contructor which parse it . * StringBuffer sb = new StringBuffer ( ) ; * Iterator it = chord . getChilds ( ) . iterator ( ) ; * while ( it . hasNext ( ) ) { * AbcNode node = ( AbcNode ) it . next ( ) ; * sb . append ( node . getValue ( ) ) ; * return new Chord ( sb . toString ( ) ) ; */ private void parseElement ( AbcNode element ) { } }
AbcNode firstChild = element . getFirstChild ( ) ; if ( firstChild != null ) { String label = firstChild . getLabel ( ) ; if ( label . equals ( Stem ) ) { addToMusic ( parseStem ( firstChild ) ) ; } else if ( label . equals ( Barline ) || label . equals ( NthRepeat ) || label . equals ( EndNthRepeat ) ) { closeTuplet ( ) ; m_brknRthmDotsCorrection = 0 ; parseBarlineOrNthRepeat ( firstChild ) ; } else if ( label . equals ( Space ) ) { // separate group of notes addToMusic ( new NotesSeparator ( ) ) ; } else if ( label . equals ( GraceNotes ) ) { parseGraceNotes ( firstChild ) ; } else if ( label . equals ( Gracing ) ) { SymbolElement se = parseGracing ( firstChild ) ; if ( se != null ) m_symbols . add ( se ) ; } else if ( label . equals ( ChordOrText ) ) { parseAnnotationsOrChord ( firstChild ) ; } else if ( label . equals ( Rest ) ) { addToMusic ( parseRest ( firstChild ) ) ; } else if ( label . equals ( SlurBegin ) ) { parseSlurBegin ( firstChild ) ; } else if ( label . equals ( SlurEnd ) ) { parseSlurEnd ( firstChild ) ; } else if ( label . equals ( Tuplet ) ) { closeTuplet ( ) ; parseTuplet ( firstChild ) ; m_brknRthmDotsCorrection = 0 ; } else if ( label . equals ( BrokenRhythm ) ) { parseBrokenRhythm ( firstChild ) ; } else if ( label . equals ( MultiMeasureRest ) ) { closeTuplet ( ) ; m_brknRthmDotsCorrection = 0 ; addToMusic ( parseMultiMeasureRest ( firstChild ) ) ; } else if ( label . equals ( MeasureRepeat ) ) { closeTuplet ( ) ; m_brknRthmDotsCorrection = 0 ; addToMusic ( parseMeasureRepeat ( firstChild ) ) ; } else if ( label . equals ( InlineField ) ) { closeTuplet ( ) ; m_brknRthmDotsCorrection = 0 ; parseTuneAndInlineFields ( firstChild ) ; } else if ( label . equals ( UnusedChar ) || label . equals ( Rollback ) ) { // do nothing } else { System . err . println ( "Element type " + label + " not handled!" ) ; } }
public class SendUsersMessageResponse { /** * An object that shows the endpoints that were messaged for each user . The object provides a list of user IDs . For * each user ID , it provides the endpoint IDs that were messaged . For each endpoint ID , it provides an * EndpointMessageResult object . * @ param result * An object that shows the endpoints that were messaged for each user . The object provides a list of user * IDs . For each user ID , it provides the endpoint IDs that were messaged . For each endpoint ID , it provides * an EndpointMessageResult object . */ public void setResult ( java . util . Map < String , java . util . Map < String , EndpointMessageResult > > result ) { } }
this . result = result ;
public class CommChannelDemoObject { /** * region > helpers */ private static < T > T firstOf ( final List < T > list ) { } }
return list . isEmpty ( ) ? null : list . get ( 0 ) ;
public class HttpHeaders { /** * Return the list of { @ linkplain ContentCodingType content coding types } , as * specified by the { @ code Content - Encoding } header . * < p > Returns an empty list when the content coding type ( s ) are unspecified . * @ return the content coding types */ public List < ContentCodingType > getContentEncoding ( ) { } }
String value = getFirst ( CONTENT_ENCODING ) ; return ( value != null ? ContentCodingType . parseCodingTypes ( value ) : Collections . < ContentCodingType > emptyList ( ) ) ;
public class SeaGlassLookAndFeel { /** * Initialize the scroll pane UI * @ param d */ private void defineScrollPane ( UIDefaults d ) { } }
// Define ScrollPane border painters . String c = PAINTER_PREFIX + "ScrollPanePainter" ; String p = "ScrollPane" ; d . put ( p + ".opaque" , Boolean . FALSE ) ; d . put ( p + ".contentMargins" , new InsetsUIResource ( 3 , 3 , 3 , 3 ) ) ; // d . put ( p + " . useChildTextComponentFocus " , Boolean . TRUE ) ; d . put ( p + ".backgroundPainter" , new LazyPainter ( c , ScrollPanePainter . Which . BACKGROUND_ENABLED ) ) ; d . put ( p + "[Enabled+Focused].borderPainter" , new LazyPainter ( c , ScrollPanePainter . Which . BORDER_ENABLED_FOCUSED ) ) ; d . put ( p + "[Enabled].borderPainter" , new LazyPainter ( c , ScrollPanePainter . Which . BORDER_ENABLED ) ) ; // Store ScrollPane Corner Component d . put ( p + ".cornerPainter" , new LazyPainter ( c , ScrollPanePainter . Which . CORNER_ENABLED ) ) ; // Initialize Viewport p = "Viewport" ; d . put ( p + ".contentMargins" , new InsetsUIResource ( 0 , 0 , 0 , 0 ) ) ; d . put ( p + ".opaque" , Boolean . TRUE ) ;
public class ApiOvhIpLoadbalancing { /** * Terminate your service zone option * REST : POST / ipLoadbalancing / { serviceName } / zone / { name } / terminate * @ param serviceName [ required ] The internal name of your IP load balancing * @ param name [ required ] Name of your zone */ public void serviceName_zone_name_terminate_POST ( String serviceName , String name ) throws IOException { } }
String qPath = "/ipLoadbalancing/{serviceName}/zone/{name}/terminate" ; StringBuilder sb = path ( qPath , serviceName , name ) ; exec ( qPath , "POST" , sb . toString ( ) , null ) ;
public class CmsIndexingThread { /** * Creates the search index document . < p > * @ param cms the current OpenCms user context * @ param res the resource to index * @ param index the index to update the resource in * @ param count the report count * @ param report the report to write the output to * @ return the created search index document * @ throws CmsException in case of issues while creating the search index document */ protected I_CmsSearchDocument createIndexDocument ( CmsObject cms , CmsResource res , I_CmsSearchIndex index , int count , I_CmsReport report ) throws CmsException { } }
I_CmsSearchDocument result = null ; if ( report != null ) { report . print ( org . opencms . report . Messages . get ( ) . container ( org . opencms . report . Messages . RPT_SUCCESSION_1 , String . valueOf ( count ) ) , I_CmsReport . FORMAT_NOTE ) ; report . print ( Messages . get ( ) . container ( Messages . RPT_SEARCH_INDEXING_FILE_BEGIN_0 ) , I_CmsReport . FORMAT_NOTE ) ; report . print ( org . opencms . report . Messages . get ( ) . container ( org . opencms . report . Messages . RPT_ARGUMENT_1 , report . removeSiteRoot ( res . getRootPath ( ) ) ) ) ; report . print ( org . opencms . report . Messages . get ( ) . container ( org . opencms . report . Messages . RPT_DOTS_0 ) , I_CmsReport . FORMAT_DEFAULT ) ; } if ( m_index . excludeFromIndex ( m_cms , m_res ) ) { m_addDefaultDocument = false ; } else { // resource is to be included in the index I_CmsDocumentFactory documentFactory = index . getDocumentFactory ( res ) ; if ( documentFactory != null ) { // some resources e . g . JSP do not have a default document factory if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_INDEXING_WITH_FACTORY_2 , res . getRootPath ( ) , documentFactory . getName ( ) ) ) ; } // create the document result = documentFactory . createDocument ( cms , res , index ) ; } else { m_addDefaultDocument = false ; } } if ( result == null ) { // this resource is not contained in the given search index or locale did not match if ( report != null ) { report . println ( org . opencms . report . Messages . get ( ) . container ( org . opencms . report . Messages . RPT_SKIPPED_0 ) , I_CmsReport . FORMAT_NOTE ) ; } if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_SKIPPED_1 , res . getRootPath ( ) ) ) ; } } else { // index document was successfully created if ( ( m_report != null ) ) { m_report . println ( org . opencms . report . Messages . get ( ) . container ( org . opencms . report . Messages . RPT_OK_0 ) , I_CmsReport . FORMAT_OK ) ; } } return result ;
public class JsniBundleGenerator { /** * - Rewrite inline regex : / . . . */ igm to new RegExp ( '...*' + 'igm' ) ; * / private String parseJavascriptSource ( String js ) throws Exception { } }
boolean isJS = true ; boolean isSingQuot = false ; boolean isDblQuot = false ; boolean isSlash = false ; boolean isCComment = false ; boolean isCPPComment = false ; boolean isRegex = false ; boolean isOper = false ; StringBuilder ret = new StringBuilder ( ) ; String tmp = "" ; Character last = 0 ; Character prev = 0 ; for ( int i = 0 , l = js . length ( ) ; i < l ; i ++ ) { Character c = js . charAt ( i ) ; String out = c . toString ( ) ; if ( isJS ) { isDblQuot = c == '"' ; isSingQuot = c == '\'' ; isSlash = c == '/' ; isJS = ! isDblQuot && ! isSingQuot && ! isSlash ; if ( ! isJS ) { out = tmp = "" ; isCPPComment = isCComment = isRegex = false ; } } else if ( isSingQuot ) { isJS = ! ( isSingQuot = last == '\\' || c != '\'' ) ; if ( isJS ) out = escapeQuotedString ( tmp , c ) ; else tmp += c ; } else if ( isDblQuot ) { isJS = ! ( isDblQuot = last == '\\' || c != '"' ) ; if ( isJS ) out = escapeQuotedString ( tmp , c ) ; else tmp += c ; } else if ( isSlash ) { if ( ! isCPPComment && ! isCComment && ! isRegex && ! isOper ) { isCPPComment = c == '/' ; isCComment = c == '*' ; isOper = ! isCPPComment && ! isCComment && ! "=(&|?:;}," . contains ( "" + prev ) ; isRegex = ! isCPPComment && ! isCComment && ! isOper ; } if ( isOper ) { isJS = ! ( isSlash = isOper = false ) ; out = "" + last + c ; } else if ( isCPPComment ) { isJS = ! ( isSlash = isCPPComment = c != '\n' ) ; if ( isJS ) out = "\n" ; } else if ( isCComment ) { isSlash = isCComment = ! ( isJS = last == '*' && c == '/' ) ; if ( isJS ) out = "" ; } else if ( isRegex ) { isJS = ! ( isSlash = isRegex = last == '\\' || c != '/' ) ; if ( isJS ) { String mod = "" ; while ( ++ i < l ) { c = js . charAt ( i ) ; if ( "igm" . contains ( "" + c ) ) mod += c ; else break ; } out = escapeInlineRegex ( tmp , mod ) + c ; } else { tmp += c ; } } else { isJS = true ; } } if ( isJS ) { ret . append ( out ) ; } if ( last != ' ' ) { prev = last ; } last = prev == '\\' && c == '\\' ? 0 : c ; } return ret . toString ( ) ;
public class JpaBeanQueryAssembler { /** * Assemble beans and initalize their properties and references * from what have been provided . * @ return the beans that were provided in the inital query . */ public List < Bean > assembleBeans ( ) { } }
connectReferences ( ) ; if ( beansQuery . size ( ) == 0 ) { // if no specific beans where requested ( such as query for a // specific schema ) return what is available . return new ArrayList < > ( beans . values ( ) ) ; } List < Bean > initalQuery = new ArrayList < > ( ) ; for ( BeanId id : beansQuery ) { Bean bean = beans . get ( id ) ; if ( bean != null ) { initalQuery . add ( beans . get ( id ) ) ; } } return initalQuery ;
public class JerseyTags { /** * Creates a { @ code status } tag based on the status of the given { @ code response } . * @ param response the container response * @ return the status tag derived from the status of the response */ public static Tag status ( ContainerResponse response ) { } }
/* In case there is no response we are dealing with an unmapped exception . */ return ( response != null ) ? Tag . of ( "status" , Integer . toString ( response . getStatus ( ) ) ) : STATUS_SERVER_ERROR ;