signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ValidateInterpretation { /** * Main . * @ param args command line args */ public static void main ( final String [ ] args ) { } }
Switch about = new Switch ( "a" , "about" , "display about message" ) ; Switch help = new Switch ( "h" , "help" , "display help message" ) ; FileArgument expectedFile = new FileArgument ( "e" , "expected-file" , "expected interpretation file, default stdin; at least one of expected or observed file must be provided" , ...
public class EmptiesCheckPanel { /** * desc = " Generated Code " > / / GEN - BEGIN : initComponents */ private void initComponents ( ) { } }
pnlSummary = new javax . swing . JPanel ( ) ; lblSummary = new javax . swing . JLabel ( ) ; lblSummaryValue = new javax . swing . JLabel ( ) ; pnlEmptiesSummary = new javax . swing . JPanel ( ) ; jScrollConcepts = new javax . swing . JScrollPane ( ) ; jScrollRoles = new javax . swing . JScrollPane ( ) ; setFont ( new j...
public class ReactionEngine { /** * Return the IParameterReact if it exists given the class . * @ param paramClass The class * @ return The IParameterReact */ public IParameterReact getParameterClass ( Class < ? > paramClass ) { } }
for ( Iterator < IParameterReact > it = paramsMap2 . iterator ( ) ; it . hasNext ( ) ; ) { IParameterReact ipr = it . next ( ) ; if ( ipr . getClass ( ) . equals ( paramClass ) ) return ipr ; } return null ;
public class DefaultQueryBuilder { /** * Sets the proposition ids to be queried . An array of length 0 or * < code > null < / code > means that all proposition ids will be queried . * @ param propIds a { @ link String [ ] } of proposition ids . If * < code > null < / code > , an empty { @ link String [ ] } will b...
if ( propIds == null ) { this . propIds = ArrayUtils . EMPTY_STRING_ARRAY ; } else { this . propIds = propIds . clone ( ) ; ProtempaUtil . internAll ( this . propIds ) ; }
public class SymbolTable { /** * Index JSDocInfo . */ void fillJSDocInfo ( Node externs , Node root ) { } }
NodeTraversal . traverseRoots ( compiler , new JSDocInfoCollector ( compiler . getTypeRegistry ( ) ) , externs , root ) ; // Create references to parameters in the JSDoc . for ( Symbol sym : getAllSymbols ( ) ) { JSDocInfo info = sym . getJSDocInfo ( ) ; if ( info == null ) { continue ; } for ( Marker marker : info . g...
public class CollectionExecutor { private < IN > void executeDataSink ( GenericDataSinkBase < ? > sink , int superStep ) throws Exception { } }
Operator < ? > inputOp = sink . getInput ( ) ; if ( inputOp == null ) { throw new InvalidProgramException ( "The data sink " + sink . getName ( ) + " has no input." ) ; } @ SuppressWarnings ( "unchecked" ) List < IN > input = ( List < IN > ) execute ( inputOp ) ; @ SuppressWarnings ( "unchecked" ) GenericDataSinkBase <...
public class WTableColumn { /** * Sets the column width . * @ param width the column width as a percentage , or & lt ; = 0 for default width . */ public void setWidth ( final int width ) { } }
if ( width > 100 ) { throw new IllegalArgumentException ( "Width (" + width + ") cannot be greater than 100 percent" ) ; } getOrCreateComponentModel ( ) . width = Math . max ( 0 , width ) ;
public class IpPermission { /** * The IPv4 ranges . * @ param ipv4Ranges * The IPv4 ranges . */ public void setIpv4Ranges ( java . util . Collection < IpRange > ipv4Ranges ) { } }
if ( ipv4Ranges == null ) { this . ipv4Ranges = null ; return ; } this . ipv4Ranges = new com . amazonaws . internal . SdkInternalList < IpRange > ( ipv4Ranges ) ;
public class RegistriesInner { /** * Regenerates the administrator login credentials for the specified container registry . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param serviceCallback the...
return ServiceFuture . fromResponse ( regenerateCredentialsWithServiceResponseAsync ( resourceGroupName , registryName ) , serviceCallback ) ;
public class ServerRequestQueue { /** * < p > Gets the queued { @ link ServerRequest } object at position with index 0 within the queue , but * unlike { @ link # dequeue ( ) } , does not remove it from the queue . < / p > * @ return The { @ link ServerRequest } object at position with index 0 within the queue . */ ...
ServerRequest req = null ; synchronized ( reqQueueLockObject ) { try { req = queue . get ( 0 ) ; } catch ( IndexOutOfBoundsException | NoSuchElementException ignored ) { } } return req ;
public class SqsParametersMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SqsParameters sqsParameters , ProtocolMarshaller protocolMarshaller ) { } }
if ( sqsParameters == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( sqsParameters . getMessageGroupId ( ) , MESSAGEGROUPID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . ge...
public class ContentMatcher { /** * Load a pattern list from an XML formatted file . * Pattern should be enclosed around a { @ code < Patterns > } tag and should be * defined as { @ code < Pattern type = " xxx " > < / Pattern > } . Use " regex " to define * a Regex formatted pattern or " string " for an exact mat...
strings = new ArrayList < BoyerMooreMatcher > ( ) ; patterns = new ArrayList < Pattern > ( ) ; SAXBuilder builder = new SAXBuilder ( ) ; Document doc = builder . build ( xmlInputStream ) ; Element el = doc . getRootElement ( ) ; String value ; // now we have the < root > tag indexed so we can // go ahead for boundaries...
public class ZealotConfigManager { /** * 扫描 xml文件所在的文件位置 并识别配置加载到内存缓存中 . * @ param xmlLocations zealot的XML文件所在的位置 * @ return ZealotConfigManager的全局唯一实例 */ public ZealotConfigManager initLoadXmlLocations ( String xmlLocations ) { } }
this . xmlLocations = StringHelper . isBlank ( xmlLocations ) ? "zealot" : xmlLocations ; XmlScanner . newInstance ( ) . scan ( this . xmlLocations ) ; this . cachingXmlAndEval ( ) ; return this ;
public class StreamingJsonBuilder { /** * A closure passed to a JSON builder will create a root JSON object * Example : * < pre class = " groovyTestCase " > * new StringWriter ( ) . with { w - > * def json = new groovy . json . StreamingJsonBuilder ( w ) * json { * name " Tim " * age 39 * assert w . toS...
writer . write ( "{" ) ; StreamingJsonDelegate . cloneDelegateAndGetContent ( writer , c ) ; writer . write ( "}" ) ; return null ;
public class XcapClientImpl { /** * ( non - Javadoc ) * @ see XcapClient # get ( java . net . URI , * Header [ ] , * Credentials ) */ public XcapResponse get ( URI uri , Header [ ] additionalRequestHeaders , Credentials credentials ) throws IOException { } }
if ( log . isDebugEnabled ( ) ) { log . debug ( "get(uri=" + uri + " , additionalRequestHeaders = ( " + Arrays . toString ( additionalRequestHeaders ) + " ) )" ) ; } return execute ( new HttpGet ( uri ) , additionalRequestHeaders , credentials ) ;
public class EventFragment { /** * < p > Performs < b > event listener linking < / b > by invoking { @ link EventUtils # link ( ) } . < / p > */ @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } }
super . onViewCreated ( view , savedInstanceState ) ; EventUtils . link ( EVENT_CONFIGURATION ) ;
public class GenbankReaderHelper { /** * Selecting lazySequenceLoad = true will parse the Genbank file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk . This allows the loading of large Genbank files where you are only interested * in o...
if ( ! lazySequenceLoad ) { return readGenbankRNASequence ( file ) ; } GenbankReader < RNASequence , NucleotideCompound > GenbankProxyReader = new GenbankReader < RNASequence , NucleotideCompound > ( file , new GenericGenbankHeaderParser < RNASequence , NucleotideCompound > ( ) , new FileProxyRNASequenceCreator ( file ...
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Returns the first cp definition specification option value in the ordered set where CPSpecificationOptionId = & # 63 ; . * @ param CPSpecificationOptionId the cp specification option ID * @ param orderByComparator the comparator to order the s...
CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue = fetchByCPSpecificationOptionId_First ( CPSpecificationOptionId , orderByComparator ) ; if ( cpDefinitionSpecificationOptionValue != null ) { return cpDefinitionSpecificationOptionValue ; } StringBundler msg = new StringBundler ( 4 ) ; msg . app...
public class ListOfferingPromotionsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListOfferingPromotionsRequest listOfferingPromotionsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listOfferingPromotionsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listOfferingPromotionsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall reque...
public class DrawableContainer { /** * TODO * @ Override public Insets getLayoutInsets ( ) { return ( mCurrDrawable = = * null ) ? Insets . NONE : mCurrDrawable . getLayoutInsets ( ) ; } */ @ Override public void setAlpha ( int alpha ) { } }
if ( mAlpha != alpha ) { mAlpha = alpha ; if ( mCurrDrawable != null ) { if ( mEnterAnimationEnd == 0 ) { mCurrDrawable . setAlpha ( alpha ) ; } else { animate ( false ) ; } } }
public class TrConfigurator { /** * Set the trace specification of the service to the input value . * @ param spec New string trace specification * @ return new TraceSpecification , or null if unchanged */ synchronized static TraceSpecification setTraceSpec ( String spec ) { } }
// If logger is used & configured by logger properties , // we ' re done as far as trace string processing is concerned if ( WsLogManager . isConfiguredByLoggingProperties ( ) ) { return null ; } // If the specified string is null , or it is equal to a string , // or the sensitive flag has not been toggled , // we ' ve...
public class ComplexImg { /** * Shifts this image by the specified translation . * The shift is torus like , so when shifting pixels to the right over the image border , * they will reappear on the left side of the image . * This is useful when the DC value should be centered instead of in the top left corner *...
while ( x < 0 ) x += getWidth ( ) ; while ( y < 0 ) y += getHeight ( ) ; x %= getWidth ( ) ; y %= getHeight ( ) ; ArrayUtils . shift2D ( real , width , height , x , y ) ; ArrayUtils . shift2D ( imag , width , height , x , y ) ; if ( synchronizePowerSpectrum ) ArrayUtils . shift2D ( power , width , height , x , y ) ; se...
public class GlobalUsersInner { /** * Stops an environment by stopping all resources inside the environment This operation can take a while to complete . * @ param userName The name of the user . * @ param environmentId The resourceId of the environment * @ param serviceCallback the async ServiceCallback to handl...
return ServiceFuture . fromResponse ( stopEnvironmentWithServiceResponseAsync ( userName , environmentId ) , serviceCallback ) ;
public class Form { /** * Release any acquired resources . */ protected void localRelease ( ) { } }
super . localRelease ( ) ; _state . clear ( ) ; _hiddenState . clear ( ) ; _focus = null ; _location = null ; _text = null ; _beanName = null ; _explicitBeanType = false ; _beanType = null ; _beanScope = null ; _realName = null ; _setRealName = false ; _targetScope = null ; _mapping = null ; _servlet = null ; _focusMap...
public class PDTXMLConverter { /** * Get the passed { @ link Date } as { @ link XMLGregorianCalendar } . * @ param aDate * Source date . May be < code > null < / code > . * @ return < code > null < / code > if the passed date is < code > null < / code > . */ @ Nullable public static XMLGregorianCalendar getXMLCal...
if ( aDate == null ) return null ; return s_aDTFactory . newXMLGregorianCalendar ( getCalendar ( aDate ) ) ;
public class HiveSessionImpl { /** * 1 . We ' ll remove the ThreadLocal SessionState as this thread might now serve * other requests . * 2 . We ' ll cache the ThreadLocal RawStore object for this background thread for an orderly cleanup * when this thread is garbage collected later . * @ see org . apache . hive...
SessionState . detachSession ( ) ; if ( ThreadWithGarbageCleanup . currentThread ( ) instanceof ThreadWithGarbageCleanup ) { ThreadWithGarbageCleanup currentThread = ( ThreadWithGarbageCleanup ) ThreadWithGarbageCleanup . currentThread ( ) ; currentThread . cacheThreadLocalRawStore ( ) ; } if ( userAccess ) { lastAcces...
public class ClosableByteArrayOutputStream { /** * Retrieves a copy of < tt > original < / tt > with the given * < tt > newLength < / tt > . < p > * @ param original the object to copy * @ param newLength the length of the copy * @ return copy of < tt > original < / tt > with the given < tt > newLength < / tt >...
byte [ ] copy = new byte [ newLength ] ; System . arraycopy ( original , 0 , copy , 0 , Math . min ( original . length , newLength ) ) ; return copy ;
public class Lexer { private Token blank ( ) { } }
Matcher matcher = scanner . getMatcherForPattern ( "^\\n *\\n" ) ; if ( matcher . find ( 0 ) ) { consume ( matcher . end ( ) - 1 ) ; ++ this . lineno ; if ( this . pipeless ) return new Text ( "" , lineno ) ; return this . next ( ) ; } return null ;
public class V1InstanceGetter { /** * Get themes filtered by the criteria specified in the passed in filter . * @ param filter Limit the items returned . If null , then all items returned . * @ return Collection of items as specified in the filter . */ public Collection < Theme > themes ( ThemeFilter filter ) { } }
return get ( Theme . class , ( filter != null ) ? filter : new ThemeFilter ( ) ) ;
public class Quaterniond { /** * / * ( non - Javadoc ) * @ see org . joml . Quaterniondc # rotateZYX ( double , double , double , org . joml . Quaterniond ) */ public Quaterniond rotateZYX ( double angleZ , double angleY , double angleX , Quaterniond dest ) { } }
double sx = Math . sin ( angleX * 0.5 ) ; double cx = Math . cosFromSin ( sx , angleX * 0.5 ) ; double sy = Math . sin ( angleY * 0.5 ) ; double cy = Math . cosFromSin ( sy , angleY * 0.5 ) ; double sz = Math . sin ( angleZ * 0.5 ) ; double cz = Math . cosFromSin ( sz , angleZ * 0.5 ) ; double cycz = cy * cz ; double s...
public class Orbitals { /** * Get the function value of a orbital */ public Vector getValues ( int index , Matrix m ) { } }
if ( m . rows != 3 ) return null ; Vector result = basis . getValues ( 0 , m ) . mul ( C . matrix [ 0 ] [ index ] ) ; for ( int i = 1 ; i < count_basis ; i ++ ) if ( C . matrix [ i ] [ index ] != 0d ) result . add ( basis . getValues ( i , m ) . mul ( C . matrix [ 0 ] [ index ] ) ) ; return result ;
public class LoggerWrapper { /** * Delegate to the appropriate method of the underlying logger . */ public void error ( Marker marker , String msg ) { } }
if ( ! logger . isErrorEnabled ( marker ) ) return ; if ( instanceofLAL ) { ( ( LocationAwareLogger ) logger ) . log ( marker , fqcn , LocationAwareLogger . ERROR_INT , msg , null , null ) ; } else { logger . error ( marker , msg ) ; }
public class NotifyApplicationStateRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( NotifyApplicationStateRequest notifyApplicationStateRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( notifyApplicationStateRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( notifyApplicationStateRequest . getApplicationId ( ) , APPLICATIONID_BINDING ) ; protocolMarshaller . marshall ( notifyApplicationStateRequest . getStatus ...
public class HttpsFileUploader { /** * Configures the HTTP / HTTPS connection . * @ param config * @ return * @ throws MalformedURLException * @ throws IOException */ private static HttpURLConnection setup ( HttpsFileUploaderConfig config ) throws MalformedURLException , IOException { } }
HttpURLConnection httpUrlConnection ; boolean isHttps = false ; URL url = config . getURL ( ) ; if ( url . getProtocol ( ) . equalsIgnoreCase ( "https" ) ) { isHttps = true ; } if ( config . usesProxy ( ) ) { Proxy proxy = new Proxy ( Proxy . Type . HTTP , new InetSocketAddress ( config . getProxyAddress ( ) , config ....
public class GccProcessor { /** * Returns the contents of the gcc specs file . * The implementation locates gcc . exe in the executable path and then * builds a relative path name from the results of - dumpmachine and * - dumpversion . Attempts to use gcc - dumpspecs to provide this information * resulted in st...
if ( specs == null ) { final File gccParent = CUtil . getExecutableLocation ( GccCCompiler . CMD_PREFIX + "gcc.exe" ) ; if ( gccParent != null ) { // build a relative path like // . . / lib / gcc - lib / i686 - pc - cygwin / 2.95.3-5 / specs // resolve it relative to the location of gcc . exe final String relativePath ...
public class FingerprintsRetinaApiImpl { /** * { @ inheritDoc } */ @ Override public Fingerprint getLogicalFingerprint ( String logicalName ) throws ApiException { } }
return api . getLogicalFingerprint ( retinaName , logicalName ) ;
public class GregorianCalendar { /** * Returns the maximum value for the given calendar field of this * < code > GregorianCalendar < / code > instance . The maximum value is * defined as the largest value returned by the { @ link * Calendar # get ( int ) get } method for any possible time value , * taking into ...
switch ( field ) { case MONTH : case DAY_OF_MONTH : case DAY_OF_YEAR : case WEEK_OF_YEAR : case WEEK_OF_MONTH : case DAY_OF_WEEK_IN_MONTH : case YEAR : { // On or after Gregorian 200-3-1 , Julian and Gregorian // calendar dates are the same or Gregorian dates are // larger ( i . e . , there is a " gap " ) after 300-3-1...
public class Element { /** * Find elements that have attributes that end with the value suffix . Case insensitive . * @ param key name of the attribute * @ param valueSuffix end of the attribute value * @ return elements that have attributes that end with the value suffix */ public Elements getElementsByAttribute...
return Collector . collect ( new Evaluator . AttributeWithValueEnding ( key , valueSuffix ) , this ) ;
public class RAExpressionAttributes { /** * CROSS JOIN ( also denoted by , in SQL ) * @ param re1 a { @ link RAExpressionAttributes } * @ param re2 a { @ link RAExpressionAttributes } * @ return a { @ link RAExpressionAttributes } * @ throws IllegalJoinException if the same alias occurs in both arguments */ pub...
checkRelationAliasesConsistency ( re1 , re2 ) ; ImmutableMap < QualifiedAttributeID , Term > attributes = merge ( re1 . selectAttributes ( id -> ( id . getRelation ( ) != null ) || re2 . isAbsent ( id . getAttribute ( ) ) ) , re2 . selectAttributes ( id -> ( id . getRelation ( ) != null ) || re1 . isAbsent ( id . getAt...
public class ListGatewaysResult { /** * An array of < a > GatewayInfo < / a > objects . * @ param gateways * An array of < a > GatewayInfo < / a > objects . */ public void setGateways ( java . util . Collection < GatewayInfo > gateways ) { } }
if ( gateways == null ) { this . gateways = null ; return ; } this . gateways = new com . amazonaws . internal . SdkInternalList < GatewayInfo > ( gateways ) ;
public class RemoteExclusionFilter { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . resourceindex . SearchResultFilter # filterSearchResult ( org . archive . wayback . core . SearchResult ) */ public int filterObject ( CaptureSearchResult r ) { } }
String captureDate = r . getCaptureTimestamp ( ) ; String url = r . getOriginalUrl ( ) ; return isBlocked ( url , captureDate ) ? FILTER_EXCLUDE : FILTER_INCLUDE ;
public class CheckSkuAvailabilitysInner { /** * Check available SKUs . * @ param location Resource location . * @ param skus The SKU of the resource . * @ param kind The Kind of the resource . Possible values include : ' Bing . Autosuggest . v7 ' , ' Bing . CustomSearch ' , ' Bing . Search . v7 ' , ' Bing . Speec...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( location == null ) { throw new IllegalArgumentException ( "Parameter location is required and cannot be null." ) ; } if ( this . client . apiVersio...
public class OptimizerPlanEnvironment { private void setAsContext ( ) { } }
ExecutionEnvironmentFactory factory = new ExecutionEnvironmentFactory ( ) { @ Override public ExecutionEnvironment createExecutionEnvironment ( ) { return OptimizerPlanEnvironment . this ; } } ; initializeContextEnvironment ( factory ) ;
public class JicUnitServletClient { /** * Execute the test at the server * @ param containerUrl * @ param testClassName * @ param testDisplayName * @ return */ public Document runAtServer ( String containerUrl , String testClassName , String testDisplayName ) { } }
DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder ; try { String url = containerUrl + String . format ( "?%s=%s&%s=%s" , TEST_CLASS_NAME_PARAM , testClassName , TEST_NAME_PARAM , URLEncoder . encode ( testDisplayName , ENCODING ) ) ; builder = factory . newDocumentBuild...
public class ValueSet { /** * Returns an abbreviated display name for the specified value , if one is * defined . * @ param value a { @ link Value } . Cannot be < code > null < / code > . * @ return a { @ link String } . */ public String abbrevDisplayName ( Value value ) { } }
if ( value == null ) { throw new IllegalArgumentException ( "value cannot be null" ) ; } ValueSetElement vse = this . values . get ( value ) ; if ( vse != null ) { return vse . getAbbrevDisplayName ( ) ; } else { return "" ; }
public class CodecCollector { /** * Collect spans for occurences . * @ param occurences * the occurences * @ param prefixes * the prefixes * @ param field * the field * @ param searcher * the searcher * @ param lrc * the lrc * @ return the map * @ throws IOException * Signals that an I / O exc...
Map < GroupHit , Spans > list = new HashMap < > ( ) ; IndexReader reader = searcher . getIndexReader ( ) ; final float boost = 0 ; for ( GroupHit hit : occurences ) { MtasSpanQuery queryHit = createQueryFromGroupHit ( prefixes , field , hit ) ; if ( queryHit != null ) { MtasSpanQuery queryHitRewritten = queryHit . rewr...
public class Block { /** * Returns a solved block that builds on top of this one . This exists for unit tests . */ @ VisibleForTesting public Block createNextBlock ( Address to , long version , long time , int blockHeight ) { } }
return createNextBlock ( to , version , null , time , pubkeyForTesting , FIFTY_COINS , blockHeight ) ;
public class InstallationManagerService { /** * Install the installation manager service . * @ param serviceTarget * @ return the service controller for the installed installation manager */ public static ServiceController < InstallationManager > installService ( ServiceTarget serviceTarget ) { } }
final InstallationManagerService service = new InstallationManagerService ( ) ; return serviceTarget . addService ( InstallationManagerService . NAME , service ) . addDependency ( JBOSS_PRODUCT_CONFIG_SERVICE , ProductConfig . class , service . productConfig ) . setInitialMode ( ServiceController . Mode . ACTIVE ) . in...
public class Grammar { /** * TODO : eliminates duplicate helper rules ( e . g . in jp example ) */ private static boolean equal ( int [ ] prod1 , int [ ] prod2 ) { } }
int ofs ; if ( prod1 . length != prod2 . length ) { return false ; } for ( ofs = 0 ; ofs < prod1 . length ; ofs ++ ) { if ( prod1 [ ofs ] != prod2 [ ofs ] ) { if ( ! ( ( prod1 [ ofs ] == prod1 [ 0 ] ) && ( prod2 [ ofs ] == prod2 [ 0 ] ) ) ) { return false ; } } } return true ;
public class CPDefinitionInventoryLocalServiceBaseImpl { /** * Performs a dynamic query on the database and returns the matching rows . * @ param dynamicQuery the dynamic query * @ return the matching rows */ @ Override public < T > List < T > dynamicQuery ( DynamicQuery dynamicQuery ) { } }
return cpDefinitionInventoryPersistence . findWithDynamicQuery ( dynamicQuery ) ;
public class ModelPackageStatusDetails { /** * The status of the scan of the Docker image container for the model package . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setImageScanStatuses ( java . util . Collection ) } or { @ link # withImageScanStatuses...
if ( this . imageScanStatuses == null ) { setImageScanStatuses ( new java . util . ArrayList < ModelPackageStatusItem > ( imageScanStatuses . length ) ) ; } for ( ModelPackageStatusItem ele : imageScanStatuses ) { this . imageScanStatuses . add ( ele ) ; } return this ;
public class ComponentClass { /** * Returns the render priority appropriate for the specified action , orientation and * component . */ public int getRenderPriority ( String action , String component , int orientation ) { } }
// because we expect there to be relatively few priority overrides , we simply search // linearly through the list for the closest match int ocount = ( _overrides != null ) ? _overrides . size ( ) : 0 ; for ( int ii = 0 ; ii < ocount ; ii ++ ) { PriorityOverride over = _overrides . get ( ii ) ; // based on the way the ...
public class ImageLoader { /** * Starts the runnable for batched delivery of responses if it is not already started . * @ param cacheKey The cacheKey of the response being delivered . * @ param request The BatchedImageRequest to be delivered . */ private void batchResponse ( String cacheKey , BatchedImageRequest re...
batchedResponses . put ( cacheKey , request ) ; // If we don ' t already have a batch delivery runnable in flight , make a new one . // Note that this will be used to deliver responses to all callers in batchedResponses . if ( runnable == null ) { runnable = new Runnable ( ) { @ Override public void run ( ) { for ( Bat...
public class CommerceNotificationTemplateUserSegmentRelLocalServiceWrapper { /** * Returns the commerce notification template user segment rel with the primary key . * @ param commerceNotificationTemplateUserSegmentRelId the primary key of the commerce notification template user segment rel * @ return the commerce ...
return _commerceNotificationTemplateUserSegmentRelLocalService . getCommerceNotificationTemplateUserSegmentRel ( commerceNotificationTemplateUserSegmentRelId ) ;
public class GoogleCloudStorageMergeInput { /** * Creates multiple merging readers for each shard using { @ link # createReaderForShard } below . * These are combined into a single reader via concatenation . The resulting input stream will be * in order except when the input switches from one merging reader to the ...
Marshaller < ByteBuffer > byteBufferMarshaller = Marshallers . getByteBufferMarshaller ( ) ; Marshaller < KeyValue < ByteBuffer , ? extends Iterable < ByteBuffer > > > marshaller = Marshallers . getKeyValuesMarshaller ( byteBufferMarshaller , byteBufferMarshaller ) ; ImmutableList . Builder < InputReader < KeyValue < B...
public class DoubleMomentStatistics { /** * Return a { @ code Collector } which applies an double - producing mapping * function to each input element , and returns moments - statistics for the * resulting values . * < pre > { @ code * final Stream < SomeObject > stream = . . . * final DoubleMomentStatistics ...
requireNonNull ( mapper ) ; return Collector . of ( DoubleMomentStatistics :: new , ( r , t ) -> r . accept ( mapper . applyAsDouble ( t ) ) , DoubleMomentStatistics :: combine ) ;
public class ClustersInner { /** * Stops a Kusto cluster . * @ param resourceGroupName The name of the resource group containing the Kusto cluster . * @ param clusterName The name of the Kusto cluster . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown...
beginStopWithServiceResponseAsync ( resourceGroupName , clusterName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class DefaultQueryAction { /** * Set source filtering on a search request . * zhongshu - comment 即es dsl中的include和exclude * @ param fields * list of fields to source filter . */ public void setFields ( List < Field > fields ) throws SqlParseException { } }
/* zhongshu - comment select * from tbl _ a ; select * 这种sql语句的select . getFields ( ) . size ( ) 为0 */ if ( select . getFields ( ) . size ( ) > 0 ) { ArrayList < String > includeFields = new ArrayList < String > ( ) ; ArrayList < String > excludeFields = new ArrayList < String > ( ) ; for ( Field field : fields ) { i...
public class SearchInterpolate { /** * Cubic interpolation using the function and derivative computed at two different points . This particular * implementation taken from [ 1 ] and appears to be designed to maximize stability . * [ 1 ] MINPACK - 2 source code http : / / ftp . mcs . anl . gov / pub / MINPACK - 2 / ...
double theta = 3.0 * ( f0 - f1 ) / ( x1 - x0 ) + g0 + g1 ; double s = Math . max ( Math . abs ( theta ) , Math . abs ( g0 ) ) ; s = Math . max ( s , Math . abs ( g1 ) ) ; double gamma = s * Math . sqrt ( ( theta / s ) * ( theta / s ) - ( g0 / s ) * ( g1 / s ) ) ; if ( x1 < x0 ) gamma = - gamma ; double p = ( gamma - g0...
public class CPDefinitionInventoryUtil { /** * Removes the cp definition inventory where uuid = & # 63 ; and groupId = & # 63 ; from the database . * @ param uuid the uuid * @ param groupId the group ID * @ return the cp definition inventory that was removed */ public static CPDefinitionInventory removeByUUID_G (...
return getPersistence ( ) . removeByUUID_G ( uuid , groupId ) ;
public class NumberField { /** * If { @ link FieldCase # isBad ( ) } is { @ code true } , an invalid number is generated using * { @ link GeneratingExpression # negateString ( String , int ) } * @ return a character string representing a random number subject to the FieldCase */ @ Override public String getString (...
boolean success = false ; String numberString ; do { double number = getDouble ( c ) ; numberString = format . format ( number ) ; if ( notZero && ZERO_PATTERN . matcher ( numberString ) . matches ( ) ) { log . info ( XMLTags . NOTZERO + " is true and a zero value was generated: value=" + numberString + " - generating ...
public class ElementBoxView { /** * Gets the box reference from properties . * @ param v * just a view . * @ return the box set in properties , if there is one . */ public static final Box getBox ( View v ) { } }
if ( v instanceof CSSBoxView ) return getBox ( ( CSSBoxView ) v ) ; AttributeSet attr = v . getAttributes ( ) ; if ( attr == null ) { throw new NullPointerException ( "AttributeSet of " + v . getClass ( ) . getName ( ) + "@" + Integer . toHexString ( v . hashCode ( ) ) + " is set to NULL." ) ; } Object obj = attr . get...
public class NPTmpRetainingTreeNormalizer { /** * Add - TMP when not present within an NP * @ param tree The tree to add temporal info to . */ private void addTMP9 ( final Tree tree ) { } }
// do the head chain under it Tree ht = headFinder . determineHead ( tree ) ; // special fix for possessives ! - - make noun before head if ( ht . value ( ) . equals ( "POS" ) ) { int j = tree . indexOf ( ht ) ; if ( j > 0 ) { ht = tree . getChild ( j - 1 ) ; } } // Note : this next bit changes the tree label , rather ...
public class ZkOrderedStore { /** * Method to add new entity to the ordered collection . Note : Same entity could be added to the collection multiple times . * Entities are added to the latest collection for the stream . If the collection has exhausted positions allowed for by rollOver limit , * a new successor col...
// add persistent sequential node to the latest collection number // if collectionNum is sealed , increment collection number and write the entity there . return getLatestCollection ( scope , stream ) . thenCompose ( latestcollectionNum -> storeHelper . createPersistentSequentialZNode ( getEntitySequentialPath ( scope ...
public class DefaultInputConnection { /** * Checks that the given ID is valid . */ private boolean checkID ( long id ) { } }
// Ensure that the given ID is a monotonically increasing ID . // If the ID is less than the last received ID then reset the // last received ID since the connection must have been reset . if ( lastReceived == 0 || id == lastReceived + 1 || id < lastReceived ) { lastReceived = id ; // If the ID reaches the end of the c...
public class JobTrackerTraits { /** * Returns specified TaskInProgress , or null . */ public TaskInProgress getTip ( TaskID tipid ) { } }
JobInProgressTraits job = getJobInProgress ( tipid . getJobID ( ) ) ; return ( job == null ? null : job . getTaskInProgress ( tipid ) ) ;
public class ListOfferingsResult { /** * A value representing the list offering results . * @ param offerings * A value representing the list offering results . */ public void setOfferings ( java . util . Collection < Offering > offerings ) { } }
if ( offerings == null ) { this . offerings = null ; return ; } this . offerings = new java . util . ArrayList < Offering > ( offerings ) ;
public class AddTask { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . msgstore . persistence . Operation # ensureDataAvailable ( ) */ public void ensureDataAvailable ( ) throws PersistentDataEncodingException , SevereMessageStoreException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "ensureDataAvailable" ) ; // Check whether the item is still in the store AbstractItem item = getItem ( ) ; if ( ( item == null ) || ! item . isInStore ( ) ) { throw new NotInMessageStore ( ) ; } // This is an uncondi...
public class ByteIOUtils { /** * Writes a specific short value ( 2 bytes ) to the output byte buffer at the given offset . * @ param buf output byte buffer * @ param pos offset into the byte buffer to write * @ param v short value to write */ public static void writeShort ( byte [ ] buf , int pos , short v ) { } ...
checkBoundary ( buf , pos , 2 ) ; buf [ pos ++ ] = ( byte ) ( 0xff & ( v >> 8 ) ) ; buf [ pos ] = ( byte ) ( 0xff & v ) ;
public class UtilFeature { /** * Normalized the tuple such that the L2 - norm is equal to 1 . This is also often referred to as * the Euclidean or frobenius ( all though that ' s a matrix norm ) . * value [ i ] = value [ i ] / sqrt ( sum ( value [ j ] * value [ j ] , for all j ) ) * @ param desc tuple */ public s...
double norm = 0 ; for ( int i = 0 ; i < desc . size ( ) ; i ++ ) { double v = desc . value [ i ] ; norm += v * v ; } if ( norm == 0 ) return ; norm = Math . sqrt ( norm ) ; for ( int i = 0 ; i < desc . size ( ) ; i ++ ) { desc . value [ i ] /= norm ; }
public class DescribeDestinationsResult { /** * The destinations . * @ return The destinations . */ public java . util . List < Destination > getDestinations ( ) { } }
if ( destinations == null ) { destinations = new com . amazonaws . internal . SdkInternalList < Destination > ( ) ; } return destinations ;
public class NistHandler { /** * decodes the given WSQ file and returns a < code > Nist < / code > containing the decoded info . * @ param file the NIST file , not null * @ return a Nist instance containing decoded info , not null * @ see Nist */ public Nist decode ( File file ) { } }
try { return decode ( new FileInputStream ( file ) ) ; } catch ( FileNotFoundException e ) { throw new RuntimeException ( "unexpected error." , e ) ; }
public class MetricSchemaRecordQuery { /** * Specifies the scope of the query . * @ param scope The scope of the query . Cannot be null or empty . */ public void setScope ( String scope ) { } }
SystemAssert . requireArgument ( scope != null && ! scope . isEmpty ( ) , "Scope cannot be null or empty." ) ; this . scope = scope ;
public class LineReader { /** * One double per line . Empty lines and lines starting with # are skipped . * @ return an array of doubles from this file */ public static double [ ] doublesFrom ( InputStream is ) { } }
ArrayList < Double > doubles = new ArrayList < Double > ( ) ; for ( String line : new LineReader ( is ) ) { if ( line . length ( ) > 0 && ! line . startsWith ( "#" ) ) doubles . add ( Double . parseDouble ( line ) ) ; } // copy it , because we can ' t cast from Double to double . . . double [ ] ret = new double [ doubl...
public class DOMHandle { /** * Evaluate a string XPath expression against the retrieved document . * An XPath expression can return a Node or subinterface such as * Element or Text , a NodeList , or a Boolean , Number , or String value . * @ param xpathExpressionthe XPath expression as a string * @ param asthe ...
return evaluateXPath ( xpathExpression , get ( ) , as ) ;
public class ErrorCollector { /** * Adds a non - fatal error to the message set , which may cause a failure if the error threshold is exceeded . * The message is not required to have a source line and column specified , but it is best practice to try * and include that information . */ public void addError ( Messag...
addErrorAndContinue ( message ) ; if ( errors != null && this . errors . size ( ) >= configuration . getTolerance ( ) ) { failIfErrors ( ) ; }
public class FastaWriterHelper { /** * Method which will write your given Sequences to the specified * { @ link OutputStream } . This is a very generic method which writes just the * AccessionID of the Sequence as the FASTA header . * @ param outputStream Stream to write to ; can be System . out * @ param seque...
FastaHeaderFormatInterface < Sequence < ? > , Compound > fhfi = new FastaHeaderFormatInterface < Sequence < ? > , Compound > ( ) { @ Override public String getHeader ( Sequence < ? > sequence ) { return sequence . getAccession ( ) . toString ( ) ; } ; } ; FastaWriter < Sequence < ? > , Compound > fastaWriter = new Fast...
public class SipCall { /** * This method sends a basic RE - INVITE on the current dialog . * This method returns when the request message has been sent out . The calling program must * subsequently call the waitReinviteResponse ( ) method ( one or more times ) to get the response ( s ) * and perhaps the sendReinv...
return sendReinvite ( newContact , displayName , body , contentType , contentSubType , null , null ) ;
public class CommandLineParser { /** * This is a property with a boolean value which defaults to false * The user can ' turn this option on ' by passing a command line switch without a value ( e . g . - d ) in which case we need to * set the value to true * @ param property * @ return true if this is a boolean ...
return property . hasDefaults ( ) && property . getDefaults ( ) . length == 1 && property . getDefaults ( ) [ 0 ] . equals ( "false" ) ;
public class DynamicList { /** * retrieve the item at the provided index , or return null if the index is past the end of the list */ public E get ( int index ) { } }
lock . readLock ( ) . lock ( ) ; try { if ( index >= size ) return null ; index ++ ; int c = 0 ; Node < E > finger = head ; for ( int i = maxHeight - 1 ; i >= 0 ; i -- ) { while ( c + finger . size [ i ] <= index ) { c += finger . size [ i ] ; finger = finger . next ( i ) ; } } assert c == index ; return finger . value...
public class DevicesInner { /** * Installs the updates on the data box edge / gateway device . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentEx...
return ServiceFuture . fromResponse ( installUpdatesWithServiceResponseAsync ( deviceName , resourceGroupName ) , serviceCallback ) ;
public class Engine { /** * Removes the rule block of the given name . * @ param name is the name of the rule block * @ return the rule block of the given name * @ throws RuntimeException if there is no rule block with the given name */ public RuleBlock removeRuleBlock ( String name ) { } }
for ( Iterator < RuleBlock > it = this . ruleBlocks . iterator ( ) ; it . hasNext ( ) ; ) { RuleBlock ruleBlock = it . next ( ) ; if ( ruleBlock . getName ( ) . equals ( name ) ) { it . remove ( ) ; return ruleBlock ; } } throw new RuntimeException ( String . format ( "[engine error] no rule block by name <%s>" , name ...
public class MetaClassConstant { /** * TODO Jochen : replace with new MetaMethod */ public MetaMethod getMethod ( String name , Class [ ] parameters ) { } }
return impl . pickMethod ( name , parameters ) ;
public class MurmurHash3v2 { /** * Final self mix of h * . * @ param h input to final mix * @ return mix */ private static long finalMix64 ( long h ) { } }
h ^= h >>> 33 ; h *= 0xff51afd7ed558ccdL ; h ^= h >>> 33 ; h *= 0xc4ceb9fe1a85ec53L ; h ^= h >>> 33 ; return h ;
public class TrieIterator { /** * Finding the next element . * This method is called just before returning the result of * next ( ) . * We always store the next element before it is requested . * In the case that we have to continue calculations into the * supplementary planes , a false will be returned . *...
int currentValue = m_nextValue_ ; m_currentCodepoint_ = m_nextCodepoint_ ; m_nextCodepoint_ ++ ; m_nextBlockIndex_ ++ ; if ( ! checkBlockDetail ( currentValue ) ) { setResult ( element , m_currentCodepoint_ , m_nextCodepoint_ , currentValue ) ; return true ; } // synwee check that next block index = = 0 here // enumera...
public class DocTreeScanner { /** * { @ inheritDoc } This implementation scans the children in left to right order . * @ param node { @ inheritDoc } * @ param p { @ inheritDoc } * @ return the result of scanning */ @ Override public R visitUses ( UsesTree node , P p ) { } }
R r = scan ( node . getServiceType ( ) , p ) ; r = scanAndReduce ( node . getDescription ( ) , p , r ) ; return r ;
public class Record { /** * Reads { @ code < T > } to the provided { @ code buffer } . * @ param buffer { @ code byte [ ] } ; of size { @ link # getRecordSize ( ) } * @ param t { @ code < T > } * @ throws InvalidArgument Thrown if either argument is null or if * { @ code buffer } is invalid */ public final void...
if ( buffer == null ) { throw new InvalidArgument ( "buffer" , buffer ) ; } else if ( t == null ) { throw new InvalidArgument ( "cannot read a null entry" ) ; } else if ( buffer . length != recordSize ) { final String fmt = "invalid buffer (%d bytes, expected %d)" ; final String msg = format ( fmt , buffer . length , r...
public class AbstractConfigAccessorBuilder { /** * { @ inheritDoc } */ @ Override public ConfigAccessorBuilder < T > withDefault ( T value ) { } }
synchronized ( this ) { this . defaultValue = value ; this . defaultString = ConfigProperty . UNCONFIGURED_VALUE ; } return this ;
public class DataMediaPairAction { /** * 批量添加DataMediaPair * @ param dataMediaPairInfo * @ throws Exception */ public void doBatchAdd ( @ FormGroup ( "batchDataMediaPairInfo" ) Group batchDataMediaPairInfo , @ Param ( "pipelineId" ) Long pipelineId , @ FormField ( name = "formBatchDataMediaPairError" , group = "bat...
String batchPairContent = batchDataMediaPairInfo . getField ( "batchPairContent" ) . getStringValue ( ) ; List < String > StringPairs = Arrays . asList ( batchPairContent . split ( "\r\n" ) ) ; try { for ( String stringPair : StringPairs ) { List < String > pairData = Arrays . asList ( stringPair . split ( "," ) ) ; if...
public class ApplicationDescriptorImpl { /** * If not already created , a new < code > administered - object < / code > element will be created and returned . * Otherwise , the first existing < code > administered - object < / code > element will be returned . * @ return the instance defined for the element < code ...
List < Node > nodeList = model . get ( "administered-object" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new AdministeredObjectTypeImpl < ApplicationDescriptor > ( this , "administered-object" , model , nodeList . get ( 0 ) ) ; } return createAdministeredObject ( ) ;
public class FactionWarfareApi { /** * List of the top factions in faction warfare Top 4 leaderboard of factions * for kills and victory points separated by total , last week and yesterday * - - - This route expires daily at 11:05 * @ param datasource * The server name you would like data from ( optional , defa...
com . squareup . okhttp . Call call = getFwLeaderboardsValidateBeforeCall ( datasource , ifNoneMatch , null ) ; Type localVarReturnType = new TypeToken < FactionWarfareLeaderboardResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class IOUtil { /** * Reads the specified file into a map . The first value is used as key . The * rest is put into a list and used as map value . Each entry is one line of * the file . * Ensures that no null value is returned . * @ param filename * the name of the specification file ( not the path to i...
Map < String , String [ ] > map = new TreeMap < > ( ) ; // read spec - file as resource , e . g . , from a jar try ( InputStreamReader isr = new InputStreamReader ( IOUtil . class . getResourceAsStream ( SPEC_DIR + filename ) ) ; BufferedReader reader = new BufferedReader ( isr ) ) { String line = null ; while ( ( line...
public class Data { /** * Filter this data by class . The resulting elements are guaranteed to be of the given type . */ @ CheckResult @ NonNull public final < O > Data < O > filter ( @ NonNull final Class < O > type ) { } }
// noinspection unchecked return ( Data < O > ) new FilterData < > ( this , new Predicate < Object > ( ) { @ Override public boolean apply ( Object o ) { return type . isInstance ( o ) ; } } ) ;
public class AbstractViewQuery { /** * Register a callback method for when the view is clicked . * @ param listener The callback method . * @ return self */ public T clicked ( View . OnClickListener listener ) { } }
if ( view != null ) { view . setOnClickListener ( listener ) ; } return self ( ) ;
public class CommerceNotificationAttachmentUtil { /** * Returns a range of all the commerce notification attachments where uuid = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , ...
return getPersistence ( ) . findByUuid ( uuid , start , end ) ;
public class BinaryBitmap { /** * Returns a new object with rotated image data by 90 degrees counterclockwise . * Only callable if { @ link # isRotateSupported ( ) } is true . * @ return A rotated version of this object . */ public BinaryBitmap rotateCounterClockwise ( ) { } }
LuminanceSource newSource = binarizer . getLuminanceSource ( ) . rotateCounterClockwise ( ) ; return new BinaryBitmap ( binarizer . createBinarizer ( newSource ) ) ;
public class IdentityTemplateLibrary { /** * Get all templated coordinates for the provided molecule . The return collection has * coordinates ordered based on the input . * @ param mol molecule ( or fragment ) to lookup * @ return the coordinates */ Collection < Point2d [ ] > getCoordinates ( IAtomContainer mol ...
try { // create the library key to lookup an entry , we also store // the canonical out ordering int n = mol . getAtomCount ( ) ; int [ ] ordering = new int [ n ] ; String smiles = cansmi ( mol , ordering ) ; final Collection < Point2d [ ] > coordSet = templateMap . get ( smiles ) ; final List < Point2d [ ] > orderedCo...
public class NumberUtil { /** * 数字转 { @ link BigDecimal } * @ param number 数字 * @ return { @ link BigDecimal } * @ since 4.0.9 */ public static BigDecimal toBigDecimal ( Number number ) { } }
if ( null == number ) { return BigDecimal . ZERO ; } return toBigDecimal ( number . toString ( ) ) ;
public class JobHistoryFileParserHadoop2 { /** * maintains compatibility between hadoop 1.0 keys and hadoop 2.0 keys . It also confirms that this * key exists in JobHistoryKeys enum * @ throws IllegalArgumentException NullPointerException */ private String getKey ( String key ) throws IllegalArgumentException { } }
String checkKey = JobHistoryKeys . HADOOP2_TO_HADOOP1_MAPPING . containsKey ( key ) ? JobHistoryKeys . HADOOP2_TO_HADOOP1_MAPPING . get ( key ) : key ; return ( JobHistoryKeys . valueOf ( checkKey ) . toString ( ) ) ;
public class MediaServicesInner { /** * Regenerates a primary or secondary key for a Media Service . * @ param resourceGroupName Name of the resource group within the Azure subscription . * @ param mediaServiceName Name of the Media Service . * @ param keyType The keyType indicating which key you want to regenera...
return ServiceFuture . fromResponse ( regenerateKeyWithServiceResponseAsync ( resourceGroupName , mediaServiceName , keyType ) , serviceCallback ) ;