signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class AppendableVec { /** * not called distributed . */
synchronized void closeChunk ( int cidx , int len ) { } } | // The Parser will pre - allocate the _ tmp _ espc large enough ( the Parser
// knows how many final Chunks there will be up front ) . Other users are
// encouraged to set a " large enough " espc - and a shared one at that - to
// avoid these copies .
// Set the length into the temp ESPC at the Chunk index ( accounting... |
public class JobsInner { /** * Retrieve the job identified by job id .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param jobId The job id .
* @ param serviceCallback the async ServiceCallback to handle successful and fail... | return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , automationAccountName , jobId ) , serviceCallback ) ; |
public class WstxInputFactory { /** * / / / / Stream reader factory methods */
@ Override public XMLStreamReader createXMLStreamReader ( InputStream in ) throws XMLStreamException { } } | // false for auto - close , since caller has access to the input stream
return createSR ( null , in , null , false , false ) ; |
public class LinearAlgebra { /** * Pseudo - Inverse of a matrix calculated in the least square sense .
* @ param matrix The given matrix A .
* @ return pseudoInverse The pseudo - inverse matrix P , such that A * P * A = A and P * A * P = P */
public static double [ ] [ ] pseudoInverse ( double [ ] [ ] matrix ) { } ... | if ( isSolverUseApacheCommonsMath ) { // Use LU from common math
SingularValueDecomposition svd = new SingularValueDecomposition ( new Array2DRowRealMatrix ( matrix ) ) ; double [ ] [ ] matrixInverse = svd . getSolver ( ) . getInverse ( ) . getData ( ) ; return matrixInverse ; } else { return org . jblas . Solve . pinv... |
public class CommerceAccountUserRelLocalServiceUtil { /** * Returns the commerce account user rel with the primary key .
* @ param commerceAccountUserRelPK the primary key of the commerce account user rel
* @ return the commerce account user rel
* @ throws PortalException if a commerce account user rel with the p... | return getService ( ) . getCommerceAccountUserRel ( commerceAccountUserRelPK ) ; |
public class CreateFlowLogsResult { /** * Information about the flow logs that could not be created successfully .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setUnsuccessful ( java . util . Collection ) } or { @ link # withUnsuccessful ( java . util . Co... | if ( this . unsuccessful == null ) { setUnsuccessful ( new com . amazonaws . internal . SdkInternalList < UnsuccessfulItem > ( unsuccessful . length ) ) ; } for ( UnsuccessfulItem ele : unsuccessful ) { this . unsuccessful . add ( ele ) ; } return this ; |
public class DescribeParametersRequest { /** * Filters to limit the request results .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setParameterFilters ( java . util . Collection ) } or { @ link # withParameterFilters ( java . util . Collection ) } if you
... | if ( this . parameterFilters == null ) { setParameterFilters ( new com . amazonaws . internal . SdkInternalList < ParameterStringFilter > ( parameterFilters . length ) ) ; } for ( ParameterStringFilter ele : parameterFilters ) { this . parameterFilters . add ( ele ) ; } return this ; |
public class ComposableFutures { /** * sends a callable task to the default thread pool and returns a ComposableFuture that represent the result .
* @ param task the task to run .
* @ param < T > the future type
* @ return a future representing the result . */
public static < T > ComposableFuture < T > submit ( f... | return submit ( false , task ) ; |
public class BufferedFileImageSequence { /** * Loads the next image into a BufferedImage and returns it . The same instance
* or a new instance of a BufferedImage might be returned each time . Don ' t rely
* on either behavior being consistent .
* @ return A BufferedImage containing the next image . */
public T n... | if ( loop ) { if ( forwards ) { if ( index >= images . length ) { index = images . length - 1 ; forwards = false ; } } else { if ( index < 0 ) { index = 0 ; forwards = true ; } } } this . imageGUI = orig [ index ] ; if ( forwards ) return images [ index ++ ] ; else return images [ index -- ] ; |
public class ColVals { /** * < p > Put column with Float val . < / p >
* @ param pNm column name
* @ param pVal column val */
public final void put ( final String pNm , final Float pVal ) { } } | if ( this . floats == null ) { this . floats = new HashMap < String , Float > ( ) ; } this . floats . put ( pNm , pVal ) ; |
public class HealthStatusHttpMapper { /** * Map the specified { @ link Status } to an HTTP status code .
* @ param status the health { @ link Status }
* @ return the corresponding HTTP status code */
public int mapStatus ( Status status ) { } } | String code = getUniformValue ( status . getCode ( ) ) ; if ( code != null ) { return this . statusMapping . entrySet ( ) . stream ( ) . filter ( ( entry ) -> code . equals ( getUniformValue ( entry . getKey ( ) ) ) ) . map ( Map . Entry :: getValue ) . findFirst ( ) . orElse ( WebEndpointResponse . STATUS_OK ) ; } ret... |
public class ContentElement { /** * Create an automatic style for this TableCellStyle and this type of cell .
* Do not produce any effect if the type is Type . STRING or Type . VOID .
* @ param style the style of the cell ( color , data style , etc . )
* @ param type the type of the cell
* @ return the created ... | final TableCellStyle newStyle ; final DataStyle dataStyle = this . format . getDataStyle ( type ) ; if ( dataStyle == null ) { newStyle = style ; } else { newStyle = this . stylesContainer . addChildCellStyle ( style , dataStyle ) ; } return newStyle ; |
public class UnitResponse { /** * No matter context pretty attribute is true or not , this method formats the json string you want .
* @ param pretty pretty or not .
* @ return formatted json string . */
public String toVoJSONString ( boolean pretty ) { } } | if ( pretty ) { return JSON . toJSONStringWithDateFormat ( toVoJSONObject ( ) , Constant . DATE_SERIALIZE_FORMAT , SerializerFeature . PrettyFormat ) ; } else { return JSONObject . toJSONStringWithDateFormat ( toVoJSONObject ( ) , Constant . DATE_SERIALIZE_FORMAT ) ; } |
public class TaskTextViewerPanel { /** * Displays the error message .
* @ param failedTaskReport error message */
public void setText ( FailedTaskReport failedTaskReport ) { } } | final String failedTaskReportString = failedTaskReport == null ? "Failed Task Report is null" : failedTaskReport . toString ( ) ; setText ( failedTaskReportString ) ; |
public class CmsDialog { /** * Builds a block with 3D border and optional subheadline in the dialog content area . < p >
* @ param segment the HTML segment ( START / END )
* @ param headline the headline String for the block
* @ param error if true , an error block will be created
* @ return 3D block start / en... | if ( segment == HTML_START ) { StringBuffer result = new StringBuffer ( 512 ) ; String errorStyle = "" ; if ( error ) { errorStyle = " dialogerror" ; } result . append ( "<!-- 3D block start -->\n" ) ; result . append ( "<fieldset class=\"dialogblock\">\n" ) ; if ( CmsStringUtil . isNotEmpty ( headline ) ) { result . a... |
public class ProducerPool { /** * selects either a synchronous or an asynchronous producer , for the
* specified broker id and calls the send API on the selected producer
* to publish the data to the specified broker partition
* @ param ppd the producer pool request object */
public void send ( ProducerPoolData <... | if ( logger . isDebugEnabled ( ) ) { logger . debug ( "send message: " + ppd ) ; } if ( sync ) { Message [ ] messages = new Message [ ppd . data . size ( ) ] ; int index = 0 ; for ( V v : ppd . data ) { messages [ index ] = serializer . toMessage ( v ) ; index ++ ; } ByteBufferMessageSet bbms = new ByteBufferMessageSet... |
public class ZoneRules { /** * Finds the offset info for a local date - time and transition .
* @ param dt the date - time , not null
* @ param trans the transition , not null
* @ return the offset info , not null */
private Object findOffsetInfo ( LocalDateTime dt , ZoneOffsetTransition trans ) { } } | LocalDateTime localTransition = trans . getDateTimeBefore ( ) ; if ( trans . isGap ( ) ) { if ( dt . isBefore ( localTransition ) ) { return trans . getOffsetBefore ( ) ; } if ( dt . isBefore ( trans . getDateTimeAfter ( ) ) ) { return trans ; } else { return trans . getOffsetAfter ( ) ; } } else { if ( dt . isBefore (... |
public class SpringMvcEndpointGeneratorMojo { /** * @ return The configuration property < baseUri > ( if set ) or the baseUri from
* the RAML spec . */
private String getBasePath ( RamlRoot loadRamlFromFile ) { } } | // we take the given baseUri from raml spec by default .
String basePath = loadRamlFromFile . getBaseUri ( ) ; // If the baseUri is explicitly set by the plugin configuration we take
// it .
if ( baseUri != null ) { basePath = baseUri ; } // Because we can ' t load an empty string parameter value from maven
// config
/... |
public class ExpressionEvaluator { /** * Utility method to evaluate both if expressions and statements
* @ param node
* @ param ifLocation
* @ param testExp
* @ param thenNode
* @ param elseIfNodeList
* @ param elseNode
* @ param ctxt
* @ return
* @ throws AnalysisException */
protected Value evalIf (... | BreakpointManager . getBreakpoint ( node ) . check ( ifLocation , ctxt ) ; try { if ( testExp . apply ( VdmRuntime . getStatementEvaluator ( ) , ctxt ) . boolValue ( ctxt ) ) { return thenNode . apply ( VdmRuntime . getStatementEvaluator ( ) , ctxt ) ; } else { for ( INode elseif : elseIfNodeList ) { Value r = elseif .... |
public class JsonUtils { /** * Decode a JSON string as Java map . The string must represent a JSON Object
* @ param json The JSON to decode
* @ return a map representing the JSON Object */
@ SuppressWarnings ( "unchecked" ) public static Map < String , Object > decodeAsMap ( String json ) { } } | return decode ( json , HashMap . class ) ; |
public class Ix { /** * Prints the elements of this sequence to the console , separated
* by the given separator and with a line break after roughly the
* given charsPerLine amount .
* @ param separator the characters to separate the elements
* @ param charsPerLine indicates how long a line should be */
public ... | boolean first = true ; int len = 0 ; for ( T v : this ) { String s = String . valueOf ( v ) ; if ( first ) { System . out . print ( s ) ; len += s . length ( ) ; first = false ; } else { System . out . print ( separator ) ; len += separator . length ( ) ; if ( len > charsPerLine ) { System . out . println ( ) ; System ... |
public class HilOut { /** * Scan function performs a squential scan over the data .
* @ param hf the hilbert features
* @ param k0 */
private void scan ( HilbertFeatures hf , int k0 ) { } } | final int mink0 = Math . min ( 2 * k0 , capital_n - 1 ) ; if ( LOG . isDebuggingFine ( ) ) { LOG . debugFine ( "Scanning with k0=" + k0 + " (" + mink0 + ")" + " N*=" + capital_n_star ) ; } for ( int i = 0 ; i < hf . pf . length ; i ++ ) { if ( hf . pf [ i ] . ubound < omega_star ) { continue ; } if ( hf . pf [ i ] . lb... |
public class PrecompileExceptDef { /** * Sets the base - directory */
public void setDir ( final File dir ) throws BuildException { } } | if ( this . localSet == null ) { this . localSet = new ConditionalFileSet ( ) ; this . owner . appendExceptFileSet ( this . localSet ) ; } this . localSet . setDir ( dir ) ; |
public class ComicChatOverlay { /** * Clear chat bubbles , either all of them or just the place - oriented ones . */
protected void clearBubbles ( boolean all ) { } } | for ( Iterator < BubbleGlyph > iter = _bubbles . iterator ( ) ; iter . hasNext ( ) ; ) { ChatGlyph rec = iter . next ( ) ; if ( all || isPlaceOrientedType ( rec . getType ( ) ) ) { _target . abortAnimation ( rec ) ; iter . remove ( ) ; } } |
public class FieldMetaData { /** * 获取动态属性值
* @ param value
* @ param charset
* @ return */
@ SuppressWarnings ( "unchecked" ) private byte [ ] getDynamicFieldByteValue ( Object value , Charset charset ) { } } | switch ( dynamicFieldType ) { // 如果是打包剩余的所有Byte
case allRestByte : return BytesUtil . objString2Byte ( ( String ) value , charset ) ; // 如果是文件metadata
case metadata : return MetadataMapper . toByte ( ( Set < MetaData > ) value , charset ) ; default : return BytesUtil . objString2Byte ( ( String ) value , charset ) ; } |
public class TermMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Term term , ProtocolMarshaller protocolMarshaller ) { } } | if ( term == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( term . getSourceText ( ) , SOURCETEXT_BINDING ) ; protocolMarshaller . marshall ( term . getTargetText ( ) , TARGETTEXT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientExc... |
public class AbstractResourcePool { /** * { @ inheritDoc }
* @ throws IllegalArgumentException { @ inheritDoc } */
@ Override public void validateUpdate ( ResourcePool newPool ) { } } | // Replacement must be of the same ResourceType
if ( ! this . getType ( ) . equals ( newPool . getType ( ) ) ) { throw new IllegalArgumentException ( "ResourceType " + newPool . getType ( ) + " can not replace " + this . getType ( ) ) ; } // Replacement must have the same persistence
if ( this . isPersistent ( ) != new... |
public class DTBuilder { /** * behavior undefined unless normalized .
* If you ' re not sure whether it ' s appropriate to use this method , use
* < code > toDateValue ( ) . compareTo ( dv ) < / code > instead . */
public int compareTo ( DateValue dv ) { } } | long dvComparable = ( ( ( ( ( long ) dv . year ( ) ) << 4 ) + dv . month ( ) ) << 5 ) + dv . day ( ) ; long dtbComparable = ( ( ( ( long ) year << 4 ) + month << 5 ) ) + day ; if ( dv instanceof TimeValue ) { TimeValue tv = ( TimeValue ) dv ; dvComparable = ( ( ( ( ( dvComparable << 5 ) + tv . hour ( ) ) << 6 ) + tv . ... |
public class JournalDriverImpl { /** * @ Override
* public void setMaxCount ( int maxCount )
* _ maxCount = maxCount ;
* @ Override
* public void setDelay ( long timeout )
* _ timeout = timeout ;
* @ Override
* public long getDelay ( )
* return _ timeout ; */
@ Override public JournalAmp open ( String n... | JournalSystem system = JournalSystem . getCurrent ( ) ; /* if ( maxCount < 0 ) {
maxCount = _ maxCount ;
if ( timeout < 0 ) {
timeout = _ timeout ; */
if ( system != null ) { return new JournalImpl ( system . openJournal ( name ) ) ; // , maxCount , timeout ) ;
} else { throw new ServiceException ( L . l ( "Journ... |
public class DefaultDataStore { /** * Internal API used by table DAOs that supports a LimitCounter instead of a long limit . */
@ Override public Iterator < Map < String , Object > > scan ( String tableName , @ Nullable String fromKeyExclusive , LimitCounter limit , ReadConsistency consistency ) { } } | return scan ( tableName , fromKeyExclusive , limit , false , consistency ) ; |
public class AbstractTraceFactory { /** * ( non - Javadoc )
* @ see com . ibm . ws . objectManager . utils . TraceFactory # getTrace ( java . lang . Class , java . lang . String ) */
public Trace getTrace ( Class sourceClass , String traceGroup ) { } } | synchronized ( activeTrace ) { TraceImpl traceImpl = new TraceImpl ( sourceClass , traceGroup , this ) ; activeTrace . put ( sourceClass , traceImpl ) ; try { applyActiveTrace ( ) ; } catch ( java . io . IOException exception ) { System . out . println ( cclass + ":getTrace() exception" + exception ) ; exception . prin... |
public class ExampleUtils { /** * Tears down external resources that can be deleted upon the example ' s completion . */
private void tearDown ( ) { } } | pendingMessages . add ( "*************************Tear Down*************************" ) ; ExamplePubsubTopicAndSubscriptionOptions pubsubOptions = options . as ( ExamplePubsubTopicAndSubscriptionOptions . class ) ; if ( ! pubsubOptions . getPubsubTopic ( ) . isEmpty ( ) ) { try { deletePubsubTopic ( pubsubOptions . get... |
public class EpicsApi { /** * Gets all issues that are assigned to an epic and the authenticated user has access to
* using the specified page and per page setting .
* < pre > < code > GitLab Endpoint : GET / groups / : id / epics / : epic _ iid / issues < / code > < / pre >
* @ param groupIdOrPath the group ID ,... | Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "epics" , epicIid , "issues" ) ; return ( response . readEntity ( new GenericType < List < Epic > > ( ) { } ) ) ; |
public class Matth { /** * Compute the inverse hyperbolic tangent of a number .
* @ param a number on which evaluation is done
* @ return inverse hyperbolic tangent of a */
public static double atanh ( double a ) { } } | boolean negative = false ; if ( a < 0 ) { negative = true ; a = - a ; } double absAtanh ; if ( a > 0.15 ) { absAtanh = 0.5 * Math . log ( ( 1 + a ) / ( 1 - a ) ) ; } else { final double a2 = a * a ; if ( a > 0.087 ) { absAtanh = a * ( 1 + a2 * ( F_1_3 + a2 * ( F_1_5 + a2 * ( F_1_7 + a2 * ( F_1_9 + a2 * ( F_1_11 + a2 * ... |
public class device_profile { /** * < pre >
* Use this operation to modify device profile .
* < / pre > */
public static device_profile update ( nitro_service client , device_profile resource ) throws Exception { } } | resource . validate ( "modify" ) ; return ( ( device_profile [ ] ) resource . update_resource ( client ) ) [ 0 ] ; |
public class ByteBuddy { /** * Creates a new configuration where any { @ link MethodDescription } that matches the provided method matcher is excluded
* from instrumentation . Any previous matcher for ignored methods is replaced . By default , Byte Buddy ignores any
* synthetic method ( bridge methods are handled a... | return new ByteBuddy ( classFileVersion , namingStrategy , auxiliaryTypeNamingStrategy , annotationValueFilterFactory , annotationRetention , implementationContextFactory , methodGraphCompiler , instrumentedTypeFactory , typeValidation , visibilityBridgeStrategy , classWriterStrategy , ignoredMethods ) ; |
public class WriterPoolMember { /** * Generate a new basename by interpolating values in the configured
* template . Values come from local state , other configured values , and
* global system properties . The recommended default template will
* generate a unique basename under reasonable assumptions . */
protec... | Properties localProps = new Properties ( ) ; localProps . setProperty ( "prefix" , settings . getPrefix ( ) ) ; synchronized ( this . getClass ( ) ) { // ensure that serialNo and timestamp are minted together ( never inverted sort order )
String paddedSerialNumber = WriterPoolMember . serialNoFormatter . format ( seria... |
public class VorbisFile { /** * clear out the OggVorbis _ File struct */
int clear ( ) { } } | vb . clear ( ) ; vd . clear ( ) ; os . clear ( ) ; if ( vi != null && links != 0 ) { for ( int i = 0 ; i < links ; i ++ ) { vi [ i ] . clear ( ) ; vc [ i ] . clear ( ) ; } vi = null ; vc = null ; } if ( dataoffsets != null ) { dataoffsets = null ; } if ( pcmlengths != null ) { pcmlengths = null ; } if ( serialnos != nu... |
public class IpRuleItemMarshaller { /** * Marshall the given parameter object . */
public void marshall ( IpRuleItem ipRuleItem , ProtocolMarshaller protocolMarshaller ) { } } | if ( ipRuleItem == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( ipRuleItem . getIpRule ( ) , IPRULE_BINDING ) ; protocolMarshaller . marshall ( ipRuleItem . getRuleDesc ( ) , RULEDESC_BINDING ) ; } catch ( Exception e ) { throw new SdkCli... |
public class AbstractClientOptionsBuilder { /** * Sets the specified HTTP header . */
public B setHttpHeader ( CharSequence name , Object value ) { } } | requireNonNull ( name , "name" ) ; requireNonNull ( value , "value" ) ; httpHeaders . setObject ( HttpHeaderNames . of ( name ) , value ) ; return self ( ) ; |
public class RiakMap { /** * Returns a RiakCounter to which the specified key is mapped , or { @ literal null }
* if no RiakCounter is present .
* @ param key key whose associated RiakCounter is to be returned .
* @ return a RiakCounter , or null if one is not present . */
public RiakCounter getCounter ( BinaryVa... | if ( entries . containsKey ( key ) ) { for ( RiakDatatype dt : entries . get ( key ) ) { if ( dt . isCounter ( ) ) { return dt . getAsCounter ( ) ; } } } return null ; |
public class SummernoteImageUploadEvent { /** * Fires a summernote image upload event on all registered handlers in the
* handler manager . If no such handlers exist , this method will do nothing .
* @ param source the source of the handlers */
public static void fire ( final HasSummernoteImageUploadHandlers source... | if ( TYPE != null ) { SummernoteImageUploadEvent event = new SummernoteImageUploadEvent ( images ) ; source . fireEvent ( event ) ; } |
public class AbstractSphere3F { /** * { @ inheritDoc } */
@ Pure @ Override public double distanceSquared ( Point3D p ) { } } | double d = FunctionalPoint3D . distanceSquaredPointPoint ( getX ( ) , getY ( ) , getZ ( ) , p . getX ( ) , p . getY ( ) , p . getZ ( ) ) - getRadius ( ) ; return MathUtil . max ( 0. , d ) ; |
public class RegistriesInner { /** * Creates a container registry with the specified parameters .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ param registry The parameters for creating a contai... | return createWithServiceResponseAsync ( resourceGroupName , registryName , registry ) . toBlocking ( ) . last ( ) . body ( ) ; |
public class MonitorHolder { /** * Perform the scan on monitored resources . This method checks the
* destroy flag before the scan begins , and after the scan completes ,
* to ensure that any scheduled destruction is carried out as soon as
* reasonable .
* This is not a trivial method - - but we use the trival ... | // Don ' t perform a scheduled scan if this monitor holder is paused
if ( isStopped ) return ; // 152229 : Changed this code to get the monitor type locally . That is , now we save the monitor type in the constructor .
// We used to get the monitor type here by monitorRef . getProperty ( FileMonitor . MONITOR _ TYPE ) ... |
public class NetworkSadnessTransformer { /** * http : / / diveintodata . org / 2009/09 / zipf - distribution - generator - in - java / */
public int nextZipfDelay ( ) { } } | int value ; double friquency = 0 ; double dice ; value = rand . nextInt ( size ) ; friquency = ( 1.0d / Math . pow ( value , this . skew ) ) / this . bottom ; dice = rand . nextDouble ( ) ; while ( ! ( dice < friquency ) ) { value = rand . nextInt ( size ) ; friquency = ( 1.0d / Math . pow ( value , this . skew ) ) / t... |
public class DescribeFolderContentsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeFolderContentsRequest describeFolderContentsRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeFolderContentsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeFolderContentsRequest . getAuthenticationToken ( ) , AUTHENTICATIONTOKEN_BINDING ) ; protocolMarshaller . marshall ( describeFolderContentsRequest ... |
public class PropertyAdapter { /** * Retrieves the exclusiveMaximum value of a property
* @ return the exclusiveMaximum value of the property */
public boolean getExclusiveMax ( ) { } } | if ( property instanceof AbstractNumericProperty ) { AbstractNumericProperty numericProperty = ( AbstractNumericProperty ) property ; return BooleanUtils . isTrue ( ( numericProperty . getExclusiveMaximum ( ) ) ) ; } return false ; |
public class GinBridgeClassLoader { /** * @ inheritDoc
* Gin class loading implementation , making sure that classes are loaded consistently and can be
* GWT generated or super - source classes . See description { @ link GinBridgeClassLoader above } . */
@ Override protected Class < ? > loadClass ( String name , bo... | Class < ? > clazz = findLoadedClass ( name ) ; if ( clazz == null ) { if ( inExceptedPackage ( name ) ) { clazz = super . loadClass ( name , false ) ; } else { try { clazz = findClass ( name ) ; } catch ( ClassNotFoundException e ) { clazz = super . loadClass ( name , false ) ; if ( ! clazz . isAnnotation ( ) ) { // An... |
public class JobLauncherUtils { /** * Cleanup the staging data for a list of Gobblin tasks . This method calls the
* { @ link # cleanTaskStagingData ( State , Logger ) } method .
* @ param states a { @ link List } of { @ link State } s that need their staging data cleaned */
public static void cleanStagingData ( Li... | for ( State state : states ) { JobLauncherUtils . cleanTaskStagingData ( state , logger ) ; } |
public class MoreLikeThis { /** * Return a query that will return docs like the passed lucene document ID .
* @ param docNum the documentID of the lucene doc to generate the ' More Like This " query for .
* @ return a query that will return docs like the passed lucene document ID . */
public Query like ( int docNum... | if ( fieldNames == null ) { setFieldNames ( ) ; } return createQuery ( retrieveTerms ( docNum ) ) ; |
public class Rasterlite2Coverage { /** * Extract an image from the database .
* @ param geom the image bounding box geometry .
* @ param width the pixel width of the expected image .
* @ param height the pixel height of the expected image .
* @ return the image bytes .
* @ throws Exception */
public byte [ ] ... | String sql ; String rasterName = getName ( ) ; if ( geomEpsg != null ) { sql = "select GetMapImageFromRaster('" + rasterName + "', ST_Transform(ST_GeomFromText('" + geom . toText ( ) + "', " + geomEpsg + "), " + srid + ") , " + width + " , " + height + ", 'default', 'image/png', '#ffffff', 0, 80, 1 )" ; } else { sql = ... |
public class MutableArray { /** * Inserts a Number object at the given index .
* @ param index the index . This value must not exceed the bounds of the array .
* @ param value the Number object
* @ return The self object */
@ NonNull @ Override public MutableArray insertNumber ( int index , Number value ) { } } | return insertValue ( index , value ) ; |
public class Gradient { /** * Set the values of all the knots .
* This version does not require the " extra " knots at - 1 and 256
* @ param x the knot positions
* @ param rgb the knot colors
* @ param types the knot types */
public void setKnots ( int [ ] x , int [ ] rgb , byte [ ] types ) { } } | numKnots = rgb . length + 2 ; xKnots = new int [ numKnots ] ; yKnots = new int [ numKnots ] ; knotTypes = new byte [ numKnots ] ; if ( x != null ) System . arraycopy ( x , 0 , xKnots , 1 , numKnots - 2 ) ; else for ( int i = 1 ; i > numKnots - 1 ; i ++ ) xKnots [ i ] = 255 * i / ( numKnots - 2 ) ; System . arraycopy ( ... |
public class Block { /** * Checks the block contents
* @ param height block height , if known , or - 1 otherwise . If valid , used
* to validate the coinbase input script of v2 and above blocks .
* @ param flags flags to indicate which tests should be applied ( i . e .
* whether to test for height in the coinba... | // Now we need to check that the body of the block actually matches the headers . The network won ' t generate
// an invalid block , but if we didn ' t validate this then an untrusted man - in - the - middle could obtain the next
// valid block from the network and simply replace the transactions in it with their own f... |
public class AbstractStreamExporterImpl { /** * Obtains an { @ link OutputStream } to the provided { @ link File } .
* @ param target
* @ param overwrite
* Whether we may overwrite an existing file
* @ return
* @ throws FileExistsException
* If the specified file exists and the overwrite flag is false
* @... | // Precondition checks
if ( target == null ) { throw new IllegalArgumentException ( "Target file must be specified" ) ; } if ( target . isDirectory ( ) ) { throw new IllegalArgumentException ( "Cannot export a stream file to existing directory: " + target . getAbsolutePath ( ) ) ; } // If target exists and we ' re not ... |
public class AbstractSecretColumnSqlFilter { /** * { @ inheritDoc }
* パラメータが暗号化対象のパラメータ名と一致する場合 、 パラメータの値を暗号化する
* @ see jp . co . future . uroborosql . filter . AbstractSqlFilter # doParameter ( jp . co . future . uroborosql . parameter . Parameter ) */
@ Override public Parameter doParameter ( final Parameter ... | if ( skipFilter || parameter == null ) { return parameter ; } if ( Parameter . class . equals ( parameter . getClass ( ) ) ) { // 通常のパラメータの場合
String key = parameter . getParameterName ( ) ; if ( getCryptParamKeys ( ) . contains ( CaseFormat . CAMEL_CASE . convert ( key ) ) ) { Object obj = parameter . getValue ( ) ; i... |
public class ReactiveMongoOperationsSessionRepository { /** * Deletes the { @ link MongoSession } with the given { @ link MongoSession # getId ( ) } or does nothing if the
* { @ link MongoSession } is not found .
* @ param id the { @ link MongoSession # getId ( ) } to delete */
@ Override public Mono < Void > delet... | return findSession ( id ) . flatMap ( document -> this . mongoOperations . remove ( document , this . collectionName ) . then ( Mono . just ( document ) ) ) . map ( document -> convertToSession ( this . mongoSessionConverter , document ) ) . doOnSuccess ( mongoSession -> publishEvent ( new SessionDeletedEvent ( this , ... |
public class MainActivity { /** * Request to read and write external storage permissions . */
private void requestPermissionForInstallPackage ( ) { } } | AndPermission . with ( this ) . runtime ( ) . permission ( Permission . Group . STORAGE ) . rationale ( new RuntimeRationale ( ) ) . onGranted ( new Action < List < String > > ( ) { @ Override public void onAction ( List < String > data ) { new WriteApkTask ( MainActivity . this , new Runnable ( ) { @ Override public v... |
public class UcsApi { /** * Delete an existing contact
* @ param id id of the Contact ( required )
* @ param deletelData Request parameters . ( optional )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the resp... | com . squareup . okhttp . Call call = deleteContactValidateBeforeCall ( id , deletelData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class SquareCrossClustersIntoGrids { /** * Finds a seed with 1 or 2 edges . */
static SquareNode findSeedNode ( List < SquareNode > cluster ) { } } | SquareNode seed = null ; for ( int i = 0 ; i < cluster . size ( ) ; i ++ ) { SquareNode n = cluster . get ( i ) ; int numConnections = n . getNumberOfConnections ( ) ; if ( numConnections == 0 || numConnections > 2 ) continue ; seed = n ; break ; } return seed ; |
public class AbstractRefreshableDataStore { /** * Triggers the update of the < code > DataStore < / code > . When this action is executed , the current data URL will be
* read in and the < code > DataReader < / code > parses and builds a new Data instance . Finally , the currently set
* < code > Data < / code > ref... | try { updateOperation . run ( ) ; } catch ( final CanNotOpenStreamException e ) { LOG . warn ( String . format ( MSG_URL_NOT_READABLE , e . getLocalizedMessage ( ) ) ) ; } catch ( final IllegalArgumentException e ) { LOG . warn ( MSG_FAULTY_CONTENT + " " + e . getLocalizedMessage ( ) ) ; } catch ( final RuntimeExceptio... |
public class TelegramBot { /** * Use this method to start the update thread which will begin retrieving messages from the API and firing the
* relevant events for you to process the data
* @ param getPreviousUpdates Whether you want to retrieve any updates that haven ' t been processed before , but were
* created... | if ( updateManager == null ) updateManager = new RequestUpdatesManager ( this , getPreviousUpdates ) ; if ( ! updateManager . isRunning ( ) ) { updateManager . startUpdates ( ) ; return true ; } return false ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcIndexedTriangleTextureMap ( ) { } } | if ( ifcIndexedTriangleTextureMapEClass == null ) { ifcIndexedTriangleTextureMapEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 323 ) ; } return ifcIndexedTriangleTextureMapEClass ; |
public class DiskCacheSizeInfo { /** * Call this method to check and add volume . If current disk cache size in GB plus request of new volume is over limit ,
* it will return false .
* @ param type - type of volume ( TYPE _ CACHE _ DATA , TYPE _ DEPENDENCY _ ID _ DATA , TYPE _ TEMPLATE _ DATA )
* @ param vol - vo... | final String methodName = "checkAddVolume()" ; if ( this . diskCacheSizeInGBLimit > 0 ) { boolean bCalculateHighAndLow = false ; int minGB = 0 ; switch ( type ) { case TYPE_CACHE_DATA : if ( this . currentDataGB >= ( vol + 1 ) ) { return true ; } if ( this . allowOverflow ) { traceDebug ( methodName , "cacheName=" + th... |
public class DataTableInterceptor { /** * 获取 dao 返回类型是否是DataTable
* @ param resultSetHandler
* @ return */
protected boolean isDataTableResultType ( DefaultResultSetHandler resultSetHandler ) { } } | MappedStatement mappedStatement = reflect ( resultSetHandler ) ; List < ResultMap > res = mappedStatement . getResultMaps ( ) ; if ( res . size ( ) == 1 && res . get ( 0 ) . getType ( ) . equals ( DataTable . class ) ) { return true ; } return false ; |
public class GraphHopperGeocoding { /** * Perform a geocoding request . Both forward and revers are possible , just configure the < code > request < / code >
* accordingly .
* @ param request the request to send to the API
* @ return found results for your request */
public GHGeocodingResponse geocode ( GHGeocodi... | String url = buildUrl ( request ) ; try { Request okRequest = new Request . Builder ( ) . url ( url ) . build ( ) ; ResponseBody rspBody = getClientForRequest ( request ) . newCall ( okRequest ) . execute ( ) . body ( ) ; return objectMapper . readValue ( rspBody . bytes ( ) , GHGeocodingResponse . class ) ; } catch ( ... |
public class AmazonSimpleEmailServiceClient { /** * Enables or disables email sending for messages sent using a specific configuration set in a given AWS Region . You
* can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending for a
* configuration set when the reputatio... | request = beforeClientExecution ( request ) ; return executeUpdateConfigurationSetSendingEnabled ( request ) ; |
public class CmsADEManager { /** * Gets the detail page for a content element . < p >
* @ param cms the CMS context
* @ param pageRootPath the element ' s root path
* @ param originPath the path in which the the detail page is being requested
* @ param targetDetailPage the target detail page to use
* @ return... | boolean online = isOnline ( cms ) ; String resType = getCacheState ( online ) . getParentFolderType ( pageRootPath ) ; if ( resType == null ) { return null ; } if ( ( targetDetailPage != null ) && getDetailPages ( cms , resType ) . contains ( targetDetailPage ) ) { return targetDetailPage ; } String originRootPath = cm... |
public class SVGHyperCube { /** * Recursive helper for hypercube drawing .
* @ param path path
* @ param minx starting corner
* @ param miny starting corner
* @ param r _ edges edge vectors
* @ param b bit set of drawn edges */
private static void recDrawEdges ( SVGPath path , double minx , double miny , List... | // Draw all " missing " edges
for ( int i = 0 ; i < r_edges . size ( ) ; i ++ ) { if ( BitsUtil . get ( b , i ) ) { continue ; } final double [ ] edge = r_edges . get ( i ) ; final double x_i = minx + edge [ 0 ] , y_i = miny + edge [ 1 ] ; if ( ! isFinite ( x_i ) || ! isFinite ( y_i ) ) { continue ; } path . moveTo ( m... |
public class CmsEditUserAddInfoDialog { /** * Initializes the additional info bean to work with , depending on the dialog state and request parameters . < p > */
@ SuppressWarnings ( "unchecked" ) protected void initUserObject ( ) { } } | try { if ( CmsStringUtil . isEmpty ( getParamAction ( ) ) || CmsDialog . DIALOG_INITIAL . equals ( getParamAction ( ) ) ) { // edit an existing user , get the user object from db
m_user = getCms ( ) . readUser ( new CmsUUID ( getParamUserid ( ) ) ) ; if ( ! Boolean . valueOf ( getParamEditall ( ) ) . booleanValue ( ) )... |
public class Table { /** * Moves the contents of matrix down by the number of purged rows and resizes the matrix accordingly . The
* capacity of the matrix should be size * resize _ factor . Caller must hold the lock . */
@ GuardedBy ( "lock" ) protected void _compact ( ) { } } | // This is the range we need to copy into the new matrix ( including from and to )
int from = computeRow ( low ) , to = computeRow ( hr ) ; int range = to - from + 1 ; // e . g . from = 3 , to = 5 , new _ size has to be [ 3 . . 5 ] ( = 3)
int new_size = ( int ) Math . max ( ( double ) range * resize_factor , ( double )... |
public class DiscoverItems { /** * Adds a collection of items to the discovered information . Does nothing if itemsToAdd is null
* @ param itemsToAdd */
public void addItems ( Collection < Item > itemsToAdd ) { } } | if ( itemsToAdd == null ) return ; for ( Item i : itemsToAdd ) { addItem ( i ) ; } |
public class Parameters { /** * Gets a directory which already exists . */
public File getExistingDirectory ( final String param ) { } } | return get ( param , new StringToFile ( ) , new And < > ( new FileExists ( ) , new IsDirectory ( ) ) , "existing directory" ) ; |
public class FieldConstraintsBuilder { /** * Creates range constraints according to CronFieldName parameter .
* @ param field - CronFieldName
* @ return FieldConstraintsBuilder instance */
public FieldConstraintsBuilder forField ( final CronFieldName field ) { } } | switch ( field ) { case SECOND : case MINUTE : endRange = 59 ; return this ; case HOUR : endRange = 23 ; return this ; case DAY_OF_WEEK : stringMapping = daysOfWeekMapping ( ) ; endRange = 6 ; return this ; case DAY_OF_MONTH : startRange = 1 ; endRange = 31 ; return this ; case MONTH : stringMapping = monthsMapping ( )... |
public class CassandraClientBase { /** * Compute entity via super columns .
* @ param m
* the m
* @ param isRelation
* the is relation
* @ param relations
* the relations
* @ param entities
* the entities
* @ param qResults
* the q results */
protected void computeEntityViaSuperColumns ( EntityMetad... | for ( ByteBuffer key : qResults . keySet ( ) ) { onSuperColumn ( m , isRelation , relations , entities , qResults . get ( key ) , key ) ; } |
public class JGTProcessingRegion { /** * Transforms a GRASS resolution string in metric or degree to decimal .
* @ param ewres the x resolution string .
* @ param nsres the y resolution string .
* @ return the array of x and y resolution doubles . */
private double [ ] xyResStringToNumbers ( String ewres , String... | double xres = - 1.0 ; double yres = - 1.0 ; if ( ewres . indexOf ( ':' ) != - 1 ) { xres = degreeToNumber ( ewres ) ; } else { xres = Double . parseDouble ( ewres ) ; } if ( nsres . indexOf ( ':' ) != - 1 ) { yres = degreeToNumber ( nsres ) ; } else { yres = Double . parseDouble ( nsres ) ; } return new double [ ] { xr... |
public class TypeDescriptor { /** * The column size for this type .
* For numeric data this is the maximum precision .
* For character data this is the length in characters .
* For datetime types this is the length in characters of the String representation
* ( assuming the maximum allowed precision of the frac... | if ( type . isNumericType ( ) ) { return getPrecision ( ) ; } switch ( type ) { case STRING_TYPE : case BINARY_TYPE : return Integer . MAX_VALUE ; case CHAR_TYPE : case VARCHAR_TYPE : return typeQualifiers . getCharacterMaximumLength ( ) ; case DATE_TYPE : return 10 ; case TIMESTAMP_TYPE : return 29 ; default : return ... |
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public IfcSpatialZoneTypeEnum createIfcSpatialZoneTypeEnumFromString ( EDataType eDataType , String initialValue ) { } } | IfcSpatialZoneTypeEnum result = IfcSpatialZoneTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class AbstractItemLink { /** * Use this to lock persistently . Invoke indirectly by the API .
* @ param transaction */
final void cmdPersistLock ( final PersistentTransaction transaction ) throws SevereMessageStoreException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "cmdPersistLock" , new Object [ ] { "Item Link: " + this , "Stream Link: " + _owningStreamLink , "Transaction: " + transaction } ) ; if ( null != transaction ) { boolean hasBecomeNonReleasable = false ; synchronized... |
public class GyroscopeRenderer { /** * This methods generates the HTML code of the current b : gyroscope .
* @ param context the FacesContext .
* @ param component the current b : gyroscope .
* @ throws IOException thrown if something goes wrong when writing the HTML code . */
@ Override public void encodeBegin (... | if ( ! component . isRendered ( ) ) { return ; } Gyroscope gyroscope = ( Gyroscope ) component ; ResponseWriter rw = context . getResponseWriter ( ) ; String clientId = gyroscope . getClientId ( ) ; rw . startElement ( "input" , component ) ; rw . writeAttribute ( "id" , clientId + ".alpha" , null ) ; rw . writeAttribu... |
public class BinarySparseDataset { /** * Returns the value at entry ( i , j ) by binary search .
* @ param i the row index .
* @ param j the column index . */
public int get ( int i , int j ) { } } | if ( i < 0 || i >= size ( ) ) { throw new IllegalArgumentException ( "Invalid index: i = " + i ) ; } int [ ] x = get ( i ) . x ; if ( x . length == 0 ) { return 0 ; } int low = 0 ; int high = x . length - 1 ; int mid = ( low + high ) / 2 ; while ( j != x [ mid ] && low <= high ) { mid = ( low + high ) / 2 ; if ( j < x ... |
public class Layout { /** * Invalidate the item in layout
* @ param dataIndex data index */
public void invalidate ( final int dataIndex ) { } } | synchronized ( mMeasuredChildren ) { Log . d ( Log . SUBSYSTEM . LAYOUT , TAG , "invalidate [%d]" , dataIndex ) ; mMeasuredChildren . remove ( dataIndex ) ; } |
public class SimpleSynchronousNotificationExecutor { /** * Fire notification of an entry that was just removed from the registry .
* @ param removeKey key identifying the entry removed from the registry .
* @ param removeValue value of the entry in the registry . */
public void fireRemoveNotification ( Iterator < R... | while ( listeners . hasNext ( ) ) { listeners . next ( ) . onRemoveEntry ( removeKey , removeValue ) ; } |
public class GrammaticalRelation { /** * Returns a < code > String < / code > representation of this
* < code > GrammaticalRelation < / code > and the hierarchy below
* it , with one node per line , indented according to
* < code > indentLevel < / code > .
* @ param indentLevel how many levels to indent ( 0 for... | for ( int i = 0 ; i < indentLevel ; i ++ ) { buf . append ( " " ) ; } buf . append ( shortName ) . append ( ": " ) . append ( targetPatterns ) ; for ( GrammaticalRelation child : children ) { buf . append ( '\n' ) ; child . toPrettyString ( indentLevel + 1 , buf ) ; } |
public class PrcBankStatementSave { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param , e . g . return this line ' s
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for farther ... | // if exist file name :
String fileToUploadName = ( String ) pRequestData . getAttribute ( "fileToUploadName" ) ; if ( fileToUploadName != null ) { String bankCsvMethodId = pRequestData . getParameter ( "bankCsvMethod" ) ; BankCsvMethod bankCsvMethod = getSrvOrm ( ) . retrieveEntityById ( pAddParam , BankCsvMethod . cl... |
public class EncryptKit { /** * HmacSHA256加密
* @ param data 明文字符串
* @ param key 秘钥
* @ return 16进制密文 */
public static String hmacSHA256 ( String data , String key ) { } } | return hmacSHA256 ( data . getBytes ( ) , key . getBytes ( ) ) ; |
public class InstallerModule { /** * Bind extension to guice context .
* @ param item extension item descriptor
* @ param installer detected extension installer
* @ param holder extensions holder bean */
@ SuppressWarnings ( "unchecked" ) private void bindExtension ( final ExtensionItemInfo item , final FeatureIn... | final Class < ? extends FeatureInstaller > installerClass = installer . getClass ( ) ; final Class < ? > type = item . getType ( ) ; holder . register ( installerClass , type ) ; if ( installer instanceof BindingInstaller ) { ( ( BindingInstaller ) installer ) . install ( binder ( ) , type , item . isLazy ( ) ) ; } els... |
public class HighlightGenerator { /** * Create the shape which will highlight the provided atom .
* @ param atom the atom to highlight
* @ param radius the specified radius
* @ return the shape which will highlight the atom */
private static Shape createAtomHighlight ( IAtom atom , double radius ) { } } | double x = atom . getPoint2d ( ) . x ; double y = atom . getPoint2d ( ) . y ; return new RoundRectangle2D . Double ( x - radius , y - radius , 2 * radius , 2 * radius , 2 * radius , 2 * radius ) ; |
public class IdentityHashSet { /** * Serialize this Object in a manner which is binary - compatible with the
* JDK . */
private void writeObject ( ObjectOutputStream s ) throws IOException { } } | Iterator < E > it = iterator ( ) ; s . writeInt ( size ( ) * 2 ) ; // expectedMaxSize
s . writeInt ( size ( ) ) ; while ( it . hasNext ( ) ) s . writeObject ( it . next ( ) ) ; |
public class SparkDl4jMultiLayer { /** * Score the examples individually , using a specified batch size . Unlike { @ link # calculateScore ( JavaRDD , boolean ) } ,
* this method returns a score for each example separately . If scoring is needed for specific examples use either
* { @ link # scoreExamples ( JavaPair... | return data . mapPartitionsToDouble ( new ScoreExamplesFunction ( sc . broadcast ( network . params ( ) ) , sc . broadcast ( conf . toJson ( ) ) , includeRegularizationTerms , batchSize ) ) ; |
public class HistoricExternalTaskLogQueryImpl { /** * query parameter / / / / / */
@ Override public HistoricExternalTaskLogQuery logId ( String historicExternalTaskLogId ) { } } | ensureNotNull ( NotValidException . class , "historicExternalTaskLogId" , historicExternalTaskLogId ) ; this . id = historicExternalTaskLogId ; return this ; |
public class BlobStoreUtils { /** * no need to synchronize , since EventManager will execute sequentially */
public static void downloadDistributeStormCode ( Map conf , String topologyId , String masterCodeDir ) throws IOException , TException { } } | String tmpToot = null ; try { // STORM _ LOCAL _ DIR / supervisor / tmp / ( UUID )
tmpToot = StormConfig . supervisorTmpDir ( conf ) + File . separator + UUID . randomUUID ( ) . toString ( ) ; // STORM _ LOCAL _ DIR / supervisor / stormdist / topologyId
String stormRoot = StormConfig . supervisor_stormdist_root ( conf ... |
public class Assert { /** * Formats the specified { @ link String message } with the given { @ link Object arguments } .
* @ param message { @ link String } containing the message to format .
* @ param arguments array of { @ link Object arguments } used when formatting the { @ link String message } .
* @ return t... | return stringFormat ( messageFormat ( message , arguments ) , arguments ) ; |
public class ChromeCast { /** * < p > Loads and starts playing media in specified URL < / p >
* < p > If no application is running at the moment then exception is thrown . < / p >
* @ param url media url
* @ return The new media status that resulted from loading the media .
* @ throws IOException */
public fina... | return load ( url . substring ( url . lastIndexOf ( '/' ) + 1 , url . lastIndexOf ( '.' ) ) , null , url , null ) ; |
public class ClassUtil { /** * loads a class from a String classname
* @ param className
* @ param defaultValue
* @ return matching Class */
public static Class loadClass ( String className , Class defaultValue ) { } } | // OSGI env
Class clazz = _loadClass ( new OSGiBasedClassLoading ( ) , className , null , null ) ; if ( clazz != null ) return clazz ; // core classloader
clazz = _loadClass ( new ClassLoaderBasedClassLoading ( SystemUtil . getCoreClassLoader ( ) ) , className , null , null ) ; if ( clazz != null ) return clazz ; // lo... |
public class LocalPDBDirectory { /** * Download a structure , but don ' t parse it yet or store it in memory .
* Used to pre - fetch large numbers of structures .
* @ param pdbId
* @ throws IOException */
public void prefetchStructure ( String pdbId ) throws IOException { } } | if ( pdbId . length ( ) != 4 ) throw new IOException ( "The provided ID does not look like a PDB ID : " + pdbId ) ; // Check existing
File file = downloadStructure ( pdbId ) ; if ( ! file . exists ( ) ) { throw new IOException ( "Structure " + pdbId + " not found and unable to download." ) ; } |
public class XSLMessages { /** * Creates a message from the specified key and replacement
* arguments , localized to the given locale .
* @ param msgKey The key for the message text .
* @ param args The arguments to be used as replacement text
* in the message created .
* @ return The formatted message string... | // BEGIN android - changed
// don ' t localize resources
return createMsg ( XSLTBundle , msgKey , args ) ; // END android - changed |
public class LauncherDelegateImpl { /** * { @ inheritDoc } */
@ Override public void launchFramework ( ) { } } | ClassLoader loader = config . getFrameworkClassloader ( ) ; if ( loader == null ) loader = this . getClass ( ) . getClassLoader ( ) ; try { // initialize RAS
LogProvider provider = getLogProviderImpl ( loader , config ) ; // get framework / platform manager
manager = new FrameworkManager ( ) ; managerLatch . countDown ... |
public class DistCacheWriterInterceptor { /** * - - - - WRITE commands */
@ Override public Object visitPutKeyValueCommand ( InvocationContext ctx , PutKeyValueCommand command ) throws Throwable { } } | return invokeNextThenApply ( ctx , command , ( rCtx , rCommand , rv ) -> { PutKeyValueCommand putKeyValueCommand = ( PutKeyValueCommand ) rCommand ; Object key = putKeyValueCommand . getKey ( ) ; if ( ! putKeyValueCommand . hasAnyFlag ( FlagBitSets . ROLLING_UPGRADE ) && ( ! isStoreEnabled ( putKeyValueCommand ) || rCt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.