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 < ...
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 o...
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 . a...
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 = p...
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 informatio...
Validator . notNull ( getEntityOptions , "getEntityOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { getEntityOptions . workspaceId ( ) , getEntityOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpU...
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 ...
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 (...
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 t...
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 hi...
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 . appe...
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 ...
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 executio...
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 IndexOutOfBoundsE...
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 ...
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...
Validator . notNull ( unregisterCallbackOptions , "unregisterCallbackOptions cannot be null" ) ; String [ ] pathSegments = { "v1/unregister_callback" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkComm...
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 , CmsCont...
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...
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 ...
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 cod...
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 ...
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 . LEA...
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...
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 ( @ Nullabl...
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 com...
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 acc...
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....
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 ( Ef...
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 > listApplicationTe...
// 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 . ap...
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...
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 == n...
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 ( cont...
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...
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 ...
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...
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 Query...
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 ind...
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 messa...
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...
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 Pro...
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 >...
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 getKeyPa...
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 par...
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 = ...
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 sec...
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 . ...
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...
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 includ...
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 m...
// 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...
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 * @ pa...
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 ...
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 [ ] removeA...
// 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 ,...
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 * @ par...
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 ...
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 > ...
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 extractPackageFromStackTra...
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 = r...
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 ( ProjectSubscriptionNa...
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...
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 = parameter...
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 ( 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...
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 ( ) != M...
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 newW...
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 k...
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...
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 lo...
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 . ...
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 { @...
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 ( ) ...
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 ( ...
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 : partiti...
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 , CmsJS...
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 ) ; } el...
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 fo...
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 ...
// 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 mor...
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 Doub...
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 ; }...
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 * call...
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 ...
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 } ...
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 IORuntimeEx...
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 neede...
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 <...
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 * ...
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 ) ;...
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 . cr...
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 UnreachableCodeEx...
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 . <...
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 = n...