signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DefaultEventStudio { /** * Adds a { @ link Listener } to the hidden station listening for the given event class , hiding the station abstraction . * @ see EventStudio # add ( Class , Listener , String ) * @ see DefaultEventStudio # HIDDEN _ STATION */ public < T > void add ( Class < T > eventClass , Li...
add ( eventClass , listener , HIDDEN_STATION ) ;
public class SerializerIntrinsics { /** * Dot Product of Packed SP - FP Values ( SSE4.1 ) . */ public final void dpps ( XMMRegister dst , Mem src , Immediate imm8 ) { } }
emitX86 ( INST_DPPS , dst , src , imm8 ) ;
public class A_CmsSelectResourceList { /** * The following columns are visible by default : type icon , resource name , title and last modification date . < p > * Override this to set different column visibilities . < p > * @ see org . opencms . workplace . list . A _ CmsListExplorerDialog # isColumnVisible ( int )...
if ( colFlag == LIST_COLUMN_TYPEICON . hashCode ( ) ) { return true ; } if ( colFlag == LIST_COLUMN_NAME . hashCode ( ) ) { return true ; } if ( colFlag == CmsUserSettings . FILELIST_TITLE ) { return true ; } if ( colFlag == CmsUserSettings . FILELIST_DATE_LASTMODIFIED ) { return true ; } return false ;
public class Trajectory { /** * Converts the positions to a 2D double array * @ return 2d double array [ i ] [ j ] , i = Time index , j = coordinate index */ public double [ ] [ ] getPositionsAsArray ( ) { } }
double [ ] [ ] posAsArr = new double [ size ( ) ] [ 3 ] ; for ( int i = 0 ; i < size ( ) ; i ++ ) { if ( get ( i ) != null ) { posAsArr [ i ] [ 0 ] = get ( i ) . x ; posAsArr [ i ] [ 1 ] = get ( i ) . y ; posAsArr [ i ] [ 2 ] = get ( i ) . z ; } else { posAsArr [ i ] = null ; } } return posAsArr ;
public class JobGraphContext { /** * Gets the vertex at a particular point , or null if it does not exist . * @ param point2D * @ return */ public Object getVertex ( final Point2D point2D ) { } }
final GraphElementAccessor < ? , ? > pickSupport = _visualizationViewer . getPickSupport ( ) ; @ SuppressWarnings ( "rawtypes" ) final Layout graphLayout = _visualizationViewer . getModel ( ) . getGraphLayout ( ) ; @ SuppressWarnings ( "unchecked" ) final Object vertex = pickSupport . getVertex ( graphLayout , point2D ...
public class FileColumn { /** * Converts the given milliseconds date value to the output date format . * @ param dt The date to be formatted * @ param format The format to use for the date * @ return The formatted date */ private String convertDateTime ( long dt , String format ) { } }
if ( format . length ( ) == 0 ) format = Formats . DATETIME_FORMAT ; return FormatUtilities . getFormattedDateTime ( dt , format , false , 0L ) ;
public class HdfsStatsKeyConverter { /** * Handles splitting the encoded hdfsStats key * @ param rawKey byte encoded representation of the path key * @ return */ static byte [ ] [ ] splitHdfsStatsKey ( byte [ ] rawKey ) { } }
byte [ ] [ ] splits = ByteUtil . split ( rawKey , HdfsConstants . SEP_BYTES , HdfsConstants . NUM_HDFS_USAGE_ROWKEY_COMPONENTS ) ; return splits ;
public class Cache { /** * A put with only the key , value provided acts as an update to the cache and * the entry retains the same creation time to live in the cache . * To do an insert action to the cache , see put ( key , value , int , int , int , Object ) . */ @ Override public Object put ( String key , Object ...
return update ( String . valueOf ( key ) , value ) ;
public class SimpleDbRepositoryFactory { /** * ( non - Javadoc ) * @ see org . springframework . data . repository . support . RepositoryFactorySupport # getEntityInformation ( java . lang . Class ) */ @ Override @ SuppressWarnings ( "unchecked" ) public < T , ID extends Serializable > SimpleDbEntityInformation < T ,...
String simpleDbDomain = simpleDbOperations . getSimpleDb ( ) . getSimpleDbDomain ( ) . getDomain ( domainClass ) ; return ( SimpleDbEntityInformation < T , ID > ) SimpleDbEntityInformationSupport . getMetadata ( domainClass , simpleDbDomain ) ;
public class HyperionClient { /** * Build the query string for the specified request * @ param request the data service request * @ return The query string */ protected String buildQueryString ( Request request ) { } }
MultiMap resolvedParameters = null ; if ( parameterFactory != null ) { resolvedParameters = parameterFactory . getParameters ( ) ; } if ( hasEntries ( resolvedParameters ) ) resolvedParameters = resolvedParameters . merge ( request . getParameters ( ) ) ; else resolvedParameters = request . getParameters ( ) ; if ( aut...
public class FessMessages { /** * Add the created action message for the key ' errors . login _ error ' with parameters . * < pre > * message : Username or Password is not correct . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ public FessMessa...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_login_error ) ) ; return this ;
public class LeaderBoard { /** * Create a map of information that describes how to write pipeline output to BigQuery . This map * is passed to the { @ link WriteToBigQuery } constructor to write user score sums . */ protected static Map < String , WriteToBigQuery . FieldInfo < KV < String , Integer > > > configureBig...
Map < String , WriteToBigQuery . FieldInfo < KV < String , Integer > > > tableConfigure = new HashMap < > ( ) ; tableConfigure . put ( "user" , new WriteToBigQuery . FieldInfo < > ( "STRING" , ( c , w ) -> c . element ( ) . getKey ( ) ) ) ; tableConfigure . put ( "total_score" , new WriteToBigQuery . FieldInfo < > ( "I...
public class CSVDirConfiguration { /** * Determine if all the values are valid . * @ throws IllegalArgumentException if encoding or fileMask or sourcePath or keyColumnName or passwordColumnName or * deleteColumnName or fields is blank or null . * @ throws IllegalStateException if the text qualifier and field deli...
// make sure the encoding is set . . if ( this . encoding == null ) { throw new IllegalArgumentException ( "File encoding must not be null!" ) ; } // make sure it ' s a valid charset Charset . forName ( this . encoding ) ; // make sure the delimiter and the text qualifier are not the same . . if ( this . textQualifier ...
public class TransliteratorParser { /** * Return the standin for segment seg ( 1 - based ) . */ public char getSegmentStandin ( int seg ) { } }
if ( segmentStandins . length ( ) < seg ) { segmentStandins . setLength ( seg ) ; } char c = segmentStandins . charAt ( seg - 1 ) ; if ( c == 0 ) { if ( variableNext >= variableLimit ) { throw new RuntimeException ( "Variable range exhausted" ) ; } c = variableNext ++ ; // Set a placeholder in the master variables vect...
public class PluginRepositoryUtil { /** * Loads the plugins definitions from the jnrpe _ plugins . xml file . * @ param cl Classloader to be used to load classes * @ param in InputStream to the jnrpe _ plugins . xml file * @ return a collection of all the declared plugins * @ throws PluginConfigurationException...
List < PluginDefinition > res = new ArrayList < PluginDefinition > ( ) ; DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; Document document ; try { DocumentBuilder loader = factory . newDocumentBuilder ( ) ; DOMReader reader = new DOMReader ( ) ; document = reader . read ( loader . parse ( in...
public class MSPDIReader { /** * This method extracts data for a single assignment from an MSPDI file . * @ param assignment Assignment data * @ param splitFactory split task handling * @ param normaliser timephased resource assignment normaliser */ private void readAssignment ( Project . Assignments . Assignment...
BigInteger taskUID = assignment . getTaskUID ( ) ; BigInteger resourceUID = assignment . getResourceUID ( ) ; if ( taskUID != null && resourceUID != null ) { Task task = m_projectFile . getTaskByUniqueID ( Integer . valueOf ( taskUID . intValue ( ) ) ) ; if ( task != null ) { Resource resource = m_projectFile . getReso...
public class UfsJournalFile { /** * Decodes a checkpoint or a log file name into a { @ link UfsJournalFile } . * @ param journal the UFS journal instance * @ param filename the filename * @ return the instance of { @ link UfsJournalFile } , null if the file invalid */ @ Nullable static UfsJournalFile decodeLogFil...
URI location = URIUtils . appendPathOrDie ( journal . getLogDir ( ) , filename ) ; try { String [ ] parts = filename . split ( "-" ) ; // There can be temporary files in logs directory . Skip them . if ( parts . length != 2 ) { return null ; } long start = Long . decode ( parts [ 0 ] ) ; long end = Long . decode ( part...
public class AbstractHttpCommandCodec { /** * Defines a new command mapping . * @ param name The command name . * @ param method The HTTP method to use for the command . * @ param pathPattern The URI path pattern for the command . When encoding a command , each * path segment prefixed with a " : " will be repla...
defineCommand ( name , new CommandSpec ( method , pathPattern ) ) ;
public class BaseValidator { /** * Test a rule and add a { @ link IssueSeverity # WARNING } validation message if the validation fails * @ param thePass * Set this parameter to < code > false < / code > if the validation does not pass * @ return Returns < code > thePass < / code > ( in other words , returns < cod...
if ( ! thePass ) { String path = toPath ( pathParts ) ; String message = formatMessage ( theMessage , theMessageArguments ) ; addValidationMessage ( errors , type , - 1 , - 1 , path , message , IssueSeverity . INFORMATION ) ; } return thePass ;
public class EnglishTreebankParserParams { /** * quite heuristic , but not useless given tagging errors ? */ private static String deduceTag ( String w ) { } }
String word = w . toLowerCase ( ) ; if ( word . endsWith ( "ing" ) ) { return "VBG" ; } else if ( word . endsWith ( "d" ) || word . endsWith ( "t" ) ) { return "VBN" ; } else if ( word . endsWith ( "s" ) ) { return "VBZ" ; } else if ( word . equals ( "to" ) ) { return "TO" ; } else { return "VB" ; }
public class EntityFieldAnnotationRule { /** * Validate for generator . * @ param clazz * @ param field * @ param generatedValue * @ param schemaName * @ throws RuleValidationException */ private void checkForGenerator ( final Class < ? > clazz , Field field , GeneratedValue generatedValue , String schemaName...
TableGenerator tableGenerator = field . getAnnotation ( TableGenerator . class ) ; SequenceGenerator sequenceGenerator = field . getAnnotation ( SequenceGenerator . class ) ; if ( tableGenerator == null || ! tableGenerator . name ( ) . equals ( generatedValue . generator ( ) ) ) { tableGenerator = clazz . getAnnotation...
public class Mediawiki { /** * get the siteinfo * @ return the siteinfo * @ throws Exception */ public SiteInfo getSiteInfo ( ) throws Exception { } }
if ( siteinfo == null ) { Api api = getQueryResult ( "&meta=siteinfo&siprop=general%7Cnamespaces" ) ; Query query = api . getQuery ( ) ; setUpSiteInfo ( query ) ; } return siteinfo ;
public class XMLValidator { /** * Sets the DTD for an xml file . If there are any entities then they are removed . This function will also add the preamble to the XML * if it doesn ' t exist . * @ param xml The XML to add the DTD for . * @ param dtdFileName The file / url name of the DTD . * @ param dtdRootEleN...
// Check if the XML already has a DOCTYPE . If it does then replace the values and remove entities for processing final Matcher matcher = DOCTYPE_PATTERN . matcher ( xml ) ; if ( matcher . find ( ) ) { String preamble = matcher . group ( "Preamble" ) ; String name = matcher . group ( "Name" ) ; String systemId = matche...
public class AbstractClientConnector { /** * Release the current push listener , which blocks the sending queue . * Does nothing in case that the push listener is not active . */ protected void release ( ) { } }
if ( ! releaseNeeded . get ( ) ) { return ; // there is no point in releasing if we do not wait . Avoid excessive releasing . } releaseNeeded . set ( false ) ; // release is under way backgroundExecutor . execute ( new Runnable ( ) { @ Override public void run ( ) { try { List < Command > releaseCommandList = new Array...
public class JAASServiceImpl { /** * Look at the login module pids required by the context entry : * < ul > * < li > If there are no module pids , and the entry id is not one of the defaults , issue a warning . * < li > If there are module pids , and some can ' t be found , add the entry to the pending list . *...
String id = ( String ) ref . getProperty ( KEY_ID ) ; String [ ] modulePids = ( String [ ] ) ref . getProperty ( JAASLoginContextEntry . CFG_KEY_LOGIN_MODULE_REF ) ; boolean changedEntryContext = false ; if ( modulePids == null || modulePids . length == 0 ) { // There are no modules specified if ( JAASConfigurationImpl...
public class WField { /** * Gets the label text ( if label exists ) else returns < code > null < / code > . * @ return the text of the label component of this field . */ public String getLabelText ( ) { } }
String text = null ; if ( label != null ) { text = label . getText ( ) ; } return text ;
public class IdentityMap { /** * Returns an iterator for the values in the map . Remove is supported . Note that the same iterator instance is returned each * time this method is called . Use the { @ link Entries } constructor for nested or multithreaded iteration . */ public Values < V > values ( ) { } }
if ( values == null ) values = new Values ( this ) ; else values . reset ( ) ; return values ;
public class StopwatchTimeRange { /** * Compute variance . * @ return variance */ public Double getVariance ( ) { } }
if ( counter == 0 ) { return Double . NaN ; } else { final double mean = computeMean ( ) ; final double meanSquare = mean * mean ; final double squareMean = ( ( double ) squareTotal ) / counter ; return squareMean - meanSquare ; }
public class ExamplePicker { /** * Override preparePaint in order to set up the resources on first access by a user . * @ param request the request being responded to . */ @ Override protected void preparePaintComponent ( final Request request ) { } }
super . preparePaintComponent ( request ) ; if ( ! isInitialised ( ) ) { // Check project versions for Wcomponents - examples and WComponents match String egVersion = Config . getInstance ( ) . getString ( "wcomponents-examples.version" ) ; String wcVersion = WebUtilities . getProjectVersion ( ) ; if ( egVersion != nul...
public class GLINEImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GLINE__RG : return rg != null && ! rg . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
public class EchoUntilQuit { /** * The main method . * @ param args the arguments * @ throws InterruptedException the interrupted exception */ public static void main ( String [ ] args ) throws InterruptedException { } }
Channel mainChannel = new NamedChannel ( "main" ) ; EchoUntilQuit app = new EchoUntilQuit ( mainChannel ) ; app . attach ( new InputStreamMonitor ( mainChannel , System . in ) ) ; Components . start ( app ) ; Components . awaitExhaustion ( ) ;
public class SmartBinder { /** * Terminate this binder by looking up the named virtual method on the * first argument ' s type . Perform the actual method lookup using the given * Lookup object . If the lookup fails , a RuntimeException will be raised , * containing the actual reason . This method is for convenie...
return new SmartHandle ( start , binder . invokeVirtualQuiet ( lookup , name ) ) ;
public class ReflectUtil { /** * Checks package access on the given class . * If it is a { @ link Proxy # isProxyClass ( java . lang . Class ) } that implements * a non - public interface ( i . e . may be in a non - restricted package ) , * also check the package access on the proxy interfaces . */ public static ...
checkPackageAccess ( clazz . getName ( ) ) ; if ( isNonPublicProxyClass ( clazz ) ) { checkProxyPackageAccess ( clazz ) ; }
public class JobScheduleGetOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has been modified since the specified time . * @ param ifModifiedSince the ifModifiedSince value to set * @ return th...
if ( ifModifiedSince == null ) { this . ifModifiedSince = null ; } else { this . ifModifiedSince = new DateTimeRfc1123 ( ifModifiedSince ) ; } return this ;
public class GVRShaderManager { /** * Retrieves the Material Shader ID associated with the * given shader template class . * A shader template is capable of generating multiple variants * from a single shader source . The exact vertex and fragment * shaders are generated by GearVRF based on the lights * being...
GVRShaderId shaderId = mShaderTemplates . get ( shaderClass ) ; if ( shaderId == null ) { GVRContext ctx = getGVRContext ( ) ; shaderId = new GVRShaderId ( shaderClass ) ; mShaderTemplates . put ( shaderClass , shaderId ) ; shaderId . getTemplate ( ctx ) ; } return shaderId ;
public class KerasActivationUtils { /** * Get activation function from Keras layer configuration . * @ param layerConfig dictionary containing Keras layer configuration * @ return DL4J activation function * @ throws InvalidKerasConfigurationException Invalid Keras config * @ throws UnsupportedKerasConfiguration...
return getActivationFromConfig ( layerConfig , conf ) . getActivationFunction ( ) ;
public class JFXDepthManager { /** * this method will generate a new container node that prevent * control transformation to be applied to the shadow effect * ( which makes it looks as a real shadow ) */ public static Node createMaterialNode ( Node control , int level ) { } }
Node container = new Pane ( control ) { @ Override protected double computeMaxWidth ( double height ) { return computePrefWidth ( height ) ; } @ Override protected double computeMaxHeight ( double width ) { return computePrefHeight ( width ) ; } @ Override protected double computePrefWidth ( double height ) { return co...
public class ObserverMethodImpl { /** * Note that { @ link CreationalContext # release ( ) } is not invoked within this method . * @ param event * @ param receiver * @ param creationalContext */ protected void sendEvent ( T event , Object receiver , CreationalContext < ? > creationalContext ) { } }
try { preNotify ( event , receiver ) ; // As we are working with the contextual instance , we may not have the // actual object , but a container proxy ( e . g . EJB ) notificationStrategy . invoke ( receiver , observerMethod , event , beanManager , creationalContext ) ; } finally { postNotify ( event , receiver ) ; }
public class SchemaTool { /** * Creates a new managed schema , or migrates an existing one if one exists for * the table name , entity name pair . * @ param tableName * The name of the table we ' ll be creating or migrating a schema for . * @ param entitySchemaString * The entity schema * @ param createTabl...
boolean migrationRequired = prepareManagedSchema ( tableName , entitySchemaString ) ; if ( migrationRequired && createTableAndFamilies ) { try { HTableDescriptor descriptor = prepareTableDescriptor ( tableName , entitySchemaString ) ; if ( hbaseAdmin . isTableAvailable ( tableName ) ) { modifyTable ( tableName , descri...
public class AuthenticationService { /** * Returns all UserContexts associated with the given AuthenticatedUser , * updating existing UserContexts , if any . If no UserContexts are yet * associated with the given AuthenticatedUser , new UserContexts are * generated by polling each available AuthenticationProvider...
List < DecoratedUserContext > userContexts = new ArrayList < DecoratedUserContext > ( authProviders . size ( ) ) ; // If UserContexts already exist , update them and add to the list if ( existingSession != null ) { // Update all old user contexts List < DecoratedUserContext > oldUserContexts = existingSession . getUser...
public class CombinedIntGenerator { /** * Compute the minimum and maximum . */ private void updateMinMax ( ) { } }
min = Integer . MAX_VALUE ; max = Integer . MIN_VALUE ; if ( generators . isEmpty ( ) ) { return ; // Keep invalid . } for ( IntGenerator gen : generators ) { final int mi = gen . getMin ( ) , ma = gen . getMax ( ) ; if ( mi > ma ) { continue ; } min = mi < min ? mi : min ; max = ma > max ? ma : max ; }
public class ReIndexWorkItemList { /** * Add a unique item to the list . * @ param aItem * The item to be added . May not be < code > null < / code > . * @ throws IllegalStateException * If an item with the same ID is already contained */ public void addItem ( @ Nonnull final ReIndexWorkItem aItem ) throws Ille...
ValueEnforcer . notNull ( aItem , "Item" ) ; m_aRWLock . writeLocked ( ( ) -> { internalCreateItem ( aItem ) ; } ) ; LOGGER . info ( "Added " + aItem . getLogText ( ) + " to re-try list for retry #" + ( aItem . getRetryCount ( ) + 1 ) ) ;
public class CreateBuilderImpl { /** * Attempt to find the znode that matches the given path and protected id * @ param children a list of candidates znodes * @ param path the path * @ param protectedId the protected id * @ return the absolute path of the znode or < code > null < / code > if it is not found */ ...
final String protectedPrefix = getProtectedPrefix ( protectedId ) ; String foundNode = Iterables . find ( children , new Predicate < String > ( ) { @ Override public boolean apply ( String node ) { return node . startsWith ( protectedPrefix ) ; } } , null ) ; if ( foundNode != null ) { foundNode = ZKPaths . makePath ( ...
public class TokenScanner { /** * ( SPC + | LF ) */ private boolean endspc ( ) throws IOException { } }
byte ych = parser . buffer . buffer [ parser . cursor ] ; switch ( ych ) { case ' ' : parser . cursor ++ ; while ( true ) { if ( parser . cursor == parser . limit ) parser . read ( ) ; if ( parser . buffer . buffer [ parser . cursor ] != ' ' ) return true ; parser . cursor ++ ; } case '\r' : if ( parser . buffer . buff...
public class StylesheetUserPreferencesTransformerConfigurationSource { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . rendering . xslt . TransformerConfigurationSource # getTransformerConfigurationKey ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) */ @ Over...
final CacheKeyBuilder < String , String > cacheKeyBuilder = CacheKey . builder ( getName ( ) ) ; final PreferencesScope stylesheetPreferencesScope = this . getStylesheetPreferencesScope ( request ) ; this . stylesheetUserPreferencesService . populateStylesheetParameters ( request , stylesheetPreferencesScope , cacheKey...
public class SourceMapResolver { /** * For a given / / # sourceMappingUrl , this locates the appropriate sourcemap on disk . This is use * for sourcemap merging ( - - apply _ input _ source _ maps ) and for error resolution . */ static SourceFile extractSourceMap ( SourceFile jsFile , String sourceMapURL , boolean pa...
// Javascript version of the compiler can only deal with inline sources . if ( sourceMapURL . startsWith ( BASE64_URL_PREFIX ) ) { byte [ ] data = BaseEncoding . base64 ( ) . decode ( sourceMapURL . substring ( BASE64_URL_PREFIX . length ( ) ) ) ; String source = new String ( data , StandardCharsets . UTF_8 ) ; return ...
public class RestClientUtil { /** * 根据路径更新文档 * For Elasticsearch 7 and 7 + * https : / / www . elastic . co / guide / en / elasticsearch / reference / current / docs - update . html * @ param index test / _ doc / 1 * test / _ doc / 1 / _ update * @ param id * @ param params * @ param refreshOption * ref...
return updateDocument ( index , ( String ) null , id , params , refreshOption , detect_noop , doc_as_upsert ) ;
public class base_resource { /** * Use this method to perform a modify operation on multiple MPS resources . * @ param service nitro _ service object . * @ return status of the operation performed . * @ throws Exception */ protected static base_resource [ ] update_bulk_request ( nitro_service service , base_resou...
if ( ! service . isLogin ( ) ) service . login ( ) ; String objtype = resources [ 0 ] . get_object_type ( ) ; String onerror = service . get_onerror ( ) ; // String id = service . get _ sessionid ( ) ; String request = service . get_payload_formatter ( ) . resource_to_string ( resources , null , onerror ) ; String resu...
public class DescriptorExtensionList { /** * Loading the descriptors in this case means filtering the descriptor from the master { @ link ExtensionList } . */ @ Override protected List < ExtensionComponent < D > > load ( ) { } }
if ( jenkins == null ) { // Should never happen on the real instance LOGGER . log ( Level . WARNING , "Cannot load extension components, because Jenkins instance has not been assigned yet" ) ; return Collections . emptyList ( ) ; } return _load ( getDescriptorExtensionList ( ) . getComponents ( ) ) ;
public class TimeBasedRoller { /** * Not thread - safe . * @ see FileRollable # roll ( org . apache . log4j . spi . LoggingEvent ) */ public final boolean roll ( final LoggingEvent loggingEvent ) { } }
boolean rolled = false ; this . takeTimeSample ( loggingEvent ) ; final long nextRolloverTime = this . getNextRolloverTimeMillis ( ) ; if ( this . isRolloverDue ( nextRolloverTime ) ) { super . roll ( this . sampledTime ( ) ) ; this . updateNextRolloverTime ( ) ; rolled = true ; } this . storeTimeSample ( ) ; return ro...
public class JCalendarButton { /** * Creates new CalendarButton . * @ param strDateParam The name of the date property ( defaults to " date " ) . * @ param dateTarget The initial date for this button . * @ param strLanguage The language to use . */ public void init ( String strDateParam , Date dateTarget , String...
if ( strDateParam == null ) strDateParam = JCalendarPopup . DATE_PARAM ; dateParam = strDateParam ; targetDate = dateTarget ; languageString = strLanguage ;
public class MPD9DatabaseReader { /** * Select the project properties from the database . * @ throws SQLException */ private void processProjectProperties ( ) throws SQLException { } }
List < ResultSetRow > rows = getRows ( "SELECT * FROM MSP_PROJECTS WHERE PROJ_ID=?" , m_projectID ) ; if ( rows . isEmpty ( ) == false ) { processProjectProperties ( rows . get ( 0 ) ) ; }
public class KAMStoreImpl { /** * { @ inheritDoc } */ @ Override public Namespace getNamespace ( final Kam kam , final String resloc ) { } }
if ( kam == null ) throw new InvalidArgument ( "kam" , kam ) ; if ( noLength ( resloc ) ) throw new InvalidArgument ( "missing resource location" ) ; if ( ! exists ( kam ) ) return null ; List < Namespace > namespaces = getNamespaces ( kam ) ; for ( final Namespace namespace : namespaces ) { final String nrl = namespac...
public class AnnotationAnalyzer { /** * Calls a method with no arguments using reflection and maps all errors into a runtime exception . * @ param obj * The object the underlying method is invoked from - Cannot be < code > null < / code > . * @ param methodName * Name of the Method - Cannot be < code > null < /...
return ( T ) invoke ( obj , methodName , null , null ) ;
public class MasterWebUIMetrics { /** * Sets ufs ops . * @ param UfsOps the ufs ops * @ return the ufs ops */ public MasterWebUIMetrics setUfsOps ( Map < String , Map < String , Long > > UfsOps ) { } }
mUfsOps = UfsOps ; return this ;
public class ST_Rotate { /** * Rotates a geometry by a given angle ( in radians ) about the specified * point at ( x0 , y0 ) . * @ param geom Geometry * @ param theta Angle * @ param x0 x - coordinate of point about which to rotate * @ param y0 y - coordinate of point about which to rotate * @ return The ge...
if ( geom != null ) { return AffineTransformation . rotationInstance ( theta , x0 , y0 ) . transform ( geom ) ; } else { return null ; }
public class Matrix4f { /** * Set the value of the matrix element at column 2 and row 3. * @ param m23 * the new value * @ return this */ public Matrix4f m23 ( float m23 ) { } }
this . m23 = m23 ; if ( m23 != 0.0f ) properties &= ~ ( PROPERTY_IDENTITY | PROPERTY_AFFINE | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL ) ; return this ;
public class Boxing { /** * Returns any multidimensional array into an array of boxed values . * @ param resultType target type * @ param src source array * @ return multidimensional array */ public static Object [ ] deepBox ( Class < ? > resultType , final Object src ) { } }
Class < ? > compType = resultType . getComponentType ( ) ; if ( compType . isArray ( ) ) { final Object [ ] src2 = ( Object [ ] ) src ; final Object [ ] result = ( Object [ ] ) newArray ( compType , src2 . length ) ; for ( int i = 0 ; i < src2 . length ; i ++ ) { result [ i ] = deepBox ( compType , src2 [ i ] ) ; } ret...
public class ConverterManagerImpl { /** * Add a { @ link Converter } to this < code > ConverterManager < / code > . * @ param fromClass The class the < code > Converter < / code > should be used to convert from . * @ param syntax The LDAP syntax that the < code > Converter < / code > should be used for . * @ para...
converters . put ( makeConverterKey ( fromClass , syntax , toClass ) , converter ) ;
public class Parser { /** * consume current token ( get next token ) ; throw exception if the current token doesn ' t * match the expected symbol . */ protected final Token consumeToken ( Symbol expected ) throws ScanException , ParseException { } }
if ( token . getSymbol ( ) != expected ) { fail ( expected ) ; } return consumeToken ( ) ;
public class GetDatasetContentRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDatasetContentRequest getDatasetContentRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDatasetContentRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDatasetContentRequest . getDatasetName ( ) , DATASETNAME_BINDING ) ; protocolMarshaller . marshall ( getDatasetContentRequest . getVersionId ( ) , VERSIONID_...
public class CommerceOrderItemPersistenceImpl { /** * Caches the commerce order item in the entity cache if it is enabled . * @ param commerceOrderItem the commerce order item */ @ Override public void cacheResult ( CommerceOrderItem commerceOrderItem ) { } }
entityCache . putResult ( CommerceOrderItemModelImpl . ENTITY_CACHE_ENABLED , CommerceOrderItemImpl . class , commerceOrderItem . getPrimaryKey ( ) , commerceOrderItem ) ; finderCache . putResult ( FINDER_PATH_FETCH_BY_C_ERC , new Object [ ] { commerceOrderItem . getCompanyId ( ) , commerceOrderItem . getExternalRefere...
public class Routes { /** * Add a route * @ param httpMethod the http - method of the route * @ param route the route to add */ public void add ( HttpMethod httpMethod , RouteImpl route ) { } }
add ( httpMethod , route . getPath ( ) , route . getAcceptType ( ) , route ) ;
public class FloatField { /** * Compare field to this and return < > or = ( - , + , 0 ) . * @ return The compare value . */ public int compareTo ( Field field ) { } }
if ( field instanceof BaseField ) if ( ! this . isSameType ( ( BaseField ) field ) ) return super . compareTo ( field ) ; float float1 = Float . MIN_VALUE , float2 = Float . MIN_VALUE ; Float floatField = ( Float ) this . getData ( ) ; // Get the physical data if ( floatField != null ) float1 = floatField . floatValue ...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link BigInteger } * { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "depth" , scope = GetTypeDescendants . class ) public JAXBElement < BigInteger > createGet...
return new JAXBElement < BigInteger > ( _GetDescendantsDepth_QNAME , BigInteger . class , GetTypeDescendants . class , value ) ;
public class HelloSignClient { /** * Retrieves a page of templates for the current user account . * @ param page int * @ return TemplateList * @ throws HelloSignException thrown if there ' s a problem processing the * HTTP request or the JSON response . */ public TemplateList getTemplates ( int page ) throws He...
return new TemplateList ( httpClient . withAuth ( auth ) . withGetParam ( AbstractResourceList . PAGE , Integer . toString ( page ) ) . get ( BASE_URI + TEMPLATE_LIST_URI ) . asJson ( ) ) ;
public class GatewayResponse { /** * Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs . * @ param responseTemplates * Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs . * @ return Returns a referenc...
setResponseTemplates ( responseTemplates ) ; return this ;
public class SpdySession { /** * hasReceivedReply and receivedReply are only called from channelRead ( ) * no need to synchronize access to the StreamState */ boolean hasReceivedReply ( int streamId ) { } }
StreamState state = activeStreams . get ( streamId ) ; return state != null && state . hasReceivedReply ( ) ;
public class ListBonusPaymentsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListBonusPaymentsRequest listBonusPaymentsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listBonusPaymentsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listBonusPaymentsRequest . getHITId ( ) , HITID_BINDING ) ; protocolMarshaller . marshall ( listBonusPaymentsRequest . getAssignmentId ( ) , ASSIGNMENTID_BINDIN...
public class EntityType_CustomFieldSerializer { /** * Deserializes the content of the object from the * { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } . * @ param streamReader the { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } to read the * object ...
deserialize ( streamReader , instance ) ;
public class UserPoolType { /** * Specifies the attributes that are aliased in a user pool . * @ param aliasAttributes * Specifies the attributes that are aliased in a user pool . * @ return Returns a reference to this object so that method calls can be chained together . * @ see AliasAttributeType */ public Us...
java . util . ArrayList < String > aliasAttributesCopy = new java . util . ArrayList < String > ( aliasAttributes . length ) ; for ( AliasAttributeType value : aliasAttributes ) { aliasAttributesCopy . add ( value . toString ( ) ) ; } if ( getAliasAttributes ( ) == null ) { setAliasAttributes ( aliasAttributesCopy ) ; ...
public class CreateSecurityConfigurationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateSecurityConfigurationRequest createSecurityConfigurationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createSecurityConfigurationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createSecurityConfigurationRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createSecurityConfigurationRequest . getEncryption...
public class ComparableTimSort { /** * Pushes the specified run onto the pending - run stack . * @ param runBase index of the first element in the run * @ param runLen the number of elements in the run */ private void pushRun ( int runBase , int runLen ) { } }
this . runBase [ stackSize ] = runBase ; this . runLen [ stackSize ] = runLen ; stackSize ++ ;
public class JSONObject { /** * Try to convert a string into a number , boolean , or null . If the string * can ' t be converted , return the string . * @ param string A String . * @ return A simple JSON value . */ public static Object stringToValue ( String string ) { } }
if ( string . equals ( "" ) ) { return string ; } if ( string . equalsIgnoreCase ( "true" ) ) { return Boolean . TRUE ; } if ( string . equalsIgnoreCase ( "false" ) ) { return Boolean . FALSE ; } if ( string . equalsIgnoreCase ( "null" ) ) { return JSONObject . NULL ; } /* * If it might be a number , try converting it ...
public class SQLDroidClob { /** * Free the Blob object and releases the resources that it holds . * The object is invalid once the free method is called . * @ throws SQLException if an error occurs */ public void free ( ) throws SQLException { } }
if ( freed ) { return ; } string = null ; if ( reader != null ) { reader . close ( ) ; } if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( IOException ioe ) { // Do nothing } } freed = true ;
public class Completable { /** * Returns a Completable instance that subscribes to the given publisher , ignores all values and * emits only the terminal event . * < img width = " 640 " height = " 422 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / Completable . from...
ObjectHelper . requireNonNull ( publisher , "publisher is null" ) ; return RxJavaPlugins . onAssembly ( new CompletableFromPublisher < T > ( publisher ) ) ;
public class ClusterLocator { /** * Locates an active local node in a set of nodes . */ private void locateNode ( String address , Set < String > nodes , Handler < AsyncResult < String > > doneHandler ) { } }
locateNode ( address , nodes . iterator ( ) , doneHandler ) ;
public class FFDC { /** * Deregister a diagnostic module for a package * @ param packageName * The package name for which to deregister a diagnostic module * @ return true if a diagnostic module was registered from the package ( and * is now not registered ) , false otherwise */ public static boolean deregister...
if ( modules . containsKey ( packageName ) ) { modules . remove ( packageName ) ; return true ; } else return false ;
public class NetworkUtils { /** * Tests if a network location is reachable . This is best effort and may give false * not reachable . * @ param endpoint the endpoint to connect to * @ param tunnelHost the host used to tunnel * @ param tunnelType what type of tunnel should be established * @ param timeout Open...
if ( NetworkUtils . isLocationReachable ( endpoint , timeout , retryCount , retryInterval ) ) { // Already reachable , return original endpoint directly return new Pair < InetSocketAddress , Process > ( endpoint , null ) ; } else { // Can not reach directly , trying to do ssh tunnel int localFreePort = SysUtils . getFr...
public class StatsProcProfTable { /** * Add or update the corresponding row . dedup flag indicates if we should dedup data based on partition for proc . */ public void updateTable ( boolean dedup , long timestamp , String procedure , long partition , long invocations , long min , long max , long avg , long failures , l...
ProcProfRow in = new ProcProfRow ( timestamp , procedure , partition , invocations , min , max , avg , failures , aborts ) ; ProcProfRow exists = m_table . ceiling ( in ) ; if ( exists != null && in . procedure . equals ( exists . procedure ) ) { exists . updateWith ( dedup , in ) ; } else { m_table . add ( in ) ; }
public class HttpRequest { /** * Sets a parameter value based on its name . * @ param name The parameter name to set * @ param value The parameter value to set */ public void setParameter ( String name , String value ) { } }
sortedParams = null ; parameters . add ( new Parameter ( name , value ) ) ;
public class TeiUtils { /** * Checks that a type is a valid MediaType . * @ param message the list of messages to add to , maybe < code > null < / code > * @ return the list of messages . A new list will have been created if the < code > message < / code > parameter was < code > null < / code > * @ see MediaType ...
Object o = data . getAttribute ( "type" ) ; if ( o != null && o != TagData . REQUEST_TIME_VALUE && ! ( o instanceof MediaType ) ) { String type = Coercion . toString ( o ) ; try { // First allow shortcuts ( matching enum names ) MediaType mediaType = MediaType . getMediaTypeByName ( type ) ; if ( mediaType == null ) { ...
public class InstructionView { /** * Used to update the instructions list with the current steps . * @ param model to provide the current steps and unit type */ private void updateInstructionList ( InstructionModel model ) { } }
RouteProgress routeProgress = model . retrieveProgress ( ) ; boolean isListShowing = instructionListLayout . getVisibility ( ) == VISIBLE ; rvInstructions . stopScroll ( ) ; instructionListAdapter . updateBannerListWith ( routeProgress , isListShowing ) ;
public class FutureReadResultEntryCollection { /** * Adds a new Result Entry . * @ param entry The entry to add . */ public void add ( FutureReadResultEntry entry ) { } }
synchronized ( this . reads ) { Exceptions . checkNotClosed ( this . closed , this ) ; this . reads . add ( entry ) ; }
public class SEPExecutor { /** * gives up a work permit */ void returnWorkPermit ( ) { } }
while ( true ) { long current = permits . get ( ) ; int workPermits = workPermits ( current ) ; if ( permits . compareAndSet ( current , updateWorkPermits ( current , workPermits + 1 ) ) ) return ; }
public class PeepholeMinimizeConditions { /** * Replaces a node with a number node if the new number node is not equivalent * to the current node . * Returns the replacement for n if it was replaced , otherwise returns n . */ private Node maybeReplaceChildWithNumber ( Node n , Node parent , int num ) { } }
Node newNode = IR . number ( num ) ; if ( ! newNode . isEquivalentTo ( n ) ) { parent . replaceChild ( n , newNode ) ; reportChangeToEnclosingScope ( newNode ) ; markFunctionsDeleted ( n ) ; return newNode ; } return n ;
public class SparseDirectedGraph { /** * { @ inheritDoc } */ public Set < DirectedEdge > outEdges ( int vertex ) { } }
SparseDirectedEdgeSet edges = getEdgeSet ( vertex ) ; return ( edges == null ) ? Collections . < DirectedEdge > emptySet ( ) : new EdgeSetDecorator ( edges . outEdges ( ) ) ;
public class FunctionTypeBuilder { /** * The scope that we should declare this function in , if it needs * to be declared in a scope . Notice that TypedScopeCreator takes * care of most scope - declaring . */ private TypedScope getScopeDeclaredIn ( ) { } }
if ( declarationScope != null ) { return declarationScope ; } int dotIndex = fnName . indexOf ( '.' ) ; if ( dotIndex != - 1 ) { String rootVarName = fnName . substring ( 0 , dotIndex ) ; TypedVar rootVar = enclosingScope . getVar ( rootVarName ) ; if ( rootVar != null ) { return rootVar . getScope ( ) ; } } return enc...
public class DistinguishedName { /** * ( non - Javadoc ) * @ see javax . naming . Name # startsWith ( javax . naming . Name ) */ public boolean startsWith ( Name name ) { } }
if ( name . size ( ) == 0 ) { return false ; } DistinguishedName start = null ; if ( name instanceof DistinguishedName ) { start = ( DistinguishedName ) name ; } else { return false ; } if ( start . size ( ) > this . size ( ) ) { return false ; } Iterator longiter = names . iterator ( ) ; Iterator shortiter = start . g...
public class XFactoryNaiveImpl { /** * / * ( non - Javadoc ) * @ see org . deckfour . xes . factory . XFactory # createAttributeList ( java . lang . String , org . deckfour . xes . extension . XExtension ) */ public XAttributeList createAttributeList ( String key , XExtension extension ) { } }
return new XAttributeListImpl ( intern ( key ) , extension ) ;
public class UniversalIdIntQueueMessage { /** * Create a new { @ link UniversalIdIntQueueMessage } object with specified id * and content . * @ param id * @ param content * @ return * @ since 0.7.0 */ public static UniversalIdIntQueueMessage newInstance ( Long id , byte [ ] content ) { } }
UniversalIdIntQueueMessage msg = newInstance ( content ) ; msg . setId ( id ) ; return msg ;
public class login { /** * < pre > * Logout . * < / pre > */ public static login delete ( nitro_service client , login resource ) throws Exception { } }
resource . validate ( "delete" ) ; return ( ( login [ ] ) resource . delete_resource ( client ) ) [ 0 ] ;
public class WSRdbXaResourceImpl { /** * Obtain the current transaction timeout value set for this XAResource instance . If XAResource . setTransactionTimeout was * not use prior to invoking this method , the return value is the default timeout set for the resource manager ; otherwise , the value * used in the prev...
// if the MC marked Stale , it means the user requested a purge pool with an immediate option // so don ' t allow any work to continue . In this case , we throw XAER _ RMFAIL xa error // which indicates that the resource manager is not available if ( ivManagedConnection . _mcStale ) { if ( TraceComponent . isAnyTracing...
public class OperaDesktopDriver { /** * Waits until the window is closed , and then returns the window id of the window . * @ param windowName - window to wait for shown event on * @ return id of window */ public int waitForWindowClose ( String windowName ) { } }
if ( getScopeServices ( ) . getConnection ( ) == null ) { throw new CommunicationException ( "waiting for a window failed because Opera is not connected." ) ; } return getScopeServices ( ) . waitForDesktopWindowClosed ( windowName , OperaIntervals . WINDOW_EVENT_TIMEOUT . getMs ( ) ) ;
public class ImageDfsServiceImpl { /** * 是否web环境 * @ return */ protected boolean isWeb ( ) { } }
ServletRequestAttributes attributes = ( ServletRequestAttributes ) RequestContextHolder . getRequestAttributes ( ) ; if ( attributes == null ) { return false ; } HttpServletRequest request = attributes . getRequest ( ) ; if ( request == null ) { return false ; } return true ;
public class Registration { /** * Add this field in the Record ' s field sequence . */ public BaseField setupField ( int iFieldSeq ) { } }
BaseField field = null ; // if ( iFieldSeq = = 0) // field = new CounterField ( this , ID , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; // field . setHidden ( true ) ; // if ( iFieldSeq = = 1) // field = new RecordChangedField ( this , LAST _ CHANGED , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; /...
public class WebAppParser { /** * Parses context params out of web . xml . * @ param contextParam contextParam element from web . xml * @ param webApp model for web . xml */ private static void parseContextParams ( final ParamValueType contextParam , final WebApp webApp ) { } }
final WebAppInitParam initParam = new WebAppInitParam ( ) ; initParam . setParamName ( contextParam . getParamName ( ) . getValue ( ) ) ; initParam . setParamValue ( contextParam . getParamValue ( ) . getValue ( ) ) ; webApp . addContextParam ( initParam ) ;
public class AtomNumberGenerator { /** * { @ inheritDoc } */ @ Override public IRenderingElement generate ( IAtomContainer container , RendererModel model ) { } }
ElementGroup numbers = new ElementGroup ( ) ; if ( ! model . getParameter ( WillDrawAtomNumbers . class ) . getValue ( ) ) return numbers ; Vector2d offset = new Vector2d ( this . offset . getValue ( ) . x , - this . offset . getValue ( ) . y ) ; offset . scale ( 1 / model . getParameter ( Scale . class ) . getValue ( ...
public class MpMessages { /** * 预览语音消息 * @ param wxName * @ param openId * @ param voice * @ return */ public long voicePreview ( String wxName , String openId , String voice ) { } }
return preview ( wxName , openId , "voice" , voice ) ;
public class appfwpolicy { /** * Use this API to fetch all the appfwpolicy resources that are configured on netscaler . */ public static appfwpolicy [ ] get ( nitro_service service ) throws Exception { } }
appfwpolicy obj = new appfwpolicy ( ) ; appfwpolicy [ ] response = ( appfwpolicy [ ] ) obj . get_resources ( service ) ; return response ;