signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class PropertiesLoaderBuilder { /** * Adds a new property . Giving both name and value . * This methods does not lookup in the Spring Context , it only adds property and value as given . * @ param name to be added in the properties * @ param value to be added in the properties * @ return PropertyLoaderBu...
props . put ( name , value ) ; return this ;
public class ExtendedByteBuf { /** * Reads a variable size int if possible . If not present the reader index is reset to the last mark . * @ param bf * @ return */ public static Optional < Integer > readMaybeVInt ( ByteBuf bf ) { } }
if ( bf . readableBytes ( ) >= 1 ) { byte b = bf . readByte ( ) ; return read ( bf , b , 7 , b & 0x7F , 1 ) ; } else { bf . resetReaderIndex ( ) ; return Optional . empty ( ) ; }
public class TimeZoneRule { /** * Returns if this rule represents the same rule and offsets as another . * When two < code > TimeZoneRule < / code > objects differ only its names , this method returns * true . * @ param other The < code > TimeZoneRule < / code > object to be compared with . * @ return true if t...
if ( rawOffset == other . rawOffset && dstSavings == other . dstSavings ) { return true ; } return false ;
public class ImageCodeUtils { /** * 输出随机验证码图片流 , 并返回验证码值 * @ param w * @ param h * @ param os * @ param verifySize * @ return * @ throws IOException */ public static String outputVerifyImage ( int w , int h , OutputStream os , int verifySize ) throws IOException { } }
String verifyCode = generateVerifyCode ( verifySize ) ; outputImage ( w , h , os , verifyCode ) ; return verifyCode ;
public class EclipseNode { /** * Visits this node and all child nodes depth - first , calling the provided visitor ' s visit methods . */ public void traverse ( EclipseASTVisitor visitor ) { } }
if ( visitor . isDeferUntilPostDiet ( ) && ! isCompleteParse ( ) ) return ; switch ( getKind ( ) ) { case COMPILATION_UNIT : visitor . visitCompilationUnit ( this , ( CompilationUnitDeclaration ) get ( ) ) ; ast . traverseChildren ( visitor , this ) ; visitor . endVisitCompilationUnit ( this , ( CompilationUnitDeclarat...
public class FastConcurrentDirectDeque { /** * Returns the first node , the unique node p for which : * p . prev = = null & & p . next ! = p * The returned node may or may not be logically deleted . * Guarantees that head is set to the returned node . */ Node < E > first ( ) { } }
restartFromHead : for ( ; ; ) for ( Node < E > h = head , p = h , q ; ; ) { if ( ( q = p . prev ) != null && ( q = ( p = q ) . prev ) != null ) // Check for head updates every other hop . // If p = = q , we are sure to follow head instead . p = ( h != ( h = head ) ) ? h : q ; else if ( p == h // It is possible that p i...
public class Hex { /** * Converts an array of bytes into an array of characters representing the hexidecimal values of each byte in order . * The returned array will be double the length of the passed array , as it takes two characters to represent any * given byte . * @ param data * a byte [ ] to convert to He...
int l = data . length ; char [ ] out = new char [ l << 1 ] ; // two characters form the hex value . for ( int i = 0 , j = 0 ; i < l ; i ++ ) { out [ j ++ ] = DIGITS [ ( 0xF0 & data [ i ] ) >>> 4 ] ; out [ j ++ ] = DIGITS [ 0x0F & data [ i ] ] ; } return out ;
public class ModuleEnvironments { /** * Fetch an environment with a given { @ code environmentId } and space . * This method will override the configuration specified through * { @ link CMAClient . Builder # setSpaceId ( String ) } . * @ param spaceId space ID * @ param environmentId environment ID * @ return...
assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( environmentId , "environmentId" ) ; return service . fetchOne ( spaceId , environmentId ) . blockingFirst ( ) ;
public class SecurityContextImpl { /** * Perform a login to recreate the full subject , given a WSPrincipal * @ param wsPrincipal the deserialized WSPrincipal that will be used for creating the new subject * @ param securityService the security service to use for authenticating the user * @ param AtomicServiceRef...
Subject subject = null ; if ( wsPrincipal != null ) { String userName = wsPrincipal . getName ( ) ; AuthenticateUserHelper authHelper = new AuthenticateUserHelper ( ) ; if ( jaasLoginContextEntry == null ) { jaasLoginContextEntry = DESERIALIZE_LOGINCONTEXT_DEFAULT ; } try { subject = authHelper . authenticateUser ( sec...
public class Utils { /** * Get the current time in microseconds since the epoch . This method is synchronized * and guarantees that each successive call , even by different threads , returns * increasing values . * @ return Current time in microseconds ( though not necessarily with microsecond * precision ) . *...
// Use use a dedicated lock object rather than synchronizing on the method , which // would synchronize on the Utils . class object , which is too coarse - grained . synchronized ( g_lastMicroLock ) { // We use System . currentTimeMillis ( ) * 1000 for compatibility with the CLI and // other tools . This makes our time...
public class JsonPullParser { /** * Creates a new parser , using the given InputStream as its { @ code JSON } feed . * Please call one of the { @ code setSource ( . . . ) } ' s before calling other methods . * @ param is * An InputStream serves as { @ code JSON } feed . Cannot be null . * @ param charsetName ...
if ( is == null ) { throw new IllegalArgumentException ( "'is' must not be null." ) ; } try { final Charset charset = ( charsetName == null ) ? null : Charset . forName ( charsetName ) ; return newParser ( is , charset ) ; } catch ( UnsupportedCharsetException e ) { throw new UnsupportedEncodingException ( e . getChars...
public class OpenVidu { /** * Stops the recording of a { @ link io . openvidu . java . client . Session } * @ param recordingId The id property of the recording you want to stop * @ return The stopped recording * @ throws OpenViduJavaClientException * @ throws OpenViduHttpException Value returned from * { @ l...
HttpPost request = new HttpPost ( OpenVidu . urlOpenViduServer + API_RECORDINGS + API_RECORDINGS_STOP + "/" + recordingId ) ; HttpResponse response ; try { response = OpenVidu . httpClient . execute ( request ) ; } catch ( IOException e ) { throw new OpenViduJavaClientException ( e . getMessage ( ) , e . getCause ( ) )...
public class PredictionsImpl { /** * Predict an image url without saving the result . * @ param projectId The project id * @ param predictImageUrlWithNoStoreOptionalParameter the object representing the optional parameters to be set before calling this API * @ param serviceCallback the async ServiceCallback to ha...
return ServiceFuture . fromResponse ( predictImageUrlWithNoStoreWithServiceResponseAsync ( projectId , predictImageUrlWithNoStoreOptionalParameter ) , serviceCallback ) ;
public class LabsInner { /** * Register to managed lab . * @ param resourceGroupName The name of the resource group . * @ param labAccountName The name of the lab Account . * @ param labName The name of the lab . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . *...
return ServiceFuture . fromResponse ( registerWithServiceResponseAsync ( resourceGroupName , labAccountName , labName ) , serviceCallback ) ;
public class AWSSimpleSystemsManagementClient { /** * Returns a summary count of compliant and non - compliant resources for a compliance type . For example , this call * can return State Manager associations , patches , or custom compliance types according to the filter criteria that * you specify . * @ param li...
request = beforeClientExecution ( request ) ; return executeListComplianceSummaries ( request ) ;
public class NNF { /** * Conversion of non - class expressions to NNF */ @ Override public OWLAxiom visit ( OWLSubClassOfAxiom axiom ) { } }
return dataFactory . getOWLSubClassOfAxiom ( axiom . getSubClass ( ) . accept ( this ) , axiom . getSuperClass ( ) . accept ( this ) ) ;
public class StaticSentinel { /** * this method is registering the termination of a method . */ public synchronized static void leaving ( String classname , int fnr2 ) { } }
int fn = fnr2 ; m . put ( classname , StaticOperationsCounters . fin [ fn ] ++ ) ; // fin [ fn ] + + ; / / changes the # fin counter adding one to it . m . put ( classname , StaticOperationsCounters . active [ fn ] -- ) ; // changes the # active counter removing one to it . stateChanged ( ) ;
public class RaftNodeImpl { /** * Schedules task using { @ link RaftIntegration # schedule ( Runnable , long , TimeUnit ) } . */ public void schedule ( Runnable task , long delayInMillis ) { } }
if ( isTerminatedOrSteppedDown ( ) ) { return ; } raftIntegration . schedule ( task , delayInMillis , MILLISECONDS ) ;
public class AllWindowedStream { /** * Applies the given window function to each window . The window function is called for each * evaluation of the window . The output of the window function is * interpreted as a regular non - windowed stream . * < p > Note that this function requires that all data in the window...
String callLocation = Utils . getCallLocationName ( ) ; function = input . getExecutionEnvironment ( ) . clean ( function ) ; TypeInformation < R > resultType = getProcessAllWindowFunctionReturnType ( function , getInputType ( ) ) ; return apply ( new InternalIterableProcessAllWindowFunction < > ( function ) , resultTy...
public class Interest { /** * Checks whether given object is of interest to this interest instance . * @ param action the action to be performed on the object * @ param object the object to check * @ return true if the object is of interest to this , false otherwise */ public boolean matches ( Action < ? , ? > ac...
return this . action == action && object != null && entityType . isAssignableFrom ( object . getClass ( ) ) ;
public class Trie { /** * Add a key with associated value to the trie . * @ param key the key . * @ param value the value . */ public void put ( K [ ] key , V value ) { } }
Node child = root . get ( key [ 0 ] ) ; if ( child == null ) { child = new Node ( key [ 0 ] ) ; root . put ( key [ 0 ] , child ) ; } child . addChild ( key , value , 1 ) ;
public class AbstractBeanDefinition { /** * Obtains a bean definition for the field at the given index and the argument at the given index * Warning : this method is used by internal generated code and should not be called by user code . * @ param resolutionContext The resolution context * @ param context The con...
return resolveBeanWithGenericsForField ( resolutionContext , injectionPoint , ( beanType , qualifier ) -> { boolean hasNoGenerics = ! injectionPoint . getType ( ) . isArray ( ) && injectionPoint . asArgument ( ) . getTypeVariables ( ) . isEmpty ( ) ; if ( hasNoGenerics ) { return ( ( DefaultBeanContext ) context ) . ge...
public class CommonOps_DDF3 { /** * Returns the absolute value of the element in the matrix that has the largest absolute value . < br > * < br > * Max { | a < sub > ij < / sub > | } for all i and j < br > * @ param a A matrix . Not modified . * @ return The max abs element value of the matrix . */ public stati...
double max = Math . abs ( a . a11 ) ; double tmp = Math . abs ( a . a12 ) ; if ( tmp > max ) max = tmp ; tmp = Math . abs ( a . a13 ) ; if ( tmp > max ) max = tmp ; tmp = Math . abs ( a . a21 ) ; if ( tmp > max ) max = tmp ; tmp = Math . abs ( a . a22 ) ; if ( tmp > max ) max = tmp ; tmp = Math . abs ( a . a23 ) ; if (...
public class Parser { /** * literal : = & lt ; TRUE & gt ; | & lt ; FALSE & gt ; | & lt ; STRING & gt ; | & lt ; INTEGER & gt ; | & lt ; FLOAT & gt ; | & lt ; NULL & gt ; */ protected AstNode literal ( ) throws ScanException , ParseException { } }
AstNode v = null ; switch ( token . getSymbol ( ) ) { case TRUE : v = new AstBoolean ( true ) ; consumeToken ( ) ; break ; case FALSE : v = new AstBoolean ( false ) ; consumeToken ( ) ; break ; case STRING : v = new AstString ( token . getImage ( ) ) ; consumeToken ( ) ; break ; case INTEGER : v = new AstNumber ( parse...
public class Reporter { /** * Creates the directory and file to hold the test output file */ private void setupFile ( ) { } }
if ( ! new File ( directory ) . exists ( ) && ! new File ( directory ) . mkdirs ( ) ) { try { throw new IOException ( "Unable to create output directory" ) ; } catch ( IOException e ) { log . info ( e ) ; } } if ( ! file . exists ( ) ) { try { if ( ! file . createNewFile ( ) ) { throw new IOException ( "Unable to creat...
public class ExecuteMethodValidatorChecker { public void checkMismatchedValidatorAnnotation ( Field field , Map < String , Class < ? > > genericMap ) { } }
doCheckMismatchedValidatorAnnotation ( field , genericMap ) ;
public class TableUtils { /** * Waits up to 10 minutes for a specified DynamoDB table to move into the * < code > ACTIVE < / code > state . If the table does not exist or does not * transition to the < code > ACTIVE < / code > state after this time , then * SdkClientException is thrown . * @ param dynamo * Th...
waitUntilActive ( dynamo , tableName , DEFAULT_WAIT_TIMEOUT , DEFAULT_WAIT_INTERVAL ) ;
public class AbstractBufferedAttributeProvider { /** * Replies the value associated to the specified name . */ private AttributeValue extractValueFor ( String name ) throws AttributeException { } }
final AttributeValue value ; if ( this . cache . containsKey ( name ) ) { value = this . cache . get ( name ) ; } else { value = loadValue ( name ) ; this . cache . put ( name , value ) ; } return value ;
public class PercentLayoutHelper { /** * Constructs a PercentLayoutInfo from attributes associated with a View . Call this method from * { @ code LayoutParams ( Context c , AttributeSet attrs ) } constructor . */ public static PercentLayoutInfo getPercentLayoutInfo ( Context context , AttributeSet attrs ) { } }
PercentLayoutInfo info = null ; TypedArray array = context . obtainStyledAttributes ( attrs , R . styleable . Carbon ) ; float value = array . getFraction ( R . styleable . Carbon_carbon_widthPercent , 1 , 1 , - 1f ) ; if ( value != - 1f ) { if ( Log . isLoggable ( TAG , Log . VERBOSE ) ) { Log . v ( TAG , "percent wid...
public class POIUtils { /** * シートの種類を判定する 。 * @ since 2.0 * @ param sheet 判定対象のオブジェクト * @ return シートの種類 。 不明な場合はnullを返す 。 * @ throws IllegalArgumentException { @ literal sheet = = null } */ public static SpreadsheetVersion getVersion ( final Sheet sheet ) { } }
ArgUtils . notNull ( sheet , "sheet" ) ; if ( sheet instanceof HSSFSheet ) { return SpreadsheetVersion . EXCEL97 ; } else if ( sheet instanceof XSSFSheet ) { return SpreadsheetVersion . EXCEL2007 ; } return null ;
public class DataConsumer { /** * Creates a future that will send a request to the reporting host and call * the handler with the response * @ param path the path at the reporting host which the request will be made * @ param reportingHandler the handler to receive the response once executed * and recieved * ...
return threadPool . submit ( new Callable < String > ( ) { @ Override public String call ( ) { String response = getResponse ( path ) ; if ( reportingHandler != null ) { reportingHandler . handleResponse ( response ) ; } return response ; } } ) ;
public class ProxyTask { /** * Constructor . */ public void init ( BasicServlet servlet , BasicServlet . SERVLET_TYPE servletType ) { } }
super . init ( servlet , servletType ) ; // First see if this is an active session if ( m_application == null ) m_application = this . getNonUserApplication ( ) ; // This task belongs to the servlet . m_application . addTask ( this , null ) ;
public class JLanguageTool { /** * Activate rules that depend on a language model . The language model currently * consists of Lucene indexes with ngram occurrence counts . * @ param indexDir directory with a ' 3grams ' sub directory which contains a Lucene index with 3gram occurrence counts * @ since 2.7 */ publ...
LanguageModel languageModel = language . getLanguageModel ( indexDir ) ; if ( languageModel != null ) { ResourceBundle messages = getMessageBundle ( language ) ; List < Rule > rules = language . getRelevantLanguageModelRules ( messages , languageModel ) ; userRules . addAll ( rules ) ; updateOptionalLanguageModelRules ...
public class WorkbenchEntrySet { /** * Rehashes the set to a new size . * @ param newN the new size . */ protected void rehash ( final int newN ) { } }
int i = 0 , pos ; final WorkbenchEntry [ ] workbenchEntry = this . workbenchEntry ; final int newMask = newN - 1 ; final WorkbenchEntry [ ] newWorkbenchEntry = new WorkbenchEntry [ newN ] ; for ( int j = size ; j -- != 0 ; ) { while ( workbenchEntry [ i ] == null ) i ++ ; WorkbenchEntry e = workbenchEntry [ i ] ; pos =...
public class JNotePartOfGroup { /** * / * public Point2D getStemBegin ( ) { * return new Point2D . Double ( stemX , stemYBegin ) ; */ public Rectangle2D getBoundingBox ( ) { } }
Dimension glyphDimension = getMetrics ( ) . getGlyphDimension ( getNotationContext ( ) ) ; if ( isStemUp ( ) ) { return new Rectangle2D . Double ( ( int ) ( getBase ( ) . getX ( ) ) , stemYEnd , getWidth ( ) , getStemBeginPosition ( ) . getY ( ) - stemYEnd + glyphDimension . getHeight ( ) / 2 ) ; } else { return new Re...
public class AccessibilityNodeInfoUtils { /** * Returns whether a node is long clickable . That is , the node supports at least one of the * following : * < ul > * < li > { @ link AccessibilityNodeInfoCompat # isLongClickable ( ) } < / li > * < li > { @ link AccessibilityNodeInfoCompat # ACTION _ LONG _ CLICK }...
if ( node == null ) { return false ; } if ( node . isLongClickable ( ) ) { return true ; } return supportsAnyAction ( node , AccessibilityNodeInfoCompat . ACTION_LONG_CLICK ) ;
public class GeoShapeCondition { /** * { @ inheritDoc } */ @ Override public Query query ( Schema schema ) { } }
if ( field == null || field . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Field name required" ) ; } if ( shape == null ) { throw new IllegalArgumentException ( "Geo shape required" ) ; } if ( operator == null ) { throw new IllegalArgumentException ( "Geo operator required" ) ; } ColumnMapper colum...
public class SARLPreferences { /** * Replies the output path for the generated sources that is registered inside the project ' s preferences . * If the project has no specific configuration , replies < code > null < / code > . * @ param project the project . * @ return the output path for SARL compiler if the pro...
assert project != null ; final IPreferenceStore preferenceStore = getSARLPreferencesFor ( project ) ; if ( preferenceStore . getBoolean ( IS_PROJECT_SPECIFIC ) ) { String key ; for ( final OutputConfiguration projectConfiguration : getXtextConfigurationsFor ( project ) ) { key = BuilderPreferenceAccess . getKey ( proje...
public class DOMConfigurator { /** * Used internally to parse an { @ link ErrorHandler } element . */ protected void parseErrorHandler ( Element element , Appender appender ) { } }
ErrorHandler eh = ( ErrorHandler ) OptionConverter . instantiateByClassName ( subst ( element . getAttribute ( CLASS_ATTR ) ) , org . apache . log4j . spi . ErrorHandler . class , null ) ; if ( eh != null ) { eh . setAppender ( appender ) ; PropertySetter propSetter = new PropertySetter ( eh ) ; NodeList children = ele...
public class VarTensor { /** * Adds a factor to this one . * From libDAI : * The sum of two factors is defined as follows : if * \ f $ f : \ prod _ { l \ in L } X _ l \ to [ 0 , \ infty ) \ f $ and \ f $ g : \ prod _ { m \ in M } X _ m \ to [ 0 , \ infty ) \ f $ , then * \ f [ f + g : \ prod _ { l \ in L \ cup ...
VarTensor newFactor = applyBinOp ( this , f , new AlgebraLambda . Add ( ) ) ; internalSet ( newFactor ) ;
public class FinishingOperationImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . FINISHING_OPERATION__FOP_TYPE : setFOpType ( FOP_TYPE_EDEFAULT ) ; return ; case AfplibPackage . FINISHING_OPERATION__REF_EDGE : setRefEdge ( REF_EDGE_EDEFAULT ) ; return ; case AfplibPackage . FINISHING_OPERATION__FOP_CNT : setFOpCnt ( FOP_CNT_EDEFAULT ) ; return ; case Afpl...
public class FullSupportScriptEngine { /** * - - - - - Compilable */ @ Override public CompiledScript compile ( String script ) throws ScriptException { } }
return ( ( Compilable ) engine ) . compile ( script ) ;
public class Resources { /** * Replaces all < code > r1 < / code > { @ link Resource } s with < code > r2 < / code > * { @ link Resource } s . * @ param r1 * @ param r2 */ public final void replace ( final List < Resource > r1 , final List < Resource > r2 ) { } }
this . resources . removeAll ( r1 ) ; this . resources . addAll ( r2 ) ;
public class ListResolverRulesResult { /** * The resolver rules that were created using the current AWS account and that match the specified filters , if any . * @ param resolverRules * The resolver rules that were created using the current AWS account and that match the specified filters , * if any . */ public v...
if ( resolverRules == null ) { this . resolverRules = null ; return ; } this . resolverRules = new java . util . ArrayList < ResolverRule > ( resolverRules ) ;
public class ImageUtil { /** * Create a new image using the supplied shape as a mask from which to cut out pixels from the * supplied image . Pixels inside the shape will be added to the final image , pixels outside * the shape will be clear . */ public static BufferedImage composeMaskedImage ( ImageCreator isrc , ...
int wid = base . getWidth ( ) ; int hei = base . getHeight ( ) ; // alternate method for composition : // 1 . create WriteableRaster with base data // 2 . test each pixel with mask . contains ( ) and set the alpha channel to fully - alpha if false // 3 . create buffered image from raster // ( I didn ' t use this method...
public class SpringWebFluxLinkBuilder { /** * Process an already - built URL just before returning it . * This method can be overridden by any subclasses that want to change this behaviour . * @ param context the execution context . * @ param link the already - built URL . * @ return the processed URL , ready t...
if ( ! ( context instanceof ISpringWebFluxContext ) ) { return link ; } final ServerWebExchange exchange = ( ( ISpringWebFluxContext ) context ) . getExchange ( ) ; return exchange . transformUrl ( link ) ;
public class EObjects { /** * Checks that the contained object is in a different resource than it ' s owner , making * it a contained proxy . * @ param owner * @ param contained * @ return true if proxy */ public static boolean isContainmentProxy ( DatabindContext ctxt , EObject owner , EObject contained ) { } ...
if ( contained . eIsProxy ( ) ) return true ; Resource ownerResource = EMFContext . getResource ( ctxt , owner ) ; Resource containedResource = EMFContext . getResource ( ctxt , contained ) ; return ownerResource != null && ownerResource != containedResource ;
public class BNFHeadersImpl { /** * Place the input int value into the outgoing cache . This will return * the buffer array as it may have changed if the cache need to be flushed . * @ param data * @ param buffers * @ return WsByteBuffer [ ] */ protected WsByteBuffer [ ] putInt ( int data , WsByteBuffer [ ] buf...
return putBytes ( GenericUtils . asBytes ( data ) , buffers ) ;
public class JobXMLDescriptorImpl { /** * Adds a new namespace * @ return the current instance of < code > JobXMLDescriptor < / code > */ public JobXMLDescriptor addNamespace ( String name , String value ) { } }
model . attribute ( name , value ) ; return this ;
public class CmsJobManagerApp { /** * Creates the edit view for the given job id . < p > * @ param jobId the id of the job to edit , or null to create a new job * @ param copy < code > true < / code > to create a copy of the given job * @ return the edit view */ public CmsJobEditView openEditDialog ( String jobId...
if ( m_dialogWindow != null ) { m_dialogWindow . close ( ) ; } m_dialogWindow = CmsBasicDialog . prepareWindow ( DialogWidth . wide ) ; CmsScheduledJobInfo job = null ; if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( jobId ) ) { job = getElement ( jobId ) ; } CmsScheduledJobInfo jobCopy ; if ( job == null ) { jobCopy...
public class DeepLearning { /** * Sanity check for Deep Learning job parameters */ private void checkParams ( ) { } }
if ( source . numCols ( ) <= 1 ) throw new IllegalArgumentException ( "Training data must have at least 2 features (incl. response)." ) ; if ( hidden == null ) throw new IllegalArgumentException ( "There must be at least one hidden layer." ) ; for ( int i = 0 ; i < hidden . length ; ++ i ) { if ( hidden [ i ] == 0 ) th...
public class DateUtils { /** * Create a new Time , with no date component . */ public static java . sql . Time newTime ( ) { } }
return new java . sql . Time ( System . currentTimeMillis ( ) % DAY_MILLIS ) ;
public class AbstractBiclustering { /** * Returns the value of the data matrix at row < code > row < / code > and column * < code > col < / code > . * @ param row the row in the data matrix according to the current order of * rows ( refers to database entry * < code > database . get ( rowIDs [ row ] ) < / code ...
iter . seek ( row ) ; return relation . get ( iter ) . doubleValue ( col ) ;
public class A_CmsTreeTabDataPreloader { /** * Loads the children of the already loaded resources . < p > * @ throws CmsException if something goes wrong */ private void loadChildren ( ) throws CmsException { } }
for ( CmsResource resource : new ArrayList < CmsResource > ( m_knownResources ) ) { if ( resource . isFolder ( ) ) { if ( ! m_mustLoadChildren . contains ( resource ) ) { continue ; } List < CmsResource > children = getChildren ( resource ) ; for ( CmsResource child : children ) { m_knownResources . add ( child ) ; m_c...
public class AbstractLockTableHandler { /** * { @ inheritDoc } */ public void cleanLocks ( ) throws SQLException { } }
ResultSet resultSet = null ; PreparedStatement preparedStatement = null ; Connection jdbcConnection = openConnection ( ) ; try { InspectionQuery query = getDeleteAllQuery ( ) ; preparedStatement = jdbcConnection . prepareStatement ( query . getStatement ( ) ) ; preparedStatement . executeUpdate ( ) ; } finally { JDBCUt...
public class DomainsInner { /** * List keys for a domain . * List the two keys used to publish to a domain . * @ param resourceGroupName The name of the resource group within the user ' s subscription . * @ param domainName Name of the domain * @ throws IllegalArgumentException thrown if parameters fail the val...
return listSharedAccessKeysWithServiceResponseAsync ( resourceGroupName , domainName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CloudFoundrySecurityService { /** * Return the URL of the UAA . * @ return the UAA url */ public String getUaaUrl ( ) { } }
if ( this . uaaUrl == null ) { try { Map < ? , ? > response = this . restTemplate . getForObject ( this . cloudControllerUrl + "/info" , Map . class ) ; this . uaaUrl = ( String ) response . get ( "token_endpoint" ) ; } catch ( HttpStatusCodeException ex ) { throw new CloudFoundryAuthorizationException ( Reason . SERVI...
public class CompilerConfigModule { /** * $ NON - NLS - 1 $ */ @ Override protected void configure ( ) { } }
VariableDecls . extend ( binder ( ) ) . declareVar ( FILE_ENCODING_NAME ) ; extend ( binder ( ) ) . addOption ( OptionMetadata . builder ( ENCODING_OPTION , MessageFormat . format ( Messages . CompilerConfigModule_0 , ENCODING_OPTION ) ) . configPath ( FILE_ENCODING_NAME ) . valueOptional ( Messages . CompilerConfigMod...
public class Limiter { /** * Merge other { @ code Limiter } object into this ( other object becomes unusable after that ) . * @ param ls other object to merge * @ return this object */ public Limiter < T > putAll ( Limiter < T > ls ) { } }
int i = 0 ; if ( ! ls . initial ) { // sorted part for ( ; i < limit ; i ++ ) { if ( ! put ( ls . data [ i ] ) ) break ; } i = limit ; } for ( ; i < ls . size ; i ++ ) { put ( ls . data [ i ] ) ; } return this ;
public class DataTracker { /** * Switch the current memtable . This atomically appends a new memtable to the end of the list of active memtables , * returning the previously last memtable . It leaves the previous Memtable in the list of live memtables until * discarding ( memtable ) is called . These two methods mu...
Memtable newMemtable = new Memtable ( cfstore ) ; Memtable toFlushMemtable ; View currentView , newView ; do { currentView = view . get ( ) ; toFlushMemtable = currentView . getCurrentMemtable ( ) ; newView = currentView . switchMemtable ( newMemtable ) ; } while ( ! view . compareAndSet ( currentView , newView ) ) ; i...
public class HttpRequestClient { /** * Parse the response and return the string from httpresponse body * @ param response * @ return String * @ throws IOException */ public static String getResult ( HttpResponse response ) throws IOException { } }
StringBuffer result = new StringBuffer ( ) ; if ( response . getEntity ( ) != null && response . getEntity ( ) . getContent ( ) != null ) { BufferedReader rd = new BufferedReader ( new InputStreamReader ( response . getEntity ( ) . getContent ( ) ) ) ; String line = "" ; while ( ( line = rd . readLine ( ) ) != null ) {...
public class ClusterManagerAvailabilityChecker { /** * Used for getting a client to the CoronaProxyJobTracker * @ param conf * @ return Returns a client to the CPJT * @ throws IOException */ public static CoronaProxyJobTrackerService . Client getPJTClient ( CoronaConf conf ) throws IOException { } }
InetSocketAddress address = NetUtils . createSocketAddr ( conf . getProxyJobTrackerThriftAddress ( ) ) ; TFramedTransport transport = new TFramedTransport ( new TSocket ( address . getHostName ( ) , address . getPort ( ) ) ) ; CoronaProxyJobTrackerService . Client client = new CoronaProxyJobTrackerService . Client ( ne...
public class SipURIImpl { /** * ( non - Javadoc ) * @ see javax . servlet . sip . SipURI # setTTLParam ( int ) */ public void setTTLParam ( int ttl ) { } }
try { getSipURI ( ) . setTTLParam ( ttl ) ; super . parameters . put ( TTL , "" + ttl ) ; } catch ( InvalidArgumentException e ) { logger . error ( "invalid argument" , e ) ; }
public class TermOfUsePanel { /** * Factory method for creating the new { @ link Component } for the salvatorius clause . This method * is invoked in the constructor from the derived classes and can be overridden so users can * provide their own version of a new { @ link Component } for the salvatorius clause . *...
return new SalvatoriusClausePanel ( id , Model . of ( model . getObject ( ) ) ) ;
public class HadoopInputFormatBase { private void writeObject ( ObjectOutputStream out ) throws IOException { } }
super . write ( out ) ; out . writeUTF ( this . mapreduceInputFormat . getClass ( ) . getName ( ) ) ; out . writeUTF ( this . keyClass . getName ( ) ) ; out . writeUTF ( this . valueClass . getName ( ) ) ; this . configuration . write ( out ) ;
public class KxPublisherActor { /** * private . remoted cancel */ public void _cancel ( int id ) { } }
if ( doOnSubscribe != null ) { doOnSubscribe . add ( ( ) -> _cancel ( id ) ) ; } else subscribers . remove ( id ) ;
public class BaasDocument { /** * Asynchronously saves this document on the server ignoring its version . * @ param acl { @ link com . baasbox . android . BaasACL } the initial acl settings * @ param handler a callback to be invoked with the result of the request * @ return a { @ link com . baasbox . android . Re...
return save ( SaveMode . IGNORE_VERSION , acl , handler ) ;
public class ExcelReader { /** * 读取Excel为Map的列表 < br > * Map表示一行 , 标题为key , 单元格内容为value * @ param headerRowIndex 标题所在行 , 如果标题行在读取的内容行中间 , 这行做为数据将忽略 * @ param startRowIndex 起始行 ( 包含 , 从0开始计数 ) * @ param endRowIndex 读取结束行 ( 包含 , 从0开始计数 ) * @ return Map的列表 */ public List < Map < String , Object > > read ( int he...
checkNotClosed ( ) ; // 边界判断 final int firstRowNum = sheet . getFirstRowNum ( ) ; final int lastRowNum = sheet . getLastRowNum ( ) ; if ( headerRowIndex < firstRowNum ) { throw new IndexOutOfBoundsException ( StrUtil . format ( "Header row index {} is lower than first row index {}." , headerRowIndex , firstRowNum ) ) ;...
public class MediaModuleGenerator { /** * Generation of community tag . * @ param m source * @ param e element to attach new element to */ private void generateCommunity ( final Metadata m , final Element e ) { } }
if ( m . getCommunity ( ) == null ) { return ; } final Element communityElement = new Element ( "community" , NS ) ; if ( m . getCommunity ( ) . getStarRating ( ) != null ) { final Element starRatingElement = new Element ( "starRating" , NS ) ; addNotNullAttribute ( starRatingElement , "average" , m . getCommunity ( ) ...
public class Graph { /** * Removes the given list of vertices and its edges from the graph . * @ param verticesToBeRemoved the list of vertices to be removed * @ return the resulted graph containing the initial vertices and edges minus the vertices * and edges removed . */ public Graph < K , VV , EV > removeVerti...
return removeVertices ( this . context . fromCollection ( verticesToBeRemoved ) ) ;
public class SelectPlan { /** * Returns a histogram that , for each field , approximates the distribution * of values from the specified histogram joining with other fields in the * specified group . * Assumes that : * < ul > * < li > Values in a bucket have the same frequency ( uniform frequency ) < / li > ...
if ( group . size ( ) < 2 ) return new Histogram ( hist ) ; List < String > flds = new ArrayList < String > ( group ) ; Collection < Bucket > jfBkts = hist . buckets ( flds . get ( 0 ) ) ; for ( int i = 1 ; i < flds . size ( ) ; i ++ ) { Collection < Bucket > temp = jfBkts ; jfBkts = new ArrayList < Bucket > ( 2 * jfBk...
public class Levenshtein { /** * Returns a new Sorensen - Dice coefficient instance with compare target string and k - shingling * @ see SorensenDice * @ param baseTarget * @ param compareTarget * @ param k * @ return */ @ SuppressWarnings ( "unchecked" ) public static < T extends Levenshtein > T sorensenDice...
return ( T ) new SorensenDice ( baseTarget , k ) . update ( compareTarget ) ;
public class FlowTypeUtils { /** * Given an array of expected record types , determine corresponding expected * field types . For example , consider the following simple Whiley snippet : * < pre > * function f ( int x ) - > { int f } : * return { f : x } * < / pre > * The expected type for the expression < ...
Type [ ] fields = new Type [ types . length ] ; for ( int i = 0 ; i != fields . length ; ++ i ) { Type . Record type = types [ i ] ; Type field = type . getField ( fieldName ) ; if ( field == null ) { if ( type . isOpen ( ) ) { field = Type . Any ; } else { return null ; } } fields [ i ] = field ; } fields = ArrayUtils...
public class GoodsAdviseCategories { /** * < p > Setter for pAdviseCategory . < / p > * @ param pAdviseCategory reference */ public final void setAdviseCategory ( final AdviseCategoryOfGs pAdviseCategory ) { } }
this . adviseCategory = pAdviseCategory ; if ( this . itsId == null ) { this . itsId = new GoodsAdviseCategoriesId ( ) ; } this . itsId . setAdviseCategory ( this . adviseCategory ) ;
public class WriterCallbacks { /** * Creates a writer callback that writes some byte array to the target stream . * < p > This writer can be used many times . * @ param data the bytes to write * @ return the writer callback */ public static WriterCallback from ( final byte [ ] data ) { } }
return new WriterCallback ( ) { @ Override public void write ( OutputStream os ) throws IOException { os . write ( data ) ; } } ;
public class ExpressionTree { /** * Processes the expression tree , including sub expressions , and returns the * results . * TODO ( cl ) - More tests around indices , etc . This can likely be cleaned up . * @ param query _ results The result set to pass to the expressions * @ return The result set or an except...
// TODO - size the array final List < DataPoints [ ] > materialized = Lists . newArrayList ( ) ; List < Integer > metric_query_keys = null ; if ( sub_metric_queries != null && sub_metric_queries . size ( ) > 0 ) { metric_query_keys = Lists . newArrayList ( sub_metric_queries . keySet ( ) ) ; Collections . sort ( metric...
public class XQuery { /** * Converts a { @ link NamedNodeMap } to a standard { @ link Map } of attributes . * @ param nnm { @ link NamedNodeMap } to convert * @ return { @ link Map } of attributes and their values */ private static @ Nonnull Map < String , String > attributesToMap ( NamedNodeMap nnm ) { } }
return IntStream . range ( 0 , nnm . getLength ( ) ) . mapToObj ( nnm :: item ) . collect ( toMap ( Node :: getNodeName , Node :: getNodeValue ) ) ;
public class LocalityPreservingCooccurrenceSpace { /** * Returns the index in the co - occurence matrix for this word . If the word * was not previously assigned an index , this method adds one for it and * returns that index . */ private final int getIndexFor ( String word ) { } }
Integer index = termToIndex . get ( word ) ; if ( index == null ) { synchronized ( this ) { // recheck to see if the term was added while blocking index = termToIndex . get ( word ) ; // if another thread has not already added this word while the // current thread was blocking waiting on the lock , then add it . if ( i...
public class TableRef { /** * Updates the provision type and provision load of the referenced table . * < pre > * StorageRef storage = new StorageRef ( " your _ app _ key " , " your _ token " ) ; * TableRef tableRef = storage . table ( " your _ table " ) ; * / / change ProvisionType * / / Note : you can ' t c...
TableMetadata tm = context . getTableMeta ( this . name ) ; if ( tm == null ) { this . meta ( new OnTableMetadata ( ) { @ Override public void run ( TableMetadata tableMetadata ) { _update ( provisionLoad , provisionType , onTableUpdate , onError ) ; } } , onError ) ; } else { this . _update ( provisionLoad , provision...
public class ServicesProcessDataEventListener { /** * helper methods */ private Integer getInteger ( String value ) { } }
int priority = 0 ; if ( value != null ) { try { priority = new Integer ( value ) ; } catch ( NumberFormatException e ) { // do nothing } } return priority ;
public class AdaptiveTableLayout { /** * Refresh current column header view holder . * @ param holder current view holder */ private void refreshHeaderColumnViewHolder ( ViewHolder holder ) { } }
int left = getEmptySpace ( ) + mManager . getColumnsWidth ( 0 , Math . max ( 0 , holder . getColumnIndex ( ) ) ) ; if ( ! isRTL ( ) ) { left += mManager . getHeaderRowWidth ( ) ; } int top = mSettings . isHeaderFixed ( ) ? 0 : - mState . getScrollY ( ) ; View view = holder . getItemView ( ) ; int leftMargin = holder . ...
public class BrowserProxyQueueImpl { /** * Closes the proxy queue . * @ see com . ibm . ws . sib . comms . client . proxyqueue . BrowserProxyQueue # close ( ) */ public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; if ( ! closed ) { // begin D249096 convHelper . closeSession ( ) ; queue . purge ( proxyQueueId ) ; owningGroup . notifyClose ( this ) ; closed = true ; // end D249096 } if ( TraceComponent . isAnyTracingEnabled ...
public class DerbyDatabase { /** * { @ inheritDoc } */ @ Override public DerbyDatabase createTable ( final Connection _con , final String _table /* final String _ parentTable */ ) throws SQLException { } }
final Statement stmt = _con . createStatement ( ) ; try { // create table itself final StringBuilder cmd = new StringBuilder ( ) . append ( "create table " ) . append ( _table ) . append ( " (" ) . append ( " ID bigint not null" ) ; /* TODO / / auto increment if ( _ parentTable = = null ) { cmd . append ( " gene...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcCoveringTypeEnum ( ) { } }
if ( ifcCoveringTypeEnumEEnum == null ) { ifcCoveringTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 804 ) ; } return ifcCoveringTypeEnumEEnum ;
public class ImportExportPortletController { /** * Display the entity export form view . * @ param request * @ return */ @ RequestMapping ( params = "action=export" ) public ModelAndView getExportView ( PortletRequest request ) { } }
Map < String , Object > model = new HashMap < String , Object > ( ) ; // add a list of all permitted export types final Iterable < IPortalDataType > exportPortalDataTypes = this . portalDataHandlerService . getExportPortalDataTypes ( ) ; final List < IPortalDataType > types = getAllowedTypes ( request , IPermission . E...
public class WordShapeClassifier { /** * Returns true if the specified word shaper doesn ' t use * known lower case words , even if a list of them is present . * This is used for backwards compatibility . It is suggested that * new word shape functions are either passed a non - null list of * lowercase words or...
return shape == WORDSHAPEDAN2 || shape == WORDSHAPEDAN2BIO || shape == WORDSHAPEJENNY1 || shape == WORDSHAPECHRIS2 || shape == WORDSHAPECHRIS3 ;
public class OracleDdlParser { /** * Parses DDL CREATE PROCEDURE statement * @ param tokens the tokenized { @ link DdlTokenStream } of the DDL input content ; may not be null * @ param parentNode the parent { @ link AstNode } node ; may not be null * @ return the parsed CREATE PROCEDURE statement node * @ throw...
assert tokens != null ; assert parentNode != null ; markStartOfStatement ( tokens ) ; /* CREATE [ OR REPLACE ] PROCEDURE [ schema . ] procedure _ name [ ( parameter _ declaration [ , parameter _ declaration ] ) ] [ AUTHID { CURRENT _ USER | DEFINER ] { IS | AS } { [ declare _ section ] body | call _ spec | EXTE...
public class OgmTableGenerator { /** * Determine the name of the column used to indicate the segment for each * row . This column acts as the primary key . * Called during { @ link # configure configuration } . * @ param params The params supplied in the generator config ( plus some standard useful extras ) . *...
ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params . get ( PersistentIdentifierGenerator . IDENTIFIER_NORMALIZER ) ; String name = ConfigurationHelper . getString ( SEGMENT_COLUMN_PARAM , params , DEF_SEGMENT_COLUMN ) ; return normalizer . toDatabaseIdentifierText ( name ) ;
public class AlphaPartitionedIndex { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . ResourceIndex # query ( org . archive . wayback . core . WaybackRequest ) */ public SearchResults query ( WaybackRequest wbRequest ) throws ResourceIndexNotAvailableException , ResourceNotInArchiveException , BadQueryEx...
RangeGroup group = getRangeGroupForRequest ( wbRequest ) ; return group . query ( wbRequest ) ;
public class Damages { /** * Set the minimum damage value . Max set to min value if over . * @ param min The minimum damage value ( must be positive ) . */ public void setMin ( int min ) { } }
this . min = UtilMath . clamp ( min , 0 , Integer . MAX_VALUE ) ; max = UtilMath . clamp ( max , this . min , Integer . MAX_VALUE ) ;
public class ExtrasPatternParser { /** * Parse a format specifier . * @ param pattern pattern to parse . * @ param patternConverters list to receive pattern converters . * @ param formattingInfos list to receive field specifiers corresponding to pattern converters . * @ param converterRegistry map of user - sup...
if ( pattern == null ) { throw new NullPointerException ( "pattern" ) ; } StringBuffer currentLiteral = new StringBuffer ( 32 ) ; int patternLength = pattern . length ( ) ; int state = LITERAL_STATE ; char c ; int i = 0 ; ExtrasFormattingInfo formattingInfo = ExtrasFormattingInfo . getDefault ( ) ; while ( i < patternL...
public class WebApplicationHandler { private FilterChain getChainForPath ( int requestType , String pathInContext , ServletHolder servletHolder ) { } }
if ( _filterChainsCached ) { synchronized ( this ) { if ( _chainCache [ requestType ] . containsKey ( pathInContext ) ) return ( FilterChain ) _chainCache [ requestType ] . get ( pathInContext ) ; } } // Build list of filters Object filters = null ; // Path filters for ( int i = 0 ; i < _pathFilters . size ( ) ; i ++ )...
public class ComputeNodesImpl { /** * Restarts the specified compute node . * You can restart a node only if it is in an idle or running state . * @ param poolId The ID of the pool that contains the compute node . * @ param nodeId The ID of the compute node that you want to restart . * @ param nodeRebootOption ...
rebootWithServiceResponseAsync ( poolId , nodeId , nodeRebootOption , computeNodeRebootOptions ) . toBlocking ( ) . single ( ) . body ( ) ;
public class DrawerBuilder { /** * Call this method to append a new DrawerBuilder to a existing Drawer . * @ param result the Drawer . Result of an existing Drawer * @ return */ public Drawer append ( @ NonNull Drawer result ) { } }
if ( mUsed ) { throw new RuntimeException ( "you must not reuse a DrawerBuilder builder" ) ; } if ( mDrawerGravity == null ) { throw new RuntimeException ( "please set the gravity for the drawer" ) ; } // set that this builder was used . now you have to create a new one mUsed = true ; mAppended = true ; // get the draw...
public class hqlParser { /** * hql . g : 564:1 : whenClause : ( WHEN ^ logicalExpression THEN ! expression ) ; */ public final hqlParser . whenClause_return whenClause ( ) throws RecognitionException { } }
hqlParser . whenClause_return retval = new hqlParser . whenClause_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token WHEN216 = null ; Token THEN218 = null ; ParserRuleReturnScope logicalExpression217 = null ; ParserRuleReturnScope expression219 = null ; CommonTree WHEN216_tree = null ; Co...
public class MappedField { /** * Gets the value of the field mapped on the instance given . * @ param instance the instance to use * @ return the value stored in the java field */ public Object getFieldValue ( final Object instance ) { } }
try { return field . get ( instance ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; }
public class CmsInlineEntityWidget { /** * Initializes the button styling . < p > */ private void initButtons ( ) { } }
m_addButton . addChoice ( m_attributeHandler . getWidgetService ( ) , new CmsChoiceMenuEntryBean ( m_attributeHandler . getAttributeName ( ) ) , new AsyncCallback < CmsChoiceMenuEntryBean > ( ) { public void onFailure ( Throwable caught ) { // will not be called } public void onSuccess ( CmsChoiceMenuEntryBean selected...
public class AttributeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Attribute attribute , ProtocolMarshaller protocolMarshaller ) { } }
if ( attribute == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( attribute . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( attribute . getScore ( ) , SCORE_BINDING ) ; protocolMarshaller . marshall ( attribute . getRelation...
public class RESTCatalog { /** * - - - - - Private methods */ private void addOwner ( UNode ownerNode ) { } }
String ownerName = ownerNode . getName ( ) ; SortedMap < String , RESTCommand > ownerMap = new TreeMap < > ( ) ; m_cmdsByOwnerMap . put ( ownerName , ownerMap ) ; for ( UNode cmdNode : ownerNode . getMemberList ( ) ) { RESTCommand cmd = RESTCommand . fromUNode ( cmdNode ) ; ownerMap . put ( cmd . getName ( ) , cmd ) ; ...
public class PoolDisableAutoScaleHeaders { /** * Set the time at which the resource was last modified . * @ param lastModified the lastModified value to set * @ return the PoolDisableAutoScaleHeaders object itself . */ public PoolDisableAutoScaleHeaders withLastModified ( DateTime lastModified ) { } }
if ( lastModified == null ) { this . lastModified = null ; } else { this . lastModified = new DateTimeRfc1123 ( lastModified ) ; } return this ;