signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class StringTools { /** * Count the num # of matches of subSequence in sourceSequence
* @ param sourceSequence to find occurrence from
* @ param subSequence to find occurrence of
* @ return num of occurrences of subSequence in sourceSequence */
public static int countMatches ( CharSequence sourceSequence ,... | if ( isEmpty ( sourceSequence ) || isEmpty ( subSequence ) || sourceSequence . length ( ) < subSequence . length ( ) ) { return 0 ; } int count = 0 ; int sourceSequenceIndex = 0 ; int subSequenceIndex = 0 ; while ( sourceSequenceIndex < sourceSequence . length ( ) ) { if ( sourceSequence . charAt ( sourceSequenceIndex ... |
public class AbstractSmoothSeekBarChangeListener { /** * Unused */
@ Override public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { } } | onSmoothProgressChanged ( seekBar , progress , progress / smoothnessFactor , fromUser ) ; |
public class WebServiceCommunication { /** * Issues HTTP POST request , returns response body as string .
* @ param endpoint endpoint of request url
* @ param params request line parameters
* @ param json request body
* @ param requestId request id for record response time in millisecond
* @ return response b... | String url = String . format ( "%s%s?%s" , this . baseUri , endpoint , StringUtils . isBlank ( params ) ? "" : params ) ; LOG . debug ( "{} POST {}" , this . hashCode ( ) , url ) ; HttpPost post = new HttpPost ( url ) ; StringEntity entity = new StringEntity ( json . toString ( ) ) ; entity . setContentType ( ContentTy... |
public class Respoke { /** * Unregister this device from the Respoke push notification service and stop any future notifications until it is re - registered
* @ param completionListener A listener to be notified of the success of the asynchronous unregistration operation */
public void unregisterPushServices ( TaskCo... | RespokeClient activeInstance = null ; // If there are already client instances running , check if any of them have already connected
for ( RespokeClient eachInstance : instances ) { if ( eachInstance . isConnected ( ) ) { // The push service only supports one endpoint per device , so the token only needs to be register... |
public class DupeTimestampLastBestStatusFilter { /** * return group key of { @ code line } .
* @ param line CDX line
* @ return first { @ code timestampDedupLength } digits
* of { @ code timestamp } */
protected final String groupKey ( CDXLine line ) { } } | String timestamp = line . getTimestamp ( ) ; return timestamp . substring ( 0 , Math . min ( timestampDedupLength , timestamp . length ( ) ) ) ; |
public class AttributeProxy { public int subscribe_event ( int event , CallBack callback , String [ ] filters ) throws DevFailed { } } | return dev . subscribe_event ( deviceName , event , callback , filters ) ; |
public class ConfigUtils { /** * Method is used to return the values for an enum .
* @ param enumClass Enum class to return the constants for .
* @ return Returns a comma seperated string of all of the values in the enum . */
public static String enumValues ( Class < ? > enumClass ) { } } | Preconditions . checkNotNull ( enumClass , "enumClass cannot be null" ) ; Preconditions . checkState ( enumClass . isEnum ( ) , "enumClass must be an enum." ) ; return Joiner . on ( ", " ) . join ( enumClass . getEnumConstants ( ) ) ; |
public class StructureTools { /** * Add a list of groups to a new structure . Chains will be automatically
* created in the new structure as needed .
* @ param s structure to receive the group
* @ param g group to add
* @ param clone Indicates whether the input groups should be cloned before
* being added to ... | Chain chainGuess = null ; for ( Group g : groups ) { chainGuess = addGroupToStructure ( s , g , model , chainGuess , clone ) ; } |
public class Group { /** * Specifies the parameters to be listed as columns
* @ param priKey the primary key of the FDT sketch
* @ param count the number of retained rows associated with this group
* @ param estimate the estimate of the original population associated with this group
* @ param ub the upper bound... | this . count = count ; est = estimate ; this . ub = ub ; this . lb = lb ; this . fraction = fraction ; this . rse = rse ; this . priKey = priKey ; return this ; |
public class WorkflowTriggersInner { /** * Resets a workflow trigger .
* @ param resourceGroupName The resource group name .
* @ param workflowName The workflow name .
* @ param triggerName The workflow trigger name .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws Clou... | resetWithServiceResponseAsync ( resourceGroupName , workflowName , triggerName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class Tools { /** * Configure the SSLContext to accept untrusted connections */
public static SSLContext getTlsSslContext ( ) throws Exception { } } | // Create a trust manager that does not validate certificate chains
TrustManager [ ] trustAllCerts = new TrustManager [ ] { new X509TrustManager ( ) { public X509Certificate [ ] getAcceptedIssuers ( ) { return new X509Certificate [ ] { } ; } public void checkClientTrusted ( X509Certificate [ ] chain , String authType )... |
public class ImagePipeline { /** * Submits a request for prefetching to the disk cache with a default priority .
* < p > Beware that if your network fetcher doesn ' t support priorities prefetch requests may slow
* down images which are immediately required on screen .
* @ param imageRequest the request to submit... | return prefetchToDiskCache ( imageRequest , callerContext , Priority . MEDIUM ) ; |
public class DescribeLifecycleHooksResult { /** * The lifecycle hooks for the specified group .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setLifecycleHooks ( java . util . Collection ) } or { @ link # withLifecycleHooks ( java . util . Collection ) } if... | if ( this . lifecycleHooks == null ) { setLifecycleHooks ( new com . amazonaws . internal . SdkInternalList < LifecycleHook > ( lifecycleHooks . length ) ) ; } for ( LifecycleHook ele : lifecycleHooks ) { this . lifecycleHooks . add ( ele ) ; } return this ; |
public class ODataRendererUtils { /** * Builds the ' Context URL ' when the request is an action or function call .
* @ param oDataUri The odata uri
* @ param entityDataModel The entity data model .
* @ param isPrimitive True if the context URL is for primitive .
* @ return The built ' Context URL ' .
* @ see... | String serviceRoot = oDataUri . serviceRoot ( ) ; String returnType = ODataUriUtil . getOperationReturnType ( oDataUri , entityDataModel ) ; return serviceRoot + "/" + METADATA + "#" + returnType + ( isPrimitive ? "" : "/$entity" ) ; |
public class NumberFormatContext { /** * Set the pattern and initialize parameters based on the arguments , pattern and options settings . */
public void setPattern ( NumberPattern pattern , int _maxSigDigits , int _minSigDigits ) { } } | Format format = pattern . format ( ) ; minIntDigits = orDefault ( options . minimumIntegerDigits ( ) , format . minimumIntegerDigits ( ) ) ; maxFracDigits = currencyDigits == - 1 ? format . maximumFractionDigits ( ) : currencyDigits ; maxFracDigits = orDefault ( options . maximumFractionDigits ( ) , maxFracDigits ) ; m... |
public class StringUtils { /** * Determines whether the String value consists entirely of letters .
* @ param value the String value for determination as text .
* @ return a boolean value indicating if the String value consists entirely of letters .
* @ see java . lang . Character # isLetter ( char )
* @ see # ... | for ( char chr : toCharArray ( value ) ) { if ( ! Character . isLetter ( chr ) ) { return false ; } } return hasText ( value ) ; |
public class LNDImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setTxtColor ( Integer newTxtColor ) { } } | Integer oldTxtColor = txtColor ; txtColor = newTxtColor ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . LND__TXT_COLOR , oldTxtColor , txtColor ) ) ; |
public class Environment { /** * Adds a directory to the collection of module paths .
* @ param moduleDir the module directory to add
* @ throws java . lang . IllegalArgumentException if the path is { @ code null } */
public void addModuleDir ( final String moduleDir ) { } } | if ( moduleDir == null ) { throw LauncherMessages . MESSAGES . nullParam ( "moduleDir" ) ; } // Validate the path
final Path path = Paths . get ( moduleDir ) . normalize ( ) ; modulesDirs . add ( path . toString ( ) ) ; |
public class DefaultSchemaOperations { /** * ( non - Javadoc )
* @ see org . springframework . data . solr . core . schema . SchemaOperations # removeField ( java . lang . String ) */
@ Override public void removeField ( final String name ) { } } | template . execute ( solrClient -> { try { UpdateResponse response = new SchemaRequest . DeleteField ( name ) . process ( solrClient , collection ) ; if ( hasErrors ( response ) ) { throw new SchemaModificationException ( String . format ( "Removing field with name %s from collection %s failed with status %s. Server re... |
public class RScriptExporter { /** * Writes an R script plotting multiple surfaces based on a data frame
* generated with the given number of values and scope for the two input
* variables on the output variables .
* @ param engine is the engine to export
* @ param writer is the output where the engine will be ... | writeScriptHeader ( writer , engine ) ; writer . append ( "engine.fldFile = \"" ) ; new FldExporter ( ) . write ( engine , writer , reader ) ; writer . append ( "\"\n\n" ) ; writer . append ( "engine.df = read.delim(textConnection(engine.fld), header=TRUE, " + "sep=\" \", strip.white=TRUE)\n\n" ) ; writeScriptPlots ( w... |
public class RotateNumber { /** * Performs a circular shift on the digits of the provided integer num .
* The function shifts the digits to the right by ' rotation ' and returns the output as an string .
* If rotations is greater than the number of digits , the function simply returns the reversed digits . */
publi... | String numStr = Integer . toString ( num ) ; if ( rotation > numStr . length ( ) ) { return new StringBuilder ( numStr ) . reverse ( ) . toString ( ) ; } else { return numStr . substring ( numStr . length ( ) - rotation ) + numStr . substring ( 0 , numStr . length ( ) - rotation ) ; } |
public class Strings { /** * Deletes the last two characters . */
public static StringBuilder chompChomp ( StringBuilder builder ) { } } | return builder . delete ( builder . length ( ) - 2 , builder . length ( ) ) ; |
public class Proxy { /** * Returns the proxy ' s Id correspondoing to the real object on the server
* @ return ID The ID of the proxy object */
public short getProxyID ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProxyID" ) ; if ( ! proxyIDSet ) { // Someone is trying to use the ID of this proxy object but it has not been set yet . This
// is an error as the ID will be invalid anyway .
SIErrorException e = new SIErrorExcep... |
public class Entity { /** * Use { @ link # getMetadataMap ( ) } instead . */
@ java . lang . Deprecated public java . util . Map < java . lang . String , java . lang . String > getMetadata ( ) { } } | return getMetadataMap ( ) ; |
public class DataTable { /** * setter for headings - sets
* @ generated
* @ param v value to set into the feature */
public void setHeadings ( StringArray v ) { } } | if ( DataTable_Type . featOkTst && ( ( DataTable_Type ) jcasType ) . casFeat_headings == null ) jcasType . jcas . throwFeatMissing ( "headings" , "ch.epfl.bbp.uima.types.DataTable" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( DataTable_Type ) jcasType ) . casFeatCode_headings , jcasType . ll_cas . ll_getFSRef ( ... |
import java . util . ArrayList ; import java . util . List ; class FilterNoneTuples { /** * Function that eliminates all tuples from a list that exclusively contain none values .
* Args :
* lists : An array of arrays .
* Returns :
* A List representation of the filtered list . */
public static List < List < Obj... | List < List < Object > > filteredList = new ArrayList < > ( ) ; for ( List < Object > list : lists ) { if ( list . stream ( ) . anyMatch ( o -> o != null ) ) { filteredList . add ( list ) ; } } return filteredList ; |
public class AgreementSeeker { /** * Convenience method that remove all instances of the given values
* from the given map
* @ param mm a multimap
* @ param values a set of values that need to be removed */
static protected void removeValues ( TreeMultimap < Long , Long > mm , Set < Long > values ) { } } | Iterator < Map . Entry < Long , Long > > itr = mm . entries ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Map . Entry < Long , Long > e = itr . next ( ) ; if ( values . contains ( e . getValue ( ) ) ) { itr . remove ( ) ; } } |
public class GlobalProperties { public static final GlobalProperties combine ( GlobalProperties gp1 , GlobalProperties gp2 ) { } } | if ( gp1 . isFullyReplicated ( ) ) { if ( gp2 . isFullyReplicated ( ) ) { return new GlobalProperties ( ) ; } else { return gp2 ; } } else if ( gp2 . isFullyReplicated ( ) ) { return gp1 ; } else if ( gp1 . ordering != null ) { return gp1 ; } else if ( gp2 . ordering != null ) { return gp2 ; } else if ( gp1 . partition... |
public class Bootstrap { /** * Update the application file with the content from the update directory .
* @ param applicationFile The application file to be updated
* @ param updateDir The update directory holding the new file versions
* @ param removeUpdateFiles If true , the updated files are deleted from the u... | Path newApplicationJar = null ; // Extract the application name from the application file
String applicationName = applicationFile . getFileName ( ) . toString ( ) ; // Strip the extension
applicationName = applicationName . substring ( 0 , applicationName . lastIndexOf ( "." ) ) ; ArrayList < Path > updateFiles = new ... |
public class FluentMatchingR { /** * Specifies an match on a decomposing matcher with 0 extracted fields and then returns a fluent
* interface for specifying the action to take if the value matches this case . */
public < U extends T > OngoingMatchingR0 < T , U , R > when ( DecomposableMatchBuilder0 < U > decomposabl... | return new OngoingMatchingR0 < > ( this , decomposableMatchBuilder . build ( ) ) ; |
public class DataFileCache { /** * Saves the * . data file as compressed * . backup .
* @ throws HsqlException */
void backupFile ( ) { } } | writeLock . lock ( ) ; try { if ( incBackup ) { if ( fa . isStreamElement ( backupFileName ) ) { fa . removeElement ( backupFileName ) ; } return ; } if ( fa . isStreamElement ( fileName ) ) { FileArchiver . archive ( fileName , backupFileName + ".new" , database . getFileAccess ( ) , FileArchiver . COMPRESSION_ZIP ) ;... |
public class gslbservice { /** * Use this API to fetch gslbservice resource of given name . */
public static gslbservice get ( nitro_service service , String servicename ) throws Exception { } } | gslbservice obj = new gslbservice ( ) ; obj . set_servicename ( servicename ) ; gslbservice response = ( gslbservice ) obj . get_resource ( service ) ; return response ; |
public class JsDocInfoParser { /** * Parses a string containing a JsDoc declaration , returning the entire JSDocInfo
* if the parsing succeeded or { @ code null } if it failed . */
public static JSDocInfo parseJsdoc ( String toParse ) { } } | JsDocInfoParser parser = getParser ( toParse ) ; parser . parse ( ) ; return parser . retrieveAndResetParsedJSDocInfo ( ) ; |
public class PooledConnectionFactory { /** * 创建连接 */
@ Override public Connection create ( InetSocketAddress address ) throws Exception { } } | // 初始化字符集
if ( null == charset ) { charset = Charset . forName ( charsetName ) ; } return new DefaultConnection ( address , soTimeout , connectTimeout , charset ) ; |
public class CacheProxyUtil { /** * Cache clear response validator , loop on results to validate that no exception exists on the result map .
* Throws the first exception in the map .
* @ param results map of { @ link CacheClearResponse } . */
public static void validateResults ( Map < Integer , Object > results ) ... | for ( Object result : results . values ( ) ) { if ( result != null && result instanceof CacheClearResponse ) { Object response = ( ( CacheClearResponse ) result ) . getResponse ( ) ; if ( response instanceof Throwable ) { ExceptionUtil . sneakyThrow ( ( Throwable ) response ) ; } } } |
public class Server { /** * Get the domain data
* @ return The data iterator
* @ exception JMException Thrown if an error occurs */
public static Iterator getDomainData ( ) throws JMException { } } | MBeanServer server = getMBeanServer ( ) ; TreeMap < String , DomainData > domainData = new TreeMap < String , DomainData > ( ) ; if ( server != null ) { Set objectNames = server . queryNames ( null , null ) ; Iterator objectNamesIter = objectNames . iterator ( ) ; while ( objectNamesIter . hasNext ( ) ) { ObjectName na... |
public class NumberPath { /** * Method to construct the greater than expression for byte
* @ param value the byte
* @ return Expression */
public Expression < Byte > gt ( byte value ) { } } | String valueString = "'" + value + "'" ; return new Expression < Byte > ( this , Operation . gt , valueString ) ; |
public class OrcBatchReader { /** * Fills an ORC batch into an array of Row .
* @ param rows The batch of rows need to be filled .
* @ param schema The schema of the ORC data .
* @ param batch The ORC data .
* @ param selectedFields The list of selected ORC fields .
* @ return The number of rows that were fil... | int rowsToRead = Math . min ( ( int ) batch . count ( ) , rows . length ) ; List < TypeDescription > fieldTypes = schema . getChildren ( ) ; // read each selected field
for ( int fieldIdx = 0 ; fieldIdx < selectedFields . length ; fieldIdx ++ ) { int orcIdx = selectedFields [ fieldIdx ] ; readField ( rows , fieldIdx , ... |
public class JsonObject { /** * Returns the property value as boolean or < code > null < / code > if it has not been set .
* @ param property
* the property
* @ return the value as boolean */
public Boolean getAsBoolean ( String property ) { } } | if ( super . has ( property ) ) { return get ( property ) . getAsBoolean ( ) ; } return null ; |
public class Jsr309CallController { /** * EVENTS */
@ Override public void onReceive ( Object message ) throws Exception { } } | final Class < ? > klass = message . getClass ( ) ; final ActorRef self = self ( ) ; final ActorRef sender = sender ( ) ; final State state = fsm . state ( ) ; if ( logger . isInfoEnabled ( ) ) { logger . info ( "********** Call Controller Current State: \"" + state . toString ( ) ) ; logger . info ( "********** Call Co... |
public class CommerceOrderUtil { /** * Returns the commerce orders before and after the current commerce order in the ordered set where shippingAddressId = & # 63 ; .
* @ param commerceOrderId the primary key of the current commerce order
* @ param shippingAddressId the shipping address ID
* @ param orderByCompar... | return getPersistence ( ) . findByShippingAddressId_PrevAndNext ( commerceOrderId , shippingAddressId , orderByComparator ) ; |
public class GeoPoint { /** * Returns one of two 32 - bit values that were previously interleaved to produce a 64 - bit value .
* @ param value
* 64 - bit value that was created by interleaving two 32 - bit values
* @ return one of two previously interleaved values */
protected static long deinterleave ( long val... | value &= MAGIC [ 0 ] ; value = ( value ^ value >>> SHIFT [ 0 ] ) & MAGIC [ 1 ] ; value = ( value ^ value >>> SHIFT [ 1 ] ) & MAGIC [ 2 ] ; value = ( value ^ value >>> SHIFT [ 2 ] ) & MAGIC [ 3 ] ; value = ( value ^ value >>> SHIFT [ 3 ] ) & MAGIC [ 4 ] ; value = ( value ^ value >>> SHIFT [ 4 ] ) & MAGIC [ 5 ] ; return ... |
public class GetDimensionValuesResult { /** * The filters that you used to filter your request . Some dimensions are available only for a specific context .
* If you set the context to < code > COST _ AND _ USAGE < / code > , you can use the following dimensions for searching :
* < ul >
* < li >
* AZ - The Avai... | if ( dimensionValues == null ) { this . dimensionValues = null ; return ; } this . dimensionValues = new java . util . ArrayList < DimensionValuesWithAttributes > ( dimensionValues ) ; |
public class OCompositeIndexDefinition { /** * Add new indexDefinition in current composite .
* @ param indexDefinition
* Index to add . */
public void addIndex ( final OIndexDefinition indexDefinition ) { } } | indexDefinitions . add ( indexDefinition ) ; if ( indexDefinition instanceof OIndexDefinitionMultiValue ) { if ( multiValueDefinitionIndex == - 1 ) multiValueDefinitionIndex = indexDefinitions . size ( ) - 1 ; else throw new OIndexException ( "Composite key can not contain more than one collection item" ) ; } |
public class AndroidEventBuilderHelper { /** * Get the device ' s current battery level ( as a percentage of total ) .
* @ param ctx Android application context
* @ return the device ' s current battery level ( as a percentage of total ) , or null if unknown */
protected static Float getBatteryLevel ( Context ctx )... | try { Intent intent = ctx . registerReceiver ( null , new IntentFilter ( Intent . ACTION_BATTERY_CHANGED ) ) ; if ( intent == null ) { return null ; } int level = intent . getIntExtra ( BatteryManager . EXTRA_LEVEL , - 1 ) ; int scale = intent . getIntExtra ( BatteryManager . EXTRA_SCALE , - 1 ) ; if ( level == - 1 || ... |
public class BashTabCompletionDoclet { /** * Must add options that are applicable to this doclet so that they will be accepted . */
public static int optionLength ( final String option ) { } } | if ( option . equals ( CALLER_SCRIPT_NAME ) || option . equals ( CALLER_SCRIPT_PREFIX_LEGAL_ARGS ) || option . equals ( CALLER_SCRIPT_PREFIX_ARG_VALUE_TYPES ) || option . equals ( CALLER_SCRIPT_PREFIX_MUTEX_ARGS ) || option . equals ( CALLER_SCRIPT_PREFIX_ALIAS_ARGS ) || option . equals ( CALLER_SCRIPT_PREFIX_ARG_MIN_O... |
public class QueueBuilder { /** * Change the executor used . The default is { @ link MoreExecutors # directExecutor ( ) }
* @ param executor new executor to use
* @ return this */
public QueueBuilder < T > executor ( Executor executor ) { } } | Preconditions . checkNotNull ( executor , "executor cannot be null" ) ; this . executor = executor ; return this ; |
public class CompareResultImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < CompareContainer > getItems ( ) { } } | return ( EList < CompareContainer > ) eGet ( StorePackage . Literals . COMPARE_RESULT__ITEMS , true ) ; |
public class OwnPresenceActor { /** * Messages */
@ Override public void onReceive ( Object message ) { } } | if ( message instanceof OnAppVisible ) { onAppVisible ( ) ; } else if ( message instanceof OnAppHidden ) { onAppHidden ( ) ; } else if ( message instanceof PerformOnline ) { performOnline ( ) ; } else { super . onReceive ( message ) ; } |
public class InlineGettingStartedCodeSampleApp { /** * Before running the code :
* Fill in your AWS access credentials in the provided credentials
* file template , and be sure to move the file to the default location
* ( ~ / . aws / credentials ) where the sample code will load the
* credentials from .
* htt... | // = = = = = Submitting a Request = = = = = / /
/* * The ProfileCredentialsProvider will return your [ default ]
* credential profile by reading from the credentials file located at
* ( ~ / . aws / credentials ) . */
AWSCredentials credentials = null ; try { credentials = new ProfileCredentialsProvider ( ) . getCre... |
public class JDayChooser { /** * Hides and shows the week buttons . */
protected void drawWeeks ( ) { } } | Calendar tmpCalendar = ( Calendar ) calendar . clone ( ) ; for ( int i = 1 ; i < 7 ; i ++ ) { tmpCalendar . set ( Calendar . DAY_OF_MONTH , ( i * 7 ) - 6 ) ; int week = tmpCalendar . get ( Calendar . WEEK_OF_YEAR ) ; String buttonText = Integer . toString ( week ) ; if ( week < 10 ) { buttonText = "0" + buttonText ; } ... |
public class CmsDetailPageDuplicateEliminatingSitemapGenerator { /** * Gets the detail information for the given container page . < p >
* @ param containerPage the container page
* @ return the detail information */
private Collection < DetailInfo > getDetailInfosForPage ( CmsResource containerPage ) { } } | if ( m_detailInfosByPage == null ) { m_detailInfosByPage = ArrayListMultimap . create ( ) ; for ( DetailInfo detailInfo : m_detailInfos ) { m_detailInfosByPage . put ( detailInfo . getDetailPageInfo ( ) . getUri ( ) , detailInfo ) ; } } String folderPath = CmsResource . getParentFolder ( containerPage . getRootPath ( )... |
public class PhantomJSDriver { /** * Execute a PhantomJS fragment . Provides extra functionality not found in WebDriver
* but available in PhantomJS .
* < br >
* See the < a href = " http : / / phantomjs . org / api / " > PhantomJS API < / a >
* for details on what is available .
* < br >
* The javascript t... | script = script . replaceAll ( "\"" , "\\\"" ) ; Iterable < Object > convertedArgs = Iterables . transform ( Lists . newArrayList ( args ) , new WebElementToJsonConverter ( ) ) ; Map < String , ? > params = ImmutableMap . of ( "script" , script , "args" , Lists . newArrayList ( convertedArgs ) ) ; return execute ( COMM... |
public class Hashes { /** * Constant - time MurmurHash3 128 - bit hashing for any prefix .
* < strong > Warning < / strong > : this code is still experimental .
* @ param bv
* a bit vector .
* @ param prefixLength
* the length of the prefix of < code > bv < / code > over which the
* hash must be computed . ... | final int startStateWord = ( int ) ( prefixLength / ( 2 * Long . SIZE ) ) ; long precomputedUpTo = startStateWord * 2L * Long . SIZE ; long h1 = hh1 [ startStateWord ] ; long h2 = hh2 [ startStateWord ] ; long c1 = cc1 [ startStateWord ] ; long c2 = cc2 [ startStateWord ] ; long k1 , k2 ; if ( prefixLength > precompute... |
public class PrintJobDao { /** * Get result report .
* @ param reportURI the URI of the report
* @ return the result report . */
public final PrintJobResultExtImpl getResult ( final URI reportURI ) { } } | final CriteriaBuilder builder = getSession ( ) . getCriteriaBuilder ( ) ; final CriteriaQuery < PrintJobResultExtImpl > criteria = builder . createQuery ( PrintJobResultExtImpl . class ) ; final Root < PrintJobResultExtImpl > root = criteria . from ( PrintJobResultExtImpl . class ) ; criteria . where ( builder . equal ... |
public class AlertResources { /** * Deletes the alert .
* @ param req The HttpServlet request object . Cannot be null .
* @ param alertId The alert Id . Cannot be null and must be a positive non - zero number .
* @ return REST response indicating whether the alert deletion was successful .
* @ throws WebApplica... | if ( alertId == null || alertId . compareTo ( BigInteger . ZERO ) < 1 ) { throw new WebApplicationException ( "Alert Id cannot be null and must be a positive non-zero number." , Status . BAD_REQUEST ) ; } Alert alert = alertService . findAlertByPrimaryKey ( alertId ) ; if ( alert != null ) { validateResourceAuthorizati... |
public class CLIQUE { /** * The specified sorted list of dense subspaces is divided into the selected
* set I and the pruned set P . For each set the mean of the cover fractions is
* computed .
* @ param denseSubspaces the dense subspaces in reverse order by their
* coverage
* @ return the mean of the cover f... | int n = denseSubspaces . size ( ) - 1 ; int [ ] mi = new int [ n + 1 ] , mp = new int [ n + 1 ] ; double resultMI = 0 , resultMP = 0 ; for ( int i = 0 ; i < denseSubspaces . size ( ) ; i ++ ) { resultMI += denseSubspaces . get ( i ) . getCoverage ( ) ; resultMP += denseSubspaces . get ( n - i ) . getCoverage ( ) ; mi [... |
public class DummyTransaction { /** * Runs the second phase of two - phase - commit protocol .
* If { @ code forceRollback } is { @ code true } , then a { @ link RollbackException } is thrown with the message { @ link # FORCE _ ROLLBACK _ MESSAGE } .
* @ param forceRollback force the transaction to rollback . */
pu... | if ( trace ) { log . tracef ( "runCommit(forceRollback=%b) invoked in transaction with Xid=%s" , forceRollback , xid ) ; } if ( forceRollback ) { markRollbackOnly ( new RollbackException ( FORCE_ROLLBACK_MESSAGE ) ) ; } int notifyAfterStatus = 0 ; try { if ( status == Status . STATUS_MARKED_ROLLBACK ) { notifyAfterStat... |
public class LibertyTracePreprocessInstrumentation { /** * Examine the class ' s { @ code toString ( ) } implementation ( if present ) and
* warn if traced methods are called .
* @ param info the collected class information */
@ SuppressWarnings ( "unchecked" ) private void processToString ( ClassTraceInfo info ) {... | for ( MethodNode mn : ( List < MethodNode > ) info . classNode . methods ) { if ( ! mn . name . equals ( "toString" ) || ! mn . desc . equals ( "()Ljava/lang/String;" ) ) { continue ; } Iterator < ? extends AbstractInsnNode > instructionIterator = mn . instructions . iterator ( ) ; INSN_LOOP : while ( instructionIterat... |
public class ScopedAttributeELResolver { /** * If the base object is < code > null < / code > , searches the page ,
* request , session and application scopes for an attribute with
* the given name and returns it , or < code > null < / code > if no
* attribute exists with the current name .
* < p > The < code >... | if ( context == null ) { throw new NullPointerException ( ) ; } if ( base == null ) { context . setPropertyResolved ( true ) ; if ( property instanceof String ) { String attribute = ( String ) property ; PageContext ctxt = ( PageContext ) context . getContext ( JspContext . class ) ; return ctxt . findAttribute ( attri... |
public class CrawlToFile { /** * Run .
* @ param args the args */
public static void main ( String [ ] args ) { } } | try { final CrawlToFile crawl = new CrawlToFile ( args ) ; crawl . crawl ( ) ; } catch ( ParseException e ) { System . err . print ( e . getMessage ( ) ) ; } catch ( IllegalArgumentException e ) { System . err . println ( e . getMessage ( ) ) ; } |
public class RandSeq { /** * Returns the given list with its elements rearranged in a random order . */
public < T > List < T > reorder ( List < T > sequence ) { } } | int elementCount = sequence . size ( ) ; if ( elementCount > 1 ) { List < T > elements = new ArrayList < T > ( sequence ) ; sequence . clear ( ) ; for ( ; elementCount > 0 ; elementCount -- ) { sequence . add ( elements . remove ( generator_ . nextInt ( elementCount ) ) ) ; } } return sequence ; |
public class OIndexFullText { /** * Splits passed in key on several words and remove records with keys equals to any item of split result and values equals to
* passed in value .
* @ param iKey
* Key to remove .
* @ param value
* Value to remove .
* @ return < code > true < / code > if at least one record i... | modificationLock . requestModificationLock ( ) ; try { final List < String > words = splitIntoWords ( iKey . toString ( ) ) ; boolean removed = false ; for ( final String word : words ) { acquireExclusiveLock ( ) ; try { final Set < OIdentifiable > recs = map . get ( word ) ; if ( recs != null && ! recs . isEmpty ( ) )... |
public class Stapler { /** * Used to detect exceptions thrown when writing content that seem to be due merely to a closed socket .
* @ param x an exception that got caught
* @ return true if this looks like a closed stream , false for some real problem
* @ since 1.222 */
public static boolean isSocketException ( ... | // JENKINS - 10524
if ( x == null ) { return false ; } if ( x instanceof SocketException ) { return true ; } if ( String . valueOf ( x . getMessage ( ) ) . equals ( "Broken pipe" ) ) { // TBD I18N
return true ; } // JENKINS - 20074 : various things that Jetty and other components could throw
if ( x instanceof EOFExcept... |
public class AbstractSlidingAngleAverage { /** * Returns sample by sample calculated average .
* @ return */
@ Override public double average ( ) { } } | readLock . lock ( ) ; try { int count = count ( ) ; double s = 0 ; double c = 0 ; PrimitiveIterator . OfInt it = modIterator ( ) ; while ( it . hasNext ( ) ) { int m = it . nextInt ( ) ; s += sin [ m ] ; c += cos [ m ] ; } ; return toDegrees ( s / count , c / count ) ; } finally { readLock . unlock ( ) ; } |
public class NetUtils { /** * Returns an iterator over available ports defined by the range definition .
* @ param rangeDefinition String describing a single port , a range of ports or multiple ranges .
* @ return Set of ports from the range definition
* @ throws NumberFormatException If an invalid string is pass... | final String [ ] ranges = rangeDefinition . trim ( ) . split ( "," ) ; UnionIterator < Integer > iterators = new UnionIterator < > ( ) ; for ( String rawRange : ranges ) { Iterator < Integer > rangeIterator ; String range = rawRange . trim ( ) ; int dashIdx = range . indexOf ( '-' ) ; if ( dashIdx == - 1 ) { // only on... |
public class DocumentationHelper { /** * Apply xslt stylesheet to xml logs file and crate an HTML report file .
* @ param xmlLogsFile
* @ param htmlReportFile */
private void prettyprint ( String xmlLogsFile , FileOutputStream htmlReportFile ) throws Exception { } } | TransformerFactory tFactory = TransformerFactory . newInstance ( ) ; // Fortify Mod : prevent external entity injection
tFactory . setFeature ( XMLConstants . FEATURE_SECURE_PROCESSING , true ) ; DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; // Fortify Mod : prevent external entity injecti... |
public class StatusRepresentation { /** * Initializes the object to contain the given status
* @ param s
* an object to copy . */
public StatusRepresentation init ( StatusRepresentation s ) { } } | _source = s . _source ; _status = s . _status ; _jsonString = s . _jsonString ; _jsonObj = s . _jsonObj ; _id = s . _id ; return this ; |
public class DistributedStore { /** * { @ inheritDoc }
* Prior to calling this method , the underlying { @ link RaftAgent }
* < strong > must < / strong > be set using { @ link DistributedStore # setRaftAgent ( RaftAgent ) } ,
* and this component < strong > must < / strong > be initialized using { @ link Distrib... | if ( running ) { return ; } checkState ( raftAgent != null ) ; checkState ( initialized ) ; raftAgent . start ( ) ; running = true ; |
public class DedicatedFileSystem { /** * This method is < em > not < / em > thread - safe and must be synchronized externally .
* @ param pWatchedDirectory */
public void unregisterRootDirectory ( final Path pToBeUnregistered , final WatchedDirectory pWatchedDirectory ) { } } | unregisterRootDirectory ( manager . getDefaultDispatcher ( ) , pToBeUnregistered , pWatchedDirectory ) ; |
public class Model { /** * Gets attribute value as < code > Boolean < / code > .
* If there is a { @ link Converter } registered for the attribute that converts from Class < code > S < / code > to Class
* < code > java . lang . Boolean < / code > , given the attribute value is an instance of < code > S < / code > ,... | Object value = getRaw ( attributeName ) ; Converter < Object , Boolean > converter = modelRegistryLocal . converterForValue ( attributeName , value , Boolean . class ) ; return converter != null ? converter . convert ( value ) : Convert . toBoolean ( value ) ; |
public class LRUHashMap { /** * Turn performance tracking on / off . */
public void setTracking ( boolean track ) { } } | if ( track != _tracking ) { _tracking = track ; if ( track ) { _seenKeys = new HashSet < K > ( ) ; _misses = _hits = 0 ; // oh boy , but to properly track we need to clear the hash
clear ( ) ; } else { _seenKeys = null ; } } |
public class ServiceActivatorDependencyProcessor { /** * Add the dependencies if the deployment contains a service activator loader entry .
* @ param phaseContext the deployment unit context
* @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentU... | final ResourceRoot deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( Attachments . DEPLOYMENT_ROOT ) ; final ModuleSpecification moduleSpecification = phaseContext . getDeploymentUnit ( ) . getAttachment ( Attachments . MODULE_SPECIFICATION ) ; if ( deploymentRoot == null ) return ; final Services... |
public class MapMessage { /** * Formats this message as an XML fragment String into the given builder .
* @ param sb format into this builder . */
public void asXml ( final StringBuilder sb ) { } } | sb . append ( "<Map>\n" ) ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { sb . append ( " <Entry key=\"" ) . append ( data . getKeyAt ( i ) ) . append ( "\">" ) . append ( ( String ) data . getValueAt ( i ) ) . append ( "</Entry>\n" ) ; } sb . append ( "</Map>" ) ; |
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertNotifictionResultEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class AbstractBigtableAdmin { /** * This is needed for the hbase shell .
* @ param snapshotName a byte array object .
* @ param tableName a byte array object .
* @ throws IOException if any . */
public void snapshot ( byte [ ] snapshotName , byte [ ] tableName ) throws IOException , IllegalArgumentExceptio... | snapshot ( snapshotName , TableName . valueOf ( tableName ) ) ; |
public class RevisionEncoder { /** * Encodes a Paste operation .
* @ param part
* Reference to the Paste operation
* @ throws EncodingException
* if the encoding failed */
private void encodePaste ( final DiffPart part ) throws EncodingException { } } | data . writeBit ( 1 ) ; data . writeBit ( 1 ) ; data . writeBit ( 0 ) ; data . writeValue ( codecData . getBlocksizeS ( ) , part . getStart ( ) ) ; data . writeValue ( codecData . getBlocksizeB ( ) , Integer . parseInt ( part . getText ( ) ) ) ; data . writeFillBits ( ) ; |
public class CmsImportExportManager { /** * Adds a property name to the list of properties that should be removed from imported resources . < p >
* @ param propertyName a property name */
public void addIgnoredProperty ( String propertyName ) { } } | if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_IMPORTEXPORT_IGNORING_PROPERTY_1 , propertyName ) ) ; } m_ignoredProperties . add ( propertyName ) ; |
public class ServerHandshakeHandler { /** * Handle initial HTTP portion of the handshake .
* @ param channelContext
* @ param request
* @ throws Exception */
protected void handleHttpRequest ( final ChannelHandlerContext channelContext , final HttpRequest request ) throws Exception { } } | if ( isWebSocketsUpgradeRequest ( request ) ) { final Handshake handshake = findHandshake ( request ) ; if ( handshake != null ) { HttpResponse response = handshake . generateResponse ( request ) ; response . addHeader ( Names . UPGRADE , Values . WEBSOCKET ) ; response . addHeader ( Names . CONNECTION , Values . UPGRA... |
public class ParserME { /** * Removes the punctuation from the specified set of chunks , adds it to the parses
* adjacent to the punctuation is specified , and returns a new array of parses with the punctuation
* removed .
* @ param chunks A set of parses .
* @ param punctSet The set of punctuation which is to ... | List collapsedParses = new ArrayList ( chunks . length ) ; int lastNonPunct = - 1 ; int nextNonPunct = - 1 ; for ( int ci = 0 , cn = chunks . length ; ci < cn ; ci ++ ) { if ( punctSet . contains ( chunks [ ci ] . getType ( ) ) ) { if ( lastNonPunct >= 0 ) { chunks [ lastNonPunct ] . addNextPunctuation ( chunks [ ci ] ... |
public class OAbstractFile { /** * ( non - Javadoc )
* @ see com . orientechnologies . orient . core . storage . fs . OFileAAA # allocateSpace ( int ) */
public int allocateSpace ( final int iSize ) throws IOException { } } | final int offset = getFilledUpTo ( ) ; final int size = getFileSize ( ) ; if ( getFreeSpace ( ) < iSize ) { if ( maxSize > 0 && maxSize - size < iSize ) throw new IllegalArgumentException ( "Cannot enlarge file since the configured max size (" + OFileUtils . getSizeAsString ( maxSize ) + ") was reached! " + toString ( ... |
public class ConnectionRepository { /** * Returns the matching { @ link JdbcConnectionDescriptor }
* or < code > null < / code > if no descriptor could be found . The user name
* and pass word will be set to match the supplied < / code > PBKey < / code >
* object . If the original user name and pass word are desi... | JdbcConnectionDescriptor result = ( JdbcConnectionDescriptor ) jcdMap . get ( pbKey ) ; if ( result == null ) { result = deepCopyOfFirstFound ( pbKey . getAlias ( ) ) ; if ( result != null ) { result . setUserName ( pbKey . getUser ( ) ) ; result . setPassWord ( pbKey . getPassword ( ) ) ; // this build connection desc... |
public class PolicyConstraintsExtension { /** * Set the attribute value . */
public void set ( String name , Object obj ) throws IOException { } } | if ( ! ( obj instanceof Integer ) ) { throw new IOException ( "Attribute value should be of type Integer." ) ; } if ( name . equalsIgnoreCase ( REQUIRE ) ) { require = ( ( Integer ) obj ) . intValue ( ) ; } else if ( name . equalsIgnoreCase ( INHIBIT ) ) { inhibit = ( ( Integer ) obj ) . intValue ( ) ; } else { throw n... |
public class OracleNoSQLClient { /** * ( non - Javadoc )
* @ see
* com . impetus . kundera . client . Client # persistJoinTable ( com . impetus . kundera
* . persistence . context . jointable . JoinTableData ) */
@ Override public void persistJoinTable ( JoinTableData joinTableData ) { } } | String joinTableName = joinTableData . getJoinTableName ( ) ; String joinColumnName = joinTableData . getJoinColumnName ( ) ; String invJoinColumnName = joinTableData . getInverseJoinColumnName ( ) ; Map < Key , List < TableOperation > > operations = new HashMap < Key , List < TableOperation > > ( ) ; Table schemaTable... |
public class CoGProperties { /** * Returns the user specified ip address . This is used
* for DHCP machines where java is unable to determine the
* right IP address .
* It first checks the ' org . globus . ip ' system property .
* If that property is not set , it checks next the ' ip ' property
* in the curre... | String value = System . getProperty ( "org.globus.ip" ) ; if ( value != null ) { return value ; } value = getProperty ( "ip" , null ) ; if ( value != null ) { return value ; } value = getHostName ( ) ; if ( value != null ) { try { return InetAddress . getByName ( value ) . getHostAddress ( ) ; } catch ( UnknownHostExce... |
public class ChunkingInputStream { public int read ( ) throws IOException { } } | int b = - 1 ; if ( _chunkSize <= 0 && getChunkSize ( ) <= 0 ) return - 1 ; b = _in . read ( ) ; if ( b < 0 ) { _chunkSize = - 1 ; throw new IOException ( __UNEXPECTED_EOF ) ; } _chunkSize -- ; return b ; |
public class MemberSummaryBuilder { /** * Build the summary for the nested classes .
* @ param node the XML element that specifies which components to document
* @ param memberSummaryTree the content tree to which the documentation will be added */
public void buildNestedClassesSummary ( XMLNode node , Content memb... | MemberSummaryWriter writer = memberSummaryWriters . get ( VisibleMemberMap . Kind . INNER_CLASSES ) ; VisibleMemberMap visibleMemberMap = getVisibleMemberMap ( VisibleMemberMap . Kind . INNER_CLASSES ) ; addSummary ( writer , visibleMemberMap , true , memberSummaryTree ) ; |
public class ScannerSupplier { /** * Filters this { @ link ScannerSupplier } based on the provided predicate . Returns a { @ link
* ScannerSupplier } with only the checks enabled that satisfy the predicate . */
@ CheckReturnValue public ScannerSupplier filter ( Predicate < ? super BugCheckerInfo > predicate ) { } } | ImmutableSet . Builder < String > disabled = ImmutableSet . builder ( ) ; for ( BugCheckerInfo check : getAllChecks ( ) . values ( ) ) { if ( ! predicate . apply ( check ) ) { disabled . add ( check . canonicalName ( ) ) ; } } return new ScannerSupplierImpl ( getAllChecks ( ) , severities ( ) , disabled . build ( ) , g... |
public class Category { /** * Log a localized message . The user supplied parameter < code > key < / code > is replaced by its localized version from the resource bundle .
* @ see # setResourceBundle
* @ since 0.8.4 */
public void l7dlog ( Priority priority , String key , Throwable t ) { } } | if ( repository . isDisabled ( priority . level ) ) { return ; } if ( priority . isGreaterOrEqual ( this . getEffectiveLevel ( ) ) ) { String msg = getResourceBundleString ( key ) ; // if message corresponding to ' key ' could not be found in the
// resource bundle , then default to ' key ' .
if ( msg == null ) { msg =... |
public class DBEngineVersion { /** * A list of the supported DB engine modes .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setSupportedEngineModes ( java . util . Collection ) } or { @ link # withSupportedEngineModes ( java . util . Collection ) }
* if ... | if ( this . supportedEngineModes == null ) { setSupportedEngineModes ( new com . amazonaws . internal . SdkInternalList < String > ( supportedEngineModes . length ) ) ; } for ( String ele : supportedEngineModes ) { this . supportedEngineModes . add ( ele ) ; } return this ; |
public class CheckerUtils { /** * Checks if the Zookeeper address has been set when running the Alluxio HA mode .
* @ param reportWriter save user - facing messages to a generated file
* @ param alluxioConf Alluxio configuration
* @ return true if Alluxio HA mode is supported , false otherwise */
public static bo... | if ( alluxioConf . getBoolean ( PropertyKey . ZOOKEEPER_ENABLED ) ) { reportWriter . println ( "Alluixo is running in high availability mode.\n" ) ; if ( ! alluxioConf . isSet ( PropertyKey . ZOOKEEPER_ADDRESS ) ) { reportWriter . println ( "Please set Zookeeper address to support " + "Alluxio high availability mode.\n... |
public class RequireSubStr { /** * Adds each required substring , checking that it ' s not null .
* @ param requiredSubStrings
* the required substrings
* @ throws NullPointerException
* if a required substring is null */
private void checkAndAddRequiredSubStrings ( final List < String > requiredSubStrings ) { ... | for ( String required : requiredSubStrings ) { if ( required == null ) { throw new NullPointerException ( "required substring should not be null" ) ; } this . requiredSubStrings . add ( required ) ; } |
public class UriEscape { /** * Perform am URI fragment identifier < strong > escape < / strong > operation
* on a < tt > char [ ] < / tt > input .
* The following are the only allowed chars in an URI fragment identifier ( will not be escaped ) :
* < ul >
* < li > < tt > A - Z a - z 0-9 < / tt > < / li >
* < l... | if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( encoding == null ) { throw new IllegalArgumentException ( "Argument 'encoding' cannot be null" ) ; } final int textLen = ( text == null ? 0 : text . length ) ; if ( offset < 0 || offset > textLen ) { throw new Ill... |
public class URLMap { /** * - - - - - private methods - - - - - */
private void setMethodsAttribute ( List < String > mList , boolean omission , int attribute , String value ) { } } | Map < String , MethodConstraint > mapWork = null ; if ( mList == null || mList . isEmpty ( ) ) { mList = new ArrayList < String > ( ) ; mList . add ( ALL_METHODS ) ; if ( mapAllMethods == null ) { mapAllMethods = new HashMap < String , MethodConstraint > ( ) ; } mapWork = mapAllMethods ; if ( tc . isDebugEnabled ( ) ) ... |
public class DefaultTextListener { /** * from interface BlurHandler */
public void onBlur ( BlurEvent event ) { } } | if ( _target . getText ( ) . trim ( ) . equals ( "" ) ) { _target . setText ( _defaultText ) ; } |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getIfcAirTerminalTypeEnum ( ) { } } | if ( ifcAirTerminalTypeEnumEEnum == null ) { ifcAirTerminalTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 776 ) ; } return ifcAirTerminalTypeEnumEEnum ; |
public class Surrogates { /** * Returns whether a surrogate character was contained in the specified
* input .
* @ param input
* input
* @ return if a surrogate character was contained or not */
public static boolean scan ( final char [ ] input ) { } } | int surLow = 0xD800 ; int surHgh = 0xDFFF ; int end = input . length ; for ( int i = 0 ; i < end ; i ++ ) { if ( ( int ) input [ i ] >= surLow && input [ i ] <= surHgh ) { return true ; } } return false ; |
public class ClassLoaderOrder { /** * Recursively delegate to another { @ link ClassLoader } .
* @ param classLoader
* the class loader */
public void delegateTo ( final ClassLoader classLoader , final boolean isParent ) { } } | if ( classLoader == null ) { return ; } // Check if this is a parent before checking if the classloader is already in the delegatedTo set ,
// so that if the classloader is a context classloader but also a parent , it still gets marked as
// a parent classloader .
if ( isParent ) { allParentClassLoaders . add ( classLo... |
public class EntityRecognizerInputDataConfig { /** * The entity types in the input data for an entity recognizer .
* @ param entityTypes
* The entity types in the input data for an entity recognizer . */
public void setEntityTypes ( java . util . Collection < EntityTypesListItem > entityTypes ) { } } | if ( entityTypes == null ) { this . entityTypes = null ; return ; } this . entityTypes = new java . util . ArrayList < EntityTypesListItem > ( entityTypes ) ; |
public class LocatorLifecycleStrategy { /** * Stops all servers linked with the current camel context
* @ param camelContext */
private void stopAllServersAndRemoveCamelContext ( CamelContext camelContext ) { } } | log . debug ( "Stopping all servers associated with {}" , camelContext ) ; List < SingleBusLocatorRegistrar > registrars = locatorRegistrar . getAllRegistars ( camelContext ) ; registrars . forEach ( registrar -> registrar . stopAllServersAndRemoveCamelContext ( ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.