signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class DefaultPreprocessorListener { /** * Handles an error .
* The behaviour of this method is defined by the
* implementation . It may simply record the error message , or
* it may throw an exception . */
@ Override public void handleError ( Source source , int line , int column , String msg ) throws Lexe... | errors ++ ; print ( source . getName ( ) + ":" + line + ":" + column + ": error: " + msg ) ; |
public class CmsSiteMatcher { /** * Initializes the member variables . < p >
* @ param serverProtocol to protocol required to access this site
* @ param serverName the server URL prefix to which this site is mapped
* @ param serverPort the port required to access this site
* @ param timeOffset the time offset *... | setServerProtocol ( serverProtocol ) ; setServerName ( serverName ) ; setServerPort ( serverPort ) ; setTimeOffset ( timeOffset ) ; |
public class AmazonInspectorClient { /** * Assigns attributes ( key and value pairs ) to the findings that are specified by the ARNs of the findings .
* @ param addAttributesToFindingsRequest
* @ return Result of the AddAttributesToFindings operation returned by the service .
* @ throws InternalException
* Inte... | request = beforeClientExecution ( request ) ; return executeAddAttributesToFindings ( request ) ; |
public class ApptentiveInternal { /** * < p > Internal use only . < / p >
* This bundle could be any bundle sent to us by a push Intent from any supported platform . For that reason , it needs to be checked in multiple ways .
* @ param pushBundle a Bundle , or null .
* @ return a String , or null . */
static Stri... | if ( pushBundle != null ) { if ( pushBundle . containsKey ( PUSH_EXTRA_KEY_PARSE ) ) { // Parse
ApptentiveLog . v ( PUSH , "Got a Parse Push." ) ; String parseDataString = pushBundle . getString ( PUSH_EXTRA_KEY_PARSE ) ; if ( parseDataString == null ) { ApptentiveLog . e ( PUSH , "com.parse.Data is null." ) ; return n... |
public class BigtableWhileMatchResultScannerAdapter { /** * Returns { @ code true } iff there are matching { @ link WhileMatchFilter } labels or no { @ link
* WhileMatchFilter } labels .
* @ param row a { @ link FlatRow } object .
* @ return a boolean value . */
public static boolean hasMatchingLabels ( FlatRow r... | int inLabelCount = 0 ; int outLabelCount = 0 ; for ( FlatRow . Cell cell : row . getCells ( ) ) { for ( String label : cell . getLabels ( ) ) { // TODO ( kevinsi4508 ) : Make sure { @ code label } is a { @ link WhileMatchFilter } label .
// TODO ( kevinsi4508 ) : Handle multiple { @ link WhileMatchFilter } labels .
if ... |
public class TraceEventHelper { /** * Get events
* @ param data The data
* @ return The events
* @ exception Exception If an error occurs */
private static List < TraceEvent > getEvents ( List < String > data ) throws Exception { } } | List < TraceEvent > result = new ArrayList < TraceEvent > ( ) ; for ( String s : data ) { result . add ( TraceEvent . parse ( s ) ) ; } return result ; |
public class EmbeddedNeo4jTupleSnapshot { /** * TODO : We should create a query to read this value */
private Object readEmbeddedProperty ( String column ) { } } | String [ ] split = split ( column ) ; Node embeddedNode = node ; for ( int i = 0 ; i < split . length - 1 ; i ++ ) { String relType = split [ i ] ; Iterator < Relationship > rels = embeddedNode . getRelationships ( Direction . OUTGOING , withName ( relType ) ) . iterator ( ) ; if ( rels . hasNext ( ) ) { embeddedNode =... |
public class SibRaManagedConnection { /** * Used to indicate that a connection has been closed . Notifies the
* connection event listeners and removes the connection from the set of
* open connections .
* @ param connection
* the connection being closed */
void connectionClosed ( final SibRaConnection connectio... | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "connectionClosed" , connection ) ; } final ConnectionEvent event = new ConnectionEvent ( this , ConnectionEvent . CONNECTION_CLOSED ) ; event . setConnectionHandle ( connection ) ; for ( Iterator iterator = _... |
public class MultimapWithProtoValuesSubject { /** * Specifies that the ordering of repeated fields for these explicitly specified field descriptors
* should be ignored when comparing for equality . Sub - fields must be specified explicitly if their
* orders are to be ignored as well .
* < p > Use { @ link # ignor... | return usingConfig ( config . ignoringRepeatedFieldOrderOfFieldDescriptors ( fieldDescriptors ) ) ; |
public class Dispatcher { void error ( ServletRequest servletRequest , ServletResponse servletResponse ) throws ServletException , IOException { } } | dispatch ( servletRequest , servletResponse , Dispatcher . __ERROR ) ; |
public class StorePackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getExtendedDataSchema ( ) { } } | if ( extendedDataSchemaEClass == null ) { extendedDataSchemaEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 48 ) ; } return extendedDataSchemaEClass ; |
public class RuntimeConfigurationMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RuntimeConfiguration runtimeConfiguration , ProtocolMarshaller protocolMarshaller ) { } } | if ( runtimeConfiguration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( runtimeConfiguration . getServerProcesses ( ) , SERVERPROCESSES_BINDING ) ; protocolMarshaller . marshall ( runtimeConfiguration . getMaxConcurrentGameSessionActiva... |
public class ChunkedIntArray { /** * Retrieve the contents of a record into a user - supplied buffer array .
* Used to reduce addressing overhead when code will access several
* columns of the record .
* @ param position int Record number
* @ param buffer int [ ] Integer array provided by user , must be large e... | /* try
System . arraycopy ( fastArray , position * slotsize , buffer , 0 , slotsize ) ;
catch ( ArrayIndexOutOfBoundsException aioobe ) */
{ // System . out . println ( " Using slow read ( 2 ) : " + position ) ;
position *= slotsize ; int chunkpos = position >> lowbits ; int slotpos = ( position & lowmask ) ; // Gr... |
public class Assert { /** * Asserts that the { @ link Object } reference is not { @ literal null } .
* The assertion holds if and only if the { @ link Object } reference is not { @ literal null } .
* @ param obj { @ link Object } reference to evaluate .
* @ param message { @ link Supplier } containing the message... | if ( isNull ( obj ) ) { throw new IllegalArgumentException ( message . get ( ) ) ; } |
public class ReflectionBasedPropertyMetadata { /** * Helper method to extract the potentially aliased name of the field .
* @ param fieldReference the field reference .
* @ return the potentially aliased name of the field . */
private static String extractName ( final Field fieldReference ) { } } | com . couchbase . client . java . repository . annotation . Field annotation = fieldReference . getAnnotation ( com . couchbase . client . java . repository . annotation . Field . class ) ; if ( annotation == null || annotation . value ( ) == null || annotation . value ( ) . isEmpty ( ) ) { return fieldReference . getN... |
public class Friend { /** * Gets the name of this friend . If the name was null then we try to fetch
* the name with your Riot API Key if provided . Enable forcedUpdate to
* always fetch the latest name of this Friend even when the name is not
* null .
* @ param forcedUpdate
* True will force to update the na... | String name = get ( ) . getName ( ) ; if ( ( name == null || forcedUpdate ) && api . getRiotApi ( ) != null ) { try { name = api . getRiotApi ( ) . getName ( getUserId ( ) ) ; setName ( name ) ; } catch ( final IOException e ) { e . printStackTrace ( ) ; } } return name ; |
public class OntClassMention { /** * indexed getter for semanticTypes - gets an indexed value - Names or IDs of associated semantic types .
* @ generated
* @ param i index in the array to get
* @ return value of the element at index i */
public String getSemanticTypes ( int i ) { } } | if ( OntClassMention_Type . featOkTst && ( ( OntClassMention_Type ) jcasType ) . casFeat_semanticTypes == null ) jcasType . jcas . throwFeatMissing ( "semanticTypes" , "de.julielab.jules.types.OntClassMention" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( OntClassMention_Type ... |
public class DateTimeFormatterBuilder { /** * Appends just a printer . With no matching parser , a parser cannot be
* built from this DateTimeFormatterBuilder .
* The printer interface is part of the low - level part of the formatting API .
* Normally , instances are extracted from another formatter .
* Note ho... | checkPrinter ( printer ) ; return append0 ( DateTimePrinterInternalPrinter . of ( printer ) , null ) ; |
public class JobsImpl { /** * Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run .
* This API returns the Job Preparation and Job Release task status on all compute nodes that have run the Job Preparation or Job Release task . Th... | return AzureServiceFuture . fromHeaderPageResponse ( listPreparationAndReleaseTaskStatusNextSinglePageAsync ( nextPageLink , jobListPreparationAndReleaseTaskStatusNextOptions ) , new Func1 < String , Observable < ServiceResponseWithHeaders < Page < JobPreparationAndReleaseTaskExecutionInformation > , JobListPreparation... |
public class RouteMatcher { /** * Specify a handler that will be called for a matching HTTP DELETE
* @ param regex A regular expression
* @ param handler The handler to call */
public RouteMatcher deleteWithRegEx ( String regex , Handler < HttpServerRequest > handler ) { } } | addRegEx ( regex , handler , deleteBindings ) ; return this ; |
public class TemplateParser { /** * Process a v - for value . It will register the loop variables as a local variable in the context
* stack .
* @ param vForValue The value of the v - for attribute
* @ return A processed v - for value , should be placed in the HTML in place of the original v - for
* value */
pr... | VForDefinition vForDef = new VForDefinition ( vForValue , context , logger ) ; // Set return of the " in " expression
currentExpressionReturnType = vForDef . getInExpressionType ( ) ; String inExpression = this . processExpression ( vForDef . getInExpression ( ) ) ; // And return the newly built definition
return vForD... |
public class GISCoordinates { /** * This function convert France Lambert II coordinate to
* France Lambert IV coordinate .
* @ param x is the coordinate in France Lambert II
* @ param y is the coordinate in France Lambert II
* @ return the France Lambert IV coordinate . */
@ Pure public static Point2d L2_L4 ( d... | final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi ( x , y , LAMBERT_2_N , LAMBERT_2_C , LAMBERT_2_XS , LAMBERT_2_YS ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_4_N , LAMBERT_4_C , LAMBERT_4_XS , LAMBERT_4_YS ) ; |
public class CmsWorkplace { /** * Initializes this workplace class instance . < p >
* @ param cms the user context
* @ param session the session */
protected void initWorkplaceMembers ( CmsObject cms , HttpSession session ) { } } | m_cms = cms ; m_session = session ; // check role
try { checkRole ( ) ; } catch ( CmsRoleViolationException e ) { throw new CmsIllegalStateException ( e . getMessageContainer ( ) , e ) ; } // get / create the workplace settings
m_settings = ( CmsWorkplaceSettings ) m_session . getAttribute ( CmsWorkplaceManager . SESSI... |
public class MessageAction { /** * { @ inheritDoc }
* @ throws java . lang . IllegalArgumentException
* If the appended CharSequence is too big and will cause the content to
* exceed the { @ value net . dv8tion . jda . core . entities . Message # MAX _ CONTENT _ LENGTH } character limit
* @ return Updated Messa... | if ( content . length ( ) + end - start > Message . MAX_CONTENT_LENGTH ) throw new IllegalArgumentException ( "A message may not exceed 2000 characters. Please limit your input!" ) ; content . append ( csq , start , end ) ; return this ; |
public class RequestParameters { /** * Sets a parameter to a list of values .
* @ param namethe parameter
* @ param valuesthe list of values */
public void put ( String name , String ... values ) { } } | getMap ( ) . put ( name , Arrays . asList ( values ) ) ; |
public class AWSGlueClient { /** * Removes a specified Database from a Data Catalog .
* < note >
* After completing this operation , you will no longer have access to the tables ( and all table versions and
* partitions that might belong to the tables ) and the user - defined functions in the deleted database . A... | request = beforeClientExecution ( request ) ; return executeDeleteDatabase ( request ) ; |
public class CmsListManager { /** * Updates the search result . < p >
* @ param fieldFacets the field facets
* @ param rangeFacets the range facets */
public void search ( Map < String , List < String > > fieldFacets , Map < String , List < String > > rangeFacets ) { } } | search ( fieldFacets , rangeFacets , null ) ; |
public class LBiObjSrtPredicateBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */
@ Nonnull public static < T1 , T2 > LBiObjSrtPredicateBuilder < T1 , T2 > biObjSrtPredicate ( Consumer < ... | return new LBiObjSrtPredicateBuilder ( consumer ) ; |
public class MaskPasswordsConfig { /** * Returns the list of name / password pairs defined at the global level .
* < p > Modifications broughts to the returned list has no impact on this
* configuration ( the returned value is a copy ) . Also , the list can be
* empty but never { @ code null } . < / p >
* @ sin... | List < VarPasswordPair > r = new ArrayList < VarPasswordPair > ( getGlobalVarPasswordPairsList ( ) . size ( ) ) ; // deep copy
for ( VarPasswordPair varPasswordPair : getGlobalVarPasswordPairsList ( ) ) { r . add ( ( VarPasswordPair ) varPasswordPair . clone ( ) ) ; } return r ; |
public class PageSection { /** * Create a simple footer , with a styled text
* @ param text the text
* @ param ts the style
* @ return the footer */
public static Footer simpleFooter ( final String text , final TextStyle ts ) { } } | return new SimplePageSectionBuilder ( ) . text ( Text . styledContent ( text , ts ) ) . buildFooter ( ) ; |
public class Email { /** * Converts a list of { @ link EmailAddress } to a list of recipients . Each
* recipient will have the type { @ link RecipientType # TO } .
* @ param to
* the list of addresses to convert
* @ return the list of recipients */
public static Recipient [ ] toRecipient ( EmailAddress [ ] to )... | Recipient [ ] addresses = new Recipient [ to . length ] ; int i = 0 ; for ( EmailAddress t : to ) { addresses [ i ++ ] = new Recipient ( t ) ; } return addresses ; |
public class CleaneLingStyleSolver { /** * Returns the unit propagated literals on level zero .
* @ return unit propagated literal on level zero */
public LNGIntVector upZeroLiterals ( ) { } } | final LNGIntVector upZeroLiterals = new LNGIntVector ( ) ; for ( int i = 0 ; i < this . trail . size ( ) ; ++ i ) { final int lit = this . trail . get ( i ) ; if ( var ( lit ) . level ( ) > 0 ) { break ; } else { upZeroLiterals . push ( lit ) ; } } return upZeroLiterals ; |
public class ArrayUtils { /** * 裁剪数组 。 Returns a new array if array is not empty and start greater or equals
* 0 and less than array length ; array self otherwise ;
* @ param array 源数组 。 array to be handed .
* @ param start 裁剪的起始位置的索引 。 start index number .
* @ return 一个新的数组 , 包含从指定索引开始到数组结束的所有元素 。 如果数组为空或起始索引小... | int end = array == null ? 0 : array . length - 1 ; return subArray ( array , start , end ) ; |
public class JobSchedulesImpl { /** * Lists all of the job schedules in the specified account .
* @ param jobScheduleListOptions Additional parameters for the operation
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; CloudJobSchedule &... | return listSinglePageAsync ( jobScheduleListOptions ) . concatMap ( new Func1 < ServiceResponseWithHeaders < Page < CloudJobSchedule > , JobScheduleListHeaders > , Observable < ServiceResponseWithHeaders < Page < CloudJobSchedule > , JobScheduleListHeaders > > > ( ) { @ Override public Observable < ServiceResponseWithH... |
public class CalculateMinimumTimeFieldSize { /** * getFormattedDateWidthInPixels , This returns the width ( in pixels ) of the longest formatted
* time , using the supplied DateTimeFormatter instance and font . Note that the locale
* information is built into the display format .
* You may optionally add extra ch... | // Create the font metrics that will be used in the calculation .
JTextField textField = new JTextField ( ) ; FontMetrics fontMetrics = textField . getFontMetrics ( fontValidTime ) ; // Create the longest possible time .
LocalTime longestTime = LocalTime . of ( 22 , 59 , 59 , 999999999 ) ; // Generate the longest time ... |
public class GenericCsvInputFormat { @ Override public void open ( FileInputSplit split ) throws IOException { } } | super . open ( split ) ; // instantiate the parsers
@ SuppressWarnings ( "unchecked" ) FieldParser < Object > [ ] parsers = new FieldParser [ fieldTypes . length ] ; for ( int i = 0 ; i < fieldTypes . length ; i ++ ) { if ( fieldTypes [ i ] != null ) { Class < ? extends FieldParser < ? > > parserType = FieldParser . ge... |
public class FieldValueMappingCallback { /** * Resolves a property via a property { @ link Resource } . This is used to retrieve relative or absolute references to
* the properties of resources other than the current resource . Such references cannot be reliably retrieved using a
* resource ' s { @ link ValueMap } ... | Resource property = this . resource . getResourceResolver ( ) . getResource ( this . resource , field . path ) ; if ( property == null ) { return null ; } // Only adaptation to String - types is supported by the property resource
if ( propertyType == String . class || propertyType == String [ ] . class ) { return prope... |
public class DebugPhaseListener { /** * Returns the debug - info Map for the given component .
* ATTENTION : this method is duplicate in UIInput .
* @ param clientId
* @ return */
@ SuppressWarnings ( "unchecked" ) public static Map < String , List < Object [ ] > > getDebugInfoMap ( String clientId ) { } } | final Map < String , Object > requestMap = FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . getRequestMap ( ) ; Map < String , List < Object [ ] > > debugInfo = ( Map < String , List < Object [ ] > > ) requestMap . get ( ErrorPageWriter . DEBUG_INFO_KEY + clientId ) ; if ( debugInfo == null ) { // no de... |
public class HDFSUtils { /** * { @ inheritDoc } */
@ Override public long getFileSize ( String path ) throws IOException , URISyntaxException { } } | FileSystem fs = FileSystem . get ( conf ) ; FileStatus fstatus = fs . getFileStatus ( new Path ( path ) ) ; if ( fstatus == null ) { return - 1 ; } return fstatus . getLen ( ) ; |
public class IfcObjectImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcRelDefinesByObject > getDeclares ( ) { } } | return ( EList < IfcRelDefinesByObject > ) eGet ( Ifc4Package . Literals . IFC_OBJECT__DECLARES , true ) ; |
public class GoogleCloudStorageReadChannel { /** * Initializes metadata ( size , encoding , etc ) from HTTP { @ code headers } . */
@ VisibleForTesting protected void initMetadata ( HttpHeaders headers ) throws IOException { } } | checkState ( ! metadataInitialized , "can not initialize metadata, it already initialized for '%s'" , resourceIdString ) ; long sizeFromMetadata ; String range = headers . getContentRange ( ) ; if ( range != null ) { sizeFromMetadata = Long . parseLong ( range . substring ( range . lastIndexOf ( '/' ) + 1 ) ) ; } else ... |
public class AbstractApplicationPage { /** * Creates a PageComponent for the given PageComponentDescriptor .
* @ param descriptor
* the descriptor
* @ return the created PageComponent */
protected PageComponent createPageComponent ( PageComponentDescriptor descriptor ) { } } | PageComponent pageComponent = descriptor . createPageComponent ( ) ; pageComponent . setContext ( new DefaultViewContext ( this , createPageComponentPane ( pageComponent ) ) ) ; if ( pageComponent instanceof ApplicationListener && getApplicationEventMulticaster ( ) != null ) { getApplicationEventMulticaster ( ) . addAp... |
public class AmazonChimeClient { /** * Retrieves termination setting details for the specified Amazon Chime Voice Connector .
* @ param getVoiceConnectorTerminationRequest
* @ return Result of the GetVoiceConnectorTermination operation returned by the service .
* @ throws UnauthorizedClientException
* The clien... | request = beforeClientExecution ( request ) ; return executeGetVoiceConnectorTermination ( request ) ; |
public class RingbufferMergeData { /** * Adds an item to the tail of the ringbuffer . If there is no space in the
* ringbuffer , the add will overwrite the oldest item in the ringbuffer .
* The method allows null values .
* The returned value is the sequence of the added item . Using this sequence
* you can rea... | tailSequence ++ ; if ( tailSequence - items . length == headSequence ) { headSequence ++ ; } int index = toIndex ( tailSequence ) ; items [ index ] = item ; return tailSequence ; |
public class Path { @ Override public void read ( DataInputView in ) throws IOException { } } | final boolean isNotNull = in . readBoolean ( ) ; if ( isNotNull ) { final String scheme = StringUtils . readNullableString ( in ) ; final String userInfo = StringUtils . readNullableString ( in ) ; final String host = StringUtils . readNullableString ( in ) ; final int port = in . readInt ( ) ; final String path = Stri... |
public class ConnectionHandler { /** * Tries to write any outstanding write bytes , runs in any thread ( possibly unlocked ) */
private void tryWriteBytes ( ) throws IOException { } } | lock . lock ( ) ; try { // Iterate through the outbound ByteBuff queue , pushing as much as possible into the OS ' network buffer .
Iterator < ByteBuffer > bytesIterator = bytesToWrite . iterator ( ) ; while ( bytesIterator . hasNext ( ) ) { ByteBuffer buff = bytesIterator . next ( ) ; bytesToWriteRemaining -= channel ... |
public class ServerModel { /** * Unregister a filter model .
* @ param model filter model to unregister */
public void removeFilterModel ( final FilterModel model ) { } } | if ( model . getUrlPatterns ( ) != null ) { try { deassociateBundle ( model . getContextModel ( ) . getVirtualHosts ( ) , model . getContextModel ( ) . getBundle ( ) ) ; filterLock . writeLock ( ) . lock ( ) ; for ( String virtualHost : resolveVirtualHosts ( model ) ) { for ( String urlPattern : model . getUrlPatterns ... |
public class SecurityConstraintTypeImpl { /** * If not already created , a new < code > web - resource - collection < / code > element will be created and returned .
* Otherwise , the first existing < code > web - resource - collection < / code > element will be returned .
* @ return the instance defined for the el... | List < Node > nodeList = childNode . get ( "web-resource-collection" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new WebResourceCollectionTypeImpl < SecurityConstraintType < T > > ( this , "web-resource-collection" , childNode , nodeList . get ( 0 ) ) ; } return createWebResourceCollection ( ) ; |
public class ResponseImpl { /** * / * ( non - Javadoc )
* @ see com . tvd12 . ezyfox . core . command . Response # exclude ( java . util . Collection ) */
@ Override public < U extends ApiBaseUser > Response exclude ( Collection < U > users ) { } } | for ( U user : users ) this . usernames . remove ( user . getName ( ) ) ; return this ; |
public class ViewableMessageBodyWriter { /** * Get { @ link org . glassfish . jersey . server . mvc . spi . ViewableContext viewable context } .
* User defined ( custom ) contexts have higher priority than the default ones
* ( i . e . { @ link ResolvingViewableContext } ) .
* @ return { @ code non - null } viewab... | final Set < ViewableContext > customProviders = Providers . getCustomProviders ( injectionManager , ViewableContext . class ) ; if ( ! customProviders . isEmpty ( ) ) { return customProviders . iterator ( ) . next ( ) ; } return Providers . getProviders ( injectionManager , ViewableContext . class ) . iterator ( ) . ne... |
public class CPDefinitionInventoryLocalServiceBaseImpl { /** * Updates the cp definition inventory in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners .
* @ param cpDefinitionInventory the cp definition inventory
* @ return the cp definition inventory that was updated... | return cpDefinitionInventoryPersistence . update ( cpDefinitionInventory ) ; |
public class AbstractContextBuilder { /** * キューを保持するクラスタのConnectionFactoryを取得する 。
* @ param queueName キュー名
* @ return ConnectionFactory */
public ConnectionFactory getConnectionFactory ( String queueName ) { } } | // このメソッドを呼び出す前に 、
// this # initContextMap ( ) を利用してcontextMapを初期しておくこと 。
if ( this . contextMap == null ) { return null ; } RabbitmqClusterContext context = this . contextMap . get ( queueName ) ; if ( context == null ) { return null ; } return context . getConnectionFactory ( ) ; |
public class SARLBuilderPreferenceAccess { /** * Load the generator configuration from the preferences .
* @ param generatorConfig the configuration to set up .
* @ param context the context of the building . */
@ SuppressWarnings ( { } } | "static-method" , "checkstyle:npathcomplexity" } ) public void loadBuilderPreferences ( GeneratorConfig2 generatorConfig , IProject context ) { final IPreferenceStore preferenceStore = SARLPreferences . getSARLPreferencesFor ( context ) ; if ( preferenceStore != null ) { if ( preferenceStore . contains ( PREF_GENERATED... |
public class NGram { /** * Produces nGrams for nGram matcher .
* @ param str source string
* @ param gramlength gram length
* @ return ngrams */
private static String [ ] generateNGrams ( String str , int gramlength ) { } } | if ( str == null || str . length ( ) == 0 ) return null ; ArrayList < String > grams = new ArrayList < String > ( ) ; int length = str . length ( ) ; String gram ; if ( length < gramlength ) { for ( int i = 1 ; i <= length ; i ++ ) { gram = str . substring ( 0 , i ) ; if ( grams . indexOf ( gram ) == - 1 ) grams . add ... |
public class DescribeRemediationConfigurationsRequest { /** * A list of AWS Config rule names of remediation configurations for which you want details .
* @ param configRuleNames
* A list of AWS Config rule names of remediation configurations for which you want details . */
public void setConfigRuleNames ( java . u... | if ( configRuleNames == null ) { this . configRuleNames = null ; return ; } this . configRuleNames = new com . amazonaws . internal . SdkInternalList < String > ( configRuleNames ) ; |
public class BaseTagGenerator { /** * Synchronizes the scripting variables of the given custom tag for
* the given scope . */
protected void syncScriptingVars ( JavaCodeWriter tagWriter , int scope ) { } } | TagVariableInfo [ ] tagVarInfos = ti . getTagVariableInfos ( ) ; VariableInfo [ ] varInfos = ti . getVariableInfo ( collectedTagData . getTagData ( ) ) ; if ( varInfos == null ) varInfos = new VariableInfo [ 0 ] ; if ( ( varInfos . length == 0 ) && ( tagVarInfos . length == 0 ) ) { return ; } if ( varInfos . length > 0... |
public class ServiceRemoveStepHandler { /** * If the { @ link OperationContext # isResourceServiceRestartAllowed ( ) context allows resource removal } ,
* removes services ; otherwise puts the process in reload - required state . The following services are
* removed :
* < ul >
* < li > The service named by the ... | if ( context . isResourceServiceRestartAllowed ( ) ) { final PathAddress address = context . getCurrentAddress ( ) ; final String name = address . getLastElement ( ) . getValue ( ) ; ServiceName nonCapabilityServiceName = serviceName ( name , address ) ; if ( nonCapabilityServiceName != null ) { context . removeService... |
public class Systems { /** * Returns the instance for the specified implementation . If the system is
* unknown , throws an exception .
* @ param impl
* implementation to be checked .
* @ return instances */
public static JaxRx getInstance ( final String impl ) { } } | final String path = Systems . getSystems ( ) . get ( impl ) ; if ( path == null ) { throw new JaxRxException ( 404 , "Unknown implementation: " + impl ) ; } JaxRx jaxrx = INSTANCES . get ( path ) ; if ( jaxrx == null ) { try { jaxrx = ( JaxRx ) Class . forName ( path ) . newInstance ( ) ; INSTANCES . put ( path , jaxrx... |
public class WebApp { /** * PK91120 Start */
public boolean notifyServletRequestCreated ( ServletRequest request ) { } } | if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "notifyServletRequestCreated" , "ENTRY" ) ; // PI26908
boolean servletRequestListenerCreated = false ; if ( ! servletRequestListeners . isEmpty ( ) ) { WebContainer... |
public class FilterDriver { /** * Run the test with this method .
* The data is input for the { @ link String } .
* @ param separator separator of data
* @ param input input { @ link String } data
* @ param output result of { @ link Record } { @ link List }
* @ throws URISyntaxException
* @ throws IOExcepti... | run ( null , separator , false , input , output ) ; |
public class BindTransformer { /** * Get transformer for type .
* @ param property
* the property
* @ return transform */
public static BindTransform lookup ( BindProperty property ) { } } | TypeName typeName = property . getPropertyType ( ) . getTypeName ( ) ; if ( property . hasTypeAdapter ( ) ) { typeName = typeName ( property . typeAdapter . dataType ) ; } return lookup ( typeName ) ; |
public class KiteConnect { /** * Retrieves quote and market depth for an instrument
* @ param instruments is the array of tradingsymbol and exchange or instrument token . For example { NSE : NIFTY 50 , BSE : SENSEX } or { 256265 , 265}
* @ return Map of String and Quote .
* @ throws KiteException is thrown for al... | KiteRequestHandler kiteRequestHandler = new KiteRequestHandler ( proxy ) ; JSONObject jsonObject = kiteRequestHandler . getRequest ( routes . get ( "market.quote" ) , "i" , instruments , apiKey , accessToken ) ; Type type = new TypeToken < Map < String , Quote > > ( ) { } . getType ( ) ; return gson . fromJson ( String... |
public class ClassPathCollector { /** * Creates a class path string from the entries using the path . seperator
* @ param entries
* @ return the class path string */
public static String toCpEnvString ( Collection < ? extends String > entries ) { } } | if ( entries . size ( ) > 0 ) { StringBuffer classPath = new StringBuffer ( "" ) ; for ( String cp : new HashSet < String > ( entries ) ) // remove dublicates
{ if ( cp == null ) { continue ; } classPath . append ( cp ) ; classPath . append ( System . getProperty ( "path.separator" ) ) ; } classPath . deleteCharAt ( cl... |
public class WikipediaTemplateInfoGenerator { /** * Fill map ( mapToFill ) with template data
* @ param textForTemplateExtraction
* text for template extraction
* @ param filterToApply
* filter to apply for templates
* @ param id
* id of a page / revision
* @ param mapToFill
* map to fill with data */
p... | Set < String > names = getTemplateNames ( textForTemplateExtraction ) ; // Update the map with template values for current page
for ( String name : names ) { // filter templates - only use templates from a provided
// whitelist
if ( filterToApply . acceptTemplate ( name ) ) { // Create records for TEMPLATE - > PAGES / ... |
public class ReflectionUtil { /** * throws RuntimeException if class is not found */
public static Class < ? > classForName ( String className ) { } } | try { return Class . forName ( className , false , Javers . class . getClassLoader ( ) ) ; } catch ( ClassNotFoundException ex ) { throw new JaversException ( ex ) ; } |
public class FMT { /** * Hook called when the processd file is not compliant with the formatter .
* @ param file the file that is not compliant
* @ param formatted the corresponding formatted of the file . */
@ Override protected void onNonComplyingFile ( File file , String formatted ) throws IOException { } } | CharSink sink = Files . asCharSink ( file , Charsets . UTF_8 ) ; sink . write ( formatted ) ; |
public class ActionContext { /** * Evict cached object
* @ param key
* the key indexed the cached object to be evicted */
public void evictCache ( String key ) { } } | H . Session sess = session ( ) ; if ( null != sess ) { sess . evict ( key ) ; } else { app ( ) . cache ( ) . evict ( key ) ; } |
public class DefaultPlexusCipher { public String decryptDecorated ( final String str , final String passPhrase ) throws PlexusCipherException { } } | if ( str == null || str . length ( ) < 1 ) { return str ; } if ( isEncryptedString ( str ) ) { return decrypt ( unDecorate ( str ) , passPhrase ) ; } return decrypt ( str , passPhrase ) ; |
public class ResourceList { /** * Return this { @ link ResourceList } as a map from resource path ( obtained from { @ link Resource # getPath ( ) } ) to a
* { @ link ResourceList } of { @ link Resource } objects that have that path .
* @ return This { @ link ResourceList } as a map from resource path ( obtained fro... | final Map < String , ResourceList > pathToResourceList = new HashMap < > ( ) ; for ( final Resource resource : this ) { final String path = resource . getPath ( ) ; ResourceList resourceList = pathToResourceList . get ( path ) ; if ( resourceList == null ) { resourceList = new ResourceList ( 1 ) ; pathToResourceList . ... |
public class UnitJudge { /** * 注意 : 请先使用 { { @ link # defined ( String , String ) } } 检查合法性 , 然后再使用本方法取属性 */
public static boolean isSequential ( String group , String unit ) { } } | try { return UnitRouter . SINGLETON . newestDefinition ( Unit . fullName ( group , unit ) ) . getInput ( ) . isSequential ( ) ; } catch ( UnitUndefinedException e ) { throw new RuntimeException ( "Please call UnitJudge.defined() first." , e ) ; } |
public class Expression { /** * Returns an identical { @ link Expression } with the given source location . */
public Expression withSourceLocation ( SourceLocation location ) { } } | checkNotNull ( location ) ; if ( location . equals ( this . location ) ) { return this ; } return new Expression ( resultType , features , location ) { @ Override protected void doGen ( CodeBuilder adapter ) { Expression . this . gen ( adapter ) ; } } ; |
public class MultipleOutputFormat { /** * Create a composite record writer that can write key / value data to different
* output files
* @ param fs
* the file system to use
* @ param job
* the job conf for the job
* @ param name
* the leaf file name for the output file ( such as part - 00000 " )
* @ par... | final FileSystem myFS = fs ; final String myName = generateLeafFileName ( name ) ; final JobConf myJob = job ; final Progressable myProgressable = arg3 ; return new RecordWriter < K , V > ( ) { // a cache storing the record writers for different output files .
TreeMap < String , RecordWriter < K , V > > recordWriters =... |
public class ObjectCacheTwoLevelImpl { /** * Make sure that the Identity objects of garbage collected cached
* objects are removed too . */
private void processQueue ( ) { } } | CacheEntry sv ; while ( ( sv = ( CacheEntry ) queue . poll ( ) ) != null ) { sessionCache . remove ( sv . oid ) ; } |
public class UsersInner { /** * Deletes the user on a databox edge / gateway device .
* @ param deviceName The device name .
* @ param name The user name .
* @ param resourceGroupName The resource group name .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ ... | return ServiceFuture . fromResponse ( deleteWithServiceResponseAsync ( deviceName , name , resourceGroupName ) , serviceCallback ) ; |
public class FSM2MealyParserIO { /** * Parse a transition .
* @ throws FSMParseException
* when the transition is illegal .
* @ throws IOException
* see { @ link StreamTokenizer # nextToken ( ) } . */
@ Override protected void parseTransition ( StreamTokenizer streamTokenizer ) throws FSMParseException , IOExce... | try { // check we will read a state index
if ( streamTokenizer . nextToken ( ) != StreamTokenizer . TT_WORD ) { throw new FSMParseException ( EXPECT_NUMBER , streamTokenizer ) ; } // read the source state index
int from = Integer . parseInt ( streamTokenizer . sval ) ; // check if such a state exists
if ( ! getStates (... |
public class Messenger { /** * Command for raw api request
* @ param service service name
* @ param method method name
* @ param params request params */
@ ObjectiveCName ( "rawRequestWithService:withMethod:WithParams:" ) public void rawRequest ( String service , String method , ApiRawValue params ) { } } | modules . getExternalModule ( ) . rawRequest ( service , method , params ) ; |
public class GeoPackageExtensions { /** * Delete the Related Tables extension
* @ param geoPackage
* GeoPackage
* @ since 3.2.0 */
public static void deleteRelatedTablesExtension ( GeoPackageCore geoPackage ) { } } | RelatedTablesCoreExtension relatedTablesExtension = getRelatedTableExtension ( geoPackage ) ; if ( relatedTablesExtension . has ( ) ) { relatedTablesExtension . removeExtension ( ) ; } |
public class Node { /** * This method adds an interaction scoped correlation id .
* @ param id The id
* @ return The node */
public Node addInteractionCorrelationId ( String id ) { } } | this . correlationIds . add ( new CorrelationIdentifier ( Scope . Interaction , id ) ) ; return this ; |
public class ExcelUtils { /** * 双检锁保证单例 */
public static ExcelUtils getInstance ( ) { } } | if ( null == excelUtils ) { synchronized ( ExcelUtils . class ) { if ( null == excelUtils ) { excelUtils = new ExcelUtils ( ) ; } } } return excelUtils ; |
public class File { /** * Returns a list of the files that your account has access to . The files are returned sorted by
* creation date , with the most recently created files appearing first . */
public static FileCollection list ( Map < String , Object > params , RequestOptions options ) throws StripeException { } ... | return requestCollection ( classUrl ( File . class ) , params , FileCollection . class , options ) ; |
public class AbstractUserTokenService { /** * If the passed token is null or expired or if there is no user associated
* with the token , this method will throw an { @ link Exception } .
* @ param userToken
* @ throws Exception if the token is not valid ( e . g . because it is expired ) */
@ Override @ Transactio... | // call super
super . validateToken ( userToken ) ; // check if user is associated
if ( userToken . getUser ( ) == null ) { throw new Exception ( "There is no user associated with this token." ) ; } |
public class CreateCollectionRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CreateCollectionRequest createCollectionRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( createCollectionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createCollectionRequest . getCollectionId ( ) , COLLECTIONID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to ... |
public class DelayedClientTransport { /** * Use the picker to try picking a transport for every pending stream , proceed the stream if the
* pick is successful , otherwise keep it pending .
* < p > This method may be called concurrently with { @ code newStream ( ) } , and it ' s safe . All pending
* streams will ... | ArrayList < PendingStream > toProcess ; synchronized ( lock ) { lastPicker = picker ; lastPickerVersion ++ ; if ( picker == null || ! hasPendingStreams ( ) ) { return ; } toProcess = new ArrayList < > ( pendingStreams ) ; } ArrayList < PendingStream > toRemove = new ArrayList < > ( ) ; for ( final PendingStream stream ... |
public class RealVoltDB { /** * move back to partition leader ' s node . */
private void checkExportStreamMastership ( ) { } } | for ( Initiator initiator : m_iv2Initiators . values ( ) ) { if ( initiator . getPartitionId ( ) != MpInitiator . MP_INIT_PID ) { SpInitiator spInitiator = ( SpInitiator ) initiator ; if ( spInitiator . isLeader ( ) ) { ExportManager . instance ( ) . takeMastership ( spInitiator . getPartitionId ( ) ) ; } } } |
public class NetUtil { /** * 根据long值获取ip v4地址
* @ param longIP IP的long表示形式
* @ return IP V4 地址 */
public static String longToIpv4 ( long longIP ) { } } | final StringBuilder sb = new StringBuilder ( ) ; // 直接右移24位
sb . append ( String . valueOf ( longIP >>> 24 ) ) ; sb . append ( "." ) ; // 将高8位置0 , 然后右移16位
sb . append ( String . valueOf ( ( longIP & 0x00FFFFFF ) >>> 16 ) ) ; sb . append ( "." ) ; sb . append ( String . valueOf ( ( longIP & 0x0000FFFF ) >>> 8 ) ) ; sb .... |
public class KeyVaultClientBaseImpl { /** * Deletes the certificate contacts for a specified key vault .
* Deletes the certificate contacts for a specified key vault certificate . This operation requires the certificates / managecontacts permission .
* @ param vaultBaseUrl The vault name , for example https : / / m... | return ServiceFuture . fromResponse ( deleteCertificateContactsWithServiceResponseAsync ( vaultBaseUrl ) , serviceCallback ) ; |
public class HttpRequestData { /** * < p > Set ( add / change ) cookie value . < / p >
* @ param pName Name
* @ param pValue Value */
@ Override public final void setCookieValue ( final String pName , final String pValue ) { } } | Cookie cookie = null ; if ( this . httpReq . getCookies ( ) != null ) { for ( Cookie co : this . httpReq . getCookies ( ) ) { if ( co . getName ( ) . equals ( pName ) ) { cookie = co ; cookie . setValue ( pValue ) ; break ; } } } if ( cookie == null ) { cookie = new Cookie ( pName , pValue ) ; cookie . setMaxAge ( Inte... |
public class JaxRsWebEndpointImpl { /** * { @ inheritDoc } */
@ Override public void init ( ServletConfig servletConfig , JaxRsProviderFactoryService providerFactoryService ) throws ServletException { } } | super . init ( servletConfig , providerFactoryService ) ; LibertyJaxRsServerFactoryBean jaxRsServerFactory = new LibertyJaxRsServerFactoryBean ( endpointInfo , jaxRsModuleMetaData , beanCustomizers , servletConfig , providerFactoryService ) ; if ( features != null && ! features . isEmpty ( ) ) { jaxRsServerFactory . se... |
public class HttpEndpointImpl { /** * Process HTTP chain work .
* @ param enableEndpoint True to enable the associated HTTP chain . False , to disable it .
* @ param isPause True if this call is being made for pause endpoint processing . */
public void processHttpChainWork ( boolean enableEndpoint , boolean isPause... | if ( enableEndpoint ) { // enable the endpoint if it is currently disabled
// it ' s ok if the endpoint is stopped , the config update will occur @ next start
endpointState . compareAndSet ( DISABLED , ENABLED ) ; if ( httpPort >= 0 ) { httpChain . enable ( ) ; } if ( httpsPort >= 0 && sslFactoryProvider . getService (... |
public class CmsScheduledJobInfo { /** * Sets the job name . < p >
* @ param jobName the job name to set */
public void setJobName ( String jobName ) { } } | checkFrozen ( ) ; if ( CmsStringUtil . isEmpty ( jobName ) || ! jobName . trim ( ) . equals ( jobName ) ) { throw new CmsIllegalArgumentException ( Messages . get ( ) . container ( Messages . ERR_BAD_JOB_NAME_1 , jobName ) ) ; } m_jobName = jobName ; |
public class ESInstanceDetailsMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ESInstanceDetails eSInstanceDetails , ProtocolMarshaller protocolMarshaller ) { } } | if ( eSInstanceDetails == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( eSInstanceDetails . getInstanceClass ( ) , INSTANCECLASS_BINDING ) ; protocolMarshaller . marshall ( eSInstanceDetails . getInstanceSize ( ) , INSTANCESIZE_BINDING ) ;... |
public class DataUtil { /** * big - endian or motorola format . */
public static long readLongBigEndian ( InputStream io ) throws IOException { } } | long value = io . read ( ) ; if ( value < 0 ) throw new EOFException ( ) ; value <<= 56 ; int i = io . read ( ) ; if ( i < 0 ) throw new EOFException ( ) ; value |= ( ( long ) i ) << 48 ; i = io . read ( ) ; if ( i < 0 ) throw new EOFException ( ) ; value |= ( ( long ) i ) << 40 ; i = io . read ( ) ; if ( i < 0 ) throw... |
public class SVGGlyph { /** * resize the svg to a certain width and height
* @ param width
* @ param height */
public void setSize ( double width , double height ) { } } | this . setMinSize ( StackPane . USE_PREF_SIZE , StackPane . USE_PREF_SIZE ) ; this . setPrefSize ( width , height ) ; this . setMaxSize ( StackPane . USE_PREF_SIZE , StackPane . USE_PREF_SIZE ) ; |
public class InstanceClient { /** * Retrieves the list of instances contained within the specified zone .
* < p > Sample code :
* < pre > < code >
* try ( InstanceClient instanceClient = InstanceClient . create ( ) ) {
* ProjectZoneName zone = ProjectZoneName . of ( " [ PROJECT ] " , " [ ZONE ] " ) ;
* for ( ... | ListInstancesHttpRequest request = ListInstancesHttpRequest . newBuilder ( ) . setZone ( zone == null ? null : zone . toString ( ) ) . build ( ) ; return listInstances ( request ) ; |
public class GetDomainsResult { /** * An array of key - value pairs containing information about each of the domain entries in the user ' s account .
* @ param domains
* An array of key - value pairs containing information about each of the domain entries in the user ' s account . */
public void setDomains ( java .... | if ( domains == null ) { this . domains = null ; return ; } this . domains = new java . util . ArrayList < Domain > ( domains ) ; |
public class DescribeBrokerResult { /** * The list of all ActiveMQ usernames for the specified broker .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setUsers ( java . util . Collection ) } or { @ link # withUsers ( java . util . Collection ) } if you want ... | if ( this . users == null ) { setUsers ( new java . util . ArrayList < UserSummary > ( users . length ) ) ; } for ( UserSummary ele : users ) { this . users . add ( ele ) ; } return this ; |
public class TraceContext { /** * This method is looking for sampling tag in nodes properties to override current sampling .
* @ param node It sh
* @ return boolean whether trace should be sampled or not */
private static boolean checkForSamplingProperties ( Node node ) { } } | Set < Property > samplingProperties = node instanceof ContainerNode ? ( ( ContainerNode ) node ) . getPropertiesIncludingDescendants ( Tags . SAMPLING_PRIORITY . getKey ( ) ) : node . getProperties ( Tags . SAMPLING_PRIORITY . getKey ( ) ) ; for ( Property prop : samplingProperties ) { int priority = 0 ; try { priority... |
public class SnapshotTaskClientImpl { /** * { @ inheritDoc } */
@ Override public GetSnapshotContentsTaskResult getSnapshotContents ( String snapshotId , int pageNumber , int pageSize , String prefix ) throws ContentStoreException { } } | GetSnapshotContentsTaskParameters taskParams = new GetSnapshotContentsTaskParameters ( ) ; taskParams . setSnapshotId ( snapshotId ) ; taskParams . setPageNumber ( pageNumber ) ; taskParams . setPageSize ( pageSize ) ; taskParams . setPrefix ( prefix ) ; String taskResult = contentStore . performTask ( SnapshotConstant... |
public class GlobalTypeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case DroolsPackage . GLOBAL_TYPE__IDENTIFIER : setIdentifier ( ( String ) newValue ) ; return ; case DroolsPackage . GLOBAL_TYPE__TYPE : setType ( ( String ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class HBaseClient { /** * Gets the batch size .
* @ param persistenceUnit
* the persistence unit
* @ param puProperties
* the pu properties
* @ return the batch size */
private int getBatchSize ( String persistenceUnit , Map < String , Object > puProperties ) { } } | String batch_size = puProperties != null ? ( String ) puProperties . get ( PersistenceProperties . KUNDERA_BATCH_SIZE ) : null ; return batch_size != null ? Integer . valueOf ( batch_size ) : KunderaMetadataManager . getPersistenceUnitMetadata ( kunderaMetadata , persistenceUnit ) . getBatchSize ( ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.