signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JobExecutionPlanDagFactory { /** * The job name is derived from the { @ link ConfigurationKeys # JOB _ NAME _ KEY } config . It is assumed to be unique * across all jobs in a { @ link Dag } . * @ param jobExecutionPlan * @ return the name of the job . */ private static String getJobName ( JobExecutio...
return jobExecutionPlan . getJobSpec ( ) . getConfig ( ) . getString ( ConfigurationKeys . JOB_NAME_KEY ) ;
public class EditorModel { /** * Show next element . * @ param event the next event to show */ private void showNext ( final JRebirthEvent event ) { } }
this . timeFrame ++ ; callCommand ( ProcessEventCommand . class , WBuilder . waveData ( EditorWaves . EVENT , event ) ) ;
public class ElemLiteralResult { /** * Get an " extension - element - prefix " property . * @ see < a href = " http : / / www . w3 . org / TR / xslt # extension - element " > extension - element in XSLT Specification < / a > * @ param i Index of URI ( " extension - element - prefix " property ) to get * @ return ...
if ( null == m_ExtensionElementURIs ) throw new ArrayIndexOutOfBoundsException ( ) ; return m_ExtensionElementURIs . elementAt ( i ) ;
public class JavaCompilerUtil { /** * Returns the classpath for the compiler . */ private String buildClassPath ( ) { } }
String classPath = null ; // _ classPath ; if ( classPath != null ) { return classPath ; } if ( classPath == null && _loader instanceof DynamicClassLoader ) { classPath = ( ( DynamicClassLoader ) _loader ) . getClassPath ( ) ; } else { // if ( true | | _ loader instanceof URLClassLoader ) { StringBuilder sb = new Strin...
public class HDUtils { /** * Append a derivation level to an existing path */ public static ImmutableList < ChildNumber > append ( List < ChildNumber > path , ChildNumber childNumber ) { } }
return ImmutableList . < ChildNumber > builder ( ) . addAll ( path ) . add ( childNumber ) . build ( ) ;
public class SSLSocket { /** * / * - - - - - [ App Write ] - - - - - */ @ Override public void addWriteInterest ( ) { } }
if ( transportOut . peekOut == this ) transportOut . peekOutInterested = true ; if ( engine . isOutboundDone ( ) ) transportOut . wakeupWriter ( ) ; else { if ( selfInterests == 0 ) peerOut . addWriteInterest ( ) ; else { if ( ( selfInterests & OP_READ ) != 0 ) peerIn . addReadInterest ( ) ; if ( ( selfInterests & OP_W...
public class mps_doc_image { /** * Use this API to fetch filtered set of mps _ doc _ image resources . * set the filter parameter values in filtervalue object . */ public static mps_doc_image [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { } }
mps_doc_image obj = new mps_doc_image ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; mps_doc_image [ ] response = ( mps_doc_image [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class AopLogUtils { /** * 获取 { @ link AopLog } 注解中的描述 * @ param className 类名 : joinPoint # getTarget # getClass # getName * @ param methodName 方法名 : joinPoint # getSignature # getName * @ param args 参数数组 : joinPoint # getArgs * @ return 描述 * @ since 1.1.0 */ public static String getDescriptionNoThrow (...
try { return getDescription ( className , methodName , args ) ; } catch ( ClassNotFoundException e ) { LoggerUtils . error ( "get description from {}#{} error: {}" , className , methodName , e . getMessage ( ) ) ; return "" ; }
public class TSColumnSchema { /** * Returns true if field corresponding to fieldID is set ( has been assigned a value ) and false otherwise */ public boolean isSet ( _Fields field ) { } }
if ( field == null ) { throw new IllegalArgumentException ( ) ; } switch ( field ) { case NAME : return isSetName ( ) ; case DATA_TYPE : return isSetDataType ( ) ; case ENCODING : return isSetEncoding ( ) ; case OTHER_ARGS : return isSetOtherArgs ( ) ; } throw new IllegalStateException ( ) ;
public class Entry { /** * Implementation . */ private synchronized void lazyLoad ( ) { } }
if ( formula != null ) { // We ' ve already done this . . . return ; } try { // Obtain the Formula . . . Class < ? > c = grammar . getClassLoader ( ) . loadClass ( clazz ) ; Bootstrappable b = ( Bootstrappable ) c . newInstance ( ) ; Formula frm = b . getFormula ( ) ; // Sanity check - - refuse the formula if the class...
public class ParseUtils { /** * Get an exception reporting an unexpected XML attribute . * @ param reader the stream reader * @ param index the attribute index * @ param possibleAttributes attributes that are expected on this element * @ return the exception */ public static XMLStreamException unexpectedAttribu...
final XMLStreamException ex = ControllerLogger . ROOT_LOGGER . unexpectedAttribute ( reader . getAttributeName ( index ) , asStringList ( possibleAttributes ) , reader . getLocation ( ) ) ; return new XMLStreamValidationException ( ex . getMessage ( ) , ValidationError . from ( ex , ErrorType . UNEXPECTED_ATTRIBUTE ) ....
public class StringRecord { /** * Set the Text to range of bytes * @ param utf8 * the data to copy from * @ param start * the first position of the new string * @ param len * the number of bytes of the new string */ public void set ( final byte [ ] utf8 , final int start , final int len ) { } }
setCapacity ( len , false ) ; System . arraycopy ( utf8 , start , bytes , 0 , len ) ; this . length = len ; this . hash = 0 ;
public class CredHubRestTemplateFactory { /** * Create a { @ link RestTemplate } configured for communication with a CredHub server . * @ param properties CredHub connection properties * @ param clientHttpRequestFactory the { @ link ClientHttpRequestFactory } to use when * creating new connections * @ return a ...
RestTemplate restTemplate = new RestTemplate ( ) ; configureRestTemplate ( restTemplate , properties . getUrl ( ) , clientHttpRequestFactory ) ; return restTemplate ;
public class CmsInheritanceReferenceParser { /** * Parses a given resource . < p > * @ param resource the resource to parse * @ throws CmsException if something goes wrong */ public void parse ( CmsResource resource ) throws CmsException { } }
CmsFile file = m_cms . readFile ( resource ) ; m_resource = resource ; CmsXmlContent content = CmsXmlContentFactory . unmarshal ( m_cms , file ) ; parse ( content ) ;
public class StringSupport { /** * Retrieves stack trace from throwable . * @ param t * @ param depth * @ return */ public static String getRootCauseAndStackTrace ( Throwable t , int depth ) { } }
while ( t . getCause ( ) != null ) { t = t . getCause ( ) ; } return t . toString ( ) + "\n" + getStackTrace ( t , depth , null ) ;
public class LIBORMarketModel { /** * Return the complete vector of the drift for the time index timeIndex , given that current state is realizationAtTimeIndex . * The drift will be zero for rates being already fixed . * The method currently provides the drift for either < code > Measure . SPOT < / code > or < code...
double time = getTime ( timeIndex ) ; int firstLiborIndex = this . getLiborPeriodIndex ( time ) + 1 ; if ( firstLiborIndex < 0 ) { firstLiborIndex = - firstLiborIndex - 1 + 1 ; } RandomVariableInterface zero = getRandomVariableForConstant ( 0.0 ) ; // Allocate drift vector and initialize to zero ( will be used to sum u...
public class FormatStringBuffer { /** * Format a < tt > char < / tt > . */ public FormatStringBuffer format ( char ch ) { } }
Format fmt = getFormat ( ) ; if ( fmt . type != CHAR ) throw new IllegalArgumentException ( "Expected a char format" ) ; if ( ( fmt . flags & LEFT ) != LEFT ) while ( -- fmt . fieldWidth > 0 ) buffer . append ( ' ' ) ; buffer . append ( ch ) ; while ( -- fmt . fieldWidth > 0 ) buffer . append ( ' ' ) ; return this ;
public class ReflectUtil { /** * 获取指定对象中指定字段对应的字段的值 * @ param obj 对象 , 不能为空 * @ param field 字段 * @ param < T > 字段类型 * @ return 字段值 */ @ SuppressWarnings ( "unchecked" ) public static < T extends Object > T getFieldValue ( Object obj , Field field ) { } }
Assert . notNull ( obj , "obj不能为空" ) ; Assert . notNull ( field , "field不能为空" ) ; try { return ( T ) field . get ( obj ) ; } catch ( IllegalArgumentException e ) { throw new ReflectException ( e ) ; } catch ( IllegalAccessException e ) { String msg = StringUtils . format ( "类型[{0}]的字段[{1}]不允许访问" , obj . getClass ( ) , ...
public class DateIntervalFormat { /** * get separated date and time skeleton from a combined skeleton . * The difference between date skeleton and normalizedDateSkeleton are : * 1 . both ' y ' and ' d ' are appeared only once in normalizeDateSkeleton * 2 . ' E ' and ' EE ' are normalized into ' EEE ' * 3 . ' MM...
// dateSkeleton follows the sequence of y * M * E * d * // timeSkeleton follows the sequence of hm * [ v | z ] ? int i ; int ECount = 0 ; int dCount = 0 ; int MCount = 0 ; int yCount = 0 ; int hCount = 0 ; int HCount = 0 ; int mCount = 0 ; int vCount = 0 ; int zCount = 0 ; for ( i = 0 ; i < skeleton . length ( ) ; ++ i...
public class cacheforwardproxy { /** * Use this API to delete cacheforwardproxy resources of given names . */ public static base_responses delete ( nitro_service client , String ipaddress [ ] ) throws Exception { } }
base_responses result = null ; if ( ipaddress != null && ipaddress . length > 0 ) { cacheforwardproxy deleteresources [ ] = new cacheforwardproxy [ ipaddress . length ] ; for ( int i = 0 ; i < ipaddress . length ; i ++ ) { deleteresources [ i ] = new cacheforwardproxy ( ) ; deleteresources [ i ] . ipaddress = ipaddress...
public class KeyVaultClientBaseImpl { /** * List all versions of the specified secret . * The full secret identifier and attributes are provided in the response . No values are returned for the secrets . This operations requires the secrets / list permission . * @ param nextPageLink The NextLink from the previous s...
return getSecretVersionsNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < SecretItem > > , Page < SecretItem > > ( ) { @ Override public Page < SecretItem > call ( ServiceResponse < Page < SecretItem > > response ) { return response . body ( ) ; } } ) ;
public class StatusData { /** * Stores given key - value mapping if no restrictions are violated by them . * @ param key mapping key . * @ param value mapping value . * @ throws IllegalArgumentException if the given key is { @ code null } or if value is neither of correct type nor of String type . */ public void ...
data . put ( key , ensureValueCorrectness ( key , value ) ) ;
public class NumericShaper { /** * Returns a { @ code Set } representing all the Unicode ranges in * this { @ code NumericShaper } that will be shaped . * @ return all the Unicode ranges to be shaped . * @ since 1.7 */ public Set < Range > getRangeSet ( ) { } }
if ( rangeSet != null ) { return EnumSet . copyOf ( rangeSet ) ; } return Range . maskToRangeSet ( mask ) ;
public class OsDetector { /** * Attempts to detect the operating system of a machine by using system calls ( if the machine is local ) , connecting * to the machine using SSH or PowerShell ( and running specific commands ) or by running a Nmap command . * @ param host The hostname or ip address of the remote host ....
@ Output ( RETURN_RESULT ) , @ Output ( RETURN_CODE ) , @ Output ( OS_FAMILY ) , @ Output ( OS_NAME ) , @ Output ( OS_ARCHITECTURE ) , @ Output ( OS_VERSION ) , @ Output ( OS_COMMANDS ) , @ Output ( EXCEPTION ) , } , responses = { @ Response ( text = ResponseNames . SUCCESS , field = RETURN_CODE , value = ReturnCodes ....
public class EditTextPreference { /** * Obtains the hint of the edit text widget , which is shown in the preference ' s dialog , from a * specific typed array . * @ param typedArray * The typed array , the hint should be obtained from , as an instance of the class { @ link * TypedArray } . The typed array may n...
setHint ( typedArray . getText ( R . styleable . EditTextPreference_android_hint ) ) ;
public class LocalProperties { /** * Translates the properties as much as possible , and truncates at the first non - translatable property */ public static < X , Y > List < LocalProperty < Y > > translate ( List < ? extends LocalProperty < X > > properties , Function < X , Optional < Y > > translator ) { } }
properties = normalizeAndPrune ( properties ) ; ImmutableList . Builder < LocalProperty < Y > > builder = ImmutableList . builder ( ) ; for ( LocalProperty < X > property : properties ) { Optional < LocalProperty < Y > > translated = property . translate ( translator ) ; if ( translated . isPresent ( ) ) { builder . ad...
public class BinaryOWLMetadata { /** * Gets the long value of an attribute . * @ param name The name of the attribute . Not null . * @ param defaultValue The default value for the attribute . May be null . This value will be returned if this * metadata object does not contain a long value for the specified attrib...
return getValue ( longAttributes , name , defaultValue ) ;
public class AppServiceEnvironmentsInner { /** * Get metric definitions for a multi - role pool of an App Service Environment . * Get metric definitions for a multi - role pool of an App Service Environment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Nam...
return listMultiRoleMetricDefinitionsSinglePageAsync ( resourceGroupName , name ) . concatMap ( new Func1 < ServiceResponse < Page < ResourceMetricDefinitionInner > > , Observable < ServiceResponse < Page < ResourceMetricDefinitionInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < ResourceMetri...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcElectricFlowStorageDeviceTypeEnum ( ) { } }
if ( ifcElectricFlowStorageDeviceTypeEnumEEnum == null ) { ifcElectricFlowStorageDeviceTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 976 ) ; } return ifcElectricFlowStorageDeviceTypeEnumEEnum ;
public class JAASConfigurationImpl { /** * The proxy ( WSLoginModuleProxy ) can not be configured for the system . DEFAULT . * @ param entryName * @ param loginModules */ private void ensureProxyIsNotSpecifyInSystemDefaultEntry ( String entryName , List < JAASLoginModuleConfig > loginModules ) { } }
for ( Iterator < JAASLoginModuleConfig > i = loginModules . iterator ( ) ; i . hasNext ( ) ; ) { JAASLoginModuleConfig loginModule = i . next ( ) ; if ( loginModule . getId ( ) . equalsIgnoreCase ( JAASLoginModuleConfig . PROXY ) ) { Tr . warning ( tc , "JAAS_PROXY_IS_NOT_SUPPORT_IN_SYSTEM_DEFAULT" ) ; i . remove ( ) ;...
public class Stream { /** * Returns a { @ code Stream } produced by iterative application of a accumulation function * to an initial element { @ code identity } and next element of the current stream . * Produces a { @ code Stream } consisting of { @ code identity } , { @ code acc ( identity , value1 ) } , * { @ ...
Objects . requireNonNull ( accumulator ) ; return new Stream < R > ( params , new ObjScanIdentity < T , R > ( iterator , identity , accumulator ) ) ;
public class ReportingDialog { /** * Shows the dialog and submits the issue to the specified repository if the { @ code vatbubgitreports } - server has write access to it . * @ param windowTitle The title of the window * @ param userName The repo owner of the repo to send the issue to * @ param repoName The name ...
show ( windowTitle , defaultGitReportsURL , userName , repoName ) ;
public class CPTaxCategoryServiceBaseImpl { /** * Sets the cp measurement unit remote service . * @ param cpMeasurementUnitService the cp measurement unit remote service */ public void setCPMeasurementUnitService ( com . liferay . commerce . product . service . CPMeasurementUnitService cpMeasurementUnitService ) { } ...
this . cpMeasurementUnitService = cpMeasurementUnitService ;
public class JPAScopeInfo { /** * Cloase all the active EntityManagers defined in this scope . */ void close ( ) { } }
synchronized ( pxmlsInfo ) { for ( JPAPxmlInfo pxmlInfo : pxmlsInfo . values ( ) ) { pxmlInfo . close ( ) ; } pxmlsInfo . clear ( ) ; }
public class PoolPatchOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has been modified since the specified time . * @ param ifModifiedSince the ifModifiedSince value to set * @ return the Poo...
if ( ifModifiedSince == null ) { this . ifModifiedSince = null ; } else { this . ifModifiedSince = new DateTimeRfc1123 ( ifModifiedSince ) ; } return this ;
public class Regex { /** * Splits the input * @ param in * @ param bufferSize * @ return * @ throws IOException */ public String [ ] split ( PushbackReader in , int bufferSize ) throws IOException { } }
return split ( in , bufferSize , Integer . MAX_VALUE ) ;
public class FsSettingsFileHandler { /** * We read settings in ~ / . fscrawler / { job _ name } / _ settings . json * @ param jobname is the job _ name * @ return Settings settings * @ throws IOException in case of error while reading */ public FsSettings readAsJson ( String jobname ) throws IOException { } }
return FsSettingsParser . fromJson ( readFile ( jobname , FILENAME_JSON ) ) ;
public class FbBotMillNetworkController { /** * POSTs an attachment as a JSON string to Facebook . * @ param input * the JSON data to send . * @ return the uploaded attachment ID . */ public static UploadAttachmentResponse postUploadAttachment ( Object input ) { } }
StringEntity stringEntity = toStringEntity ( input ) ; return postUploadAttachment ( stringEntity ) ;
public class SQLExpressions { /** * Add the given amount of seconds to the date * @ param date datetime * @ param seconds seconds to add * @ return converted datetime */ public static < D extends Comparable > DateTimeExpression < D > addSeconds ( DateTimeExpression < D > date , int seconds ) { } }
return Expressions . dateTimeOperation ( date . getType ( ) , Ops . DateTimeOps . ADD_SECONDS , date , ConstantImpl . create ( seconds ) ) ;
public class LocalQueuePoint { /** * @ see com . ibm . ws . sib . processor . runtime . SIMPLocalizationControllable # getDestinationHighMsgs ( ) */ public long getDestinationHighMsgs ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDestinationHighMsgs" ) ; long destHighMsgs = itemStream . getDestHighMsgs ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDestinationHighMsgs" , new Long ( destHig...
public class ReflectUtils { /** * will copy fields with same declaration name < br > * @ param clazz the starting / root class of input ( maybe input class is wrapped by spring , hibernate or another framework so you should define the root class ) * @ param input the input object * @ param output the object to fi...
if ( null == clazz ) { clazz = input . getClass ( ) ; } Field [ ] fields = clazz . getDeclaredFields ( ) ; for ( Field field : fields ) { /* * do not copy collections because of possible * org . hibernate . HibernateException : Found shared references to a collection */ if ( ReflectUtils . isNotStatic ( field ) ) { i...
public class Phrase { /** * Advances the current character position without any error checking . Consuming beyond the * end of the string can only happen if this parser contains a bug . */ private void consume ( ) { } }
curCharIndex ++ ; curChar = ( curCharIndex == pattern . length ( ) ) ? EOF : pattern . charAt ( curCharIndex ) ;
public class PolymerUtils { /** * method to get the number of all existing monomers from one MonomerNotation * @ param monomerNotation MonomerNotation * @ return number of monomers in the given MonomerNotation */ private static int getMonomerCountFromMonomerNotation ( MonomerNotation monomerNotation ) { } }
int multiply ; try { multiply = Integer . parseInt ( monomerNotation . getCount ( ) ) ; if ( multiply < 1 ) { multiply = 1 ; } } catch ( NumberFormatException e ) { multiply = 1 ; } if ( monomerNotation instanceof MonomerNotationGroup ) { return 1 * multiply ; } if ( monomerNotation instanceof MonomerNotationList ) { i...
public class JsonBuffer { /** * Add the given value . * @ param name the name . * @ param value the value . */ public void add ( String name , JsonBuffer value ) { } }
if ( value != null && value != this && ! value . isEmpty ( ) ) { this . content . put ( name , value ) ; }
public class DbHelperBase { /** * List of references with multiplicity > 1 */ private List < Reference > getAllManyReferences ( DomainObject domainObject ) { } }
List < Reference > allReferences = domainObject . getReferences ( ) ; List < Reference > allManyReferences = new ArrayList < Reference > ( ) ; for ( Reference ref : allReferences ) { if ( ref . isMany ( ) ) { allManyReferences . add ( ref ) ; } } return allManyReferences ;
public class Monitors { /** * Create a new timer with a name and context . The returned timer will maintain separate * sub - monitors for each distinct set of tags returned from the context on an update operation . */ public static Timer newTimer ( String name , TimeUnit unit , TaggingContext context ) { } }
final MonitorConfig config = MonitorConfig . builder ( name ) . build ( ) ; return new ContextualTimer ( config , context , new TimerFactory ( unit ) ) ;
public class BaseResourceReferenceDt { /** * Returns the referenced resource , fetching it < b > if it has not already been loaded < / b > . This method invokes the * HTTP client to retrieve the resource unless it has already been loaded , or was a contained resource in which case * it is simply returned . */ publi...
if ( myResource != null ) { return myResource ; } IdDt resourceId = getReference ( ) ; if ( resourceId == null || isBlank ( resourceId . getValue ( ) ) ) { throw new IllegalStateException ( "Reference has no resource ID defined" ) ; } if ( isBlank ( resourceId . getBaseUrl ( ) ) || isBlank ( resourceId . getResourceTyp...
public class BaseMessagingEngineImpl { /** * Determine whether the conditions permitting a " server stopping " * notification to be sent are met . * The ME state can be STARTED , AUTOSTARTING or in STARTING state , to receive " server stopping " notification * @ return boolean a value indicating whether the notif...
// Removed the synchronized modifier of this method , as its only setting one private variable _ sentServerStopping , // If its synchronized , then notification thread gets blocked here until JsActivationThread returns and so it doesnot set _ sentServerStopping to true if ( TraceComponent . isAnyTracingEnabled ( ) && t...
public class Locales { /** * Gets country from the specified locale string . * @ param localeString the specified locale string * @ return country , if the length of specified locale string less than 5 , returns " " */ public static String getCountry ( final String localeString ) { } }
if ( localeString . length ( ) >= COUNTRY_END ) { return localeString . substring ( COUNTRY_START , COUNTRY_END ) ; } return "" ;
public class ObjectPropertiesController { /** * Replace default values will null , allowing them to be ignored . * @ param value value to test * @ return filtered value */ private Object filterValue ( Object value ) { } }
if ( value instanceof Boolean && ! ( ( Boolean ) value ) . booleanValue ( ) ) { value = null ; } if ( value instanceof String && ( ( String ) value ) . isEmpty ( ) ) { value = null ; } if ( value instanceof Double && ( ( Double ) value ) . doubleValue ( ) == 0.0 ) { value = null ; } if ( value instanceof Integer && ( (...
public class Assistant { /** * Update dialog node . * Update an existing dialog node with new or modified data . * This operation is limited to 500 requests per 30 minutes . For more information , see * * Rate limiting * * . * @ param updateDialogNodeOptions the { @ link UpdateDialogNodeOptions } containing the o...
Validator . notNull ( updateDialogNodeOptions , "updateDialogNodeOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "dialog_nodes" } ; String [ ] pathParameters = { updateDialogNodeOptions . workspaceId ( ) , updateDialogNodeOptions . dialogNode ( ) } ; RequestBuilder builder = RequestBuilder . p...
public class ClientConfig { /** * Sets the map of { @ link ClientReliableTopicConfig } , * mapped by config name . The config name may be a pattern with which the * configuration will be obtained in the future . * @ param map the FlakeIdGenerator configuration map to set * @ return this config instance */ publi...
Preconditions . isNotNull ( map , "reliableTopicConfigMap" ) ; reliableTopicConfigMap . clear ( ) ; reliableTopicConfigMap . putAll ( map ) ; for ( Entry < String , ClientReliableTopicConfig > entry : map . entrySet ( ) ) { entry . getValue ( ) . setName ( entry . getKey ( ) ) ; } return this ;
public class UndoUtils { /** * Applies a list of { @ link PlainTextChange } s to the given area when the { @ link UndoManager } ' s change stream emits * an event by { @ code area . replaceAbsolutely ( change . getPosition ( ) , change . getRemovalEnd ( ) , change . getInserted ( ) } . */ public static < PS , SEG , S...
return changeList -> { MultiChangeBuilder < PS , SEG , S > builder = area . createMultiChange ( changeList . size ( ) ) ; for ( PlainTextChange c : changeList ) { builder . replaceTextAbsolutely ( c . getPosition ( ) , c . getRemovalEnd ( ) , c . getInserted ( ) ) ; } builder . commit ( ) ; } ;
public class DependencyGraph { /** * Flattens this graph into an observer list in dependencys order . Empties the graph in the * process . */ public ObserverList < T > toObserverList ( ) { } }
ObserverList < T > list = ObserverList . newSafeInOrder ( ) ; while ( ! isEmpty ( ) ) { list . add ( removeAvailableElement ( ) ) ; } return list ;
public class AmazonWorkMailClient { /** * Deletes permissions granted to a member ( user or group ) . * @ param deleteMailboxPermissionsRequest * @ return Result of the DeleteMailboxPermissions operation returned by the service . * @ throws EntityNotFoundException * The identifier supplied for the user , group ...
request = beforeClientExecution ( request ) ; return executeDeleteMailboxPermissions ( request ) ;
public class SignitClient { /** * 可用单独授权 , 或者可单独调用只获取token */ public OauthData getOauthData ( String apiKey , String secretKey , TokenType grantType , boolean autoSetRequestToken ) throws SignitException { } }
if ( apiKey == null || secretKey == null ) { throw new SignitException ( "请完善开发者账户数据" ) ; } TokenType tmpGrantType = grantType != null ? grantType : TokenType . CLIENT_CREDENTIALS ; String response = httpClient . withAuth ( auth ) . withGetParam ( RequestParam . CLIENT_ID , apiKey ) . withGetParam ( RequestParam . CLIE...
public class JsonTextSequences { /** * Creates a new JSON Text Sequences from the specified { @ link Publisher } . * @ param headers the HTTP headers supposed to send * @ param contentPublisher the { @ link Publisher } which publishes the objects supposed to send as contents * @ param trailingHeaders the trailing...
requireNonNull ( mapper , "mapper" ) ; return streamingFrom ( contentPublisher , sanitizeHeaders ( headers ) , trailingHeaders , o -> toHttpData ( mapper , o ) ) ;
public class PerceptronLexicalAnalyzer { /** * 在线学习 * @ param segmentedTaggedSentence 已分词 、 标好词性和命名实体的人民日报2014格式的句子 * @ return 是否学习成果 ( 失败的原因是句子格式不合法 ) */ public boolean learn ( String segmentedTaggedSentence ) { } }
Sentence sentence = Sentence . create ( segmentedTaggedSentence ) ; return learn ( sentence ) ;
public class NamespaceRegistryImpl { /** * { @ inheritDoc } */ public void registerNamespace ( String prefix , String uri ) throws NamespaceException , RepositoryException { } }
validateNamespace ( prefix , uri ) ; registerNamespace ( prefix , uri , true ) ; if ( started && rpcService != null ) { try { rpcService . executeCommandOnAllNodes ( registerNamespace , false , id , prefix , uri ) ; } catch ( Exception e ) { LOG . warn ( "Could not register the namespace '" + uri + "' on other cluster ...
public class OWLLiteralImplNoCompression_CustomFieldSerializer { /** * Deserializes the content of the object from the * { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } . * @ param streamReader the { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } to rea...
deserialize ( streamReader , instance ) ;
public class Check { /** * Check if < code > a < / code > is strictly inferior to < code > b < / code > . * @ param a The parameter to test . * @ param b The parameter to compare to . * @ throws LionEngineException If check failed . */ public static void inferiorStrict ( int a , int b ) { } }
if ( a >= b ) { throw new LionEngineException ( ERROR_ARGUMENT + String . valueOf ( a ) + ERROR_INFERIOR_STRICT + String . valueOf ( b ) ) ; }
public class BasicFileServlet { /** * Copies the given range of bytes from the input stream to the output stream . * @ param in * @ param out * @ param r * @ throws IOException */ public static void copyPartialContent ( InputStream in , OutputStream out , Range r ) throws IOException { } }
IOUtils . copyLarge ( in , out , r . start , r . length ) ;
public class PtoPInputHandler { /** * Sends a Nack message back to the originating ME */ @ Override public void sendNackMessage ( SIBUuid8 sourceMEUuid , SIBUuid12 destUuid , SIBUuid8 busUuid , long startTick , long endTick , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResourceException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendNackMessage" , new Object [ ] { new Long ( startTick ) , new Long ( endTick ) } ) ; ControlNack nackMsg = createControlNackMessage ( ) ; // As we are using the Guaranteed Header - set all the attributes as // well as th...
public class HeapUtils { /** * Finds the { @ code n } largest values in { @ code values } , returning their * indexes in { @ code values } . The returned indexes are sorted in descending * order by their value , i . e . , the 0th element is the index of the maximum * value in { @ code values } . * To avoid reim...
long [ ] heapKeys = new long [ n + 1 ] ; double [ ] heapValues = new double [ n + 1 ] ; int heapSize = 0 ; for ( int i = 0 ; i < values . length ; i ++ ) { offer ( heapKeys , heapValues , heapSize , i , values [ i ] ) ; heapSize ++ ; if ( heapSize > n ) { removeMin ( heapKeys , heapValues , heapSize ) ; heapSize -- ; }...
public class DbxClientV1 { /** * Creates and returns a publicly - shareable URL to a file ' s contents . This URL can be used * without authentication . This link will stop working after a few hours . * @ param path * The Dropbox path to a file . * @ return * If there is no file at that path , return { @ code...
DbxPathV1 . checkArgNonRoot ( "path" , path ) ; String apiPath = "1/media/auto" + path ; return doPost ( host . getApi ( ) , apiPath , null , null , new DbxRequestUtil . ResponseHandler < /* @ Nullable */ DbxUrlWithExpiration > ( ) { @ Override public /* @ Nullable */ DbxUrlWithExpiration handle ( HttpRequestor . Respo...
public class TcpWriter { /** * - - - CLOSE SOCKET BY NODE ID - - - */ public void close ( String nodeID ) { } }
SendBuffer buffer ; synchronized ( buffers ) { buffer = buffers . remove ( nodeID ) ; } if ( buffer != null ) { buffer . close ( ) ; }
public class DeployMojo { /** * endregion */ protected ArtifactHandler getArtifactHandler ( ) throws MojoExecutionException { } }
final ArtifactHandlerBase . Builder builder ; switch ( this . getDeploymentType ( ) ) { case MSDEPLOY : builder = new MSDeployArtifactHandlerImpl . Builder ( ) . functionAppName ( this . getAppName ( ) ) ; break ; case FTP : builder = new FTPArtifactHandlerImpl . Builder ( ) ; break ; case EMPTY : case ZIP : builder = ...
public class Groups { /** * Get the Group instance from the list by * name . * @ param groupName The group for which will be searched . * @ return The Group instance for the given group name . */ public Group getGroup ( String groupName ) { } }
Group result = null ; for ( Group item : getGroupsList ( ) ) { if ( item . getName ( ) . equals ( groupName ) ) { result = item ; } } return result ;
public class LayerUtil { /** * Converts the supplied point from screen coordinates to coordinates * relative to the specified layer . The results are stored into { @ code into } * , which is returned for convenience . */ public static Point screenToLayer ( Layer layer , XY point , Point into ) { } }
Layer parent = layer . parent ( ) ; XY cur = ( parent == null ) ? point : screenToLayer ( parent , point , into ) ; return parentToLayer ( layer , cur , into ) ;
public class GVRIndexBuffer { /** * Get the triangle vertex indices of the mesh as an integer array . * The indices for each * triangle are represented as a packed { @ code int } triplet , where * { @ code t0 } is the first triangle , { @ code t1 } is the second , etc . : * < code > * { t0[0 ] , t0[1 ] , t0[2...
int n = getIndexCount ( ) ; if ( getIndexSize ( ) != 4 ) { throw new UnsupportedOperationException ( "Cannot convert char indices to int array" ) ; } if ( n <= 0 ) { return null ; } return NativeIndexBuffer . getIntArray ( getNative ( ) ) ;
public class Readability { /** * Get an elements class / id weight . Uses regular expressions to tell if this * element looks good or bad . * @ param e * @ return */ private static int getClassWeight ( Element e ) { } }
int weight = 0 ; /* Look for a special classname */ String className = e . className ( ) ; if ( ! isEmpty ( className ) ) { Matcher negativeMatcher = Patterns . get ( Patterns . RegEx . NEGATIVE ) . matcher ( className ) ; Matcher positiveMatcher = Patterns . get ( Patterns . RegEx . POSITIVE ) . matcher ( className ) ...
public class KeyVaultClientBaseImpl { /** * Lists the policy for a certificate . * The GetCertificatePolicy operation returns the specified certificate policy resources in the specified key vault . This operation requires the certificates / get permission . * @ param vaultBaseUrl The vault name , for example https ...
return ServiceFuture . fromResponse ( getCertificatePolicyWithServiceResponseAsync ( vaultBaseUrl , certificateName ) , serviceCallback ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link EnumIncludeRelationships } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "includeRelationships" , scope = GetChildren . class ) public JAXBElement < ...
return new JAXBElement < EnumIncludeRelationships > ( _GetObjectOfLatestVersionIncludeRelationships_QNAME , EnumIncludeRelationships . class , GetChildren . class , value ) ;
public class CmsLockManager { /** * Counts the exclusive locked resources in a project . < p > * @ param project the project * @ return the number of exclusive locked resources in the specified project */ public int countExclusiveLocksInProject ( CmsProject project ) { } }
int count = 0 ; Iterator < CmsLock > itLocks = OpenCms . getMemoryMonitor ( ) . getAllCachedLocks ( ) . iterator ( ) ; while ( itLocks . hasNext ( ) ) { CmsLock lock = itLocks . next ( ) ; if ( lock . getEditionLock ( ) . isInProject ( project ) ) { count ++ ; } } return count ;
public class Choice3 { /** * { @ inheritDoc } */ @ Override public final < D > Choice4 < A , B , C , D > diverge ( ) { } }
return match ( Choice4 :: a , Choice4 :: b , Choice4 :: c ) ;
public class TSDBEntity { /** * Returns an unmodifiable collection of tags associated with the metric . * @ return The tags for a metric . Will never be null but may be empty . */ public Map < String , String > getTags ( ) { } }
Map < String , String > result = new HashMap < > ( ) ; for ( Map . Entry < String , String > entry : _tags . entrySet ( ) ) { String key = entry . getKey ( ) ; if ( ! ReservedField . isReservedField ( key ) ) { result . put ( key , entry . getValue ( ) ) ; } } return Collections . unmodifiableMap ( result ) ;
public class PackageCache { /** * To get all the versions of packageVOs ( including archive ) based on package name * @ param packageName * @ return * @ throws CachingException */ public static List < Package > getAllPackages ( String packageName ) throws CachingException { } }
List < Package > allPackages = new ArrayList < > ( ) ; for ( Package packageVO : getPackageList ( ) ) { if ( packageVO . getName ( ) . equals ( packageName ) ) { allPackages . add ( packageVO ) ; } } return allPackages ;
public class CollectionUtils { /** * Returns a { @ link Collection } containing the intersection * of the given { @ link Collection } s . * The cardinality of each element in the returned { @ link Collection } * will be equal to the minimum of the cardinality of that element * in the two given { @ link Collecti...
ArrayList list = new ArrayList ( ) ; Map mapa = getCardinalityMap ( a ) ; Map mapb = getCardinalityMap ( b ) ; Set elts = new HashSet ( a ) ; elts . addAll ( b ) ; Iterator it = elts . iterator ( ) ; while ( it . hasNext ( ) ) { Object obj = it . next ( ) ; for ( int i = 0 , m = Math . min ( getFreq ( obj , mapa ) , ge...
public class Voice { /** * Returns the last note that has been added to this score . * @ return The last note that has been added to this score . < TT > null < / TT > * if no note in this score . */ public NoteAbstract getLastNote ( ) { } }
if ( lastNote == null ) { for ( int i = super . size ( ) - 1 ; i >= 0 ; i -- ) { if ( super . elementAt ( i ) instanceof NoteAbstract ) { lastNote = ( NoteAbstract ) super . elementAt ( i ) ; break ; } } } return lastNote ;
public class MassNumberRule { /** * { @ inheritDoc } */ @ Override public int compare ( ILigand ligand1 , ILigand ligand2 ) { } }
ensureFactory ( ) ; return getMassNumber ( ligand1 ) . compareTo ( getMassNumber ( ligand2 ) ) ;
public class XPathToQueryTranslator { /** * Determine if the predicates contain any expressions that cannot be put into a LIKE constraint on the path . * @ param predicates the predicates * @ return true if the supplied predicates can be handled entirely in the LIKE constraint on the path , or false if they have ...
if ( predicates . isEmpty ( ) ) return true ; if ( predicates . size ( ) > 1 ) return false ; assert predicates . size ( ) == 1 ; Component predicate = predicates . get ( 0 ) ; if ( predicate instanceof Literal && ( ( Literal ) predicate ) . isInteger ( ) ) return true ; if ( predicate instanceof NameTest && ( ( NameTe...
public class MutableDigest { /** * Returns true if all members have a corresponding seqno > = 0 , else false */ public boolean allSet ( ) { } }
for ( int i = 0 ; i < seqnos . length ; i += 2 ) if ( seqnos [ i ] == - 1 ) return false ; return true ;
public class ListDocumentsResult { /** * The names of the Systems Manager documents . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDocumentIdentifiers ( java . util . Collection ) } or { @ link # withDocumentIdentifiers ( java . util . Collection ) } ...
if ( this . documentIdentifiers == null ) { setDocumentIdentifiers ( new com . amazonaws . internal . SdkInternalList < DocumentIdentifier > ( documentIdentifiers . length ) ) ; } for ( DocumentIdentifier ele : documentIdentifiers ) { this . documentIdentifiers . add ( ele ) ; } return this ;
public class CreateSymbols { /** * < editor - fold defaultstate = " collapsed " desc = " Class Writing " > */ void writeClass ( String ctSymLocation , ClassDescription classDescription , ClassHeaderDescription header , String version ) throws IOException { } }
List < CPInfo > constantPool = new ArrayList < > ( ) ; constantPool . add ( null ) ; List < Method > methods = new ArrayList < > ( ) ; for ( MethodDescription methDesc : classDescription . methods ) { if ( disjoint ( methDesc . versions , version ) ) continue ; Descriptor descriptor = new Descriptor ( addString ( const...
public class IntArrayList { /** * Remove the first instance of a value if found in the list . * @ param value to be removed . * @ return true if successful otherwise false . */ public boolean removeInt ( final int value ) { } }
@ DoNotSub final int index = indexOf ( value ) ; if ( - 1 != index ) { remove ( index ) ; return true ; } return false ;
public class SessionProtocolNegotiationCache { /** * Returns { @ code true } if the specified { @ code remoteAddress } is known to have no support for * the specified { @ link SessionProtocol } . */ public static boolean isUnsupported ( SocketAddress remoteAddress , SessionProtocol protocol ) { } }
final String key = key ( remoteAddress ) ; final CacheEntry e ; final long stamp = lock . readLock ( ) ; try { e = cache . get ( key ) ; } finally { lock . unlockRead ( stamp ) ; } if ( e == null ) { // Can ' t tell if it ' s unsupported return false ; } return e . isUnsupported ( protocol ) ;
public class TransformerImpl { /** * Push both the current xsl : template or xsl : for - each onto the * stack , along with the child node that was matched . * ( Note : should this only be used for xsl : templates ? ? - sb ) * @ param template xsl : template or xsl : for - each . * @ param child The child that ...
m_currentMatchTemplates . push ( template ) ; m_currentMatchedNodes . push ( child ) ;
public class AbstractJSPExtensionServletWrapper { /** * Defect 268176.1 */ public boolean isAvailable ( ) { } }
boolean available = false ; String relativeURL = inputSource . getRelativeURL ( ) ; Container container = tcontext . getServletContext ( ) . getModuleContainer ( ) ; if ( container != null ) { if ( options . isDisableJspRuntimeCompilation ( ) == false ) { Entry entry = container . getEntry ( relativeURL ) ; if ( entry ...
public class ChemicalFilters { /** * Sort MCS solution by stereo and bond type matches . * @ throws CDKException */ public synchronized void sortResultsByStereoAndBondMatch ( ) throws CDKException { } }
// System . out . println ( " \ n \ n \ n \ nSort By ResultsByStereoAndBondMatch " ) ; Map < Integer , Map < Integer , Integer > > allStereoMCS = new HashMap < Integer , Map < Integer , Integer > > ( ) ; Map < Integer , Map < IAtom , IAtom > > allStereoAtomMCS = new HashMap < Integer , Map < IAtom , IAtom > > ( ) ; Map...
public class JKMessage { public String fixValue ( String value ) { } }
logger . trace ( "Fix label value : " , value ) ; if ( value != null && ! value . equals ( "" ) ) { value = value . toUpperCase ( ) ; if ( value . startsWith ( "MI " ) ) value = value . replaceFirst ( "MI " , "" ) ; if ( value . startsWith ( "MEN " ) ) value = value . replaceFirst ( "MEN " , "" ) ; if ( value . startsW...
public class TarFileInputStream { /** * Work - around for the problem that compressed InputReaders don ' t fill * the read buffer before returning . * Has visibility ' protected ' so that subclasses may override with * different algorithms , or use different algorithms for different * compression stream . */ pr...
int bytesSoFar = 0 ; int requiredBytes = 512 * blocks ; // This method works with individual bytes ! int i ; while ( bytesSoFar < requiredBytes ) { i = readStream . read ( readBuffer , bytesSoFar , requiredBytes - bytesSoFar ) ; if ( i < 0 ) { // A VoltDB extension to disable tagging eof as an error . return ; /* disab...
public class CholeskyDecompositionCommon_DDRM { /** * Performs Choleksy decomposition on the provided matrix . * If the matrix is not positive definite then this function will return * false since it can ' t complete its computations . Not all errors will be * found . This is an efficient way to check for positiv...
if ( mat . numRows > maxWidth ) { setExpectedMaxSize ( mat . numRows , mat . numCols ) ; } else if ( mat . numRows != mat . numCols ) { throw new IllegalArgumentException ( "Must be a square matrix." ) ; } n = mat . numRows ; T = mat ; t = T . data ; if ( lower ) { return decomposeLower ( ) ; } else { return decomposeU...
public class TurfMeta { /** * Get all coordinates from a { @ link MultiPoint } object , returning a { @ code List } of Point * objects . If you have a geometry collection , you need to break it down to individual geometry * objects before using { @ link # coordAll } . * @ param multiPoint any { @ link MultiPoint ...
return coordAll ( new ArrayList < Point > ( ) , multiPoint ) ;
public class ParseZoneId { /** * { @ inheritDoc } * @ throws SuperCsvCellProcessorException if value is null or is not a String */ public Object execute ( final Object value , final CsvContext context ) { } }
validateInputNotNull ( value , context ) ; if ( ! ( value instanceof String ) ) { throw new SuperCsvCellProcessorException ( String . class , value , context , this ) ; } final ZoneId result ; try { if ( aliasMap != null ) { result = ZoneId . of ( ( String ) value , aliasMap ) ; } else { result = ZoneId . of ( ( String...
public class ServiceOperations { /** * Verify that a service is in a given state . * @ param state the actual state a service is in * @ param expectedState the desired state * @ throws IllegalStateException if the service state is different from * the desired state */ public static void ensureCurrentState ( Ser...
if ( state != expectedState ) { throw new IllegalStateException ( "For this operation, the " + "current service state must be " + expectedState + " instead of " + state ) ; }
public class ESSOAProviderParser { @ Override public Object getRealPropertyValue ( Pro pro ) { } }
String templateFile = ( String ) pro . getExtendAttribute ( "templateFile" ) ; if ( templateFile == null ) return pro . getValue ( ) ; else { String templateName = ( String ) pro . getExtendAttribute ( "templateName" ) ; if ( templateName == null ) { logger . warn ( new StringBuilder ( ) . append ( "The DSL template " ...
public class AppServiceEnvironmentsInner { /** * Get available SKUs for scaling a worker pool . * Get available SKUs for scaling a worker pool . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation ...
return listWorkerPoolSkusNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < SkuInfoInner > > , Page < SkuInfoInner > > ( ) { @ Override public Page < SkuInfoInner > call ( ServiceResponse < Page < SkuInfoInner > > response ) { return response . body ( ) ; } } ) ;
public class Expressions { /** * Create a new DateTimeExpression * @ param expr the date time Expression * @ return new DateTimeExpression */ public static < T extends Comparable < ? > > DateTimeExpression < T > asDateTime ( Expression < T > expr ) { } }
Expression < T > underlyingMixin = ExpressionUtils . extract ( expr ) ; if ( underlyingMixin instanceof PathImpl ) { return new DateTimePath < T > ( ( PathImpl < T > ) underlyingMixin ) ; } else if ( underlyingMixin instanceof OperationImpl ) { return new DateTimeOperation < T > ( ( OperationImpl < T > ) underlyingMixi...
public class CsvEscape { /** * Perform a CSV < strong > escape < / strong > operation on a < tt > String < / tt > input , writing results to * a < tt > Writer < / tt > . * This method is < strong > thread - safe < / strong > . * @ param text the < tt > String < / tt > to be escaped . * @ param writer the < tt >...
if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } CsvEscapeUtil . escape ( new InternalStringReader ( text ) , writer ) ;
public class Descriptives { /** * Calculates the Frequency Table * @ param flatDataCollection * @ return */ public static AssociativeArray frequencies ( FlatDataCollection flatDataCollection ) { } }
AssociativeArray frequencies = new AssociativeArray ( ) ; for ( Object value : flatDataCollection ) { Object counter = frequencies . get ( value ) ; if ( counter == null ) { frequencies . put ( value , 1 ) ; } else { frequencies . put ( value , ( ( Number ) counter ) . intValue ( ) + 1 ) ; } } return frequencies ;