signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ExceptionFactory { /** * Creates an exception from an plan id and version . * @ param planId the plan id * @ param version the version id * @ return the exception */ public static final PlanVersionNotFoundException planVersionNotFoundException ( String planId , String version ) { } }
return new PlanVersionNotFoundException ( Messages . i18n . format ( "PlanVersionDoesNotExist" , planId , version ) ) ; // $ NON - NLS - 1 $
public class TransformerFactoryImpl { /** * < p > Set a feature for this < code > TransformerFactory < / code > and < code > Transformer < / code > s * or < code > Template < / code > s created by this factory . < / p > * Feature names are fully qualified { @ link java . net . URI } s . * Implementations may defi...
// feature name cannot be null if ( name == null ) { throw new NullPointerException ( XSLMessages . createMessage ( XSLTErrorResources . ER_SET_FEATURE_NULL_NAME , null ) ) ; } // secure processing ? if ( name . equals ( XMLConstants . FEATURE_SECURE_PROCESSING ) ) { m_isSecureProcessing = value ; } // This implementat...
public class RaXmlGen { /** * Output xml * @ param def definition * @ param out Writer * @ throws IOException ioException */ @ Override public void writeXmlBody ( Definition def , Writer out ) throws IOException { } }
writeConnectorVersion ( out ) ; int indent = 1 ; writeIndent ( out , indent ) ; out . write ( "<vendor-name>Red Hat Inc</vendor-name>" ) ; writeEol ( out ) ; writeIndent ( out , indent ) ; out . write ( "<eis-type>Test RA</eis-type>" ) ; writeEol ( out ) ; writeIndent ( out , indent ) ; out . write ( "<resourceadapter-...
public class InputFactory { /** * Returns an ArticleReader which reads the specified input file . * @ param archive * input file * @ return ArticleReaderInterface * @ throws ConfigurationException * if an error occurred while accessing the configuration * @ throws ArticleReaderException * if an error occu...
Reader reader = null ; switch ( archive . getType ( ) ) { case XML : reader = readXMLFile ( archive . getPath ( ) ) ; break ; case SEVENZIP : reader = decompressWith7Zip ( archive . getPath ( ) ) ; break ; case BZIP2 : reader = decompressWithBZip2 ( archive . getPath ( ) ) ; break ; default : throw ErrorFactory . creat...
public class ListUtil { /** * finds a value inside a list , case sensitive , ignore empty items * @ param list list to search * @ param value value to find * @ param delimiter delimiter of the list * @ return position in list or 0 */ public static int listFindIgnoreEmpty ( String list , String value , char deli...
if ( list == null ) return - 1 ; int len = list . length ( ) ; if ( len == 0 ) return - 1 ; int last = 0 ; int count = 0 ; for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { if ( last < i ) { if ( list . substring ( last , i ) . equals ( value ) ) return count ; count ++ ; } last = i + 1 ; }...
public class EsUtil { /** * create a new index and return its name . No alias will point to * the new index . * @ param name basis for new name * @ param mappingPath path to mapping file . * @ return name of created index . * @ throws IndexException for errors */ public String newIndex ( final String name , f...
try { final String newName = name + newIndexSuffix ( ) ; final IndicesAdminClient idx = getAdminIdx ( ) ; final CreateIndexRequestBuilder cirb = idx . prepareCreate ( newName ) ; final File f = new File ( mappingPath ) ; final byte [ ] sbBytes = Streams . copyToByteArray ( f ) ; cirb . setSource ( sbBytes ) ; final Cre...
public class Version { /** * Increments the patch version and appends the pre - release version . * @ param preRelease the pre - release version to append * @ return a new instance of the { @ code Version } class * @ throws IllegalArgumentException if the input string is { @ code NULL } or empty * @ throws Pars...
return new Version ( normal . incrementPatch ( ) , VersionParser . parsePreRelease ( preRelease ) ) ;
public class MediaBatchOperations { /** * Parses the parts core . * @ param entityInputStream * the entity input stream * @ param contentType * the content type * @ return the list * @ throws MessagingException * the messaging exception * @ throws IOException * Signals that an I / O exception has occu...
DataSource dataSource = new InputStreamDataSource ( entityInputStream , contentType ) ; MimeMultipart batch = new MimeMultipart ( dataSource ) ; MimeBodyPart batchBody = ( MimeBodyPart ) batch . getBodyPart ( 0 ) ; MimeMultipart changeSets = new MimeMultipart ( new MimePartDataSource ( batchBody ) ) ; List < DataSource...
public class Comparators { /** * Returns a comparator which can sort single or multi - dimensional arrays * of primitves or Comparables . * @ param unsigned applicable only to arrays of bytes , shorts , ints , or longs * @ return null if unsupported */ public static < T > Comparator < T > arrayComparator ( Class ...
if ( ! arrayType . isArray ( ) ) { throw new IllegalArgumentException ( ) ; } Comparator c ; TypeDesc componentType = TypeDesc . forClass ( arrayType . getComponentType ( ) ) ; switch ( componentType . getTypeCode ( ) ) { case TypeDesc . BYTE_CODE : c = unsigned ? UnsignedByteArray : SignedByteArray ; break ; case Type...
public class ARouter { /** * Launch the navigation by type * @ param service interface of service * @ param < T > return type * @ return instance of service */ public < T > T navigation ( Class < ? extends T > service ) { } }
return _ARouter . getInstance ( ) . navigation ( service ) ;
public class UpdateBuilder { /** * Adds a new mutation to the batch . */ private Mutation addMutation ( ) { } }
Preconditions . checkState ( ! committed , "Cannot modify a WriteBatch that has already been committed." ) ; Mutation mutation = new Mutation ( ) ; mutations . add ( mutation ) ; return mutation ;
public class Rectangle { /** * Enlarges the Rectangle sides individually * @ param left left enlargement * @ param top top enlargement * @ param right right enlargement * @ param bottom bottom enlargement * @ return */ public Rectangle enlarge ( double left , double top , double right , double bottom ) { } }
return new Rectangle ( this . left - left , this . top - top , this . right + right , this . bottom + bottom ) ;
public class BaseMessageRecordDesc { /** * Move the correct fields from this current record to the map . * If this method is used , is must be overidden to move the correct fields . * @ param record The record to get the data from . */ public int putRawRecordData ( Rec record ) { } }
if ( this . getNodeType ( ) == BaseMessageRecordDesc . NON_UNIQUE_NODE ) this . getMessage ( ) . createNewNode ( this . getFullKey ( null ) ) ; return super . putRawRecordData ( record ) ;
public class BeanContextServicesSupport { /** * This method is called everytime a child is removed from this context . * The implementation releases all services requested by the child . * @ see com . googlecode . openbeans . beancontext . BeanContextSupport # childJustRemovedHook ( java . lang . Object , * com ....
if ( bcsChild instanceof BCSSChild ) { releaseServicesForChild ( ( BCSSChild ) bcsChild , false ) ; }
public class Discrete { /** * Formats a vector of Pair into a string in the form * ` ( x _ 1 , y _ 1 ) . . . ( x _ n , y _ n ) ` * @ param xy is the vector of Pair * @ param prefix indicates the prefix of a Pair , e . g . , ` ( ` results in * ` ( x _ i ` * @ param innerSeparator indicates the separator betwee...
StringBuilder result = new StringBuilder ( ) ; Iterator < Pair > it = xy . iterator ( ) ; while ( it . hasNext ( ) ) { Pair pair = it . next ( ) ; result . append ( prefix ) . append ( Op . str ( pair . getX ( ) ) ) . append ( innerSeparator ) . append ( Op . str ( pair . getY ( ) ) ) . append ( suffix ) ; if ( it . ha...
public class CartItemUrl { /** * Get Resource Url for GetCartItem * @ param cartItemId Identifier of the cart item to delete . * @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to retrieve d...
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "cartItemId" , cartItemId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation...
public class SavedSettingsFile { /** * Remove a given key from the file . * @ param key Key to remove */ public void remove ( String key ) { } }
Iterator < Pair < String , ArrayList < String > > > it = store . iterator ( ) ; while ( it . hasNext ( ) ) { String thisKey = it . next ( ) . first ; if ( key . equals ( thisKey ) ) { it . remove ( ) ; break ; } }
public class WaitBuilder { /** * The HTTP condition to wait for during execution . * @ deprecated in favor of { @ link # http ( ) } */ @ Deprecated public WaitHttpConditionBuilder http ( String url ) { } }
HttpCondition condition = new HttpCondition ( ) ; condition . setUrl ( url ) ; container . setCondition ( condition ) ; this . buildAndRun ( ) ; return new WaitHttpConditionBuilder ( condition , this ) ;
public class SipCall { /** * This method is the same as the basic respondToDisconnect ( ) method except that it uses the given * parameters for the status code and reason in the response message sent out and allows the * caller to specify a message body and / or additional JAIN - SIP API message headers to add to o...
initErrorInfo ( ) ; if ( parent . sendReply ( transaction , statusCode , reasonPhrase , myTag , null , - 1 , additionalHeaders , replaceHeaders , body ) != null ) { return true ; } setReturnCode ( parent . getReturnCode ( ) ) ; setException ( parent . getException ( ) ) ; setErrorMessage ( "respondToDisconnect(JSIP hea...
public class ELJavascriptBundleTagBeanInfo { /** * ( non - Javadoc ) * @ see java . beans . SimpleBeanInfo # getPropertyDescriptors ( ) */ @ Override public PropertyDescriptor [ ] getPropertyDescriptors ( ) { } }
List < PropertyDescriptor > proplist = new ArrayList < > ( ) ; try { proplist . add ( new PropertyDescriptor ( "type" , ELJavascriptBundleTag . class , null , "setTypeExpr" ) ) ; } catch ( IntrospectionException ex ) { } try { proplist . add ( new PropertyDescriptor ( "async" , ELJavascriptBundleTag . class , null , "s...
public class Bean { /** * Constructs the bean object with dependencies resolved . * @ return bean object * @ throws Exception exception */ private T instantiateReference ( ) throws Exception { } }
final T ret = proxyClass . newInstance ( ) ; ( ( ProxyObject ) ret ) . setHandler ( javassistMethodHandler ) ; LOGGER . log ( Level . TRACE , "Uses Javassist method handler for bean [class={0}]" , beanClass . getName ( ) ) ; return ret ;
public class TiledMap { /** * Retrieve the image source property for a given object * @ param groupID * Index of a group * @ param objectID * Index of an object * @ return The image source reference or null if one isn ' t defined */ public String getObjectImage ( int groupID , int objectID ) { } }
if ( groupID >= 0 && groupID < objectGroups . size ( ) ) { ObjectGroup grp = ( ObjectGroup ) objectGroups . get ( groupID ) ; if ( objectID >= 0 && objectID < grp . objects . size ( ) ) { GroupObject object = ( GroupObject ) grp . objects . get ( objectID ) ; if ( object == null ) { return null ; } return object . imag...
public class OntRelationMention { /** * getter for domainList - gets * @ generated * @ return value of the feature */ public FSArray getDomainList ( ) { } }
if ( OntRelationMention_Type . featOkTst && ( ( OntRelationMention_Type ) jcasType ) . casFeat_domainList == null ) jcasType . jcas . throwFeatMissing ( "domainList" , "de.julielab.jules.types.OntRelationMention" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , (...
public class PhoenixReader { /** * Map from an activity code value UUID to the actual value itself , and its * sequence number . * @ param storepoint storepoint containing current project data */ private void processActivityCodes ( Storepoint storepoint ) { } }
for ( Code code : storepoint . getActivityCodes ( ) . getCode ( ) ) { int sequence = 0 ; for ( Value value : code . getValue ( ) ) { UUID uuid = getUUID ( value . getUuid ( ) , value . getName ( ) ) ; m_activityCodeValues . put ( uuid , value . getName ( ) ) ; m_activityCodeSequence . put ( uuid , Integer . valueOf ( +...
public class SRTServletResponse { /** * This method is used to prevent IllegalStateExceptions that may be thrown * because the engine attempts to report the error , but has no idea what state * the currently executing servlet has put this response into . The error reporting * will attempt to set the status code a...
// 311717 if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) // 306998.15 logger . logp ( Level . FINE , CLASS_NAME , "setIgnoreStateErrors" , " " + String . valueOf ( b ) , "[" + this + "]" ) ; _ignoreStateErrors = b ;
public class RunnerFactory { /** * Creates strict runner implementation */ public InternalRunner createStrict ( Class < ? > klass ) throws InvocationTargetException { } }
return create ( klass , new Supplier < MockitoTestListener > ( ) { public MockitoTestListener get ( ) { return new MismatchReportingTestListener ( Plugins . getMockitoLogger ( ) ) ; } } ) ;
public class CollectionUtils { /** * Like { @ link Collections # min ( java . util . Collection ) } except with a default value returned in the * case of an empty collection . */ public static < T extends Comparable < T > > T minOr ( Collection < T > values , T defaultVal ) { } }
if ( values . isEmpty ( ) ) { return defaultVal ; } else { return Collections . min ( values ) ; }
public class CharTrieIndex { /** * Creates the index tree using the accumulated documents * @ param maxLevels - Maximum depth of the tree to build * @ param minWeight - Minimum number of cursors for a node to be index using , exclusive bound * @ return this char trie index */ public CharTrieIndex index ( int maxL...
AtomicInteger numberSplit = new AtomicInteger ( 0 ) ; int depth = - 1 ; do { numberSplit . set ( 0 ) ; if ( 0 == ++ depth ) { numberSplit . incrementAndGet ( ) ; root ( ) . split ( ) ; } else { root ( ) . streamDecendents ( depth ) . forEach ( node -> { TrieNode godparent = node . godparent ( ) ; if ( node . getDepth (...
public class HttpUtil { /** * Performs an HTTP POST on the given URL . * Basic auth is used if both username and password are not null * @ param url The URL to connect to . * @ param file The file to send as MultiPartFile . * @ param username username * @ param password password * @ return The HTTP response...
return postMultiPart ( new HttpPost ( url ) , new FileBody ( file ) , new UsernamePasswordCredentials ( username , password ) , null ) ;
public class RecommendationsInner { /** * Get all recommendations for an app . * Get all recommendations for an app . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param siteName Name of the app . * @ param featured Specify & lt ; code & gt ; true & lt ; / code & gt ...
ServiceResponse < Page < RecommendationInner > > response = listRecommendedRulesForWebAppSinglePageAsync ( resourceGroupName , siteName , featured , filter ) . toBlocking ( ) . single ( ) ; return new PagedList < RecommendationInner > ( response . body ( ) ) { @ Override public Page < RecommendationInner > nextPage ( S...
public class StorableIndexSet { /** * Return true if index is unique or fully contains the members of a unique index . */ private boolean isUniqueImplied ( StorableIndex < S > candidate ) { } }
if ( candidate . isUnique ( ) ) { return true ; } if ( this . size ( ) <= 1 ) { return false ; } Set < StorableProperty < S > > candidateProps = new HashSet < StorableProperty < S > > ( ) ; for ( int i = candidate . getPropertyCount ( ) ; -- i >= 0 ; ) { candidateProps . add ( candidate . getProperty ( i ) ) ; } search...
public class AbstractSequencer { /** * Creates an event poller for this sequence that will use the supplied data provider and * gating sequences . * @ param dataProvider The data source for users of this event poller * @ param gatingSequences Sequence to be gated on . * @ return A poller that will gate on this ...
return EventPoller . newInstance ( dataProvider , this , new Sequence ( ) , cursor , gatingSequences ) ;
public class Http2ClientStreamTransportState { /** * Inspect initial headers to make sure they conform to HTTP and gRPC , returning a { @ code Status } * on failure . * @ return status with description of failure , or { @ code null } when valid */ @ Nullable private Status validateInitialMetadata ( Metadata headers...
Integer httpStatus = headers . get ( HTTP2_STATUS ) ; if ( httpStatus == null ) { return Status . INTERNAL . withDescription ( "Missing HTTP status code" ) ; } String contentType = headers . get ( GrpcUtil . CONTENT_TYPE_KEY ) ; if ( ! GrpcUtil . isGrpcContentType ( contentType ) ) { return GrpcUtil . httpStatusToGrpcS...
public class Line { /** * Configure the line * @ param start * The start point of the line * @ param end * The end point of the line */ public void set ( Vector2f start , Vector2f end ) { } }
super . pointsDirty = true ; if ( this . start == null ) { this . start = new Vector2f ( ) ; } this . start . set ( start ) ; if ( this . end == null ) { this . end = new Vector2f ( ) ; } this . end . set ( end ) ; vec = new Vector2f ( end ) ; vec . sub ( start ) ; lenSquared = vec . lengthSquared ( ) ;
public class FormulaParser { /** * Sets the internal lexer and the parser . * @ param lexer the lexer * @ param parser the parser */ void setLexerAndParser ( final Lexer lexer , final ParserWithFormula parser ) { } }
this . lexer = lexer ; this . parser = parser ; this . parser . setFormulaFactory ( this . f ) ; this . lexer . removeErrorListeners ( ) ; this . parser . removeErrorListeners ( ) ; this . parser . setErrorHandler ( new BailErrorStrategy ( ) ) ;
public class Strings { /** * removeWord . * @ param host * a { @ link java . lang . String } object . * @ param word * a { @ link java . lang . String } object . * @ return a { @ link java . lang . String } object . */ public static String removeWord ( final String host , final String word ) { } }
return removeWord ( host , word , DELIMITER ) ;
public class FSNamesystem { /** * Scan blocks in { @ link # neededReplications } and assign replication * work to data - nodes they belong to . * The number of process blocks equals either twice the number of live * data - nodes or the number of under - replicated blocks whichever is less . * @ return number of...
// stall only useful for unit tests ( see TestFileAppend4 . java ) if ( stallReplicationWork ) { return 0 ; } // Choose the blocks to be replicated List < List < BlockInfo > > blocksToReplicate = chooseUnderReplicatedBlocks ( blocksToProcess ) ; // replicate blocks return computeReplicationWorkForBlocks ( blocksToRepli...
public class DynamoDBReflector { /** * Returns whether the method given is an annotated , no - args getter of a * version attribute . */ boolean isVersionAttributeGetter ( Method getter ) { } }
synchronized ( versionAttributeGetterCache ) { if ( ! versionAttributeGetterCache . containsKey ( getter ) ) { versionAttributeGetterCache . put ( getter , getter . getName ( ) . startsWith ( "get" ) && getter . getParameterTypes ( ) . length == 0 && ReflectionUtils . getterOrFieldHasAnnotation ( getter , DynamoDBVersi...
public class Converter { /** * { @ inheritDoc } * @ return { @ code true } if the source value is an instance of our SOURCE bound and the target type is assignable * from our TARGET bound . If , the source value is an instance of the target type , returns ! * { @ link # isRejectNoop ( ) } . */ @ Override public b...
return ! ( isNoop ( convert ) && isRejectNoop ( ) ) && TypeUtils . isAssignable ( convert . getSourceType ( ) . getType ( ) , getSourceBound ( ) ) && TypeUtils . isAssignable ( getTargetBound ( ) , convert . getTargetType ( ) . getType ( ) ) ;
public class AmazonConfigClient { /** * Returns the number of AWS Config rules that are compliant and noncompliant , up to a maximum of 25 for each . * @ param getComplianceSummaryByConfigRuleRequest * @ return Result of the GetComplianceSummaryByConfigRule operation returned by the service . * @ sample AmazonCon...
request = beforeClientExecution ( request ) ; return executeGetComplianceSummaryByConfigRule ( request ) ;
public class FastThreadLocal { /** * Returns the current value for the current thread if it exists , { @ code null } otherwise . */ @ SuppressWarnings ( "unchecked" ) public final V getIfExists ( ) { } }
InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap . getIfSet ( ) ; if ( threadLocalMap != null ) { Object v = threadLocalMap . indexedVariable ( index ) ; if ( v != InternalThreadLocalMap . UNSET ) { return ( V ) v ; } } return null ;
public class Descriptor { /** * Replace all the path param serializers registered with this descriptor with the the given path param serializers . * @ param pathParamSerializers The path param serializers to replace the existing ones with . * @ return A copy of this descriptor with the new path param serializers . ...
return new Descriptor ( name , calls , pathParamSerializers , messageSerializers , serializerFactory , exceptionSerializer , autoAcl , acls , headerFilter , locatableService , circuitBreaker , topicCalls ) ;
public class DatabasesInner { /** * Resumes a database . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param databaseName The name of the databa...
return ServiceFuture . fromResponse ( beginResumeWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) , serviceCallback ) ;
public class UntagResourceRequest { /** * The keys of the tags to remove from the user pool . * @ param tagKeys * The keys of the tags to remove from the user pool . */ public void setTagKeys ( java . util . Collection < String > tagKeys ) { } }
if ( tagKeys == null ) { this . tagKeys = null ; return ; } this . tagKeys = new java . util . ArrayList < String > ( tagKeys ) ;
public class SensorsParser { /** * Invokes query ( ) to do the parsing and handles parsing errors . * @ return an array of EventRecords that holds one element that represents * the current state of the hardware sensors */ public EventRecord [ ] monitor ( ) { } }
EventRecord [ ] recs = new EventRecord [ 1 ] ; try { recs [ 0 ] = query ( null ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return recs ;
public class Segment3dfx { /** * Replies the property that is the y coordinate of the second segment point . * @ return the y2 property . */ @ Pure public DoubleProperty y2Property ( ) { } }
if ( this . p2 . y == null ) { this . p2 . y = new SimpleDoubleProperty ( this , MathFXAttributeNames . Y2 ) ; } return this . p2 . y ;
public class ImgUtil { /** * { @ link Image } 转 { @ link BufferedImage } < br > * 如果源图片的RGB模式与目标模式一致 , 则直接转换 , 否则重新绘制 * @ param image { @ link Image } * @ param imageType 目标图片类型 * @ return { @ link BufferedImage } * @ since 4.3.2 */ public static BufferedImage toBufferedImage ( Image image , String imageType ...
BufferedImage bufferedImage ; if ( false == imageType . equalsIgnoreCase ( IMAGE_TYPE_PNG ) ) { // 当目标为非PNG类图片时 , 源图片统一转换为RGB格式 if ( image instanceof BufferedImage ) { bufferedImage = ( BufferedImage ) image ; if ( BufferedImage . TYPE_INT_RGB != bufferedImage . getType ( ) ) { bufferedImage = copyImage ( image , Buffe...
public class MethodCompiler { /** * Load default value to stack depending on type * @ param type * @ throws IOException */ public void loadDefault ( TypeMirror type ) throws IOException { } }
if ( type . getKind ( ) != TypeKind . VOID ) { if ( Typ . isPrimitive ( type ) ) { tconst ( type , 0 ) ; } else { aconst_null ( ) ; } }
public class DatatypeConverter { /** * Print an earned value method . * @ param value EarnedValueMethod instance * @ return earned value method value */ public static final BigInteger printEarnedValueMethod ( EarnedValueMethod value ) { } }
return ( value == null ? BigInteger . valueOf ( EarnedValueMethod . PERCENT_COMPLETE . getValue ( ) ) : BigInteger . valueOf ( value . getValue ( ) ) ) ;
public class RedshiftDatabaseMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RedshiftDatabase redshiftDatabase , ProtocolMarshaller protocolMarshaller ) { } }
if ( redshiftDatabase == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( redshiftDatabase . getDatabaseName ( ) , DATABASENAME_BINDING ) ; protocolMarshaller . marshall ( redshiftDatabase . getClusterIdentifier ( ) , CLUSTERIDENTIFIER_BINDIN...
public class ExtensionLoader { /** * Gets the { @ code Extension } with the given name . * @ param name the name of the { @ code Extension } . * @ return the { @ code Extension } or { @ code null } if not found / enabled . * @ see # getExtension ( Class ) */ public Extension getExtension ( String name ) { } }
if ( name != null ) { for ( int i = 0 ; i < extensionList . size ( ) ; i ++ ) { Extension p = getExtension ( i ) ; if ( p . getName ( ) . equalsIgnoreCase ( name ) ) { return p ; } } } return null ;
public class ScribeIndex { /** * Registers a component scribe . * @ param scribe the scribe to register */ public void register ( ICalComponentScribe < ? extends ICalComponent > scribe ) { } }
experimentalCompByName . put ( scribe . getComponentName ( ) . toUpperCase ( ) , scribe ) ; experimentalCompByClass . put ( scribe . getComponentClass ( ) , scribe ) ;
public class Example { /** * KeysColSpecifiers get sent as Strings and returned as objects also containing a list of Frames that the col must be a member of , * so they need a custom GSON serializer . * private static class ColSpecifierSerializer implements JsonSerializer < ColSpecifierV3 > { * public JsonElement...
Jobs jobsService = retrofit . create ( Jobs . class ) ; Response < JobsV3 > jobsResponse = null ; int retries = 3 ; JobsV3 jobs = null ; do { try { jobsResponse = jobsService . fetch ( job_id ) . execute ( ) ; } catch ( IOException e ) { System . err . println ( "Caught exception: " + e ) ; } if ( ! jobsResponse . isSu...
public class QueryImpl { /** * ( non - Javadoc ) * @ see javax . persistence . Query # getParameter ( int , java . lang . Class ) */ @ Override public < T > Parameter < T > getParameter ( int paramInt , Class < T > paramClass ) { } }
onNativeCondition ( ) ; getParameters ( ) ; Parameter parameter = getParameterByOrdinal ( paramInt ) ; return onTypeCheck ( paramClass , parameter ) ;
public class Directory { /** * Indicates whether the specified tag type has been set . * @ param tagType the tag type to check for * @ return true if a value exists for the specified tag type , false if not */ @ java . lang . SuppressWarnings ( { } }
"UnnecessaryBoxing" } ) public boolean containsTag ( int tagType ) { return _tagMap . containsKey ( Integer . valueOf ( tagType ) ) ;
public class SimpleArrayMap { /** * Add a new value to the array map . * @ param key The key under which to store the value . < b > Must not be null . < / b > If * this key already exists in the array , its value will be replaced . * @ param value The value to store for the given key . * @ return Returns the ol...
final int hash ; int index ; if ( key == null ) { hash = 0 ; index = indexOfNull ( ) ; } else { hash = key . hashCode ( ) ; index = indexOf ( key , hash ) ; } if ( index >= 0 ) { index = ( index << 1 ) + 1 ; final V old = ( V ) mArray [ index ] ; mArray [ index ] = value ; return old ; } index = ~ index ; if ( mSize >=...
public class ColorValidator { /** * Validates the Pattern constraint of ' < em > Hex Color < / em > ' . * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public boolean validateHexColor_Pattern ( String hexColor , DiagnosticChain diagnostics , Map < Object , Object > context ) {...
return validatePattern ( ColorPackage . Literals . HEX_COLOR , hexColor , HEX_COLOR__PATTERN__VALUES , diagnostics , context ) ;
public class CommandLine { /** * Adds the specified environment variables . * @ param environment the variables to add * @ throws IllegalArgumentException if any value given is null ( unsupported ) */ public void setEnvironmentVariables ( Map < String , String > environment ) { } }
for ( Map . Entry < String , String > entry : environment . entrySet ( ) ) { setEnvironmentVariable ( entry . getKey ( ) , entry . getValue ( ) ) ; }
public class XmlNamespaceDictionary { /** * Returns the namespace URI to use for serialization for a given namespace alias , possibly using * a predictable made - up namespace URI if the alias is not recognized . * < p > Specifically , if the namespace alias is not recognized , the namespace URI returned will be ...
String result = getUriForAlias ( alias ) ; if ( result == null ) { Preconditions . checkArgument ( ! errorOnUnknown , "unrecognized alias: %s" , alias . length ( ) == 0 ? "(default)" : alias ) ; return "http://unknown/" + alias ; } return result ;
public class LLongSupplierBuilder { /** * Builds the functional interface implementation and if previously provided calls the consumer . */ @ Nonnull public final LLongSupplier build ( ) { } }
final LLongSupplier eventuallyFinal = this . eventually ; LLongSupplier retval ; final Case < LBoolSupplier , LLongSupplier > [ ] casesArray = cases . toArray ( new Case [ cases . size ( ) ] ) ; retval = LLongSupplier . longSup ( ( ) -> { try { for ( Case < LBoolSupplier , LLongSupplier > aCase : casesArray ) { if ( aC...
public class NameNode { /** * { @ inheritDoc } */ public void merge ( String parity , String source , String codecId , int [ ] checksums ) throws IOException { } }
namesystem . merge ( parity , source , codecId , checksums ) ; myMetrics . numFilesMerged . inc ( ) ;
public class JmsJcaConnectionImpl { /** * Creates a < code > JmsJcaSession < / code > that shares the core connection * from this connection . When first called it returns the session that was * created when this connection was requested . On subsequent calls , * constructs a < code > JmsJcaConnectionRequestInfo ...
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "createSession" , new Object [ ] { Boolean . valueOf ( transacted ) } ) ; } JmsJcaSessionImpl session ; if ( connectionClosed ) { throw new IllegalStateException ( NLS . getFormattedMessage ( ( "ILLEGAL_STATE_...
public class DesignContextMenu { /** * Returns an instance of the design context menu . This is a singleton with the page scope and * is cached once created . * @ return The design context menu for the active page . */ public static DesignContextMenu getInstance ( ) { } }
Page page = ExecutionContext . getPage ( ) ; DesignContextMenu contextMenu = page . getAttribute ( DesignConstants . ATTR_DESIGN_MENU , DesignContextMenu . class ) ; if ( contextMenu == null ) { contextMenu = create ( ) ; page . setAttribute ( DesignConstants . ATTR_DESIGN_MENU , contextMenu ) ; } return contextMenu ;
public class SHE { /** * Zero ' s out memory where the key is stored . * After calling this method init ( ) needs to be called again . */ public void zeroKey ( ) { } }
for ( int i = 0 ; i < key . length ; i ++ ) { key [ i ] = 0x0 ; } for ( int i = 0 ; i < prehash . length ; i ++ ) { key [ i ] = 0x0 ; } cfg = false ;
public class TopologyAssign { /** * Backup topology assignment to ZK * todo : Do we need to do backup operation every time ? */ public void backupAssignment ( Assignment assignment , TopologyAssignEvent event ) { } }
String topologyId = event . getTopologyId ( ) ; String topologyName = event . getTopologyName ( ) ; try { StormClusterState zkClusterState = nimbusData . getStormClusterState ( ) ; // one little problem , get tasks twice when assign one topology Map < Integer , String > tasks = Cluster . get_all_task_component ( zkClus...
public class ParameterInlinePolicyMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ParameterInlinePolicy parameterInlinePolicy , ProtocolMarshaller protocolMarshaller ) { } }
if ( parameterInlinePolicy == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( parameterInlinePolicy . getPolicyText ( ) , POLICYTEXT_BINDING ) ; protocolMarshaller . marshall ( parameterInlinePolicy . getPolicyType ( ) , POLICYTYPE_BINDING )...
public class ColorPicker { /** * Allows you to suppress automatic rendering of labels . Used internally by AngularFaces , too . < P > * @ return Returns the value of the attribute , or false , if it hasn ' t been set by the JSF file . */ public boolean isRenderLabel ( ) { } }
return ( boolean ) ( Boolean ) getStateHelper ( ) . eval ( PropertyKeys . renderLabel , net . bootsfaces . component . ComponentUtils . isRenderLabelDefault ( ) ) ;
public class ApikeyManager { /** * with set for roles ( protected to be hidden in js ctrls ) */ protected String serializeNowFromMap ( @ Nullable String user , long duration , @ Nullable List < String > roles , Map < String , Object > nameAndValMap ) { } }
return serializeNowFromMap ( user , duration , toArr ( roles ) , nameAndValMap ) ;
public class WebUtilities { /** * This method is required on occasion because WebSphere Portal by default escapes " & lt ; " and " & gt ; " characters for * security reasons . * Decode any escape sequences to their original character , and return the resultant string . * Eg . " cat & amp ; amp ; dog & amp ; gt ; ...
if ( encoded == null || encoded . length ( ) == 0 || encoded . indexOf ( '&' ) == - 1 ) { return encoded ; } return DECODE . translate ( encoded ) ;
public class PathNormalizer { /** * Determines all single paths of the method result recursively . All parent class and method results are analyzed as well . * @ param methodResult The method result * @ return All single path pieces */ private static List < String > determinePaths ( final MethodResult methodResult ...
final List < String > paths = new LinkedList < > ( ) ; MethodResult currentMethod = methodResult ; while ( true ) { addNonBlank ( currentMethod . getPath ( ) , paths ) ; final ClassResult parentClass = currentMethod . getParentResource ( ) ; if ( parentClass == null ) break ; currentMethod = parentClass . getParentSubR...
public class UpdatePlanNode { /** * TODO : Members not loaded */ @ Override public void loadFromJSONObject ( JSONObject jobj , Database db ) throws JSONException { } }
super . loadFromJSONObject ( jobj , db ) ; m_updatesIndexes = jobj . getBoolean ( Members . UPDATES_INDEXES . name ( ) ) ;
public class DataSetLineageService { /** * Return the lineage inputs graph for the given tableName . * @ param tableName tableName * @ return Inputs Graph as JSON */ @ Override @ GraphTransaction public String getInputsGraph ( String tableName ) throws AtlasException { } }
LOG . info ( "Fetching lineage inputs graph for tableName={}" , tableName ) ; tableName = ParamChecker . notEmpty ( tableName , "table name" ) ; TypeUtils . Pair < String , String > typeIdPair = validateDatasetNameExists ( tableName ) ; return getInputsGraphForId ( typeIdPair . right ) ;
public class AbstractTrigger { /** * Fires the specified trigger event . < br > Calling this method is left to the sub - classes . * @ param event Trigger event to be fired . */ protected void fireTriggerEvent ( TriggerEvent event ) { } }
try { for ( TriggerListener listener : listeners ) { listener . triggerValidation ( event ) ; } } catch ( RuntimeException e ) { uncheckedExceptionHandler . handleException ( e ) ; } catch ( Error e ) { uncheckedExceptionHandler . handleError ( e ) ; }
public class JmxUtils { /** * Returns an { @ link ObjectName } for the specified object in standard * format , using the package as the domain . * @ param < T > The type of class . * @ param clazz The { @ link Class } to create an { @ link ObjectName } for . * @ return The new { @ link ObjectName } . */ public ...
final String domain = clazz . getPackage ( ) . getName ( ) ; final String className = clazz . getSimpleName ( ) ; final String objectName = domain + ":type=" + className ; LOG . debug ( "Returning object name: {}" , objectName ) ; try { return new ObjectName ( objectName ) ; } catch ( final MalformedObjectNameException...
public class CommerceNotificationTemplateUserSegmentRelUtil { /** * Returns an ordered range of all the commerce notification template user segment rels where commerceNotificationTemplateId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start ...
return getPersistence ( ) . findByCommerceNotificationTemplateId ( commerceNotificationTemplateId , start , end , orderByComparator , retrieveFromCache ) ;
public class TimeZoneNamesImpl { /** * / * ( non - Javadoc ) * @ see android . icu . text . TimeZoneNames # find ( java . lang . CharSequence , int , java . util . Set ) */ @ Override public synchronized Collection < MatchInfo > find ( CharSequence text , int start , EnumSet < NameType > nameTypes ) { } }
if ( text == null || text . length ( ) == 0 || start < 0 || start >= text . length ( ) ) { throw new IllegalArgumentException ( "bad input text or range" ) ; } NameSearchHandler handler = new NameSearchHandler ( nameTypes ) ; Collection < MatchInfo > matches ; // First try of lookup . matches = doFind ( handler , text ...
public class PrimaryBackupServerContext { /** * Unregisters message listeners . */ private void unregisterListeners ( ) { } }
protocol . unregisterExecuteHandler ( ) ; protocol . unregisterBackupHandler ( ) ; protocol . unregisterRestoreHandler ( ) ; protocol . unregisterCloseHandler ( ) ; protocol . unregisterMetadataHandler ( ) ;
public class DayPeriod { /** * / * [ deutsch ] * < p > Repr & auml ; sentiert einen fest definierten Tagesabschnitt ( am / pm / midnight / noon ) . < / p > * < p > Die Funktion kann entweder auf { @ code PlainTime } oder { @ code PlainTimestamp } angewandt werden . * Sonst wirft sie eine { @ code ChronoException ...
return new PeriodName ( true , width , outputContext ) ;
public class TargetInstanceClient { /** * Creates a TargetInstance resource in the specified project and zone using the data included in * the request . * < p > Sample code : * < pre > < code > * try ( TargetInstanceClient targetInstanceClient = TargetInstanceClient . create ( ) ) { * ProjectZoneName zone = P...
InsertTargetInstanceHttpRequest request = InsertTargetInstanceHttpRequest . newBuilder ( ) . setZone ( zone == null ? null : zone . toString ( ) ) . setTargetInstanceResource ( targetInstanceResource ) . build ( ) ; return insertTargetInstance ( request ) ;
public class RTMPClient { /** * Sets the RTMP protocol , the default is " rtmp " . If " rtmps " or " rtmpt " are required , the appropriate client type should be selected . * @ param protocol * the protocol to set * @ throws Exception */ @ Override public void setProtocol ( String protocol ) throws Exception { } ...
this . protocol = protocol ; if ( "rtmps" . equals ( protocol ) || "rtmpt" . equals ( protocol ) || "rtmpte" . equals ( protocol ) || "rtmfp" . equals ( protocol ) ) { throw new Exception ( "Unsupported protocol specified, please use the correct client for the intended protocol." ) ; }
public class MicroHessianInput { /** * Reads an arbitrary object the input stream . */ public Object readObject ( Class expectedClass ) throws IOException { } }
int tag = is . read ( ) ; switch ( tag ) { case 'N' : return null ; case 'T' : return new Boolean ( true ) ; case 'F' : return new Boolean ( false ) ; case 'I' : { int b32 = is . read ( ) ; int b24 = is . read ( ) ; int b16 = is . read ( ) ; int b8 = is . read ( ) ; return new Integer ( ( b32 << 24 ) + ( b24 << 16 ) + ...
public class RuleOrganizer { /** * This method counts how many times each data point is used in REDUCED sequitur rule ( i . e . data * point 1 appears only in R1 and R2 , the number for data point 1 is two ) . The function will get * the occurrence time for all points , and write the result into a text file named a...
// init the data structure and copy the original values SAXPointsNumber pointsNumber [ ] = new SAXPointsNumber [ ts . length ] ; for ( int i = 0 ; i < ts . length ; i ++ ) { pointsNumber [ i ] = new SAXPointsNumber ( ) ; pointsNumber [ i ] . setPointIndex ( i ) ; pointsNumber [ i ] . setPointValue ( ts [ i ] ) ; } for ...
public class ZipUtil { /** * Unpacks a ZIP stream to the given directory . * The output directory must not be a file . * @ param is * inputstream for ZIP file . * @ param outputDir * output directory ( created automatically if not found ) . * @ param mapper * call - back for renaming the entries . * @ p...
log . debug ( "Extracting {} into '{}'." , is , outputDir ) ; iterate ( is , new Unpacker ( outputDir , mapper ) , charset ) ;
public class EventStore { /** * A finder for Event objects in the EventStore * @ param criteria the { @ link org . owasp . appsensor . core . criteria . SearchCriteria } object to search by * @ param events the { @ link Event } objects to match on - supplied by subclasses * @ return a { @ link java . util . Colle...
if ( criteria == null ) { throw new IllegalArgumentException ( "criteria must be non-null" ) ; } Collection < Event > matches = new ArrayList < Event > ( ) ; for ( Event event : events ) { if ( isMatchingEvent ( criteria , event ) ) { matches . add ( event ) ; } } return matches ;
public class MathUtil { /** * Replies the min value . * @ param values are the values to scan . * @ return the min value . */ @ Pure public static float min ( float ... values ) { } }
if ( values == null || values . length == 0 ) { return Float . NaN ; } float min = values [ 0 ] ; for ( final float v : values ) { if ( v < min ) { min = v ; } } return min ;
public class ListNotebookInstanceLifecycleConfigsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListNotebookInstanceLifecycleConfigsRequest listNotebookInstanceLifecycleConfigsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listNotebookInstanceLifecycleConfigsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listNotebookInstanceLifecycleConfigsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listNotebookInstanceLi...
public class EDBConverter { /** * Tests if an EDBObject has the correct model class in which it should be converted . Returns false if the model * type is not fitting , returns true if the model type is fitting or model type is unknown . */ private boolean checkEDBObjectModelType ( EDBObject object , Class < ? > mode...
String modelClass = object . getString ( EDBConstants . MODEL_TYPE ) ; if ( modelClass == null ) { LOGGER . warn ( String . format ( "The EDBObject with the oid %s has no model type information." + "The resulting model may be a different model type than expected." , object . getOID ( ) ) ) ; } if ( modelClass != null &...
public class V1InstanceCreator { /** * Create a new iteration with a name , begin date , and end date . * @ param name The name of the iteration . * @ param schedule The schedule this iteration belongs to . * @ param beginDate The begin date or start date of this iteration . * @ param endDate The end date of th...
return iteration ( name , schedule , beginDate , endDate , null ) ;
public class XPathBuilder { /** * < p > < b > Used for finding element process ( to generate xpath address ) < / b > < / p > * < p > Result Example : < / p > * < pre > * / / * [ @ type = ' type ' ] * < / pre > * @ param type eg . ' checkbox ' or ' button ' * @ param < T > the element which calls this method...
this . type = type ; return ( T ) this ;
public class DescribeTapeRecoveryPointsResult { /** * An array of TapeRecoveryPointInfos that are available for the specified gateway . * @ return An array of TapeRecoveryPointInfos that are available for the specified gateway . */ public java . util . List < TapeRecoveryPointInfo > getTapeRecoveryPointInfos ( ) { } ...
if ( tapeRecoveryPointInfos == null ) { tapeRecoveryPointInfos = new com . amazonaws . internal . SdkInternalList < TapeRecoveryPointInfo > ( ) ; } return tapeRecoveryPointInfos ;
public class HttpTunnelPayload { /** * Write the content of this payload to the given target channel . * @ param channel the channel to write to * @ throws IOException in case of I / O errors */ public void writeTo ( WritableByteChannel channel ) throws IOException { } }
Assert . notNull ( channel , "Channel must not be null" ) ; while ( this . data . hasRemaining ( ) ) { channel . write ( this . data ) ; }
public class BaseRTMPClientHandler { /** * Dynamic streaming play method . * The following properties are supported on the play options : * < pre > * streamName : String . The name of the stream to play or the new stream to switch to . * oldStreamName : String . The name of the initial stream that needs to be s...
log . debug ( "play2 options: {}" , playOptions . toString ( ) ) ; /* { streamName = streams / new . flv , oldStreamName = streams / old . flv , start = 0 , len = - 1, offset = 12.195, transition = switch } */ // get the transition type String transition = ( String ) playOptions . get ( "transition" ) ; if ( co...
public class BaseConvertToNative { /** * Move the standard payload properties from the message to the xml . * @ param message * @ param msg */ public void setPayloadProperties ( BaseMessage message , Object msg ) { } }
MessageDataDesc messageDataDesc = message . getMessageDataDesc ( null ) ; // Top level only if ( messageDataDesc != null ) { Map < String , Class < ? > > mapPropertyNames = messageDataDesc . getPayloadPropertyNames ( null ) ; if ( mapPropertyNames != null ) { for ( String strKey : mapPropertyNames . keySet ( ) ) { Clas...
public class MetricRegistryImpl { /** * Adds the metric name to an application map . * This map is not a complete list of metrics owned by an application , * produced metrics are managed in the MetricsExtension * @ param name */ protected void addNameToApplicationMap ( String name ) { } }
String appName = getApplicationName ( ) ; // If it is a base metric , the name will be null if ( appName == null ) return ; ConcurrentLinkedQueue < String > list = applicationMap . get ( appName ) ; if ( list == null ) { ConcurrentLinkedQueue < String > newList = new ConcurrentLinkedQueue < String > ( ) ; list = applic...
public class DefaultShardManagerBuilder { /** * Adds the provided listener providers to the list of listener providers that will be used to create listeners . * On shard creation ( including shard restarts ) each provider will have the shard id applied and must return a listener , * which will be used , along all o...
Checks . noneNull ( listenerProviders , "listener providers" ) ; this . listenerProviders . addAll ( listenerProviders ) ; return this ;
public class GetPortRequest { /** * ( non - Javadoc ) * @ see * com . emc . ecs . nfsclient . rpc . RpcRequest # marshalling ( com . emc . ecs . nfsclient . * rpc . Xdr ) */ public void marshalling ( Xdr x ) { } }
super . marshalling ( x ) ; x . putInt ( _programToQuery ) ; x . putInt ( _programVersion ) ; x . putInt ( _networkProtocol ) ; x . putInt ( _port ) ;
public class GenericMapAttribute { /** * Parse the given projection . * @ param projection The projection string . * @ param longitudeFirst longitudeFirst */ public static CoordinateReferenceSystem parseProjection ( final String projection , final Boolean longitudeFirst ) { } }
try { if ( longitudeFirst == null ) { return CRS . decode ( projection ) ; } else { return CRS . decode ( projection , longitudeFirst ) ; } } catch ( NoSuchAuthorityCodeException e ) { throw new RuntimeException ( projection + " was not recognized as a crs code" , e ) ; } catch ( FactoryException e ) { throw new Runtim...
public class PollingWait { /** * Default : 30 seconds . */ public PollingWait timeoutAfter ( long timeAmount , @ Nonnull TimeUnit timeUnit ) { } }
if ( timeAmount <= 0 ) { throw new IllegalArgumentException ( "Invalid timeAmount: " + timeAmount + " -- must be greater than 0" ) ; } timeoutMillis = timeUnit . toMillis ( timeAmount ) ; return this ;
public class XAnnotationInvocationHandler { /** * Returns an object ' s invocation handler if that object is a dynamic proxy * with a handler of type AnnotationInvocationHandler . Returns null * otherwise . */ private XAnnotationInvocationHandler asOneOfUs ( Object o ) { } }
if ( Proxy . isProxyClass ( o . getClass ( ) ) ) { InvocationHandler handler = Proxy . getInvocationHandler ( o ) ; if ( handler instanceof XAnnotationInvocationHandler ) return ( XAnnotationInvocationHandler ) handler ; } return null ;
public class QueryStateMachine { /** * Created QueryStateMachines must be transitioned to terminal states to clean up resources . */ public static QueryStateMachine begin ( String query , Session session , URI self , ResourceGroupId resourceGroup , Optional < QueryType > queryType , boolean transactionControl , Transac...
return beginWithTicker ( query , session , self , resourceGroup , queryType , transactionControl , transactionManager , accessControl , executor , Ticker . systemTicker ( ) , metadata , warningCollector ) ;