signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LocalDateTime { /** * Calculates the amount of time until another date - time in terms of the specified unit .
* This calculates the amount of time between two { @ code LocalDateTime }
* objects in terms of a single { @ code TemporalUnit } .
* The start and end points are { @ code this } and the spec... | LocalDateTime end = LocalDateTime . from ( endExclusive ) ; if ( unit instanceof ChronoUnit ) { if ( unit . isTimeBased ( ) ) { long amount = date . daysUntil ( end . date ) ; if ( amount == 0 ) { return time . until ( end . time , unit ) ; } long timePart = end . time . toNanoOfDay ( ) - time . toNanoOfDay ( ) ; if ( ... |
public class CreateReplicationGroupRequest { /** * A list of EC2 Availability Zones in which the replication group ' s clusters are created . The order of the
* Availability Zones in the list is the order in which clusters are allocated . The primary cluster is created in
* the first AZ in the list .
* This param... | if ( preferredCacheClusterAZs == null ) { this . preferredCacheClusterAZs = null ; return ; } this . preferredCacheClusterAZs = new com . amazonaws . internal . SdkInternalList < String > ( preferredCacheClusterAZs ) ; |
public class DirContextAdapter { /** * Collect all modifications for the changed attribute . If no changes have
* been made , return immediately . If modifications have been made , and the
* original size as well as the updated size of the attribute is 1 , replace
* the attribute . If the size of the updated attr... | NameAwareAttribute currentAttribute = originalAttrs . get ( changedAttr . getID ( ) ) ; if ( currentAttribute != null && changedAttr . hasValuesAsNames ( ) ) { try { currentAttribute . initValuesAsNames ( ) ; } catch ( IllegalArgumentException e ) { log . warn ( "Incompatible attributes; changed attribute has Name valu... |
public class UACHandler { /** * Generating an ACK to a 2xx response is the same as any other subsequent request . However , a
* subsequent request is generated in the context of what is known as a Dialog and since we
* currently are completely stateless , this is not necessarily an easy thing to achieve but for
*... | final ContactHeader contact = response . getContactHeader ( ) ; final SipURI requestURI = ( SipURI ) contact . getAddress ( ) . getURI ( ) ; final ToHeader to = response . getToHeader ( ) ; final FromHeader from = response . getFromHeader ( ) ; // The contact of the response is where the remote party wishes
// to recei... |
public class ManagedPropertyPersistenceHelper { /** * Generate param parser .
* @ param context the context
* @ param methodName the method name
* @ param parameterTypeName the parameter type name
* @ param persistType the persist type */
public static void generateParamParser ( BindTypeContext context , String... | methodName = SQLiteDaoDefinition . PARAM_PARSER_PREFIX + methodName ; MethodSpec . Builder methodBuilder = MethodSpec . methodBuilder ( methodName ) . addJavadoc ( "for param $L parsing\n" , methodName ) . returns ( parameterTypeName ) ; methodBuilder . addModifiers ( context . modifiers ) ; switch ( persistType ) { ca... |
public class TypedArrayCompat { /** * Retrieve the resource identifier for the attribute at
* < var > index < / var > . Note that attribute resource as resolved when
* the overall { @ link TypedArray } object is retrieved . As a result , this function will return
* the resource identifier of the final resource va... | if ( values != null && theme != null ) { TypedValue v = values [ index ] ; if ( v . type == TypedValue . TYPE_ATTRIBUTE ) { TEMP_ARRAY [ 0 ] = v . data ; TypedArray tmp = theme . obtainStyledAttributes ( null , TEMP_ARRAY , 0 , 0 ) ; try { return tmp . getResourceId ( 0 , def ) ; } finally { tmp . recycle ( ) ; } } } i... |
public class SchedulerForType { /** * Match requests to nodes .
* @ return The list of granted resources for each session */
private Map < String , List < ResourceGrant > > scheduleTasks ( ) { } } | fullyScheduled = false ; long nodeWait = configManager . getLocalityWait ( type , LocalityLevel . NODE ) ; long rackWait = configManager . getLocalityWait ( type , LocalityLevel . RACK ) ; int tasksToSchedule = configManager . getGrantsPerIteration ( ) ; Map < String , List < ResourceGrant > > sessionIdToGranted = new ... |
public class QuerySnippets { /** * [ VARIABLE " my _ kind " ] */
public QueryResults < Key > newKeyQuery ( String kind ) { } } | // [ START newKeyQuery ]
Query < Key > query = Query . newKeyQueryBuilder ( ) . setKind ( kind ) . build ( ) ; QueryResults < Key > results = datastore . run ( query ) ; // Use results
// [ END newKeyQuery ]
return results ; |
public class Histogram { /** * add item to histogram , increasing its frequency by one */
public int add ( T item ) { } } | Integer count = map . get ( item ) ; if ( count == null ) { map . put ( item , 1 ) ; return 1 ; } else { map . put ( item , count + 1 ) ; return count + 1 ; } |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EEnum getIfcVibrationIsolatorTypeEnum ( ) { } } | if ( ifcVibrationIsolatorTypeEnumEEnum == null ) { ifcVibrationIsolatorTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1098 ) ; } return ifcVibrationIsolatorTypeEnumEEnum ; |
public class AppAuthenticator { /** * jh the application auth ticket using the refresh token */
public void refreshAppAuthTicket ( ) { } } | StringBuilder resourceUrl = new StringBuilder ( MozuConfig . getBaseUrl ( ) ) . append ( AuthTicketUrl . refreshAppAuthTicketUrl ( null ) . getUrl ( ) ) ; try { @ SuppressWarnings ( "unchecked" ) MozuClient < AuthTicket > client = ( MozuClient < AuthTicket > ) MozuClientFactory . getInstance ( AuthTicket . class ) ; Au... |
public class DNAToRNATranslator { /** * Takes in the given DNA Sequence and returns an instance of RNASequence
* which is using { @ link RnaSequenceView } as a
* { @ link ProxySequenceReader } . */
protected RNASequence wrapToRna ( Sequence < NucleotideCompound > dna ) { } } | ProxySequenceReader < NucleotideCompound > rnaView = new RnaSequenceView ( dna ) ; return new RNASequence ( rnaView ) ; |
public class PeriodDuration { /** * Obtains an instance based on a period and duration .
* The total amount of time of the resulting instance is the period plus the duration .
* @ param period the period , not null
* @ param duration the duration , not null
* @ return the combined period - duration , not null *... | Objects . requireNonNull ( period , "The period must not be null" ) ; Objects . requireNonNull ( duration , "The duration must not be null" ) ; return new PeriodDuration ( period , duration ) ; |
public class ScriptUtil { /** * Execute a process directly with some arguments
* @ param logger logger
* @ param workingdir working dir
* @ param scriptargs arguments to the shell
* @ param envContext Environment variable context
* @ param newDataContext context data to replace in the scriptargs
* @ param l... | // use script - exec attribute and replace datareferences
final String [ ] args = DataContextUtils . replaceDataReferencesInArray ( scriptargs . split ( " " ) , newDataContext ) ; // create system environment variables from the data context
final Map < String , String > envMap = DataContextUtils . generateEnvVarsFromCo... |
public class Es6RewriteBlockScopedDeclaration { /** * Renames block - scoped declarations that shadow a variable in an outer scope
* < p > Also normalizes declarations with no initializer in a loop to be initialized to undefined . */
private void visitBlockScopedName ( NodeTraversal t , Node decl , Node nameNode ) { ... | Scope scope = t . getScope ( ) ; Node parent = decl . getParent ( ) ; // Normalize " let x ; " to " let x = undefined ; " if in a loop , since we later convert x
// to be $ jscomp $ loop $ 0 . x and want to reset the property to undefined every loop iteration .
if ( ( decl . isLet ( ) || decl . isConst ( ) ) && ! nameN... |
public class FilePolicyIndex { /** * Determine name of policy from file . . xml prefix is removed , and name is converted to a PID .
* Policy names must be valid PIDs .
* @ param policyFile
* @ return
* @ throws PolicyIndexException */
private String fileToName ( File policyFile ) throws PolicyIndexException { ... | try { if ( ! policyFile . getName ( ) . endsWith ( ".xml" ) ) throw new PolicyIndexException ( "Invalid policy file name. Policy files must end in .xml - " + policyFile . getName ( ) ) ; return PID . fromFilename ( policyFile . getName ( ) . substring ( 0 , policyFile . getName ( ) . lastIndexOf ( ".xml" ) ) ) . toStr... |
public class Gamma { /** * Regularized Incomplete Gamma Function P ( a , x ) = < i > < big > & # 8747 ; < / big > < sub > < small > 0 < / small > < / sub > < sup > < small > x < / small > < / sup > e < sup > - t < / sup > t < sup > ( a - 1 ) < / sup > dt < / i > .
* Series representation of the function - valid for x... | if ( a < 0.0 || x < 0.0 || x >= a + 1 ) { throw new IllegalArgumentException ( String . format ( "Invalid a = %f, x = %f" , a , x ) ) ; } int i = 0 ; double igf = 0.0 ; boolean check = true ; double acopy = a ; double sum = 1.0 / a ; double incr = sum ; double loggamma = lgamma ( a ) ; while ( check ) { ++ i ; ++ a ; i... |
public class ViewHelper { public static void setBackgroundColor ( int color , final View view ) { } } | if ( color == MULTICOLOR ) { ShapeDrawable . ShaderFactory sf = new ShapeDrawable . ShaderFactory ( ) { @ Override public Shader resize ( int width , int height ) { return new LinearGradient ( 0 , 0 , 0 , height , new int [ ] { 0xFFFF0000 , 0xFF0000FF , 0xFF00FF00 } , new float [ ] { 0.1f , 0.5f , 0.9f } , Shader . Til... |
public class CmsJspTagHeadIncludes { /** * Gets the head includes of a resource from the content definition . < p >
* @ param cms the current CMS context
* @ param res the resource for which the head includes should be fetched
* @ param type the head include type ( CSS or Javascript )
* @ return the set of sche... | if ( type . equals ( TYPE_CSS ) ) { return getCSSHeadIncludes ( cms , res ) ; } else if ( type . equals ( TYPE_JAVASCRIPT ) ) { return getJSHeadIncludes ( cms , res ) ; } return null ; |
public class BuildingPartType { /** * Gets the value of the genericApplicationPropertyOfBuildingPart property .
* This accessor method returns a reference to the live list ,
* not a snapshot . Therefore any modification you make to the
* returned list will be present inside the JAXB object .
* This is why there... | if ( _GenericApplicationPropertyOfBuildingPart == null ) { _GenericApplicationPropertyOfBuildingPart = new ArrayList < JAXBElement < Object > > ( ) ; } return this . _GenericApplicationPropertyOfBuildingPart ; |
public class BeagleMain { /** * { @ inheritDoc } */
public SemanticSpace getSpace ( ) { } } | SemanticType type = ( argOptions . hasOption ( 's' ) ) ? SemanticType . valueOf ( argOptions . getStringOption ( 's' ) . toUpperCase ( ) ) : SemanticType . COMPOSITE ; return new Beagle ( dimension , type , generatorMap ) ; |
public class PassThruTable { /** * Free this passthrutable and all linked tables in this chain . */
public void free ( ) { } } | if ( m_mapTable != null ) { Iterator < BaseTable > iterator = this . getTables ( ) ; while ( iterator . hasNext ( ) ) { BaseTable table = iterator . next ( ) ; if ( ( table != null ) && ( table != this . getNextTable ( ) ) ) { Record record = table . getRecord ( ) ; if ( record != null ) record . free ( ) ; } } m_mapTa... |
public class IcuSyntaxUtils { /** * Given a list of msg parts : ( a ) if it contains any plural / select parts , then builds a new list
* of msg parts where plural / select parts in the original msg parts are all embedded as raw text
* in ICU format , ( b ) if it doesn ' t contain any plural / select parts , then s... | // If origMsgParts doesn ' t have plural / select parts , simply return it .
if ( ! MsgPartUtils . hasPlrselPart ( origMsgParts ) ) { return origMsgParts ; } // Build the new msg parts .
ImmutableList . Builder < SoyMsgPart > newMsgPartsBuilder = ImmutableList . builder ( ) ; StringBuilder currRawTextSb = new StringBui... |
public class PTBConstituent { /** * setter for adv - sets Adverbials are generally VP adjuncts .
* @ generated
* @ param v value to set into the feature */
public void setAdv ( String v ) { } } | if ( PTBConstituent_Type . featOkTst && ( ( PTBConstituent_Type ) jcasType ) . casFeat_adv == null ) jcasType . jcas . throwFeatMissing ( "adv" , "de.julielab.jules.types.PTBConstituent" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( PTBConstituent_Type ) jcasType ) . casFeatCode_adv , v ) ; |
public class GetMetricStatisticsRequest { /** * The metric statistics , other than percentile . For percentile statistics , use < code > ExtendedStatistics < / code > .
* When calling < code > GetMetricStatistics < / code > , you must specify either < code > Statistics < / code > or
* < code > ExtendedStatistics < ... | if ( this . statistics == null ) { setStatistics ( new com . amazonaws . internal . SdkInternalList < String > ( statistics . length ) ) ; } for ( String ele : statistics ) { this . statistics . add ( ele ) ; } return this ; |
public class RethinkDBSchemaManager { /** * ( non - Javadoc )
* @ see
* com . impetus . kundera . configure . schema . api . AbstractSchemaManager # create
* ( java . util . List ) */
@ Override protected void create ( List < TableInfo > tableInfos ) { } } | List dbList = r . dbList ( ) . run ( connection ) ; if ( ! dbList . contains ( databaseName ) ) { r . dbCreate ( databaseName ) . run ( connection ) ; } List listTables = r . db ( databaseName ) . tableList ( ) . run ( connection ) ; for ( TableInfo tableInfo : tableInfos ) { try { if ( listTables . contains ( tableInf... |
public class GraphQL { /** * Executes the specified graphql query / mutation / subscription
* @ param query the query / mutation / subscription
* @ return an { @ link ExecutionResult } which can include errors */
public ExecutionResult execute ( String query ) { } } | ExecutionInput executionInput = ExecutionInput . newExecutionInput ( ) . query ( query ) . build ( ) ; return execute ( executionInput ) ; |
public class AmqpChannel { /** * Fired on consume basic
* @ param e */
private void fireOnConsumeBasic ( ChannelEvent e ) { } } | List < EventListener > listeners = changes . getListenerList ( AMQP ) ; for ( EventListener listener : listeners ) { ChannelListener amqpListener = ( ChannelListener ) listener ; amqpListener . onConsumeBasic ( e ) ; } |
public class FLACEncoder { /** * Close the current FLAC stream . Updates the stream header information .
* If called on a closed stream , operation is undefined . Do not do this . */
private void closeFLACStream ( ) throws IOException { } } | // reset position in output stream to beginning .
// re - write the updated stream info .
checkForThreadErrors ( ) ; if ( DEBUG_LEV > 0 ) System . err . println ( "FLACEncoder::closeFLACStream : Begin" ) ; streamLock . lock ( ) ; try { if ( ! flacStreamIsOpen ) throw new IllegalStateException ( "Cannot close a non-open... |
public class ExampleStreamingLogWriterPlugin { /** * Add a new event
* @ param event */
public void addEvent ( LogEvent event ) { } } | try { write ( getString ( event ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } |
public class OidcClientUtil { /** * extra handling */
public String getRedirectUrl ( HttpServletRequest req , String uri ) { } } | String hostName = req . getServerName ( ) ; Integer httpsPort = new com . ibm . ws . security . common . web . WebUtils ( ) . getRedirectPortFromRequest ( req ) ; String entryPoint = uri ; if ( httpsPort == null && req . isSecure ( ) ) { // TODO : need to specify SSL _ PORT _ IS _ NULL message
// Tr . error ( tc , " SS... |
public class JfxNativeWorker { /** * Sometimes we need to work with some bundler , even if it wasn ' t requested . This happens when one bundler was selected and we need
* to work with the outcome of some image - bundler ( because that JDK - bundler is faulty ) . */
private boolean shouldBundlerRun ( String requested... | if ( requestedBundler != null && ! "ALL" . equalsIgnoreCase ( requestedBundler ) && ! requestedBundler . equalsIgnoreCase ( currentRunningBundlerID ) ) { // this is not the specified bundler
return false ; } if ( ext . isSkipJNLP ( ) && "jnlp" . equalsIgnoreCase ( currentRunningBundlerID ) ) { logger . info ( "Skipped ... |
public class ScreenUtil { /** * Set this property to this color .
* ( Utility method ) .
* @ param strProperty The key to save this color as .
* @ param color The registered color for this property key . */
public static void setColor ( String strProperty , ColorUIResource color , PropertyOwner propertyOwner , Ma... | if ( color != null ) ScreenUtil . setProperty ( strProperty , "#" + Integer . toHexString ( color . getRGB ( ) & 0xFFFFFF ) , propertyOwner , properties ) ; else ScreenUtil . setProperty ( strProperty , null , propertyOwner , properties ) ; |
public class NBTIO { /** * Writes the given root CompoundTag to the given file .
* @ param tag Tag to write .
* @ param file File to write to .
* @ param compressed Whether the NBT file should be compressed .
* @ param littleEndian Whether to write little endian NBT .
* @ throws java . io . IOException If an ... | if ( ! file . exists ( ) ) { if ( file . getParentFile ( ) != null && ! file . getParentFile ( ) . exists ( ) ) { file . getParentFile ( ) . mkdirs ( ) ; } file . createNewFile ( ) ; } OutputStream out = new FileOutputStream ( file ) ; if ( compressed ) { out = new GZIPOutputStream ( out ) ; } writeTag ( out , tag , li... |
public class ProClass { /** * Construct a new instance of { @ code className } using { @ code parameters } . If the class cannot be loaded
* { @ code loadFailure } will be invoked and { @ code null } is returned . If the class cannot be constructed
* { @ link VoltDB # crashLocalVoltDB ( String , boolean , Throwable... | return ProClass . < T > load ( className , feature , loadFailure ) . newInstance ( parameters ) ; |
public class LancasterStemmer { /** * Strips suffix off word */
private String stripSuffixes ( String word ) { } } | // integer variables 1 is positive , 0 undecided , - 1 negative equiverlent of pun vars positive undecided negative
int ruleok = 0 ; int Continue = 0 ; // integer varables
int pll = 0 ; // position of last letter
int xl ; // counter for nuber of chars to be replaced and length of stemmed word if rule was aplied
int pfv... |
public class VpnSitesInner { /** * Updates VpnSite tags .
* @ param resourceGroupName The resource group name of the VpnSite .
* @ param vpnSiteName The name of the VpnSite being updated .
* @ param tags Resource tags .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws Er... | return beginUpdateTagsWithServiceResponseAsync ( resourceGroupName , vpnSiteName , tags ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class Main { /** * This function calculates the total number of set bits from 1 to num .
* Examples :
* calculateSetBits ( 16)
* > > > 33
* calculateSetBits ( 2)
* calculateSetBits ( 14)
* > > > 28 */
public static int calculateSetBits ( int num ) { } } | num += 1 ; int bitMultiplier = 2 ; int setBitsCount = num / 2 ; while ( bitMultiplier <= num ) { int pairTotal = num / bitMultiplier ; setBitsCount += ( pairTotal / 2 ) * bitMultiplier ; if ( ( pairTotal & 1 ) != 0 ) { setBitsCount += ( num % bitMultiplier ) ; } bitMultiplier <<= 1 ; } return setBitsCount ; |
public class PoolManager { /** * This method reserves connection . If unused connection exists , it is returned ,
* otherwise new connection is created using ManagedConnectionFactory .
* @ param Subject connection security context
* @ param ConnectionRequestInfo requestInfo
* @ param Object affinity
* @ param... | final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; // boolean normalSharing = true ;
// This is to be a parm past in when j2c code is ready
// If this is false we don ' t check the for an existing shared
// Connection , we hand out a new shared connection .
if ( isTracingEnabled && tc . isEntry... |
public class ServerHandshaker { /** * This routine handles all the server side handshake messages , one at
* a time . Given the message type ( and in some cases the pending cipher
* spec ) it parses the type - specific message . Then it calls a function
* that handles that specific message .
* It updates the st... | // In SSLv3 and TLS , messages follow strictly increasing
// numerical order _ except _ for one annoying special case .
if ( ( state >= type ) && ( state != HandshakeMessage . ht_client_key_exchange && type != HandshakeMessage . ht_certificate_verify ) ) { throw new SSLProtocolException ( "Handshake message sequence vi... |
public class MarkLogicRepositoryConnection { /** * sets default graph permissions to be used by all queries
* @ param graphPerms */
@ Override public void setDefaultGraphPerms ( GraphPermissions graphPerms ) { } } | if ( notNull ( graphPerms ) ) { this . defaultGraphPerms = graphPerms ; } else { this . defaultGraphPerms = client . emptyGraphPerms ( ) ; } |
public class Utils { /** * Checks whether given given { @ link Tuple } s have equal
* { @ link Tuple # getSize ( ) size } , and throws an
* < code > IllegalArgumentException < / code > if not .
* @ param t0 The first tuple
* @ param t1 The second tuple
* @ throws IllegalArgumentException If the given tuples
... | if ( t0 . getSize ( ) != t1 . getSize ( ) ) { throw new IllegalArgumentException ( "Sizes do not match: " + t0 . getSize ( ) + " and " + t1 . getSize ( ) ) ; } |
public class FlexBase64 { /** * Creates an InputStream wrapper which encodes a source into base64 as it is read , until the source hits EOF .
* Upon hitting EOF , a standard base64 termination sequence will be readable . Clients can simply treat this input
* stream as if they were reading from a base64 encoded file... | return new EncoderInputStream ( source , bufferSize , wrap , false ) ; |
public class ImplicitObjects { /** * Creates the Map that maps parameter name to single parameter
* value . */
public static Map createParamMap ( PageContext pContext ) { } } | final HttpServletRequest request = ( HttpServletRequest ) pContext . getRequest ( ) ; return new EnumeratedMap ( ) { public Enumeration enumerateKeys ( ) { return request . getParameterNames ( ) ; } public Object getValue ( Object pKey ) { if ( pKey instanceof String ) { return request . getParameter ( ( String ) pKey ... |
public class FuzzyAllenIntervalConstraint { /** * Get current possibilities of all Allen relations ( types ) .
* @ return The current possibilities of all Allen relations . */
public HashMap < FuzzyAllenIntervalConstraint . Type , Double > getPossibilities ( ) { } } | HashMap < FuzzyAllenIntervalConstraint . Type , Double > fr = new HashMap < FuzzyAllenIntervalConstraint . Type , Double > ( ) ; for ( Type t : Type . values ( ) ) fr . put ( t , 0.0 ) ; for ( Type type : types ) { for ( int t = 0 ; t < FuzzyAllenIntervalConstraint . freksa_neighbor [ type . ordinal ( ) ] . length ; t ... |
public class ClientService { /** * This function deletes a client , but its transactions are not deleted .
* @ param client
* A { @ link Client } with Id . */
public void delete ( Client client ) { } } | RestfulUtils . delete ( ClientService . PATH , client , Client . class , super . httpClient ) ; |
public class Assert { /** * Asserts that the { @ link Thread # currentThread ( ) current Thread } holds the specified { @ link Object lock } .
* The assertion holds if and only if the { @ link Object lock } is not { @ literal null }
* and the { @ link Thread # currentThread ( ) current Thread } holds the given { @ ... | holdsLock ( lock , new IllegalMonitorStateException ( format ( message , arguments ) ) ) ; |
public class TransactionRequestProcessor { /** * Checks if the transaction was already prepared in another node
* The client can send multiple requests to the server ( in case of timeout or similar ) . This request is ignored when
* ( 1 ) the originator is still alive ; ( 2 ) the transaction is prepared or committe... | TxState txState = txCoordinator . getTxState ( ) ; if ( txState == null ) { return false ; } if ( txCoordinator . isAlive ( txState . getOriginator ( ) ) ) { // transaction started on another node but the node is still in the topology . 2 possible scenarios :
// #1 , the topology isn ' t updated
// #2 , the client time... |
public class HtmlUtils { /** * Detect simple HTML contained inside of the given < code > value < / code > string .
* @ param value the value
* @ return < code > true < / code > if the string contains HTML ; < code > false < / code > otherwise . */
public static boolean containsHtml ( String value ) { } } | int numChars = value . length ( ) ; char c ; for ( int i = 0 ; i < numChars ; i ++ ) { c = value . charAt ( i ) ; switch ( c ) { case '<' : return true ; case '&' : return true ; case '"' : return true ; } } return false ; |
public class StreamEx { /** * Returns a stream consisting of the elements of this stream that don ' t
* equal to the given value .
* This is an < a href = " package - summary . html # StreamOps " > intermediate < / a >
* operation .
* @ param value the value to remove from the stream . If the value is null
* ... | if ( value == null ) return filter ( Objects :: nonNull ) ; return remove ( value :: equals ) ; |
public class JobResource { /** * The Python - language Lambda functions for this job .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setLambdaResources ( java . util . Collection ) } or { @ link # withLambdaResources ( java . util . Collection ) } if you
... | if ( this . lambdaResources == null ) { setLambdaResources ( new java . util . ArrayList < LambdaResource > ( lambdaResources . length ) ) ; } for ( LambdaResource ele : lambdaResources ) { this . lambdaResources . add ( ele ) ; } return this ; |
public class MODCAInterchangeSetImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setISid ( Integer newISid ) { } } | Integer oldISid = iSid ; iSid = newISid ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . MODCA_INTERCHANGE_SET__ISID , oldISid , iSid ) ) ; |
public class GvmClusters { /** * Collapses the number of clusters subject to constraints on the maximum
* permitted variance , and the least number of clusters . This method may be
* called at any time , including between calls to add ( ) .
* @ param maxVar
* an upper bound on the global variance that may not b... | if ( minClusters < 0 ) throw new IllegalArgumentException ( "negative minClusters" ) ; if ( count <= minClusters ) return ; // nothing to do
double totalVar = 0.0 ; double totalMass = 0.0 ; for ( int i = 0 ; i < count ; i ++ ) { GvmCluster < S , K > cluster = clusters [ i ] ; totalVar += cluster . var ; totalMass += cl... |
public class StorePath { /** * 获取Group名称
* @ param filePath
* @ return */
private static String getGroupName ( String filePath ) { } } | // 先分隔开路径
String [ ] paths = filePath . split ( SPLIT_GROUP_NAME_AND_FILENAME_SEPERATOR ) ; if ( paths . length == 1 ) { throw new FdfsUnsupportStorePathException ( "解析文件路径错误,有效的路径样式为(group/path) 而当前解析路径为" . concat ( filePath ) ) ; } System . out . println ( paths ) ; for ( String item : paths ) { if ( item . indexOf (... |
public class RangeCondition { /** * { @ inheritDoc } */
@ Override public Query query ( Schema schema ) { } } | if ( field == null || field . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Field name required" ) ; } ColumnMapperSingle < ? > columnMapper = getMapper ( schema , field ) ; Class < ? > clazz = columnMapper . baseClass ( ) ; Query query ; if ( clazz == String . class ) { String lower = ( String ) col... |
public class ObjectMapperFactory { /** * @ see # setSubtypes ( NamedType . . . )
* @ param subtypes the { @ link NamedType } s to add to { @ link # setSubtypeList ( List ) sub - type list } for registration . */
public void addSubtypes ( NamedType ... subtypes ) { } } | if ( this . subtypeList == null ) { this . subtypeList = new ArrayList < > ( ) ; } this . subtypeList . addAll ( Arrays . asList ( subtypes ) ) ; |
public class Clustering { /** * Add a cluster to the clustering .
* @ param parent Parent cluster
* @ param child Child cluster . */
public void addChildCluster ( Cluster < M > parent , Cluster < M > child ) { } } | hierarchy . add ( parent , child ) ; |
public class ArrayIterate { /** * Returns the first element of an array . This method is null safe . */
public static < T > T getFirst ( T [ ] objectArray ) { } } | if ( ArrayIterate . notEmpty ( objectArray ) ) { return objectArray [ 0 ] ; } return null ; |
public class Providers { /** * sun . security . util . ManifestEntryVerifier and java . security . SecureRandom . */
public static Provider getSunProvider ( ) { } } | try { Class < ? > clazz = Class . forName ( jarVerificationProviders [ 0 ] ) ; return ( Provider ) clazz . newInstance ( ) ; } catch ( Exception e ) { try { Class < ? > clazz = Class . forName ( BACKUP_PROVIDER_CLASSNAME ) ; return ( Provider ) clazz . newInstance ( ) ; } catch ( Exception ee ) { throw new RuntimeExcep... |
public class ImageLoader { /** * Loads and decodes image synchronously . < br / >
* < b > NOTE : < / b > { @ link # init ( ImageLoaderConfiguration ) } method must be called before this method call
* @ param uri Image URI ( i . e . " http : / / site . com / image . png " , " file : / / / mnt / sdcard / image . png ... | if ( options == null ) { options = configuration . defaultDisplayImageOptions ; } options = new DisplayImageOptions . Builder ( ) . cloneFrom ( options ) . syncLoading ( true ) . build ( ) ; SyncImageLoadingListener listener = new SyncImageLoadingListener ( ) ; loadImage ( uri , targetImageSize , options , listener ) ;... |
public class HBCIDialog { /** * < p > Ausführen aller bisher erzeugten Aufträge . Diese Methode veranlasst den HBCI - Kernel ,
* die Aufträge , die durch die Aufrufe auszuführen . < / p >
* @ return ein Status - Objekt , anhand dessen der Erfolg oder das Fehlschlagen
* der Dialoge festgestellt werden kann . *... | HBCIExecStatus ret = new HBCIExecStatus ( ) ; log . debug ( "executing dialog" ) ; try { ret . setDialogStatus ( doIt ( closeDialog ) ) ; } catch ( Exception e ) { ret . addException ( e ) ; } return ret ; |
public class SCCs { /** * Find all strongly - connected components in a graph . When a new SCC is found , the { @ link
* SCCListener # foundSCC ( java . util . Collection ) } method is invoked . The listener object may hence not be null .
* Tarjan ' s algorithm is used for realizing the SCC search .
* @ param gra... | TarjanSCCVisitor < N , E > vis = new TarjanSCCVisitor < > ( graph , listener ) ; for ( N node : graph ) { if ( ! vis . hasVisited ( node ) ) { GraphTraversal . depthFirst ( graph , node , vis ) ; } } |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EEnum getIfcSequenceEnum ( ) { } } | if ( ifcSequenceEnumEEnum == null ) { ifcSequenceEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1061 ) ; } return ifcSequenceEnumEEnum ; |
public class AbstractExecutableMemberWriter { /** * Get the type parameters for the executable member .
* @ param member the member for which to get the type parameters .
* @ return the type parameters . */
protected Content getTypeParameters ( ExecutableElement member ) { } } | LinkInfoImpl linkInfo = new LinkInfoImpl ( configuration , MEMBER_TYPE_PARAMS , member ) ; return writer . getTypeParameterLinks ( linkInfo ) ; |
public class MListTable { /** * Retourne la liste d ' objets sélectionnés .
* @ return List
* @ see # setSelectedList */
public List < T > getSelectedList ( ) { } } | final int [ ] selectedRows = getSelectedRows ( ) ; int selectedRow ; final int rowCount = getRowCount ( ) ; final int length = selectedRows . length ; final List < T > selectedList = new ArrayList < > ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { selectedRow = selectedRows [ i ] ; // getSelectedRows peut renvoye... |
public class TreeReaderRegistry { /** * Deregisters the given format from the registry .
* @ param format
* name of the format ( eg . " custom " , " csv " , etc . ) */
public static final void removeReader ( String format ) { } } | String key = format . toLowerCase ( ) ; if ( key . equals ( JSON ) ) { throw new IllegalArgumentException ( "Unable to delete the default JSON reader!" ) ; } readers . remove ( key ) ; |
public class CurationManager { /** * Get the data payload ( ending in ' . tfpackage ' ) from the provided object .
* @ param object
* The digital object holding our payload
* @ return Payload The payload requested
* @ throws StorageException
* if an errors occurs or the payload is not found */
private JsonSim... | // Get our data from Storage
Payload payload = null ; try { DigitalObject object = storage . getObject ( oid ) ; payload = object . getPayload ( WORKFLOW_PAYLOAD ) ; } catch ( StorageException ex ) { log . error ( "Error accessing object '{}' in storage: " , oid , ex ) ; return null ; } // Parse the JSON
try { try { re... |
public class ApiOvhEmailexchange { /** * Generate outlook url
* REST : POST / email / exchange / { organizationName } / service / { exchangeService } / account / { primaryEmailAddress } / outlookURL
* @ param version [ required ] Version of outlook
* @ param language [ required ] Language of outlook
* @ param o... | String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEmailAddress}/outlookURL" ; StringBuilder sb = path ( qPath , organizationName , exchangeService , primaryEmailAddress ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "language" , languag... |
public class BulkSQSOperation { /** * Bulk action on list of message identifiers up to the provided index
* @ param messageIdentifierList
* Container for the list of message identifiers
* @ param indexOfMessage
* The action will apply to all messages up to this index
* @ throws JMSException
* if < code > ac... | assert indexOfMessage > 0 ; assert indexOfMessage <= messageIdentifierList . size ( ) ; Map < String , List < String > > receiptHandleWithSameQueueUrl = new HashMap < String , List < String > > ( ) ; // Add all messages up to and including requested message into Map .
// Map contains key as queueUrl and value as list r... |
public class IntBuffer { /** * Compares the remaining ints of this buffer to another int buffer ' s remaining ints .
* @ param otherBuffer another int buffer .
* @ return a negative value if this is less than { @ code other } ; 0 if this equals to { @ code
* other } ; a positive value if this is greater than { @ ... | int compareRemaining = ( remaining ( ) < otherBuffer . remaining ( ) ) ? remaining ( ) : otherBuffer . remaining ( ) ; int thisPos = position ; int otherPos = otherBuffer . position ; // BEGIN android - changed
int thisInt , otherInt ; while ( compareRemaining > 0 ) { thisInt = get ( thisPos ) ; otherInt = otherBuffer ... |
public class Objects { /** * Checks boolean expression .
* @ param expression a boolean expression
* @ param message error message
* @ param messageArgs array of parameters to the message
* @ throws IllegalArgumentException if boolean expression is false */
public static void validArgument ( boolean expression ... | if ( ! expression ) { throw new IllegalArgumentException ( format ( message , messageArgs ) ) ; } |
public class CmsResourceInfoDialog { /** * Initializes the user object . < p > */
protected void initFileInfo ( ) { } } | try { // edit an existing user , get the user object from db
m_path = getParamResource ( ) ; m_title = getCms ( ) . readPropertyObject ( m_path , CmsPropertyDefinition . PROPERTY_TITLE , false ) . getValue ( "-" ) ; } catch ( CmsException e ) { // should never happen
} |
public class PhaxioFaxClientSpi { /** * This function initializes the fax action type to resource mappings .
* @ return The fax action type to resource mappings */
@ Override protected Map < FaxActionType , String > initializeFaxActionType2ResourceMap ( ) { } } | // set resources
Map < FaxActionType , String > map = new HashMap < FaxActionType , String > ( ) ; map . put ( FaxActionType . SUBMIT_FAX_JOB , "/v1/send" ) ; map . put ( FaxActionType . CANCEL_FAX_JOB , "/v1/faxCancel" ) ; map . put ( FaxActionType . GET_FAX_JOB_STATUS , "/v1/faxStatus" ) ; return map ; |
public class Lists { /** * An implementation of { @ link List # indexOf ( Object ) } . */
static int indexOfImpl ( List < ? > list , @ Nullable Object element ) { } } | ListIterator < ? > listIterator = list . listIterator ( ) ; while ( listIterator . hasNext ( ) ) { if ( Objects . equal ( element , listIterator . next ( ) ) ) { return listIterator . previousIndex ( ) ; } } return - 1 ; |
public class ColumnPrinter { /** * Add a value to the nth column
* @ param columnIndex n
* @ param value value to add */
void addValue ( int columnIndex , String value ) { } } | if ( ( columnIndex < 0 ) || ( columnIndex >= data . size ( ) ) ) { throw new IllegalArgumentException ( ) ; } List < String > stringList = data . get ( columnIndex ) ; stringList . add ( value ) ; |
public class SIXAResourceProxy { /** * Called when the transaction manager would like us to
* prepare to complete the transaction .
* Across the wire we will flow :
* BIT32 Transaction Id
* The XID Structure
* @ param xid
* @ return Returns the result of the resource manager ' s vote on whether
* we can c... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "prepare" , xid ) ; final int result = internalPrepare ( xid ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "prepare" , "" + result ) ; return result ; |
public class BondManipulator { /** * Get the single bond equivalent ( SBE ) of a list of bonds , given an iterator to the list .
* @ param bonds An iterator to the list of bonds
* @ return The SBE sum */
public static int getSingleBondEquivalentSum ( Iterator < IBond > bonds ) { } } | int sum = 0 ; while ( bonds . hasNext ( ) ) { IBond . Order order = bonds . next ( ) . getOrder ( ) ; if ( order != null ) { sum += order . numeric ( ) ; } } return sum ; |
public class SubPlanAssembler { /** * Get an index scan access plan for a table .
* @ param tableAliasIndex The table to get data from .
* @ param path The access path to access the data in the table ( index / scan / etc ) .
* @ return An index scan plan node OR ,
* in one edge case , an NLIJ of a MaterializedS... | // now assume this will be an index scan and get the relevant index
Index index = path . index ; IndexScanPlanNode scanNode = new IndexScanPlanNode ( tableScan , index ) ; AbstractPlanNode resultNode = scanNode ; // set sortDirection here because it might be used for IN list
scanNode . setSortDirection ( path . sortDir... |
public class ConfigurationAbstractImpl { /** * Returns the class specified by the value for the specified key . If no
* value for this key is found in the configuration , no class of this name
* can be found or the specified class is not assignable to each
* class / interface in < code > assignables defaultValue ... | String className = properties . getProperty ( key ) ; if ( className == null ) { if ( defaultValue == null ) { logger . info ( "No value for key '" + key + "'" ) ; return null ; } else { className = defaultValue . getName ( ) ; properties . put ( key , className ) ; logger . debug ( "No value for key \"" + key + "\", u... |
public class FloatAttribute { /** * BigDecimal */
public FloatAttribute plus ( BigDecimalAttribute attribute ) { } } | return FloatNumericType . getInstance ( ) . createCalculatedAttribute ( FloatNumericType . getInstance ( ) . createAdditionCalculator ( this , attribute ) ) ; |
public class AstUtil { /** * Return the AnnotationNode for the named annotation , or else null .
* Supports Groovy 1.5 and Groovy 1.6.
* @ param node - the AnnotatedNode
* @ param name - the name of the annotation
* @ return the AnnotationNode or else null */
public static AnnotationNode getAnnotation ( Annotat... | List < AnnotationNode > annotations = node . getAnnotations ( ) ; for ( AnnotationNode annot : annotations ) { if ( annot . getClassNode ( ) . getName ( ) . equals ( name ) ) { return annot ; } } return null ; |
public class CookieVersionData { /** * @ see
* com . ibm . ws . http . channel . internal . values . CookieData # set ( com . ibm . websphere
* . http . HttpCookie , byte [ ] ) */
@ Override public boolean set ( HttpCookie cookie , byte [ ] attribValue ) { } } | try { if ( null != cookie && null != attribValue && 0 < attribValue . length ) { cookie . setVersion ( GenericUtils . asIntValue ( attribValue ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Cookie version set to " + cookie . getVersion ( ) ) ; } return true ; } } c... |
public class KafkaProducerPusher { /** * Push all byte array messages to the Kafka topic .
* @ param messages List of byte array messages to push to Kakfa . */
public void pushMessages ( List < byte [ ] > messages ) { } } | for ( byte [ ] message : messages ) { producer . send ( new ProducerRecord < > ( topic , message ) , ( recordMetadata , e ) -> { if ( e != null ) { log . error ( "Failed to send message to topic {} due to exception: " , topic , e ) ; } } ) ; } |
public class PooledByteBufAllocator { /** * Return the number of thread local caches used by this { @ link PooledByteBufAllocator } .
* @ deprecated use { @ link PooledByteBufAllocatorMetric # numThreadLocalCaches ( ) } . */
@ Deprecated public int numThreadLocalCaches ( ) { } } | PoolArena < ? > [ ] arenas = heapArenas != null ? heapArenas : directArenas ; if ( arenas == null ) { return 0 ; } int total = 0 ; for ( PoolArena < ? > arena : arenas ) { total += arena . numThreadCaches . get ( ) ; } return total ; |
public class TransformerRegistry { /** * Get the sub registry for the domain .
* @ param range the version range
* @ return the sub registry */
public TransformersSubRegistration getDomainRegistration ( final ModelVersionRange range ) { } } | final PathAddress address = PathAddress . EMPTY_ADDRESS ; return new TransformersSubRegistrationImpl ( range , domain , address ) ; |
public class GlobalExceptionHandler { /** * 全局处理错误
* @ param request current HTTP request
* @ param response current HTTP response
* @ param handler the executed handler , or < code > null < / code > if none chosen at the time of the exception ( for
* example ,
* if multipart resolution failed )
* @ param e... | ModelAndView model = new ModelAndView ( new MappingJacksonJsonView ( ) ) ; try { if ( e instanceof TypeMismatchException ) { LOG . warn ( "TypeMismatchException occurred. " + e . getMessage ( ) ) ; return buildBizErrors ( ( TypeMismatchException ) e , model ) ; } else if ( e instanceof BindException ) { LOG . warn ( "B... |
public class AnnotationDto { /** * Converts list of alert entity objects to list of alertDto objects .
* @ param annotations List of alert entities . Cannot be null .
* @ return List of alertDto objects .
* @ throws WebApplicationException If an error occurs . */
public static List < AnnotationDto > transformToDt... | if ( annotations == null ) { throw new WebApplicationException ( "Null entity object cannot be converted to Dto object." , Status . INTERNAL_SERVER_ERROR ) ; } List < AnnotationDto > result = new ArrayList < > ( ) ; for ( Annotation annotation : annotations ) { result . add ( transformToDto ( annotation ) ) ; } return ... |
public class CmsContainerpageController { /** * Replaces the given drag - element with the given container element . < p >
* @ param containerElement the container element to replace
* @ param elementData the new element data
* @ return the container element which replaced the old one
* @ throws Exception if so... | I_CmsDropContainer parentContainer = containerElement . getParentTarget ( ) ; String containerId = parentContainer . getContainerId ( ) ; CmsContainerPageElementPanel replacer = null ; String elementContent = elementData . getContents ( ) . get ( containerId ) ; if ( ( elementContent != null ) && ( elementContent . tri... |
public class EJBMDOrchestrator { /** * Populate the transactionAttrs and activitySessionAttrs arrays from XML
* metadata in activitySessionList and transactionList and from annotation
* data in ejbMethods . */
private void initializeBeanMethodTransactionAttributes ( boolean isEntity , boolean addRemove , MethodInte... | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "initializeBeanMethodTransactionAttributes: " + methodInterface ) ; int numMethods = ejbMethods . length ; int numExplicitMethods = numMethods - ( addRemove ? 1 : 0 ) ; for ( int i = 0 ; i ... |
public class MasterProtocol { /** * loop until found the failed connection .
* @ param listener current failover
* @ param globalInfo server global variables information
* @ param addresses list of HostAddress to loop
* @ param searchFilter search parameter
* @ throws SQLException if not found */
public stati... | MasterProtocol protocol ; ArrayDeque < HostAddress > loopAddresses = new ArrayDeque < > ( addresses ) ; if ( loopAddresses . isEmpty ( ) ) { resetHostList ( listener , loopAddresses ) ; } int maxConnectionTry = listener . getRetriesAllDown ( ) ; boolean firstLoop = true ; SQLException lastQueryException = null ; while ... |
public class X509CertImpl { /** * Gets the publickey from this certificate .
* @ return the publickey . */
public PublicKey getPublicKey ( ) { } } | if ( info == null ) return null ; try { PublicKey key = ( PublicKey ) info . get ( CertificateX509Key . NAME + DOT + CertificateX509Key . KEY ) ; return key ; } catch ( Exception e ) { return null ; } |
public class ComponentCollision { /** * Add point and adjacent points depending of the collidable max collision size .
* @ param minX The min horizontal location .
* @ param minY The min vertical location .
* @ param maxX The min horizontal location .
* @ param maxY The min vertical location .
* @ param colli... | addPoint ( new Point ( minX , minY ) , collidable ) ; if ( minX != maxX && minY == maxY ) { addPoint ( new Point ( maxX , minY ) , collidable ) ; } else if ( minX == maxX && minY != maxY ) { addPoint ( new Point ( minX , maxY ) , collidable ) ; } else if ( minX != maxX ) { addPoint ( new Point ( minX , maxY ) , collida... |
public class TextToSpeech { /** * Get a voice .
* Gets information about the specified voice . The information includes the name , language , gender , and other details
* about the voice . Specify a customization ID to obtain information for that custom voice model of the specified
* voice . To list information a... | Validator . notNull ( getVoiceOptions , "getVoiceOptions cannot be null" ) ; String [ ] pathSegments = { "v1/voices" } ; String [ ] pathParameters = { getVoiceOptions . voice ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ;... |
public class GeometryColumnsSfSqlDao { /** * { @ inheritDoc } */
@ Override public GeometryColumnsSfSql queryForId ( TableColumnKey key ) throws SQLException { } } | GeometryColumnsSfSql geometryColumns = null ; if ( key != null ) { Map < String , Object > fieldValues = new HashMap < String , Object > ( ) ; fieldValues . put ( GeometryColumnsSfSql . COLUMN_F_TABLE_NAME , key . getTableName ( ) ) ; fieldValues . put ( GeometryColumnsSfSql . COLUMN_F_GEOMETRY_COLUMN , key . getColumn... |
public class SingleOutputStreamOperator { /** * Adds a type information hint about the return type of this operator . This method
* can be used in cases where Flink cannot determine automatically what the produced
* type of a function is . That can be the case if the function uses generic type variables
* in the ... | requireNonNull ( typeClass , "type class must not be null." ) ; try { return returns ( TypeInformation . of ( typeClass ) ) ; } catch ( InvalidTypesException e ) { throw new InvalidTypesException ( "Cannot infer the type information from the class alone." + "This is most likely because the class represents a generic ty... |
public class ServletTimerImpl { /** * Method that actually */
public void run ( ) { } } | final MobicentsSipApplicationSession sipApplicationSession = getApplicationSession ( ) ; SipContext sipContext = sipApplicationSession . getSipContext ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "running Servlet Timer " + id + " for sip application session " + sipApplicationSession ) ; } boolean batchSt... |
public class JobTargetExecutionsInner { /** * Lists the target executions of a job step execution .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server .
* ... | ServiceResponse < Page < JobExecutionInner > > response = listByStepSinglePageAsync ( resourceGroupName , serverName , jobAgentName , jobName , jobExecutionId , stepName ) . toBlocking ( ) . single ( ) ; return new PagedList < JobExecutionInner > ( response . body ( ) ) { @ Override public Page < JobExecutionInner > ne... |
public class SlowQueryListener { /** * Calculate a key for given { @ link ExecutionInfo } .
* < p > This key is passed to the slow query check { @ link Runnable } as well as for removal in { @ link # afterQuery ( ExecutionInfo , List ) } .
* < p > Default implementation uses { @ link System # identityHashCode ( Obj... | int exeInfoKey = System . identityHashCode ( executionInfo ) ; return String . valueOf ( exeInfoKey ) ; |
public class AbstractMappableValidator { /** * Disposes all data providers and rules that are mapped to each other . < br > Note that some data providers may have
* been
* disposed already in the other disposal methods . */
private void disposeDataProvidersAndRules ( ) { } } | for ( final Map . Entry < DP , List < R > > entry : dataProvidersToRules . entrySet ( ) ) { // Dispose data provider
final DP dataProvider = entry . getKey ( ) ; if ( dataProvider instanceof Disposable ) { ( ( Disposable ) dataProvider ) . dispose ( ) ; } // Dispose rules
final List < R > rules = entry . getValue ( ) ;... |
public class JSONArray { /** * Returns a List or a Set taking generics into account . < br / > Contributed by
* [ Matt Small @ WaveMaker ] . */
public static Collection toCollection ( JSONArray jsonArray , JsonConfig jsonConfig ) { } } | Collection collection = null ; Class collectionType = jsonConfig . getCollectionType ( ) ; if ( collectionType . isInterface ( ) ) { if ( collectionType . equals ( List . class ) ) { collection = new ArrayList ( ) ; } else if ( collectionType . equals ( Set . class ) ) { collection = new HashSet ( ) ; } else { throw ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.