signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class RestController { /** * Deletes all entities and entity meta data for the given entity name */ @ DeleteMapping ( value = "/{entityTypeId}/meta" ) @ ResponseStatus ( NO_CONTENT ) public void deleteMeta ( @ PathVariable ( "entityTypeId" ) String entityTypeId ) { } }
deleteMetaInternal ( entityTypeId ) ;
public class PubDate { /** * Gets the value of the yearOrMonthOrDayOrSeasonOrMedlineDate property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE > method for the yearOrMonthOrDayOrSeasonOrMedlineDate property . * For example , to add a new item , do as follows : * < pre > * getYearOrMonthOrDayOrSeasonOrMedlineDate ( ) . add ( newItem ) ; * < / pre > * Objects of the following type ( s ) are allowed in the list * { @ link Year } * { @ link Month } * { @ link Day } * { @ link Season } * { @ link MedlineDate } */ public List < java . lang . Object > getYearOrMonthOrDayOrSeasonOrMedlineDate ( ) { } }
if ( yearOrMonthOrDayOrSeasonOrMedlineDate == null ) { yearOrMonthOrDayOrSeasonOrMedlineDate = new ArrayList < java . lang . Object > ( ) ; } return this . yearOrMonthOrDayOrSeasonOrMedlineDate ;
public class TextParameter { /** * Returns the < i > key - value < / i > pairs contained in a null character - separated text data segment in an array of * { @ link String } s . * If the parameter equals < code > null < / code > an empty { @ link List } will be returned . * @ param keyValuePairs a login request or text negotiation text data segment * @ return a { @ link Vector } of { @ link String } s containing the purged key value pairs */ public static List < String > tokenizeKeyValuePairs ( final String keyValuePairs ) { } }
final List < String > result = new Vector < > ( ) ; if ( keyValuePairs == null ) return result ; final String [ ] split = keyValuePairs . split ( TextKeyword . NULL_CHAR ) ; for ( int i = 0 ; i < split . length ; ++ i ) if ( split [ i ] . length ( ) > 0 ) // does not mean key - value pair is // RFC - conform result . add ( split [ i ] ) ; return result ;
public class BitsyVertex { /** * THERE ARE TWO MORE COPIES OF THIS CODE IN ELEMENT AND EDGE */ @ Override public < V > Iterator < VertexProperty < V > > properties ( String ... propertyKeys ) { } }
ArrayList < VertexProperty < V > > ans = new ArrayList < VertexProperty < V > > ( ) ; if ( propertyKeys . length == 0 ) { if ( this . properties == null ) return Collections . emptyIterator ( ) ; propertyKeys = this . properties . getPropertyKeys ( ) ; } for ( String key : propertyKeys ) { VertexProperty < V > prop = property ( key ) ; if ( prop . isPresent ( ) ) ans . add ( prop ) ; } return ans . iterator ( ) ;
public class Assistant { /** * Get entity . * Get information about an entity , optionally including all entity content . * With * * export * * = ` false ` , this operation is limited to 6000 requests per 5 minutes . With * * export * * = ` true ` , the * limit is 200 requests per 30 minutes . For more information , see * * Rate limiting * * . * @ param getEntityOptions the { @ link GetEntityOptions } containing the options for the call * @ return a { @ link ServiceCall } with a response type of { @ link Entity } */ public ServiceCall < Entity > getEntity ( GetEntityOptions getEntityOptions ) { } }
Validator . notNull ( getEntityOptions , "getEntityOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { getEntityOptions . workspaceId ( ) , getEntityOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getEntity" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getEntityOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( getEntityOptions . export ( ) ) ) ; } if ( getEntityOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getEntityOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Entity . class ) ) ;
public class CommonIronJacamarParser { /** * Store timeout * @ param t The timeout * @ param writer The writer * @ exception Exception Thrown if an error occurs */ protected void storeTimeout ( Timeout t , XMLStreamWriter writer ) throws Exception { } }
writer . writeStartElement ( CommonXML . ELEMENT_TIMEOUT ) ; if ( t . getBlockingTimeoutMillis ( ) != null ) { writer . writeStartElement ( CommonXML . ELEMENT_BLOCKING_TIMEOUT_MILLIS ) ; writer . writeCharacters ( t . getValue ( CommonXML . ELEMENT_BLOCKING_TIMEOUT_MILLIS , t . getBlockingTimeoutMillis ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( t . getIdleTimeoutMinutes ( ) != null ) { writer . writeStartElement ( CommonXML . ELEMENT_IDLE_TIMEOUT_MINUTES ) ; writer . writeCharacters ( t . getValue ( CommonXML . ELEMENT_IDLE_TIMEOUT_MINUTES , t . getIdleTimeoutMinutes ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( t . getAllocationRetry ( ) != null ) { writer . writeStartElement ( CommonXML . ELEMENT_ALLOCATION_RETRY ) ; writer . writeCharacters ( t . getValue ( CommonXML . ELEMENT_ALLOCATION_RETRY , t . getAllocationRetry ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( t . getAllocationRetryWaitMillis ( ) != null ) { writer . writeStartElement ( CommonXML . ELEMENT_ALLOCATION_RETRY_WAIT_MILLIS ) ; writer . writeCharacters ( t . getValue ( CommonXML . ELEMENT_ALLOCATION_RETRY_WAIT_MILLIS , t . getAllocationRetryWaitMillis ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } if ( t . getXaResourceTimeout ( ) != null ) { writer . writeStartElement ( CommonXML . ELEMENT_XA_RESOURCE_TIMEOUT ) ; writer . writeCharacters ( t . getValue ( CommonXML . ELEMENT_XA_RESOURCE_TIMEOUT , t . getXaResourceTimeout ( ) . toString ( ) ) ) ; writer . writeEndElement ( ) ; } writer . writeEndElement ( ) ;
public class DefaultThriftConnection { /** * 创建原始连接的方法 * @ throws ThriftConnectionPoolException * 创建连接出现问题时抛出该异常 */ @ SuppressWarnings ( "unchecked" ) private void createConnection ( ) throws ThriftConnectionPoolException { } }
try { transport = new TSocket ( host , port , connectionTimeOut ) ; transport . open ( ) ; TProtocol protocol = createTProtocol ( transport ) ; // 反射实例化客户端对象 Constructor < ? extends TServiceClient > clientConstructor = clientClass . getConstructor ( TProtocol . class ) ; client = ( T ) clientConstructor . newInstance ( protocol ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "创建新连接成功:" + host + " 端口:" + port ) ; } } catch ( Exception e ) { throw new ThriftConnectionPoolException ( "无法连接服务器:" + host + " 端口:" + port ) ; }
public class Cleaner { /** * Clears state of specific component . * To be cleaned state components must implement ICleanable interface . If they * don ' t the call to this method has no effect . * @ param correlationId ( optional ) transaction id to trace execution through * call chain . * @ param component the component that is to be cleaned . * @ throws ApplicationException when errors occured . * @ see ICleanable */ public static void clearOne ( String correlationId , Object component ) throws ApplicationException { } }
if ( component instanceof ICleanable ) ( ( ICleanable ) component ) . clear ( correlationId ) ;
public class Delegator { /** * Note that this method does not get forwarded to the delegee if * the < code > hint < / code > parameter is null , * < code > ScriptRuntime . ScriptableClass < / code > or * < code > ScriptRuntime . FunctionClass < / code > . Instead the object * itself is returned . * @ param hint the type hint * @ return the default value * @ see org . mozilla . javascript . Scriptable # getDefaultValue */ @ Override public Object getDefaultValue ( Class < ? > hint ) { } }
return ( hint == null || hint == ScriptRuntime . ScriptableClass || hint == ScriptRuntime . FunctionClass ) ? this : getDelegee ( ) . getDefaultValue ( hint ) ;
public class VoterUtil { /** * This is small debug utility available to voters in this package . */ protected static String debugText ( String heading , Authentication auth , Collection < ConfigAttribute > config , Object resource , int decision ) { } }
StringBuilder sb = new StringBuilder ( heading ) ; sb . append ( ": " ) ; if ( auth != null ) { sb . append ( auth . getName ( ) ) ; } if ( config != null ) { Collection < ConfigAttribute > atts = config ; if ( atts != null && atts . size ( ) > 0 ) { sb . append ( " [" ) ; for ( ConfigAttribute att : atts ) { sb . append ( att . getAttribute ( ) ) ; sb . append ( "," ) ; } sb . replace ( sb . length ( ) - 1 , sb . length ( ) , "]" ) ; } } if ( resource != null ) { sb . append ( " resource: [" ) ; sb . append ( resource . toString ( ) ) ; sb . append ( "]" ) ; } sb . append ( " => decision: " + decision ) ; return sb . toString ( ) ;
public class Vector2f { /** * Add the component - wise multiplication of < code > a * b < / code > to this vector . * @ param a * the first multiplicand * @ param b * the second multiplicand * @ return a vector holding the result */ public Vector2f fma ( Vector2fc a , Vector2fc b ) { } }
return fma ( a , b , thisOrNew ( ) ) ;
public class StandardSerializers { /** * Obtain the JavaScript serializer ( implementation of { @ link IStandardJavaScriptSerializer } ) registered by * the Standard Dialect that is being currently used . * @ param configuration the configuration object for the current template execution environment . * @ return the parser object . */ public static IStandardJavaScriptSerializer getJavaScriptSerializer ( final IEngineConfiguration configuration ) { } }
final Object serializer = configuration . getExecutionAttributes ( ) . get ( STANDARD_JAVASCRIPT_SERIALIZER_ATTRIBUTE_NAME ) ; if ( serializer == null || ( ! ( serializer instanceof IStandardJavaScriptSerializer ) ) ) { throw new TemplateProcessingException ( "No JavaScript Serializer has been registered as an execution argument. " + "This is a requirement for using Standard serialization, and might happen " + "if neither the Standard or the SpringStandard dialects have " + "been added to the Template Engine and none of the specified dialects registers an " + "attribute of type " + IStandardJavaScriptSerializer . class . getName ( ) + " with name " + "\"" + STANDARD_JAVASCRIPT_SERIALIZER_ATTRIBUTE_NAME + "\"" ) ; } return ( IStandardJavaScriptSerializer ) serializer ;
public class ExpandableDirectByteBuffer { private void ensureCapacity ( final int index , final int length ) { } }
if ( index < 0 ) { throw new IndexOutOfBoundsException ( "index cannot be negative: index=" + index ) ; } final long resultingPosition = index + ( long ) length ; final int currentCapacity = capacity ; if ( resultingPosition > currentCapacity ) { if ( currentCapacity >= MAX_BUFFER_LENGTH ) { throw new IndexOutOfBoundsException ( "index=" + index + " length=" + length + " maxCapacity=" + MAX_BUFFER_LENGTH ) ; } final int newCapacity = calculateExpansion ( currentCapacity , ( int ) resultingPosition ) ; final ByteBuffer newBuffer = ByteBuffer . allocateDirect ( newCapacity ) ; getBytes ( 0 , newBuffer , 0 , capacity ) ; address = address ( newBuffer ) ; capacity = newCapacity ; byteBuffer = newBuffer ; }
public class Duration { /** * Compare two Duration instances * @ param a - one instance * @ param b - the other instance * @ return true if they are equal , false otherwise */ public static boolean compare ( Duration a , Duration b ) { } }
if ( null == a || null == b ) return ( null == a ) && ( null == b ) ; return a . equals ( b ) ;
public class URIClassLoader { /** * Finds the ResourceHandle object for the class with the specified name . Unlike < code > findClass ( ) < / code > , this * method does not load the class . * @ param name the name of the class * @ return the ResourceHandle of the class */ protected ResourceHandle getClassHandle ( final String name ) { } }
String path = name . replace ( '.' , '/' ) . concat ( ".class" ) ; return getResourceHandle ( path ) ;
public class ConfigBase { /** * / * Emit a start element with a name and type . The type is the name * of the actual class . */ private QName startElement ( final XmlEmit xml , final Class c , final ConfInfo ci ) throws Throwable { } }
QName qn ; if ( ci == null ) { qn = new QName ( ns , c . getName ( ) ) ; } else { qn = new QName ( ns , ci . elementName ( ) ) ; } xml . openTag ( qn , "type" , c . getCanonicalName ( ) ) ; return qn ;
public class SpeechToText { /** * Unregister a callback . * Unregisters a callback URL that was previously white - listed with a * * Register a callback * * request for use with the * asynchronous interface . Once unregistered , the URL can no longer be used with asynchronous recognition requests . * * * See also : * * [ Unregistering a callback * URL ] ( https : / / cloud . ibm . com / docs / services / speech - to - text / async . html # unregister ) . * @ param unregisterCallbackOptions the { @ link UnregisterCallbackOptions } containing the options for the call * @ return a { @ link ServiceCall } with a response type of Void */ public ServiceCall < Void > unregisterCallback ( UnregisterCallbackOptions unregisterCallbackOptions ) { } }
Validator . notNull ( unregisterCallbackOptions , "unregisterCallbackOptions cannot be null" ) ; String [ ] pathSegments = { "v1/unregister_callback" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "unregisterCallback" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . query ( "callback_url" , unregisterCallbackOptions . callbackUrl ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ;
public class CmsElementSettingsDialog { /** * Adds the model group settings fields to the given field set . < p > * @ param elementBean the element bean * @ param elementWidget the element widget * @ param fieldSet the field set */ private void addModelGroupSettings ( CmsContainerElementData elementBean , CmsContainerPageElementPanel elementWidget , CmsFieldSet fieldSet ) { } }
Map < String , String > groupOptions = new LinkedHashMap < String , String > ( ) ; groupOptions . put ( GroupOption . disabled . name ( ) , GroupOption . disabled . getLabel ( ) ) ; groupOptions . put ( GroupOption . copy . name ( ) , GroupOption . copy . getLabel ( ) ) ; groupOptions . put ( GroupOption . reuse . name ( ) , GroupOption . reuse . getLabel ( ) ) ; m_modelGroupSelect = new CmsSelectBox ( groupOptions ) ; if ( elementWidget . isModelGroup ( ) ) { if ( Boolean . valueOf ( elementBean . getSettings ( ) . get ( CmsContainerElement . USE_AS_COPY_MODEL ) ) . booleanValue ( ) ) { m_modelGroupSelect . selectValue ( GroupOption . copy . name ( ) ) ; } else { m_modelGroupSelect . selectValue ( GroupOption . reuse . name ( ) ) ; } } CmsFormRow selectRow = new CmsFormRow ( ) ; selectRow . getLabel ( ) . setText ( Messages . get ( ) . key ( Messages . GUI_USE_AS_MODEL_GROUP_LABEL_0 ) ) ; selectRow . getWidgetContainer ( ) . add ( m_modelGroupSelect ) ; fieldSet . add ( selectRow ) ;
public class WSJdbcResultSet { /** * Updates a column with a character stream value . The updateXXX methods are used to update column * values in the current row , or the insert row . The updateXXX methods do not update the underlying database ; instead * the updateRow or insertRow methods are called to update the database . * @ param columnName - the name of the column * x - the new column value * length - of the stream * @ throws SQLException if a database access error occurs . */ public void updateCharacterStream ( String arg0 , Reader arg1 , int arg2 ) throws SQLException { } }
try { rsetImpl . updateCharacterStream ( arg0 , arg1 , arg2 ) ; } catch ( SQLException ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateCharacterStream" , "3317" , this ) ; throw WSJdbcUtil . mapException ( this , ex ) ; } catch ( NullPointerException nullX ) { // No FFDC code needed ; we might be closed . throw runtimeXIfNotClosed ( nullX ) ; }
public class UnicodeSetSpanner { /** * Returns a trimmed sequence ( using CharSequence . subsequence ( ) ) , that omits matching elements at the start or * end of the string , depending on the trimOption and spanCondition . For example : * < pre > * { @ code * new UnicodeSet ( " [ ab ] " ) . trim ( " abacatbab " , TrimOption . LEADING , SpanCondition . SIMPLE ) } * < / pre > * . . . returns { @ code " catbab " } . * @ param sequence * the sequence to trim * @ param trimOption * LEADING , TRAILING , or BOTH * @ param spanCondition * SIMPLE , CONTAINED or NOT _ CONTAINED * @ return a subsequence */ public CharSequence trim ( CharSequence sequence , TrimOption trimOption , SpanCondition spanCondition ) { } }
int endLeadContained , startTrailContained ; final int length = sequence . length ( ) ; if ( trimOption != TrimOption . TRAILING ) { endLeadContained = unicodeSet . span ( sequence , spanCondition ) ; if ( endLeadContained == length ) { return "" ; } } else { endLeadContained = 0 ; } if ( trimOption != TrimOption . LEADING ) { startTrailContained = unicodeSet . spanBack ( sequence , spanCondition ) ; } else { startTrailContained = length ; } return endLeadContained == 0 && startTrailContained == length ? sequence : sequence . subSequence ( endLeadContained , startTrailContained ) ;
public class Ix { /** * Collects the elements of this sequence into a multi - Map where the key is * determined from each element via the keySelector function and * the value is derived from the same element via the valueSelector function . * @ param < K > the key type * @ param < V > the value type * @ param keySelector the function that receives the current element and returns * a key for it to be used as the Map key . * @ param valueSelector the function that receives the current element and returns * a value for it to be used as the Map value * @ return the new Map instance * @ throws NullPointerException if keySelector or valueSelector is null * @ since 1.0 */ public final < K , V > Map < K , Collection < V > > toMultimap ( IxFunction < ? super T , ? extends K > keySelector , IxFunction < ? super T , ? extends V > valueSelector ) { } }
return this . < K , V > collectToMultimap ( keySelector , valueSelector ) . first ( ) ;
public class CollectionUtils { /** * Retrieve the last element of the given List , accessing the highest index . * @ param list the List to check ( may be { @ code null } or empty ) * @ return the last element , or { @ code null } if none * @ since 5.0.3 */ @ Nullable public static < T > T lastElement ( @ Nullable final List < T > list ) { } }
if ( CollectionUtils . isEmpty ( list ) ) { return null ; } return list . get ( list . size ( ) - 1 ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcConnectedFaceSet ( ) { } }
if ( ifcConnectedFaceSetEClass == null ) { ifcConnectedFaceSetEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 100 ) ; } return ifcConnectedFaceSetEClass ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MedianType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "median" ) public JAXBElement < MedianType > createMedian ( MedianType value ) { } }
return new JAXBElement < MedianType > ( _Median_QNAME , MedianType . class , null , value ) ;
public class XmlParser { /** * Parse string URL . */ public synchronized Node parse ( String url ) throws IOException , SAXException { } }
if ( log . isDebugEnabled ( ) ) log . debug ( "parse: " + url ) ; return parse ( new InputSource ( url ) ) ;
public class CalendarFormatterBase { /** * Check if the zoneId has an alias in the CLDR data . */ public String resolveTimeZoneId ( String zoneId ) { } }
String alias = _CalendarUtils . getTimeZoneAlias ( zoneId ) ; if ( alias != null ) { zoneId = alias ; } alias = TimeZoneAliases . getAlias ( zoneId ) ; if ( alias != null ) { zoneId = alias ; } return zoneId ;
public class WebContainerLogger { /** * Accepts a throwable and returns a String representation . * @ param t * @ return string representation of stack trace */ public static String throwableToString ( Throwable t ) { } }
StringWriter s = new StringWriter ( ) ; PrintWriter p = new PrintWriter ( s ) ; t . printStackTrace ( p ) ; return s . toString ( ) ;
public class ContentPackage { /** * Get root path of the package . This does only work if there is only one filter of the package . * If they are more filters use { @ link # getFilters ( ) } instead . * @ return Root path of package */ public String getRootPath ( ) { } }
if ( metadata . getFilters ( ) . size ( ) == 1 ) { return metadata . getFilters ( ) . get ( 0 ) . getRootPath ( ) ; } else { throw new IllegalStateException ( "Content package has more than one package filter - please use getFilters()." ) ; }
public class BitmapUtils { /** * Store the bitmap on the cache directory path . * @ param context the context . * @ param bitmap to store . * @ param path file path . * @ param filename file name . * @ param format bitmap format . * @ param quality the quality of the compressed bitmap . * @ return the compressed bitmap file . */ public static File storeOnCacheDir ( Context context , Bitmap bitmap , String path , String filename , Bitmap . CompressFormat format , int quality ) { } }
File dir = new File ( context . getCacheDir ( ) , path ) ; FileUtils . makeDirsIfNeeded ( dir ) ; File file = new File ( dir , filename ) ; if ( ! storeAsFile ( bitmap , file , format , quality ) ) { return null ; } return file ;
public class StandardBullhornData { /** * { @ inheritDoc } */ @ Override public < T extends BullhornEntity > MetaData < T > getMetaData ( Class < T > type , MetaParameter metaParameter , Set < String > fieldSet ) { } }
return this . getMetaData ( type , metaParameter , fieldSet , null ) ;
public class NormalDistribution { /** * Inverse of the cumulative distribution function of the standard normal distribution * Java Version of * Michael J . Wichura : Algorithm AS241 Appl . Statist . ( 1988 ) Vol . 37 , No . 3 Produces the normal * deviate z corresponding to a given lower tail area of p ; z is accurate * to about 1 part in 10 * * 16. * The hash sums below are the sums of the mantissas of the coefficients . * they are included for use in checking transcription . * @ param p The probablity ( quantile ) . * @ return The argument of the cumulative distribution function being assigned to p . */ public static double inverseCumulativeNormalDistribution_Wichura ( double p ) { } }
double zero = 0.e+00 , one = 1.e+00 , half = 0.5e+00 ; double split1 = 0.425e+00 , split2 = 5.e+00 ; double const1 = 0.180625e+00 , const2 = 1.6e+00 ; // coefficients for p close to 0.5 double a0 = 3.3871328727963666080e+00 ; double a1 = 1.3314166789178437745e+02 ; double a2 = 1.9715909503065514427e+03 ; double a3 = 1.3731693765509461125e+04 ; double a4 = 4.5921953931549871457e+04 ; double a5 = 6.7265770927008700853e+04 ; double a6 = 3.3430575583588128105e+04 ; double a7 = 2.5090809287301226727e+03 ; double b1 = 4.2313330701600911252e+01 ; double b2 = 6.8718700749205790830e+02 ; double b3 = 5.3941960214247511077e+03 ; double b4 = 2.1213794301586595867e+04 ; double b5 = 3.9307895800092710610e+04 ; double b6 = 2.8729085735721942674e+04 ; double b7 = 5.2264952788528545610e+03 ; // hash sum ab 55.8831928806149014439 // coefficients for p not close to 0 , 0.5 or 1. double c0 = 1.42343711074968357734e+00 ; double c1 = 4.63033784615654529590e+00 ; double c2 = 5.76949722146069140550e+00 ; double c3 = 3.64784832476320460504e+00 ; double c4 = 1.27045825245236838258e+00 ; double c5 = 2.41780725177450611770e-01 ; double c6 = 2.27238449892691845833e-02 ; double c7 = 7.74545014278341407640e-04 ; double d1 = 2.05319162663775882187e+00 ; double d2 = 1.67638483018380384940e+00 ; double d3 = 6.89767334985100004550e-01 ; double d4 = 1.48103976427480074590e-01 ; double d5 = 1.51986665636164571966e-02 ; double d6 = 5.47593808499534494600e-04 ; double d7 = 1.05075007164441684324e-09 ; // hash sum cd 49.33206503301610289036 // coefficients for p near 0 or 1. double e0 = 6.65790464350110377720e+00 ; double e1 = 5.46378491116411436990e+00 ; double e2 = 1.78482653991729133580e+00 ; double e3 = 2.96560571828504891230e-01 ; double e4 = 2.65321895265761230930e-02 ; double e5 = 1.24266094738807843860e-03 ; double e6 = 2.71155556874348757815e-05 ; double e7 = 2.01033439929228813265e-07 ; double f1 = 5.99832206555887937690e-01 ; double f2 = 1.36929880922735805310e-01 ; double f3 = 1.48753612908506148525e-02 ; double f4 = 7.86869131145613259100e-04 ; double f5 = 1.84631831751005468180e-05 ; double f6 = 1.42151175831644588870e-07 ; double f7 = 2.04426310338993978564e-15 ; // hash sum ef 47.52583 31754 92896 71629 double q = p - half ; double r , ppnd16 ; if ( Math . abs ( q ) <= split1 ) { r = const1 - q * q ; return q * ( ( ( ( ( ( ( a7 * r + a6 ) * r + a5 ) * r + a4 ) * r + a3 ) * r + a2 ) * r + a1 ) * r + a0 ) / ( ( ( ( ( ( ( b7 * r + b6 ) * r + b5 ) * r + b4 ) * r + b3 ) * r + b2 ) * r + b1 ) * r + one ) ; } else { if ( q < zero ) { r = p ; } else { r = one - p ; } if ( r <= zero ) { return zero ; } r = Math . sqrt ( - Math . log ( r ) ) ; if ( r <= split2 ) { r -= const2 ; ppnd16 = ( ( ( ( ( ( ( c7 * r + c6 ) * r + c5 ) * r + c4 ) * r + c3 ) * r + c2 ) * r + c1 ) * r + c0 ) / ( ( ( ( ( ( ( d7 * r + d6 ) * r + d5 ) * r + d4 ) * r + d3 ) * r + d2 ) * r + d1 ) * r + one ) ; } else { r -= split2 ; ppnd16 = ( ( ( ( ( ( ( e7 * r + e6 ) * r + e5 ) * r + e4 ) * r + e3 ) * r + e2 ) * r + e1 ) * r + e0 ) / ( ( ( ( ( ( ( f7 * r + f6 ) * r + f5 ) * r + f4 ) * r + f3 ) * r + f2 ) * r + f1 ) * r + one ) ; } if ( q < zero ) { ppnd16 = - ppnd16 ; } return ppnd16 ; }
public class NonReusingBuildFirstHashJoinIterator { @ Override public void open ( ) throws IOException , MemoryAllocationException , InterruptedException { } }
this . hashJoin . open ( this . firstInput , this . secondInput , this . buildSideOuterJoin ) ;
public class ViewHelper { /** * Equivalent to calling ImageView . setImageUri * @ param cacheView The cache of views to get the view from * @ param viewId The id of the view whose image should change * @ param uri the Uri of an image , or { @ code null } to clear the content */ public static void setImageUri ( EfficientCacheView cacheView , int viewId , @ Nullable Uri uri ) { } }
View view = cacheView . findViewByIdEfficient ( viewId ) ; if ( view instanceof ImageView ) { ( ( ImageView ) view ) . setImageURI ( uri ) ; }
public class ManagementResource { /** * ( non - Javadoc ) * @ see net . roboconf . dm . rest . services . internal . resources . IManagementResource * # listApplicationTemplates ( java . lang . String , java . lang . String , java . lang . String ) */ @ Override public List < ApplicationTemplate > listApplicationTemplates ( String exactName , String exactQualifier , String tag ) { } }
// Log if ( this . logger . isLoggable ( Level . FINE ) ) { if ( exactName == null && exactQualifier == null ) { this . logger . fine ( "Request: list all the application templates." ) ; } else { StringBuilder sb = new StringBuilder ( "Request: list/find the application templates" ) ; if ( exactName != null ) { sb . append ( " with name = " ) ; sb . append ( exactName ) ; } if ( exactQualifier != null ) { if ( exactName != null ) sb . append ( " and" ) ; sb . append ( " qualifier = " ) ; sb . append ( exactQualifier ) ; } sb . append ( "." ) ; this . logger . fine ( sb . toString ( ) ) ; } } // Search List < ApplicationTemplate > result = new ArrayList < > ( ) ; for ( ApplicationTemplate tpl : this . manager . applicationTemplateMngr ( ) . getApplicationTemplates ( ) ) { // Equality is on the name , not on the display name if ( ( exactName == null || exactName . equals ( tpl . getName ( ) ) ) && ( exactQualifier == null || exactQualifier . equals ( tpl . getVersion ( ) ) && ( tag == null || tpl . getTags ( ) . contains ( tag ) ) ) ) result . add ( tpl ) ; } return result ;
public class AbstractMessageHandler { /** * Handle a message . * @ param channel the channel * @ param input the message * @ param header the management protocol header * @ throws IOException */ @ Override public void handleMessage ( final Channel channel , final DataInput input , final ManagementProtocolHeader header ) throws IOException { } }
final byte type = header . getType ( ) ; if ( type == ManagementProtocol . TYPE_RESPONSE ) { // Handle response to local requests final ManagementResponseHeader response = ( ManagementResponseHeader ) header ; final ActiveRequest < ? , ? > request = requests . remove ( response . getResponseId ( ) ) ; if ( request == null ) { ProtocolLogger . CONNECTION_LOGGER . noSuchRequest ( response . getResponseId ( ) , channel ) ; safeWriteErrorResponse ( channel , header , ProtocolLogger . ROOT_LOGGER . responseHandlerNotFound ( response . getResponseId ( ) ) ) ; } else if ( response . getError ( ) != null ) { request . handleFailed ( response ) ; } else { handleRequest ( channel , input , header , request ) ; } } else { // Handle requests ( or other messages ) try { final ManagementRequestHeader requestHeader = validateRequest ( header ) ; final ManagementRequestHandler < ? , ? > handler = getRequestHandler ( requestHeader ) ; if ( handler == null ) { safeWriteErrorResponse ( channel , header , ProtocolLogger . ROOT_LOGGER . responseHandlerNotFound ( requestHeader . getBatchId ( ) ) ) ; } else { handleMessage ( channel , input , requestHeader , handler ) ; } } catch ( Exception e ) { safeWriteErrorResponse ( channel , header , e ) ; } }
public class Ci_ScRun { /** * Interprets the actual run command * @ param lp line parser * @ param mm the message manager to use for reporting errors , warnings , and infos * @ return 0 for success , non - zero otherwise */ protected int interpretRun ( LineParser lp , MessageMgr mm ) { } }
String fileName = this . getFileName ( lp ) ; String content = this . getContent ( fileName , mm ) ; if ( content == null ) { return 1 ; } mm . report ( MessageMgr . createInfoMessage ( "" ) ) ; mm . report ( MessageMgr . createInfoMessage ( "running file {}" , fileName ) ) ; for ( String s : StringUtils . split ( content , '\n' ) ) { if ( this . printProgress == true && MessageConsole . PRINT_MESSAGES ) { System . out . print ( "." ) ; } this . skbShell . parseLine ( s ) ; } this . lastScript = fileName ; return 0 ;
public class Speller { /** * Get the frequency value for a word form . It is taken from the first entry * with this word form . * @ param word * the word to be tested * @ return frequency value in range : 0 . . FREQ _ RANGE - 1 ( 0 : less frequent ) . */ public int getFrequency ( final CharSequence word ) { } }
if ( ! dictionaryMetadata . isFrequencyIncluded ( ) ) { return 0 ; } final byte separator = dictionaryMetadata . getSeparator ( ) ; try { byteBuffer = charSequenceToBytes ( word ) ; } catch ( UnmappableInputException e ) { return 0 ; } final MatchResult match = matcher . match ( matchResult , byteBuffer . array ( ) , 0 , byteBuffer . remaining ( ) , rootNode ) ; if ( match . kind == SEQUENCE_IS_A_PREFIX ) { final int arc = fsa . getArc ( match . node , separator ) ; if ( arc != 0 && ! fsa . isArcFinal ( arc ) ) { finalStatesIterator . restartFrom ( fsa . getEndNode ( arc ) ) ; if ( finalStatesIterator . hasNext ( ) ) { final ByteBuffer bb = finalStatesIterator . next ( ) ; final byte [ ] ba = bb . array ( ) ; final int bbSize = bb . remaining ( ) ; // the last byte contains the frequency after a separator return ba [ bbSize - 1 ] - FIRST_RANGE_CODE ; } } } return 0 ;
public class LaClassificationUtil { protected static OptionalThing < Classification > nativeFindByCode ( Class < ? > cdefType , Object code ) { } }
assertArgumentNotNull ( "cdefType" , cdefType ) ; assertArgumentNotNull ( "code" , code ) ; final BeanDesc beanDesc = BeanDescFactory . getBeanDesc ( cdefType ) ; final String methodName = "of" ; final Method method ; try { method = beanDesc . getMethod ( methodName , new Class < ? > [ ] { Object . class } ) ; } catch ( BeanMethodNotFoundException e ) { String msg = "Failed to get the method " + methodName + "() of the classification type: " + cdefType ; throw new ClassificationFindByCodeMethodNotFoundException ( msg , e ) ; } @ SuppressWarnings ( "unchecked" ) final OptionalThing < Classification > opt = ( OptionalThing < Classification > ) DfReflectionUtil . invokeStatic ( method , new Object [ ] { code } ) ; return opt ;
public class StoredChannel { /** * Stores this notification channel in the given notification channel data store . * It is important that this method be called before the watch HTTP request is made in case the * notification is received before the watch HTTP response is received . * @ param dataStore notification channel data store */ public StoredChannel store ( DataStore < StoredChannel > dataStore ) throws IOException { } }
lock . lock ( ) ; try { dataStore . set ( getId ( ) , this ) ; return this ; } finally { lock . unlock ( ) ; }
public class QueryParamProcessor { /** * < p > Accepts the { @ link InvocationContext } along with an { @ link HttpRequestBase } and creates a * < a href = " http : / / en . wikipedia . org / wiki / Query _ string " > query string < / a > using arguments annotated * with @ { @ link QueryParam } and @ { @ link QueryParams } ; which is subsequently appended to the URI . < / p > * < p > See { @ link AbstractRequestProcessor # process ( InvocationContext , HttpRequestBase ) } . < / p > * @ param context * the { @ link InvocationContext } which is used to discover annotated query parameters * < br > < br > * @ param request * prefers an instance of { @ link HttpGet } so as to conform with HTTP 1.1 ; however , other * request types will be entertained to allow compliance with unusual endpoint definitions * < br > < br > * @ return the same instance of { @ link HttpRequestBase } which was given for processing query parameters * < br > < br > * @ throws RequestProcessorException * if the creation of a query string failed due to an unrecoverable errorS * < br > < br > * @ since 1.3.0 */ @ Override protected HttpRequestBase process ( InvocationContext context , HttpRequestBase request ) { } }
try { URIBuilder uriBuilder = new URIBuilder ( request . getURI ( ) ) ; // add static name and value pairs List < Param > constantQueryParams = RequestUtils . findStaticQueryParams ( context ) ; for ( Param param : constantQueryParams ) { uriBuilder . setParameter ( param . name ( ) , param . value ( ) ) ; } // add individual name and value pairs List < Entry < QueryParam , Object > > queryParams = Metadata . onParams ( QueryParam . class , context ) ; for ( Entry < QueryParam , Object > entry : queryParams ) { String name = entry . getKey ( ) . value ( ) ; Object value = entry . getValue ( ) ; if ( ! ( value instanceof CharSequence ) ) { StringBuilder errorContext = new StringBuilder ( ) . append ( "Query parameters can only be of type " ) . append ( CharSequence . class . getName ( ) ) . append ( ". Please consider implementing CharSequence " ) . append ( "and providing a meaningful toString() representation for the " ) . append ( "<name> of the query parameter. " ) ; throw new RequestProcessorException ( new IllegalArgumentException ( errorContext . toString ( ) ) ) ; } uriBuilder . setParameter ( name , ( ( CharSequence ) value ) . toString ( ) ) ; } // add batch name and value pairs ( along with any static params ) List < Entry < QueryParams , Object > > queryParamMaps = Metadata . onParams ( QueryParams . class , context ) ; for ( Entry < QueryParams , Object > entry : queryParamMaps ) { Param [ ] constantParams = entry . getKey ( ) . value ( ) ; if ( constantParams != null && constantParams . length > 0 ) { for ( Param param : constantParams ) { uriBuilder . setParameter ( param . name ( ) , param . value ( ) ) ; } } Object map = entry . getValue ( ) ; if ( ! ( map instanceof Map ) ) { StringBuilder errorContext = new StringBuilder ( ) . append ( "@QueryParams can only be applied on <java.util.Map>s. " ) . append ( "Please refactor the method to provide a Map of name and value pairs. " ) ; throw new RequestProcessorException ( new IllegalArgumentException ( errorContext . toString ( ) ) ) ; } Map < ? , ? > nameAndValues = ( Map < ? , ? > ) map ; for ( Entry < ? , ? > nameAndValue : nameAndValues . entrySet ( ) ) { Object name = nameAndValue . getKey ( ) ; Object value = nameAndValue . getValue ( ) ; if ( ! ( name instanceof CharSequence && ( value instanceof CharSequence || value instanceof Collection ) ) ) { StringBuilder errorContext = new StringBuilder ( ) . append ( "The <java.util.Map> identified by @QueryParams can only contain mappings of type " ) . append ( "<java.lang.CharSequence, java.lang.CharSequence> or " ) . append ( "<java.lang.CharSequence, java.util.Collection<? extends CharSequence>>" ) ; throw new RequestProcessorException ( new IllegalArgumentException ( errorContext . toString ( ) ) ) ; } if ( value instanceof CharSequence ) { uriBuilder . addParameter ( ( ( CharSequence ) name ) . toString ( ) , ( ( CharSequence ) value ) . toString ( ) ) ; } else { // add multi - valued query params Collection < ? > multivalues = ( Collection < ? > ) value ; for ( Object multivalue : multivalues ) { if ( ! ( multivalue instanceof CharSequence ) ) { StringBuilder errorContext = new StringBuilder ( ) . append ( "Values for the <java.util.Map> identified by @QueryParams can only contain collections " ) . append ( "of type java.util.Collection<? extends CharSequence>" ) ; throw new RequestProcessorException ( new IllegalArgumentException ( errorContext . toString ( ) ) ) ; } uriBuilder . addParameter ( ( ( CharSequence ) name ) . toString ( ) , ( ( CharSequence ) multivalue ) . toString ( ) ) ; } } } } request . setURI ( uriBuilder . build ( ) ) ; return request ; } catch ( Exception e ) { throw ( e instanceof RequestProcessorException ) ? ( RequestProcessorException ) e : new RequestProcessorException ( context , getClass ( ) , e ) ; }
public class ErrorFactory { /** * Creates a SQLConsumerException object . * @ param errorId * reference to the error identifier * @ param message * additional message * @ return SQLConsumerException */ public static SQLConsumerException createSQLConsumerException ( final ErrorKeys errorId , final String message ) { } }
return new SQLConsumerException ( errorId . toString ( ) + ":\r\n" + message ) ;
public class StylesheetHandler { /** * Receive notification of the end of the document . * @ see org . xml . sax . ContentHandler # endDocument * @ throws org . xml . sax . SAXException Any SAX exception , possibly * wrapping another exception . */ public void endDocument ( ) throws org . xml . sax . SAXException { } }
try { if ( null != getStylesheetRoot ( ) ) { if ( 0 == m_stylesheetLevel ) getStylesheetRoot ( ) . recompose ( ) ; } else throw new TransformerException ( XSLMessages . createMessage ( XSLTErrorResources . ER_NO_STYLESHEETROOT , null ) ) ; // " Did not find the stylesheet root ! " ) ; XSLTElementProcessor elemProcessor = getCurrentProcessor ( ) ; if ( null != elemProcessor ) elemProcessor . startNonText ( this ) ; m_stylesheetLevel -- ; popSpaceHandling ( ) ; // WARNING : This test works only as long as stylesheets are parsed // more or less recursively . If we switch to an iterative " work - list " // model , this will become true prematurely . In that case , // isStylesheetParsingComplete ( ) will have to be adjusted to be aware // of the worklist . m_parsingComplete = ( m_stylesheetLevel < 0 ) ; } catch ( TransformerException te ) { throw new org . xml . sax . SAXException ( te ) ; }
public class DialogRequestAPDUImpl { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . tcap . asn . Encodable # encode ( org . mobicents . protocols . asn . AsnOutputStream ) */ public void encode ( AsnOutputStream aos ) throws EncodeException { } }
if ( acn == null ) throw new EncodeException ( "Error encoding DialogRequestAPDU: Application Context Name must not be null" ) ; try { aos . writeTag ( Tag . CLASS_APPLICATION , false , _TAG_REQUEST ) ; int pos = aos . StartContentDefiniteLength ( ) ; if ( ! doNotSendProtocolVersion ) { this . protocolVersion = new ProtocolVersionImpl ( ) ; this . protocolVersion . encode ( aos ) ; } this . acn . encode ( aos ) ; if ( ui != null ) ui . encode ( aos ) ; aos . FinalizeContent ( pos ) ; } catch ( AsnException e ) { throw new EncodeException ( "IOException while encoding DialogRequestAPDU: " + e . getMessage ( ) , e ) ; }
public class ADPayloadParser { /** * Parse a byte sequence as a list of AD structures . * @ param payload * A byte array containing of AD structures . * @ return * A list of parsed AD structures . If { @ code payload } * is { @ code null } , this method returns { @ code null } . */ public List < ADStructure > parse ( byte [ ] payload ) { } }
if ( payload == null ) { return null ; } return parse ( payload , 0 , payload . length ) ;
public class KeyUtil { /** * 从KeyStore中获取私钥公钥 * @ param type 类型 * @ param in { @ link InputStream } 如果想从文件读取 . keystore文件 , 使用 { @ link FileUtil # getInputStream ( java . io . File ) } 读取 * @ param password 密码 * @ param alias 别名 * @ return { @ link KeyPair } * @ since 4.4.1 */ public static KeyPair getKeyPair ( String type , InputStream in , char [ ] password , String alias ) { } }
final KeyStore keyStore = readKeyStore ( type , in , password ) ; return getKeyPair ( keyStore , password , alias ) ;
public class TextUtils { /** * Unescape the input string by removing the escape char for allowed chars * @ param input input string * @ param echar escape char * @ param allowEscaped all chars that can be escaped by the escape char * @ param delimiter all chars that indicate parsing should stop * @ return partial unescape result */ public static Partial unescape ( String input , char echar , char [ ] allowEscaped , char [ ] delimiter ) { } }
StringBuilder component = new StringBuilder ( ) ; boolean escaped = false ; Character doneDelimiter = null ; boolean done = false ; String allowed = String . valueOf ( allowEscaped != null ? allowEscaped : new char [ 0 ] ) + echar + String . valueOf ( delimiter != null ? delimiter : new char [ 0 ] ) ; char [ ] array = input . toCharArray ( ) ; int i ; for ( i = 0 ; i < array . length && ! done ; i ++ ) { char c = array [ i ] ; if ( c == echar ) { if ( escaped ) { component . append ( echar ) ; escaped = false ; } else { escaped = true ; } } else if ( allowed . indexOf ( c ) >= 0 ) { if ( escaped ) { component . append ( c ) ; escaped = false ; } else { boolean delimFound = false ; if ( null != delimiter ) { for ( final char aDelimiter : delimiter ) { if ( c == aDelimiter ) { delimFound = true ; doneDelimiter = aDelimiter ; done = true ; break ; } } } if ( ! delimFound ) { // append component . append ( c ) ; } } } else { if ( escaped ) { component . append ( echar ) ; escaped = false ; } component . append ( c ) ; } } String rest = i <= array . length - 1 ? new String ( array , i , array . length - i ) : null ; return new Partial ( component . toString ( ) , doneDelimiter , rest ) ;
public class CompletionStages { /** * Returns a CompletableStage that completes when both of the provides CompletionStages complete . This method * may choose to return either of the argument if the other is complete or a new instance completely . * @ param first the first CompletionStage * @ param second the second CompletionStage * @ return a CompletionStage that is complete when both of the given CompletionStages complete */ public static CompletionStage < Void > allOf ( CompletionStage < Void > first , CompletionStage < Void > second ) { } }
if ( ! isCompletedSuccessfully ( first ) ) { if ( isCompletedSuccessfully ( second ) ) { return first ; } else { return CompletionStages . aggregateCompletionStage ( ) . dependsOn ( first ) . dependsOn ( second ) . freeze ( ) ; } } return second ;
public class XCasePartImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case XbasePackage . XCASE_PART__CASE : setCase ( ( XExpression ) newValue ) ; return ; case XbasePackage . XCASE_PART__THEN : setThen ( ( XExpression ) newValue ) ; return ; case XbasePackage . XCASE_PART__TYPE_GUARD : setTypeGuard ( ( JvmTypeReference ) newValue ) ; return ; case XbasePackage . XCASE_PART__FALL_THROUGH : setFallThrough ( ( Boolean ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class ProbeSender { /** * This method will take the given probe to send and then chop it up into * smaller probes that will fit under the maximum packet size specified by the * transport . This is important because Argo wants the UDP packets to not get * chopped up by the network routers of at all possible . This makes the * overall reliability of the protocol a little higher . * @ param probe the offered probe instance * @ return the list of probes the original one was split into ( might be the * same as the original probe ) * @ throws ProbeSenderException if there was some issue creating the xml * @ throws JAXBException if there was some issue creating the xml * @ throws UnsupportedPayloadType this should never happen in this method * @ throws MalformedURLException this should never happen in this method */ private List < Probe > splitProbe ( Probe probe ) throws ProbeSenderException , JAXBException , MalformedURLException , UnsupportedPayloadType { } }
List < Probe > actualProbeList = new ArrayList < Probe > ( ) ; int maxPayloadSize = this . probeTransport . maxPayloadSize ( ) ; LinkedList < ProbeIdEntry > combinedList = probe . getCombinedIdentifierList ( ) ; // use a strategy to split up the probe into biggest possible chunks // all respondTo address must be included - if that ' s a problem then throw // an exception - the user will need to do some thinking . // start by taking one siid or scid off put it into a temp probe , check the // payload size of the probe and repeat until target probe is right size . // put the target probe in the list , make the temp probe the target probe // and start the process again . // Not sure how to do this with wireline compression involved . if ( probe . asXML ( ) . length ( ) < maxPayloadSize ) { actualProbeList . add ( probe ) ; } else { Probe frame = Probe . frameProbeFrom ( probe ) ; Probe splitProbe = new Probe ( frame ) ; int payloadLength = splitProbe . asXML ( ) . length ( ) ; ProbeIdEntry nextId = combinedList . peek ( ) ; if ( payloadLength + nextId . getId ( ) . length ( ) + 40 >= maxPayloadSize ) { throw new ProbeSenderException ( "Basic frame violates maxPayloadSize of transport. Likely due to too many respondTo address." ) ; } while ( ! combinedList . isEmpty ( ) ) { payloadLength = splitProbe . asXML ( ) . length ( ) ; nextId = combinedList . peek ( ) ; if ( payloadLength + nextId . getId ( ) . length ( ) + 40 >= maxPayloadSize ) { actualProbeList . add ( splitProbe ) ; splitProbe = new Probe ( frame ) ; } ProbeIdEntry id = combinedList . pop ( ) ; switch ( id . getType ( ) ) { case "scid" : splitProbe . addServiceContractID ( id . getId ( ) ) ; break ; case "siid" : splitProbe . addServiceInstanceID ( id . getId ( ) ) ; break ; default : break ; } } actualProbeList . add ( splitProbe ) ; } return actualProbeList ;
public class ResidueGroup { /** * Determine if two Residuegroups ( maximally connected components of the * alignment Graph ) are compatible , based in the following criterion : * < pre > * Two maximally connected components of the self - alignment Graph are * compatible if they can be combined in a consistent multiple alignment * of repeats , i . e . there exists one residue in c1 between each sorted * pair of residues in c2. * < / pre > * Compatibility is an intransitive relation , which means that for three * ResidueGroups { A , B , C } , if A is compatible with B and B is compatible with * C , then A is not necessarily compatible with C . * @ param c2 * second maximally connected component * @ return true if compatible , false otherwise */ public boolean isCompatible ( ResidueGroup other ) { } }
// Same order needed is necessary if ( this . order ( ) != other . order ( ) ) return false ; // Use the method of the smallest ResidueGroup if ( this . residues . get ( 0 ) > other . residues . get ( 0 ) ) return other . isCompatible ( this ) ; // Check for intercalation of residues for ( int i = 0 ; i < order ( ) - 1 ; i ++ ) { if ( other . residues . get ( i ) > residues . get ( i + 1 ) ) return false ; if ( residues . get ( i ) > other . residues . get ( i + 1 ) ) return false ; } return true ;
public class PackageIndexWriter { /** * Adds the tag information as provided in the file specified by the * " - overview " option on the command line . * @ param body the documentation tree to which the overview will be added */ protected void addOverview ( Content body ) throws IOException { } }
HtmlTree div = new HtmlTree ( HtmlTag . DIV ) ; div . addStyle ( HtmlStyle . contentContainer ) ; addOverviewComment ( div ) ; addTagsInfo ( root , div ) ; body . addContent ( div ) ;
public class StandardBullhornData { /** * { @ inheritDoc } */ @ Override public < C extends CrudResponse , T extends AssociationEntity > C associateWithEntity ( Class < T > type , Integer entityId , AssociationField < T , ? extends BullhornEntity > associationName , Set < Integer > associationIds ) { } }
return this . handleAssociateWithEntity ( type , entityId , associationName , associationIds ) ;
public class Tracy { /** * before ( ) and after ( ) will capture timing information and hostname in a TracyEvent . < br > * annotate ( ) allows capturing other information you want to see in TracyEvent ( e . g . bytesReceived , bytesSent , etc ) * for the TracyEvent for which you last called before ( ) for * @ param keyValueSequence is the sequence key , value strings you want on the TracyEvent * ( e . g . annotate ( " bytesSent " , " 103 " , " bytesReceived " , " 15432 " ) */ public static void annotate ( String ... keyValueSequence ) { } }
TracyThreadContext ctx = threadContext . get ( ) ; if ( isValidContext ( ctx ) ) { ctx . annotate ( keyValueSequence ) ; }
public class ApiOvhDedicatedserver { /** * Alter this object properties * REST : PUT / dedicated / server / { serviceName } / serviceMonitoring / { monitoringId } / alert / email / { alertId } * @ param body [ required ] New object properties * @ param serviceName [ required ] The internal name of your dedicated server * @ param monitoringId [ required ] This monitoring id * @ param alertId [ required ] This monitoring id */ public void serviceName_serviceMonitoring_monitoringId_alert_email_alertId_PUT ( String serviceName , Long monitoringId , Long alertId , OvhEmailAlert body ) throws IOException { } }
String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}" ; StringBuilder sb = path ( qPath , serviceName , monitoringId , alertId ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class CompactIntListUtil { /** * Removes the value at the specified index . A new array will be * created containing all other elements , except the specified * element , in the order they existed in the original list . * @ return the new array minus the specified element . */ public static int [ ] removeAt ( int [ ] list , int index ) { } }
// this will NPE if the bastards passed a null list , which is how // we ' ll let them know not to do that int nlength = list . length - 1 ; // create a new array minus the removed element int [ ] nlist = new int [ nlength ] ; System . arraycopy ( list , 0 , nlist , 0 , index ) ; System . arraycopy ( list , index + 1 , nlist , index , nlength - index ) ; return nlist ;
public class MoviePosterFragment { /** * Override method used to initialize the fragment . */ @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } }
View view = inflater . inflate ( R . layout . fragment_movie_poster , container , false ) ; ButterKnife . inject ( this , view ) ; Picasso . with ( getActivity ( ) ) . load ( videoPosterThumbnail ) . placeholder ( R . drawable . xmen_placeholder ) . into ( thumbnailImageView ) ; return view ;
public class GatewayTimeout { /** * Returns a static GatewayTimeout instance and set the { @ link # payload } thread local * with error code and cause specified . * When calling the instance on { @ link # getMessage ( ) } method , it will return whatever * stored in the { @ link # payload } thread local * @ param cause the cause * @ param errorCode app defined error code * @ return a static GatewayTimeout instance as described above */ public static GatewayTimeout of ( int errorCode , Throwable cause ) { } }
if ( _localizedErrorMsg ( ) ) { return of ( errorCode , cause , defaultMessage ( GATEWAY_TIMEOUT ) ) ; } else { touchPayload ( ) . errorCode ( errorCode ) . cause ( cause ) ; return _INSTANCE ; }
public class StandardRequestMapper { /** * Loads mapping values . * @ throws ConfigurationException if no properties section exists where mapping definition files are specified */ public void setProperties ( Properties properties ) throws ConfigurationException { } }
// initialRequest = application . getCurrentRequest ( ) ; autoReload = Boolean . valueOf ( properties . getProperty ( "autoreload" , "true" ) ) ; defaultMappingName = properties . getProperty ( "defaultmapping" , defaultMappingName ) ; /* strict = section . getValue ( " strict " , new GenericValue ( strict ) , " abort mapping loading on errors " ) . toBoolean ( ) . booleanValue ( ) ; Environment . System . out . println ( " checking mapping strictly : " + strict ) ; */ mappingFilesMap = PropertiesSupport . getSubsection ( properties , "mapping" ) ;
public class ProviderOperationsInner { /** * Result of the request to list REST API operations . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; OperationMetadataInner & gt ; object */ public Observable < Page < OperationMetadataInner > > listAsync ( ) { } }
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < OperationMetadataInner > > , Page < OperationMetadataInner > > ( ) { @ Override public Page < OperationMetadataInner > call ( ServiceResponse < Page < OperationMetadataInner > > response ) { return response . body ( ) ; } } ) ;
public class SarlCompiler { /** * Log an internal error but do not fail . * @ param exception the exception to log . */ protected void logInternalError ( Throwable exception ) { } }
if ( exception != null && this . log . isLoggable ( Level . FINEST ) ) { this . log . log ( Level . FINEST , Messages . SARLJvmModelInferrer_0 , exception ) ; }
public class PackageProcessor { /** * Utility method . Given a line from a stack trace , like * " at com . ibm . ws . kernel . boot . Launcher . configAndLaunchPlatform ( Launcher . java : 311 ) " * work out the package name ( " com . ibm . ws . kernel . boot " ) . */ public static String extractPackageFromStackTraceLine ( String txt ) { } }
String packageName = null ; // Look for character classes mixed with dots , then a dot , then a class name ( which could include dollar signs ) , then a dot , then a method name and other stuff like the file name Pattern regexp = Pattern . compile ( "\tat ([\\w\\.]*)\\.[\\w\\$]+\\.[<>\\w]+\\(.*" ) ; Matcher matcher = regexp . matcher ( txt ) ; if ( matcher . matches ( ) ) { packageName = matcher . group ( 1 ) ; } return packageName ;
public class Subscriber { /** * Constructs a new { @ link Builder } . * @ param subscription Cloud Pub / Sub subscription to bind the subscriber to * @ param receiver an implementation of { @ link MessageReceiver } used to process the received * messages */ public static Builder newBuilder ( ProjectSubscriptionName subscription , MessageReceiver receiver ) { } }
return newBuilder ( subscription . toString ( ) , receiver ) ;
public class ParseContext { /** * Adds a parsed date to this parse context so its timezone can be applied * to it after the iCalendar object has been parsed ( if it has one ) . * @ param icalDate the parsed date * @ param property the property that the date value belongs to * @ param parameters the property ' s parameters */ public void addDate ( ICalDate icalDate , ICalProperty property , ICalParameters parameters ) { } }
if ( ! icalDate . hasTime ( ) ) { // dates don ' t have timezones return ; } if ( icalDate . getRawComponents ( ) . isUtc ( ) ) { // it ' s a UTC date , so it was already parsed under the correct timezone return ; } // TODO handle UTC offsets within the date strings ( not part of iCal standard ) String tzid = parameters . getTimezoneId ( ) ; if ( tzid == null ) { addFloatingDate ( property , icalDate ) ; } else { addTimezonedDate ( tzid , property , icalDate ) ; }
public class DefaultGroovyMethods { /** * Iterate over each element of the list in the reverse order . * < pre class = " groovyTestCase " > def result = [ ] * [ 1,2,3 ] . reverseEach { result & lt ; & lt ; it } * assert result = = [ 3,2,1 ] < / pre > * @ param self a List * @ param closure a closure to which each item is passed . * @ return the original list * @ since 1.5.0 */ public static < T > List < T > reverseEach ( List < T > self , @ ClosureParams ( FirstParam . FirstGenericType . class ) Closure closure ) { } }
each ( new ReverseListIterator < T > ( self ) , closure ) ; return self ;
public class DatabaseDAODefaultImpl { public void put_attribute_alias ( Database database , String attname , String aliasname ) throws DevFailed { } }
String [ ] array = new String [ 2 ] ; array [ 0 ] = attname ; array [ 1 ] = aliasname ; DeviceData argIn = new DeviceData ( ) ; argIn . insert ( array ) ; command_inout ( database , "DbPutAttributeAlias" , argIn ) ;
public class Readability { /** * Scales the content score for an Element with a factor of scale . * @ param node * @ param scale * @ return */ private static Element scaleContentScore ( Element node , float scale ) { } }
int contentScore = getContentScore ( node ) ; contentScore *= scale ; node . attr ( CONTENT_SCORE , Integer . toString ( contentScore ) ) ; return node ;
public class PreviousEngine { protected void packInfo ( TemplatePack templatePack , String message ) { } }
log . info ( "[" + templatePack . getName ( ) + "][" + message + "]" ) ;
public class MAPDialogLsmImpl { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . map . api . service . lsm . MAPDialogLsm # addSendRoutingInforForLCSResponseIndication * ( org . restcomm . protocols . ss7 . map . api . service . lsm . SubscriberIdentity , * org . restcomm . protocols . ss7 . map . api . service . lsm . LCSLocationInfo , * org . restcomm . protocols . ss7 . map . api . primitives . MAPExtensionContainer , byte [ ] , byte [ ] , byte [ ] , byte [ ] ) */ public void addSendRoutingInfoForLCSResponse ( long invokeId , SubscriberIdentity targetMS , LCSLocationInfo lcsLocationInfo , MAPExtensionContainer extensionContainer , GSNAddress vgmlcAddress , GSNAddress hGmlcAddress , GSNAddress pprAddress , GSNAddress additionalVGmlcAddress ) throws MAPException { } }
if ( targetMS == null || lcsLocationInfo == null ) { throw new MAPException ( "Mandatroy parameters targetMS or lcsLocationInfo cannot be null" ) ; } if ( ( this . appCntx . getApplicationContextName ( ) != MAPApplicationContextName . locationSvcGatewayContext ) || this . appCntx . getApplicationContextVersion ( ) != MAPApplicationContextVersion . version3 ) throw new MAPException ( "Bad application context name for addSendRoutingInfoForLCSResponse: must be locationSvcGatewayContext_V3" ) ; ReturnResultLast resultLast = this . mapProviderImpl . getTCAPProvider ( ) . getComponentPrimitiveFactory ( ) . createTCResultLastRequest ( ) ; resultLast . setInvokeId ( invokeId ) ; // Operation Code OperationCode oc = this . mapProviderImpl . getTCAPProvider ( ) . getComponentPrimitiveFactory ( ) . createOperationCode ( ) ; oc . setLocalOperationCode ( ( long ) MAPOperationCode . sendRoutingInfoForLCS ) ; resultLast . setOperationCode ( oc ) ; SendRoutingInfoForLCSResponseImpl resInd = new SendRoutingInfoForLCSResponseImpl ( targetMS , lcsLocationInfo , extensionContainer , vgmlcAddress , hGmlcAddress , pprAddress , additionalVGmlcAddress ) ; AsnOutputStream asnOs = new AsnOutputStream ( ) ; resInd . encodeData ( asnOs ) ; Parameter p = this . mapProviderImpl . getTCAPProvider ( ) . getComponentPrimitiveFactory ( ) . createParameter ( ) ; p . setTagClass ( resInd . getTagClass ( ) ) ; p . setPrimitive ( resInd . getIsPrimitive ( ) ) ; p . setTag ( resInd . getTag ( ) ) ; p . setData ( asnOs . toByteArray ( ) ) ; resultLast . setParameter ( p ) ; this . sendReturnResultLastComponent ( resultLast ) ;
public class TransformationUtils { /** * Scale an envelope to have a given width . * @ param original the envelope . * @ param newWidth the new width to use . * @ return the scaled envelope placed in the original lower left corner position . */ public static Envelope scaleToWidth ( Envelope original , double newWidth ) { } }
double width = original . getWidth ( ) ; double factor = newWidth / width ; double newHeight = original . getHeight ( ) * factor ; return new Envelope ( original . getMinX ( ) , original . getMinX ( ) + newWidth , original . getMinY ( ) , original . getMinY ( ) + newHeight ) ;
public class SqlEntityQueryImpl { /** * ORDER BY句を生成する * @ return ORDER BY句の文字列 */ @ SuppressWarnings ( "unchecked" ) private String getOrderByClause ( ) { } }
boolean firstFlag = true ; List < TableMetadata . Column > keys ; Map < TableMetadata . Column , SortOrder > existsSortOrders = new HashMap < > ( ) ; if ( this . sortOrders . isEmpty ( ) ) { // ソート条件の指定がない場合は主キーでソートする keys = ( List < TableMetadata . Column > ) this . tableMetadata . getKeyColumns ( ) ; for ( Column key : keys ) { existsSortOrders . put ( key , new SortOrder ( key . getCamelColumnName ( ) , Order . ASCENDING ) ) ; } } else { // ソート条件の指定がある場合は指定されたカラムでソートする keys = new ArrayList < > ( ) ; for ( SortOrder sortOrder : sortOrders ) { for ( TableMetadata . Column metaCol : this . tableMetadata . getColumns ( ) ) { if ( sortOrder . getCol ( ) . equals ( metaCol . getCamelColumnName ( ) ) ) { keys . add ( metaCol ) ; existsSortOrders . put ( metaCol , sortOrder ) ; break ; } } } } if ( ! keys . isEmpty ( ) ) { StringBuilder sql = new StringBuilder ( ) ; Dialect dialect = agent ( ) . getSqlConfig ( ) . getDialect ( ) ; sql . append ( "ORDER BY" ) . append ( System . lineSeparator ( ) ) ; firstFlag = true ; for ( final TableMetadata . Column key : keys ) { SortOrder sortOrder = existsSortOrders . get ( key ) ; sql . append ( "\t" ) ; if ( firstFlag ) { sql . append ( " " ) ; firstFlag = false ; } else { sql . append ( ", " ) ; } sql . append ( key . getColumnIdentifier ( ) ) . append ( " " ) . append ( sortOrder . getOrder ( ) . toString ( ) ) ; if ( dialect . supportsNullValuesOrdering ( ) ) { sql . append ( " " ) . append ( sortOrder . getNulls ( ) . toString ( ) ) ; } sql . append ( System . lineSeparator ( ) ) ; } return sql . toString ( ) ; } else { return "" ; }
public class Filter { /** * Removes a join property prefix from all applicable properties of this * filter . For example , consider two Storable types , Person and * Address . Person has a property " homeAddress " which joins to Address . A * Person filter might be " homeAddress . city = ? & lastName = ? " . When not * joined from " homeAddress " , it becomes " city = ? " on Address with a * remainder of " lastName = ? " on Person . * < p > The resulting remainder filter ( if any ) is always logically and ' d to * the not joined filter . In order to achieve this , the original filter is * first converted to conjunctive normal form . And as a side affect , both * the remainder and not joined filters are { @ link # bind bound } . * @ param joinProperty property to not join from * @ return not join result * @ throws IllegalArgumentException if property does not refer to a Storable */ public final NotJoined notJoinedFrom ( ChainedProperty < S > joinProperty ) { } }
if ( ! Storable . class . isAssignableFrom ( joinProperty . getType ( ) ) ) { throw new IllegalArgumentException ( "Join property type is not a Storable: " + joinProperty ) ; } return notJoinedFromAny ( joinProperty ) ;
public class BytecodeCompiler { /** * Writes the source files out to a { @ code - src . jar } . This places the soy files at the same * classpath relative location as their generated classes . Ultimately this can be used by * debuggers for source level debugging . * < p > It is a little weird that the relative locations of the generated classes are not identical * to the input source files . This is due to the disconnect between java packages and soy * namespaces . We should consider using the soy namespace directly as a java package in the * future . * @ param registry All the templates in the current compilation unit * @ param files The source files by file path * @ param sink The source to write the jar file */ public static void writeSrcJar ( SoyFileSetNode soyFileSet , ImmutableMap < String , SoyFileSupplier > files , ByteSink sink ) throws IOException { } }
try ( SoyJarFileWriter writer = new SoyJarFileWriter ( sink . openStream ( ) ) ) { for ( SoyFileNode file : soyFileSet . getChildren ( ) ) { String namespace = file . getNamespace ( ) ; String fileName = file . getFileName ( ) ; writer . writeEntry ( Names . javaFileName ( namespace , fileName ) , files . get ( file . getFilePath ( ) ) . asCharSource ( ) . asByteSource ( UTF_8 ) ) ; } }
public class UriSourceSupplier { /** * Converts { @ link String } based representation of the { @ link URI } to the actual * instance of the { @ link URI } */ public static URI toURI ( String strURI ) { } }
try { return new URI ( strURI . trim ( ) ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( e ) ; }
public class EscapeTool { /** * Properly escape a parameter map representing a query string , so that it can be safely used in an URL . Parameters * can have multiple values in which case the value in the map is either an array or a { @ link Collection } . If the * parameter name is { @ code null } ( the key is { @ code null } ) then the parameter is ignored . { @ code null } values are * serialized as an empty string . * @ param parametersMap Map representing the query string . * @ return the safe query string representing the passed parameters * @ since 5.2M1 */ public String url ( Map < String , ? > parametersMap ) { } }
StringBuilder queryStringBuilder = new StringBuilder ( ) ; for ( Map . Entry < String , ? > entry : parametersMap . entrySet ( ) ) { if ( entry . getKey ( ) == null ) { // Skip the parameter if its name is null . continue ; } String cleanKey = this . url ( entry . getKey ( ) ) ; Object mapValues = entry . getValue ( ) ; if ( mapValues != null && mapValues . getClass ( ) . isArray ( ) ) { // A parameter with multiple values . Object [ ] values = ( Object [ ] ) mapValues ; for ( Object value : values ) { addQueryStringPair ( cleanKey , value , queryStringBuilder ) ; } } else if ( mapValues != null && Collection . class . isAssignableFrom ( mapValues . getClass ( ) ) ) { // A parameter with multiple values . Collection < ? > values = ( Collection < ? > ) mapValues ; for ( Object value : values ) { addQueryStringPair ( cleanKey , value , queryStringBuilder ) ; } } else { addQueryStringPair ( cleanKey , mapValues , queryStringBuilder ) ; } } return queryStringBuilder . toString ( ) ;
public class MessageUpdater { /** * Make the request to the Twilio API to perform the update . * @ param client TwilioRestClient with which to make the request * @ return Updated Message */ @ Override @ SuppressWarnings ( "checkstyle:linelength" ) public Message update ( final TwilioRestClient client ) { } }
Request request = new Request ( HttpMethod . POST , Domains . IPMESSAGING . toString ( ) , "/v1/Services/" + this . pathServiceSid + "/Channels/" + this . pathChannelSid + "/Messages/" + this . pathSid + "" , client . getRegion ( ) ) ; addPostParams ( request ) ; Response response = client . request ( request ) ; if ( response == null ) { throw new ApiConnectionException ( "Message update failed: Unable to connect to server" ) ; } else if ( ! TwilioRestClient . SUCCESS . apply ( response . getStatusCode ( ) ) ) { RestException restException = RestException . fromJson ( response . getStream ( ) , client . getObjectMapper ( ) ) ; if ( restException == null ) { throw new ApiException ( "Server Error, no content" ) ; } throw new ApiException ( restException . getMessage ( ) , restException . getCode ( ) , restException . getMoreInfo ( ) , restException . getStatus ( ) , null ) ; } return Message . fromJson ( response . getStream ( ) , client . getObjectMapper ( ) ) ;
public class DeepRecordReader { /** * TODO check this */ private void retrieveKeys ( ) { } }
TableMetadata tableMetadata = config . fetchTableMetadata ( ) ; List < ColumnMetadata > partitionKeys = tableMetadata . getPartitionKey ( ) ; List < ColumnMetadata > clusteringKeys = tableMetadata . getClusteringColumns ( ) ; List < AbstractType < ? > > types = new ArrayList < > ( ) ; for ( ColumnMetadata key : partitionKeys ) { String columnName = key . getName ( ) ; BoundColumn boundColumn = new BoundColumn ( columnName ) ; boundColumn . validator = CellValidator . cellValidator ( key . getType ( ) ) . getAbstractType ( ) ; partitionBoundColumns . add ( boundColumn ) ; types . add ( boundColumn . validator ) ; } for ( ColumnMetadata key : clusteringKeys ) { String columnName = key . getName ( ) ; BoundColumn boundColumn = new BoundColumn ( columnName ) ; boundColumn . validator = CellValidator . cellValidator ( key . getType ( ) ) . getAbstractType ( ) ; clusterColumns . add ( boundColumn ) ; } if ( types . size ( ) > 1 ) { keyValidator = CompositeType . getInstance ( types ) ; } else if ( types . size ( ) == 1 ) { keyValidator = types . get ( 0 ) ; } else { throw new DeepGenericException ( "Cannot determine if keyvalidator is composed or not, " + "partitionKeys: " + partitionKeys ) ; }
public class Utils { /** * Discover the classname specified in the supplied bytecode and return it . * @ param classbytes the bytecode for the class * @ return the classname recovered from the bytecode */ public static String discoverClassname ( byte [ ] classbytes ) { } }
ClassReader cr = new ClassReader ( classbytes ) ; ClassnameDiscoveryVisitor v = new ClassnameDiscoveryVisitor ( ) ; cr . accept ( v , 0 ) ; return v . classname ;
public class CmsImageEditorForm { /** * Displays the provided image information . < p > * @ param imageInfo the image information * @ param imageAttributes the image attributes * @ param initialFill flag to indicate that a new image has been selected */ public void fillContent ( CmsImageInfoBean imageInfo , CmsJSONMap imageAttributes , boolean initialFill ) { } }
m_initialImageAttributes = imageAttributes ; for ( Entry < Attribute , I_CmsFormWidget > entry : m_fields . entrySet ( ) ) { String val = imageAttributes . getString ( entry . getKey ( ) . name ( ) ) ; if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( val ) ) { entry . getValue ( ) . setFormValueAsString ( val ) ; } else { if ( entry . getKey ( ) == Attribute . alt ) { entry . getValue ( ) . setFormValueAsString ( imageInfo . getProperties ( ) . get ( CmsClientProperty . PROPERTY_TITLE ) ) ; } if ( entry . getKey ( ) == Attribute . copyright ) { entry . getValue ( ) . setFormValueAsString ( imageInfo . getCopyright ( ) ) ; } if ( initialFill && ( entry . getKey ( ) == Attribute . align ) ) { entry . getValue ( ) . setFormValueAsString ( "left" ) ; } } }
public class AbstractAggregatorImpl { /** * / * ( non - Javadoc ) * @ see javax . servlet . GenericServlet # init ( javax . servlet . ServletConfig ) */ @ Override public void init ( ServletConfig servletConfig ) throws ServletException { } }
final String sourceMethod = "init" ; // $ NON - NLS - 1 $ boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( AbstractAggregatorImpl . class . getName ( ) , sourceMethod , new Object [ ] { servletConfig } ) ; } super . init ( servletConfig ) ; // Default constructor for MimetypesFileTypeMap * should * read our bundle ' s // META - INF / mime . types automatically , but some older platforms ( Domino ) // don ' t use the right class loader , so get the input stream ourselves // and pass it to the constructor . ClassLoader cld = AbstractAggregatorImpl . class . getClassLoader ( ) ; InputStream is = cld . getResourceAsStream ( "META-INF/mime.types" ) ; // $ NON - NLS - 1 $ // Initialize the type maps ( see getContentType ) fileTypeMap = new MimetypesFileTypeMap ( is ) ; fileNameMap = URLConnection . getFileNameMap ( ) ; final ServletContext context = servletConfig . getServletContext ( ) ; // Set servlet context attributes for access though the request context . setAttribute ( IAggregator . AGGREGATOR_REQATTRNAME , this ) ; try { webContentUri = AbstractAggregatorImpl . class . getClassLoader ( ) . getResource ( "WebContent" ) . toURI ( ) ; // $ NON - NLS - 1 $ } catch ( URISyntaxException e ) { throw new ServletException ( e ) ; } if ( isTraceLogging ) { log . exiting ( AbstractAggregatorImpl . class . getName ( ) , sourceMethod ) ; }
public class XPathFactoryImpl { /** * < p > Establish a default variable resolver . < / p > * < p > Any < code > XPath < / code > objects constructed from this factory will use * the specified resolver by default . < / p > * < p > A < code > NullPointerException < / code > is thrown if < code > resolver < / code > is < code > null < / code > . < / p > * @ param resolver Variable resolver . * @ throws NullPointerException If < code > resolver < / code > is * < code > null < / code > . */ public void setXPathVariableResolver ( XPathVariableResolver resolver ) { } }
// resolver cannot be null if ( resolver == null ) { String fmsg = XSLMessages . createXPATHMessage ( XPATHErrorResources . ER_NULL_XPATH_VARIABLE_RESOLVER , new Object [ ] { CLASS_NAME } ) ; throw new NullPointerException ( fmsg ) ; } xPathVariableResolver = resolver ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcVirtualElement ( ) { } }
if ( ifcVirtualElementEClass == null ) { ifcVirtualElementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 755 ) ; } return ifcVirtualElementEClass ;
public class JournalEntryContext { /** * This method covers the totally bogus Exception that is thrown by * MultiValueMap . set ( ) , and wraps it in an IllegalArgumentException , which * is more appropriate . * @ param < T > */ private < T > void storeInMap ( MultiValueMap < T > map , T key , String [ ] values ) { } }
try { map . set ( key , values ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( e ) ; }
public class ModifyDBClusterSnapshotAttributeRequest { /** * A list of DB cluster snapshot attributes to remove from the attribute specified by < code > AttributeName < / code > . * To remove authorization for other AWS accounts to copy or restore a manual DB cluster snapshot , set this list to * include one or more AWS account identifiers . To remove authorization for any AWS account to copy or restore the * DB cluster snapshot , set it to < code > all < / code > . If you specify < code > all < / code > , an AWS account whose account * ID is explicitly added to the < code > restore < / code > attribute can still copy or restore a manual DB cluster * snapshot . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setValuesToRemove ( java . util . Collection ) } or { @ link # withValuesToRemove ( java . util . Collection ) } if you want * to override the existing values . * @ param valuesToRemove * A list of DB cluster snapshot attributes to remove from the attribute specified by * < code > AttributeName < / code > . < / p > * To remove authorization for other AWS accounts to copy or restore a manual DB cluster snapshot , set this * list to include one or more AWS account identifiers . To remove authorization for any AWS account to copy * or restore the DB cluster snapshot , set it to < code > all < / code > . If you specify < code > all < / code > , an AWS * account whose account ID is explicitly added to the < code > restore < / code > attribute can still copy or * restore a manual DB cluster snapshot . * @ return Returns a reference to this object so that method calls can be chained together . */ public ModifyDBClusterSnapshotAttributeRequest withValuesToRemove ( String ... valuesToRemove ) { } }
if ( this . valuesToRemove == null ) { setValuesToRemove ( new java . util . ArrayList < String > ( valuesToRemove . length ) ) ; } for ( String ele : valuesToRemove ) { this . valuesToRemove . add ( ele ) ; } return this ;
public class BuildWidgetScore { /** * Calculate percentage of successful builds * Any build with status InProgress , Aborted is excluded from calculation * Builds with status as Success , Unstable is included as success build * @ param builds iterable build * @ return percentage of build success */ private Double fetchBuildSuccessRatio ( Iterable < Build > builds ) { } }
int totalBuilds = 0 , totalSuccess = 0 ; for ( Build build : builds ) { if ( Constants . IGNORE_STATUS . contains ( build . getBuildStatus ( ) ) ) { continue ; } totalBuilds ++ ; if ( Constants . SUCCESS_STATUS . contains ( build . getBuildStatus ( ) ) ) { totalSuccess ++ ; } } if ( totalBuilds == 0 ) { return 0.0d ; } return ( ( totalSuccess * 100 ) / ( double ) totalBuilds ) ;
public class SSLReadServiceContext { /** * This method handles calling the complete method of the callback as required by an async * read . Appropriate action is taken based on the setting of the forceQueue parameter . * If it is true , the complete callback is called on a separate thread . Otherwise it is * called right here . * @ param forceQueue * @ param inCallback */ private void handleAsyncComplete ( boolean forceQueue , TCPReadCompletedCallback inCallback ) { } }
boolean fireHere = true ; if ( forceQueue ) { // Complete must be returned on a separate thread . // Reuse queuedWork object ( performance ) , but reset the error parameters . queuedWork . setCompleteParameters ( getConnLink ( ) . getVirtualConnection ( ) , this , inCallback ) ; EventEngine events = SSLChannelProvider . getEventService ( ) ; if ( null == events ) { Exception e = new Exception ( "missing event service" ) ; FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "471" , this ) ; // fall - thru below and use callback here regardless } else { // fire an event to continue this queued work Event event = events . createEvent ( SSLEventHandler . TOPIC_QUEUED_WORK ) ; event . setProperty ( SSLEventHandler . KEY_RUNNABLE , this . queuedWork ) ; events . postEvent ( event ) ; fireHere = false ; } } if ( fireHere ) { // Call the callback right here . inCallback . complete ( getConnLink ( ) . getVirtualConnection ( ) , this ) ; }
public class Link { /** * Returns the current href as URI after expanding the links without any arguments , i . e . all optional URI * { @ link TemplateVariable } s will be dropped . If the href contains mandatory { @ link TemplateVariable } s , the URI * creation will fail with an { @ link IllegalStateException } . * @ return will never be { @ literal null } . * @ throws IllegalStateException in case the href contains mandatory URI { @ link TemplateVariable } s . */ public URI toUri ( ) { } }
try { return URI . create ( expand ( ) . getHref ( ) ) ; } catch ( IllegalArgumentException o_O ) { throw new IllegalStateException ( o_O ) ; }
public class AbstractParsedStmt { /** * Get a list of the table subqueries used by this statement . This method * may be overridden by subclasses , e . g . , insert statements have a subquery * but does not use m _ joinTree . */ public List < StmtEphemeralTableScan > getEphemeralTableScans ( ) { } }
List < StmtEphemeralTableScan > scans = new ArrayList < > ( ) ; if ( m_joinTree != null ) { m_joinTree . extractEphemeralTableQueries ( scans ) ; } return scans ;
public class Histogram_F64 { /** * Creates a new instance of this histogram which has the same " shape " and min / max values . */ public Histogram_F64 newInstance ( ) { } }
Histogram_F64 out = new Histogram_F64 ( length ) ; for ( int i = 0 ; i < length . length ; i ++ ) { out . setRange ( i , valueMin [ i ] , valueMax [ i ] ) ; } return out ;
public class FileUtil { /** * 将列表写入文件 , 追加模式 * @ param < T > 集合元素类型 * @ param list 列表 * @ param file 文件 * @ param charset 字符集 * @ return 目标文件 * @ throws IORuntimeException IO异常 * @ since 3.1.2 */ public static < T > File appendLines ( Collection < T > list , File file , String charset ) throws IORuntimeException { } }
return writeLines ( list , file , charset , true ) ;
public class InjectionProviders { /** * InjectionProvider that provides a singleton instance of type T for every * injection point that is annotated with a { @ link Named } qualifier with * value " name " . * @ param name * value of Named annotation * @ param instance * the instance to return whenever needed * @ return InjectionProvider for instance */ public static < T > InjectionProvider < T > providerForNamedInstance ( final String name , final T instance ) { } }
return new NamedInstanceInjectionProvider < T > ( name , instance ) ;
public class JacksonDBCollection { /** * calls { @ link DBCollection # remove ( com . mongodb . DBObject , com . mongodb . WriteConcern ) } with the default WriteConcern * @ param id the id of the document to remove * @ return The write result * @ throws MongoException If an error occurred */ public WriteResult < T , K > removeById ( K id ) throws MongoException { } }
return new WriteResult < T , K > ( this , dbCollection . remove ( createIdQuery ( id ) ) ) ;
public class SleepBuilder { /** * Causes the current thread to wait until the value returned by statement * is evaluated by comparer to { @ code false } , or the specified waiting time * elapses . * Condition is checked with interval . * Any { @ code InterruptedException } ' s are suppress and logged . Any * { @ code Exception } ' s thrown by callable are propagate as SystemException * @ return value returned by callable method * @ throws SystemException if callable throws exception */ public T build ( ) { } }
long start = System . currentTimeMillis ( ) ; long sleepingFor = start + timeout - System . currentTimeMillis ( ) ; T result ; try { result = statement . call ( ) ; while ( comparer . call ( result ) && 0 < sleepingFor ) { LOGGER . debug ( "Sleeping on: {}" , name ) ; LOGGER . debug ( "Wake up in: {}" , sleepingFor ) ; try { Thread . sleep ( interval ) ; } catch ( InterruptedException ex ) { LOGGER . error ( "Sleeper: " + name + " interupted!" , ex ) ; break ; } sleepingFor = start + timeout - System . currentTimeMillis ( ) ; result = statement . call ( ) ; } ; } catch ( Exception ex ) { LOGGER . error ( "Callable on sleeper: " + name + " throwed exception!" , ex ) ; throw new SystemException ( "Callable on sleeper: " + name + " throwed exception!" , ex ) ; } return result ;
public class MP3FileID3Controller { /** * Set the artist of this mp3. * @ param artist the artist of the mp3 */ public void setArtist ( String artist , int type ) { } }
if ( allow ( type & ID3V1 ) ) { id3v1 . setArtist ( artist ) ; } if ( allow ( type & ID3V2 ) ) { id3v2 . setTextFrame ( ID3v2Frames . LEAD_PERFORMERS , artist ) ; }
public class ConditionalGet { /** * - - - - - AbstractProcessor implementation - - - - - */ @ Override public Object process ( InvocableMap . Entry entry ) { } }
Object value = entry . getValue ( ) ; return condition . evaluate ( value ) ? value : null ;
public class PAXWicketServlet { public static Servlet createServlet ( final PaxWicketApplicationFactory applicationFactory ) { } }
try { Enhancer e = new Enhancer ( ) ; e . setSuperclass ( applicationFactory . getFilterClass ( ) ) ; e . setCallback ( new WicketFilterCallback ( applicationFactory ) ) ; setCombinedClassLoader ( e , applicationFactory ) ; PAXWicketServlet delegateServlet = new PAXWicketServlet ( applicationFactory , ( Filter ) e . create ( ) ) ; // PAXWicketServlet delegateServlet = new PAXWicketServlet ( applicationFactory , new WicketCustomFilter ( applicationFactory ) ) ; return new ServletCallInterceptor ( applicationFactory , delegateServlet ) ; } catch ( NullPointerException ex ) { LOGGER . error ( "Got an nullpointer while enhancing {} " , applicationFactory . getApplicationName ( ) , ex ) ; } return null ;
public class LWJGL3TypeConversions { /** * Convert primitives to GL constants . * @ param p The primitives . * @ return The resulting GL constant . */ public static int primitiveToGL ( final JCGLPrimitives p ) { } }
switch ( p ) { case PRIMITIVE_LINES : return GL11 . GL_LINES ; case PRIMITIVE_LINE_LOOP : return GL11 . GL_LINE_LOOP ; case PRIMITIVE_TRIANGLES : return GL11 . GL_TRIANGLES ; case PRIMITIVE_TRIANGLE_STRIP : return GL11 . GL_TRIANGLE_STRIP ; case PRIMITIVE_POINTS : return GL11 . GL_POINTS ; } throw new UnreachableCodeException ( ) ;
public class HLL { /** * Computes the union of HLLs and stores the result in this instance . * @ param other the other { @ link HLL } instance to union into this one . This * cannot be < code > null < / code > . */ public void union ( final HLL other ) { } }
// TODO : verify HLLs are compatible final HLLType otherType = other . getType ( ) ; if ( type . equals ( otherType ) ) { homogeneousUnion ( other ) ; return ; } else { heterogenousUnion ( other ) ; return ; }
public class ConnectionFactory { /** * Returns a reference to the H2 database file . * @ param configuration the configured settings * @ return the path to the H2 database file * @ throws IOException thrown if there is an error */ public static File getH2DataFile ( Settings configuration ) throws IOException { } }
final File dir = configuration . getH2DataDirectory ( ) ; final String fileName = configuration . getString ( Settings . KEYS . DB_FILE_NAME ) ; final File file = new File ( dir , fileName ) ; return file ;
public class LaunchNowOption { public Map < String , Object > getParameterMap ( ) { } }
// read - only return parameterMap != null ? Collections . unmodifiableMap ( parameterMap ) : Collections . emptyMap ( ) ;
public class SybaseDatabaseType { /** * < p > Overridden to create the table metadata by hand rather than using the JDBC * < code > DatabaseMetadata . getColumns ( ) < / code > method . This is because the Sybase driver fails * when the connection is an XA connection unless you allow transactional DDL in tempdb . < / p > */ public TableColumnInfo getTableColumnInfo ( Connection connection , String schema , String table ) throws SQLException { } }
if ( schema == null || schema . length ( ) == 0 ) { schema = connection . getCatalog ( ) ; } PreparedStatement stmt = connection . prepareStatement ( "SELECT name,colid,length,usertype,prec,scale,status FROM " + getFullyQualifiedDboTableName ( schema , "syscolumns" ) + " WHERE id=OBJECT_ID(?)" ) ; ResultSet results = null ; ArrayList < ColumnInfo > columns = new ArrayList < ColumnInfo > ( ) ; try { String objectName = getFullyQualifiedTableName ( schema , table ) ; stmt . setString ( 1 , objectName ) ; results = stmt . executeQuery ( ) ; while ( results . next ( ) ) { String name = results . getString ( "name" ) ; int ordinalPosition = results . getInt ( "colid" ) ; int size = results . getInt ( "length" ) ; int type = sybaseToJDBCTypes . get ( results . getInt ( "usertype" ) ) ; int precision = results . getInt ( "prec" ) ; int scale = results . getInt ( "scale" ) ; // http : / / www . sybase . com / detail ? id = 205883 # syscol - How to Read syscolumns . status boolean nullable = ( results . getInt ( "status" ) & 8 ) != 0 ; columns . add ( new ColumnInfo ( name , type , size , precision , scale , ordinalPosition , nullable ) ) ; } } finally { closeResultSet ( results , "Ignoring error whilst closing ResultSet that was used to query the DatabaseInfo" ) ; closeStatement ( stmt , "Ignoring error whilst closing PreparedStatement that was used to query the DatabaseInfo" ) ; } Collections . sort ( columns ) ; return columns . isEmpty ( ) ? null : new TableColumnInfo ( null , schema , table , columns . toArray ( new ColumnInfo [ columns . size ( ) ] ) ) ;