signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class BaseBigtableInstanceAdminClient { /** * Gets information about a cluster . * < p > Sample code : * < pre > < code > * try ( BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient . create ( ) ) { * ClusterName name = ClusterName . of ( " [ PROJECT ] " , " ...
GetClusterRequest request = GetClusterRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getCluster ( request ) ;
public class CPSpecificationOptionPersistenceImpl { /** * Returns the first cp specification option in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > nu...
CPSpecificationOption cpSpecificationOption = fetchByUuid_C_First ( uuid , companyId , orderByComparator ) ; if ( cpSpecificationOption != null ) { return cpSpecificationOption ; } StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ...
public class HCHead { /** * Append some JavaScript code * @ param aJS * The JS to be added . May not be < code > null < / code > . * @ return this */ @ Nonnull public final HCHead addJS ( @ Nonnull final IHCNode aJS ) { } }
ValueEnforcer . notNull ( aJS , "JS" ) ; if ( ! HCJSNodeDetector . isJSNode ( aJS ) ) throw new IllegalArgumentException ( aJS + " is not a valid JS node!" ) ; m_aJS . add ( aJS ) ; return this ;
public class OsmMapShapeConverter { /** * Convert a { @ link GeometryCollection } to a list of Map shapes and add to * the map * @ param map * @ param geometryCollection * @ return */ public List < OsmDroidMapShape > addToMap ( MapView map , GeometryCollection < Geometry > geometryCollection ) { } }
List < OsmDroidMapShape > shapes = new ArrayList < OsmDroidMapShape > ( ) ; for ( Geometry geometry : geometryCollection . getGeometries ( ) ) { OsmDroidMapShape shape = addToMap ( map , geometry ) ; shapes . add ( shape ) ; } return shapes ;
public class ConfigImpl { /** * is file a directory or not , touch if not exist * @ param directory * @ return true if existing directory or has created new one */ protected boolean isDirectory ( Resource directory ) { } }
if ( directory . exists ( ) ) return directory . isDirectory ( ) ; try { directory . createDirectory ( true ) ; return true ; } catch ( IOException e ) { e . printStackTrace ( getErrWriter ( ) ) ; } return false ;
public class AbstractCache { /** * The complete cache is read and then replaces the current stored values * in the cache . The cache must be read in this order : * < ul > * < li > create new cache map < / li > * < li > read cache in the new cache map < / li > * < li > replace old cache map with the new cache ...
// if cache is not initialized , the correct order is required ! // otherwise the cache is not null and returns wrong values ! final Map < Long , T > newCache4Id = getNewCache4Id ( ) ; final Map < String , T > newCache4Name = getNewCache4Name ( ) ; final Map < UUID , T > newCache4UUID = getNewCache4UUID ( ) ; try { rea...
public class SearchRequestEntity { /** * Get query language . * @ return query language * @ throws UnsupportedQueryException { @ link UnsupportedQueryException } */ public String getQueryLanguage ( ) throws UnsupportedQueryException { } }
if ( body . getChild ( 0 ) . getName ( ) . getNamespaceURI ( ) . equals ( "DAV:" ) && body . getChild ( 0 ) . getName ( ) . getLocalPart ( ) . equals ( "sql" ) ) { return "sql" ; } else if ( body . getChild ( 0 ) . getName ( ) . getNamespaceURI ( ) . equals ( "DAV:" ) && body . getChild ( 0 ) . getName ( ) . getLocalPa...
public class SingleDbJDBCConnection { /** * { @ inheritDoc } */ protected ResultSet findWorkspacePropertiesOnValueStorage ( ) throws SQLException { } }
if ( findWorkspacePropertiesOnValueStorage == null ) { findWorkspacePropertiesOnValueStorage = dbConnection . prepareStatement ( FIND_WORKSPACE_PROPERTIES_ON_VALUE_STORAGE ) ; } findWorkspacePropertiesOnValueStorage . setString ( 1 , containerConfig . containerName ) ; return findWorkspacePropertiesOnValueStorage . exe...
public class IndexChangeAdapters { /** * Create an { @ link IndexChangeAdapter } implementation that handles node type information . * @ param propertyName a symbolic name of the property that will be sent to the { @ link ProvidedIndex } when the adapter * notices that there are either primary type of mixin type ch...
return new NodeTypesChangeAdapter ( propertyName , context , matcher , workspaceName , index ) ;
public class HystrixInvocationHandler { /** * If the method param of InvocationHandler . invoke is not accessible , i . e in a package - private * interface , the fallback call in hystrix command will fail cause of access restrictions . But * methods in dispatch are copied methods . So setting access to dispatch me...
Map < Method , Method > result = new LinkedHashMap < Method , Method > ( ) ; for ( Method method : dispatch . keySet ( ) ) { method . setAccessible ( true ) ; result . put ( method , method ) ; } return result ;
public class DefaultGrailsControllerClass { /** * Register a new { @ link grails . web . UrlConverter } with the controller * @ param urlConverter The { @ link grails . web . UrlConverter } to register */ @ Override public void registerUrlConverter ( UrlConverter urlConverter ) { } }
for ( String actionName : new ArrayList < String > ( actions . keySet ( ) ) ) { actionUriToViewName . put ( urlConverter . toUrlElement ( actionName ) , actionName ) ; actions . put ( urlConverter . toUrlElement ( actionName ) , actions . remove ( actionName ) ) ; } defaultActionName = urlConverter . toUrlElement ( def...
public class SmoothieMap { /** * Performs the given action for each entry in this map until all entries have been processed or * the action throws an exception . Actions are performed in the order of { @ linkplain # entrySet ( ) * entry set } iteration . Exceptions thrown by the action are relayed to the caller . ...
Objects . requireNonNull ( action ) ; int mc = this . modCount ; Segment < K , V > segment ; for ( long segmentIndex = 0 ; segmentIndex >= 0 ; segmentIndex = nextSegmentIndex ( segmentIndex , segment ) ) { ( segment = segment ( segmentIndex ) ) . forEach ( action ) ; } if ( mc != modCount ) throw new ConcurrentModifica...
public class CommerceAccountOrganizationRelPersistenceImpl { /** * Caches the commerce account organization rel in the entity cache if it is enabled . * @ param commerceAccountOrganizationRel the commerce account organization rel */ @ Override public void cacheResult ( CommerceAccountOrganizationRel commerceAccountOr...
entityCache . putResult ( CommerceAccountOrganizationRelModelImpl . ENTITY_CACHE_ENABLED , CommerceAccountOrganizationRelImpl . class , commerceAccountOrganizationRel . getPrimaryKey ( ) , commerceAccountOrganizationRel ) ; commerceAccountOrganizationRel . resetOriginalValues ( ) ;
public class BuildDatabase { /** * Sets the Duplicate IDs for all the SpecTopics in the Database . */ public void setDatabaseDuplicateIds ( ) { } }
// Set the spec topic duplicate ids based on topic title for ( final Entry < Integer , List < ITopicNode > > topicTitleEntry : topics . entrySet ( ) ) { final List < ITopicNode > topics = topicTitleEntry . getValue ( ) ; if ( topics . size ( ) > 1 ) { for ( int i = 1 ; i < topics . size ( ) ; i ++ ) { topics . get ( i ...
public class DateTimeApiParameterMapper { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . parameter . mapper . BindParameterMapper # toJdbc ( java . lang . Object , java . sql . Connection , jp . co . future . uroborosql . parameter . mapper . BindParameterMapperManager ) */ @ Override public Object to...
/* Dateに変換 */ if ( original instanceof LocalDateTime ) { return java . sql . Timestamp . valueOf ( ( LocalDateTime ) original ) ; } if ( original instanceof OffsetDateTime ) { return new java . sql . Timestamp ( ( ( OffsetDateTime ) original ) . toInstant ( ) . toEpochMilli ( ) ) ; } if ( original instanceof ZonedDateT...
public class LPredicateBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T > LPredicate < T > predicateFrom ( Consumer < LPredicateBuilder < T > > buildingFunction ) { } }
LPredicateBuilder builder = new LPredicateBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class LogFileEntry { /** * Writes the next numberOfBytes bytes from the stream to the outputWriter , assuming that the bytes are UTF - 8 encoded * characters . * @ param stream * @ param outputWriter * @ param numberOfBytes * @ throws IOException */ private void write ( final DataInputStream stream , f...
final byte [ ] buf = new byte [ 65535 ] ; int lenRemaining = numberOfBytes ; while ( lenRemaining > 0 ) { final int len = stream . read ( buf , 0 , lenRemaining > 65535 ? 65535 : lenRemaining ) ; if ( len > 0 ) { outputWriter . write ( new String ( buf , 0 , len , "UTF-8" ) ) ; lenRemaining -= len ; } else { break ; } ...
public class JobHistoryService { /** * Returns the { @ link Flow } instance matching the application ID and run ID . * @ param cluster the cluster identifier * @ param user the user running the jobs * @ param appId the application description * @ param runId the specific run ID for the flow * @ param populate...
Flow flow = null ; byte [ ] startRow = ByteUtil . join ( Constants . SEP_BYTES , Bytes . toBytes ( cluster ) , Bytes . toBytes ( user ) , Bytes . toBytes ( appId ) , Bytes . toBytes ( FlowKey . encodeRunId ( runId ) ) , Constants . EMPTY_BYTES ) ; LOG . info ( "Reading job_history rows start at " + Bytes . toStringBina...
public class ScriptDataContextUtil { /** * @ return a data context for executing a script plugin or provider , which contains two datasets : * plugin : { vardir : [ dir ] , tmpdir : [ dir ] } * and * rundeck : { base : [ basedir ] } * @ param framework framework */ public static DataContext createScriptDataCont...
BaseDataContext data = new BaseDataContext ( ) ; final File vardir = new File ( Constants . getBaseVar ( framework . getBaseDir ( ) . getAbsolutePath ( ) ) ) ; final File tmpdir = new File ( vardir , "tmp" ) ; data . group ( "plugin" ) . put ( "vardir" , vardir . getAbsolutePath ( ) ) ; data . group ( "plugin" ) . put ...
public class HostsResource { /** * Returns various status information about the hosts . * @ param hosts The hosts . * @ param statusFilter An optional status filter . * @ return The response . */ @ POST @ Path ( "/statuses" ) @ Produces ( APPLICATION_JSON ) @ Timed @ ExceptionMetered public Map < String , HostSta...
final Map < String , HostStatus > statuses = Maps . newHashMap ( ) ; for ( final String host : hosts ) { final HostStatus status = model . getHostStatus ( host ) ; if ( status != null ) { if ( isNullOrEmpty ( statusFilter ) || statusFilter . equals ( status . getStatus ( ) . toString ( ) ) ) { statuses . put ( host , s...
public class BoneCPConnectionProvider { /** * { @ inheritDoc } * @ see org . hibernate . engine . jdbc . connections . spi . ConnectionProvider # getConnection ( ) */ public Connection getConnection ( ) throws SQLException { } }
Connection connection = this . pool . getConnection ( ) ; // set the Transaction Isolation if defined try { // set the Transaction Isolation if defined if ( ( this . isolation != null ) && ( connection . getTransactionIsolation ( ) != this . isolation . intValue ( ) ) ) { connection . setTransactionIsolation ( this . i...
public class HttpUtil { /** * Determine if a uri is in asterisk - form according to * < a href = " https : / / tools . ietf . org / html / rfc7230 # section - 5.3 " > rfc7230 , 5.3 < / a > . */ public static boolean isAsteriskForm ( URI uri ) { } }
return "*" . equals ( uri . getPath ( ) ) && uri . getScheme ( ) == null && uri . getSchemeSpecificPart ( ) == null && uri . getHost ( ) == null && uri . getAuthority ( ) == null && uri . getQuery ( ) == null && uri . getFragment ( ) == null ;
public class ObjectWriter { /** * Should switch to IOUtils . read ( ) when we update to the latest version of * commons - io * @ param in * @ param b * @ param off * @ param len * @ return * @ throws IOException */ private static int readFully ( InputStream in , byte [ ] b , int off , int len ) throws IOE...
int total = 0 ; for ( ; ; ) { int got = in . read ( b , off + total , len - total ) ; if ( got < 0 ) { return ( total == 0 ) ? - 1 : total ; } else { total += got ; if ( total == len ) return total ; } }
public class IfcBSplineSurfaceWithKnotsImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < Long > getVMultiplicities ( ) { } }
return ( EList < Long > ) eGet ( Ifc4Package . Literals . IFC_BSPLINE_SURFACE_WITH_KNOTS__VMULTIPLICITIES , true ) ;
public class NodeManager { /** * This method rebuilds members related to a ResourceRequestInfo instance , * which were not directly persisted themselves . * @ param resourceRequestInfo The ResourceRequestInfo instance to be restored */ public void restoreResourceRequestInfo ( ResourceRequestInfo resourceRequestInfo...
List < RequestedNode > requestedNodes = null ; List < String > hosts = resourceRequestInfo . getHosts ( ) ; if ( hosts != null && hosts . size ( ) > 0 ) { requestedNodes = new ArrayList < RequestedNode > ( hosts . size ( ) ) ; for ( String host : hosts ) { requestedNodes . add ( resolve ( host , resourceRequestInfo . g...
public class Edge { /** * Insert the given suffix at the supplied active point . * @ param suffix The suffix to insert . * @ param activePoint The active point to insert it at . * @ return */ void insert ( Suffix < T , S > suffix , ActivePoint < T , S > activePoint ) { } }
Object item = suffix . getEndItem ( ) ; Object nextItem = getItemAt ( activePoint . getLength ( ) ) ; if ( item . equals ( nextItem ) ) { activePoint . incrementLength ( ) ; } else { split ( suffix , activePoint ) ; suffix . decrement ( ) ; activePoint . updateAfterInsert ( suffix ) ; if ( suffix . isEmpty ( ) ) { } el...
public class U { /** * Documented , # keys */ public static < K , V > Set < K > keys ( final Map < K , V > object ) { } }
return object . keySet ( ) ;
public class NodeWrapper { /** * { @ inheritDoc } */ @ Override public int getFingerprint ( ) { } }
int retVal ; final int nameCount = getNameCode ( ) ; if ( nameCount == - 1 ) { retVal = - 1 ; } else { retVal = nameCount & 0xfffff ; } return retVal ;
public class CmsFlexController { /** * Checks if the request has the " If - Modified - Since " header set , and if so , * if the header date value is equal to the provided last modification date . < p > * @ param req the request to set the " If - Modified - Since " date header from * @ param dateLastModified the ...
// check if the request contains a last modified header try { long lastModifiedHeader = req . getDateHeader ( CmsRequestUtil . HEADER_IF_MODIFIED_SINCE ) ; // if last modified header is set ( > - 1 ) , compare it to the requested resource return ( ( lastModifiedHeader > - 1 ) && ( ( ( dateLastModified / 1000 ) * 1000 )...
public class MutateInBuilder { /** * Prepend multiple values at once in an existing array , pushing all values in the collection ' s iteration order to * the front / start of the array . * First value becomes the first element of the array , second value the second , etc . . . All existing values * are shifted ri...
asyncBuilder . arrayPrependAll ( path , values , optionsBuilder ) ; return this ;
public class GenKUmsAllCamt05200107 { /** * Erzeugt eine einzelne CAMT - Umsatzbuchung . * @ param line eine Umsatzbuchung aus HBCI4Java . * @ return die CAMT - Umsatzbuchung . * @ throws Exception */ private ReportEntry9 createLine ( UmsLine line ) throws Exception { } }
ReportEntry9 entry = new ReportEntry9 ( ) ; EntryDetails8 detail = new EntryDetails8 ( ) ; entry . getNtryDtls ( ) . add ( detail ) ; EntryTransaction9 tx = new EntryTransaction9 ( ) ; detail . getTxDtls ( ) . add ( tx ) ; // Checken , ob es Soll - oder Habenbuchung ist boolean haben = line . value != null && line . va...
public class AsyncCallObject { void read_attribute_reply ( int timeout ) { } }
DevError [ ] errors = null ; DeviceAttribute [ ] argout = null ; try { if ( timeout == NO_TIMEOUT ) argout = dev . read_attribute_reply ( id ) ; else argout = dev . read_attribute_reply ( id , timeout ) ; } catch ( AsynReplyNotArrived e ) { errors = e . errors ; } catch ( DevFailed e ) { errors = e . errors ; } cb . at...
public class JsonDataProviderImpl { /** * Parses the JSON file as a 2D Object array for TestNg dataprovider usage . < br > * < pre > * < i > Array Of Objects mapped to a user defined type : < / i > * " name " : " Optimus Prime " , * " password " : 123456, * " accountNumber " : 99999, * " amount " : 50000, ...
logger . entering ( resource ) ; Class < ? > arrayType ; Object [ ] [ ] dataToBeReturned = null ; JsonReader reader = new JsonReader ( getReader ( resource ) ) ; try { // The type specified must be converted to array type for the parser // to deal with array of JSON objects arrayType = Array . newInstance ( resource . ...
public class UserHandlerImpl { /** * Notifying listeners after user deletion . * @ param user * the user which is used in delete operation * @ throws Exception * if any listener failed to handle the event */ private void postDelete ( User user ) throws Exception { } }
for ( UserEventListener listener : listeners ) { listener . postDelete ( user ) ; }
public class JmxTransformer { /** * Are we a file and a JSON or YAML file ? */ private boolean isProcessConfigFile ( File file ) { } }
if ( this . configuration . getProcessConfigDirOrFile ( ) . isFile ( ) ) { return file . equals ( this . configuration . getProcessConfigDirOrFile ( ) ) ; } // If the file doesn ' t exist anymore , treat it as a regular file ( to handle file deletion events ) if ( file . exists ( ) && ! file . isFile ( ) ) { return fal...
public class TarHeader { /** * This method , like getNameBytes ( ) , is intended to place a name into a TarHeader ' s buffer . However , this method is * sophisticated enough to recognize long names ( name . length ( ) > NAMELEN ) . In these cases , the method will break the * name into a prefix and suffix and plac...
if ( newName . length ( ) > 100 ) { // Locate a pathname " break " prior to the maximum name length . . . int index = newName . indexOf ( "/" , newName . length ( ) - 100 ) ; if ( index == - 1 ) { throw new InvalidHeaderException ( "file name is greater than 100 characters, " + newName ) ; } // Get the " suffix subpath...
public class DefaultStackTraceFilterer { /** * Whether the given class name is an internal class and should be filtered * @ param className The class name * @ return true if is internal */ protected boolean isApplicationClass ( String className ) { } }
for ( String packageName : packagesToFilter ) { if ( className . startsWith ( packageName ) ) return false ; } return true ;
public class SysUtil { /** * Return an list of ABIs we supported on this device ordered according to preference . Use a * separate inner class to isolate the version - dependent call where it won ' t cause the whole * class to fail preverification . * @ return Ordered array of supported ABIs */ public static Stri...
if ( Build . VERSION . SDK_INT < Build . VERSION_CODES . LOLLIPOP ) { return new String [ ] { Build . CPU_ABI , Build . CPU_ABI2 } ; } else { return LollipopSysdeps . getSupportedAbis ( ) ; }
public class DrawerView { /** * Adds a profile to the drawer view * @ param profile Profile to add */ public DrawerView addProfile ( DrawerProfile profile ) { } }
if ( profile . getId ( ) <= 0 ) { profile . setId ( System . nanoTime ( ) * 100 + Math . round ( Math . random ( ) * 100 ) ) ; } for ( DrawerProfile oldProfile : mProfileAdapter . getItems ( ) ) { if ( oldProfile . getId ( ) == profile . getId ( ) ) { mProfileAdapter . remove ( oldProfile ) ; break ; } } profile . atta...
public class CloudFoundryEntityImpl { /** * If custom behaviour is required by sub - classes , consider overriding { @ link # doStop ( ) } . */ @ Override public final void stop ( ) { } }
if ( DynamicTasks . getTaskQueuingContext ( ) != null ) { doStop ( ) ; } else { Task < ? > task = Tasks . builder ( ) . name ( "stop" ) . body ( new Runnable ( ) { public void run ( ) { doStop ( ) ; } } ) . build ( ) ; Entities . submit ( this , task ) . getUnchecked ( ) ; }
public class DocumentElement { /** * getter for width - gets * @ generated * @ return value of the feature */ public float getWidth ( ) { } }
if ( DocumentElement_Type . featOkTst && ( ( DocumentElement_Type ) jcasType ) . casFeat_width == null ) jcasType . jcas . throwFeatMissing ( "width" , "ch.epfl.bbp.uima.types.DocumentElement" ) ; return jcasType . ll_cas . ll_getFloatValue ( addr , ( ( DocumentElement_Type ) jcasType ) . casFeatCode_width ) ;
public class HttpResponseMessageImpl { /** * Set the status code of the response message . An input code that does * not match an existing defined StatusCode will create a new " Undefined " * code where the getByteArray ( ) API will return the input code as a * byte [ ] . * @ param code */ @ Override public voi...
StatusCodes val = null ; try { val = StatusCodes . getByOrdinal ( code ) ; } catch ( IndexOutOfBoundsException e ) { // no FFDC required // nothing to do , just make the undefined value below } // this could be null because the ordinal lookup returned an empty // status code , or because it was out of bounds if ( null ...
public class LoggingScopeFactory { /** * Get a new instance of LoggingScope with msg and params through new . * @ param msg * @ param params * @ return */ public LoggingScope getNewLoggingScope ( final String msg , final Object [ ] params ) { } }
return new LoggingScopeImpl ( LOG , logLevel , msg , params ) ;
public class ObjectGraphDump { /** * For some types , we don ' t care about their internals , so just summarise the size . * @ param node the node to summarise . */ private void summariseNode ( final ObjectGraphNode node ) { } }
int size = node . getSize ( ) ; node . removeAll ( ) ; node . setSize ( size ) ;
public class GeometryDeserializer { /** * Parses the JSON as a MultiPolygon geometry * @ param coords the coordinates of a multipolygon which is just a list of coordinates of polygons . * @ param crsId * @ return an instance of multipolygon * @ throws IOException if the given json does not correspond to a multi...
if ( coords == null || coords . isEmpty ( ) ) { throw new IOException ( "A multipolygon should have at least one polyon." ) ; } Polygon [ ] polygons = new Polygon [ coords . size ( ) ] ; for ( int i = 0 ; i < coords . size ( ) ; i ++ ) { polygons [ i ] = asPolygon ( coords . get ( i ) , crsId ) ; } return new MultiPoly...
public class SRTOutputStream { /** * This method was created in VisualAge . */ public void close ( ) throws java . io . IOException { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { // 306998.15 logger . logp ( Level . FINE , CLASS_NAME , "close" , "Closing" ) ; } if ( _observer != null ) { _observer . alertClose ( ) ; } super . close ( ) ;
public class Op { /** * Creates an array with the specified elements and an < i > operation expression < / i > on it . * @ param elements the elements of the array being created * @ return an operator , ready for chaining */ public static < T > Level0ArrayOperator < Boolean [ ] , Boolean > onArrayFor ( final Boolea...
return onArrayOf ( Types . BOOLEAN , VarArgsUtil . asRequiredObjectArray ( elements ) ) ;
public class CobolZonedDecimalType { /** * { @ inheritDoc } */ public boolean isValidInternal ( Class < T > javaClass , CobolContext cobolContext , byte [ ] hostData , int start ) { } }
int end = start + getBytesLen ( ) ; int [ ] nibbles = new int [ 2 ] ; // check all bytes excluding sign // all right hand size nibbles must contain a digit for ( int i = start + ( signLeading ? 1 : 0 ) ; i < end - ( signLeading ? 0 : 1 ) ; i ++ ) { setNibbles ( nibbles , hostData [ i ] ) ; if ( ! isDigit ( nibbles [ 1 ...
public class CreateProcedure { /** * Parse and validate the substring containing ALLOW and PARTITION * clauses for CREATE PROCEDURE . * @ param clauses the substring to parse * @ param descriptor procedure descriptor populated with role names from ALLOW clause * @ return parsed and validated partition data or n...
// Nothing to do if there were no clauses . // Null means there ' s no partition data to return . // There ' s also no roles to add . if ( clauses == null || clauses . isEmpty ( ) ) { return null ; } ProcedurePartitionData data = null ; Matcher matcher = SQLParser . matchAnyCreateProcedureStatementClause ( clauses ) ; ...
public class AnalysisRunnerJobDelegate { /** * Runs the job * @ return */ public AnalysisResultFuture run ( ) { } }
try { // the injection manager is job scoped final InjectionManager injectionManager = _configuration . getEnvironment ( ) . getInjectionManagerFactory ( ) . getInjectionManager ( _configuration , _job ) ; final LifeCycleHelper rowProcessingLifeCycleHelper = new LifeCycleHelper ( injectionManager , _includeNonDistribut...
public class ReportingApi { /** * Get statistics * Get the statistics for the specified subscription IDs . * @ param ids The IDs of the subscriptions . ( required ) * @ return InlineResponse2001 * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ pub...
ApiResponse < InlineResponse2001 > resp = peekMultipleWithHttpInfo ( ids ) ; return resp . getData ( ) ;
public class MessageTransportInfo { /** * Set up the key areas . */ public void setupKeys ( ) { } }
KeyAreaInfo keyArea = null ; keyArea = new KeyAreaInfo ( this , Constants . UNIQUE , ID_KEY ) ; keyArea . addKeyField ( ID , Constants . ASCENDING ) ; keyArea = new KeyAreaInfo ( this , Constants . UNIQUE , MESSAGE_PROCESS_INFO_ID_KEY ) ; keyArea . addKeyField ( MESSAGE_PROCESS_INFO_ID , Constants . ASCENDING ) ; keyAr...
public class ThirdPartyAudienceSegment { /** * Gets the licenseType value for this ThirdPartyAudienceSegment . * @ return licenseType * Specifies the license type of the external segment . This attribute * is read - only . */ public com . google . api . ads . admanager . axis . v201805 . ThirdPartyAudienceSegmentLi...
return licenseType ;
public class UCharacter { /** * < p > Returns the titlecase version of the argument string . * < p > Position for titlecasing is determined by the argument break * iterator , hence the user can customize his break iterator for * a specialized titlecasing . In this case only the forward iteration * needs to be i...
if ( titleIter == null ) { if ( locale == null ) { locale = ULocale . getDefault ( ) ; } titleIter = BreakIterator . getWordInstance ( locale ) ; } titleIter . setText ( str ) ; return toTitleCase ( getCaseLocale ( locale ) , options , titleIter , str ) ;
public class StandardFieldsDialog { /** * Tells whether or not the tab with the given label is scrollable . * < strong > Note : < / strong > The scrollable state returned by this method only applies to tabs that were set to be ( or not ) * scrollable through the method { @ link # setTabScrollable ( String , boolean...
JPanel tabPanel = this . tabNameMap . get ( tabLabel ) ; if ( tabPanel == null ) { return false ; } return isTabScrollable ( tabPanel ) ;
public class PairedEndFastqReader { /** * Stream the specified interleaved paired end reads . Per the interleaved format , all reads must be sorted and paired . * @ param reader reader , must not be null * @ param listener paired end listener , must not be null * @ throws IOException if an I / O error occurs * ...
streamInterleaved ( ( Readable ) reader , listener ) ;
public class ELBinder { /** * Bind an ELInterceptor to the given annotation with the given * { @ link ELBinder . ExecutionPolicy } . * @ param annotationClass EL annotation to intercept * @ param policy determine when the EL is evaluated * @ return ELBinder */ public ELBinder bindELAnnotation ( Class < ? extend...
ELInterceptor interceptor = new ELInterceptor ( annotationClass , policy ) ; binder . requestInjection ( interceptor ) ; binder . bindInterceptor ( Matchers . any ( ) , handlerMethodMatcher ( annotationClass ) , interceptor ) ; return this ;
public class Simulator { /** * Start simulation * @ return the winner player index */ public Optional < Integer > start ( ) { } }
LOGGER . info ( "Starting match with: {}" , Arrays . toString ( players ) ) ; try ( ViewerWriter viewerWriter = createViewerWriter ( ) ) { listeners . forEach ( simulatorListener -> simulatorListener . beforeGameStart ( players , gameMap ) ) ; Arrays . stream ( players ) . forEach ( p -> { GameStartApiResponse startDat...
public class SecurityClient { public void setId ( String id ) { } }
if ( id == null || id . length ( ) == 0 ) throw new IllegalArgumentException ( "id required in setId" ) ; this . setId ( Integer . valueOf ( id ) ) ;
public class HibernateUtils { /** * Creates an instance of < code > clazz < / code > and populates fields fetched * from MongoDB document object . Field names are determined from * < code > columns < / code > * @ param documentObj * the document obj * @ param clazz * the clazz * @ param columns * the co...
for ( Attribute column : columns ) { Object value = documentObj . get ( ( ( AbstractAttribute ) column ) . getJPAColumnName ( ) ) ; if ( ( ( MetamodelImpl ) metamodel ) . isEmbeddable ( ( ( AbstractAttribute ) column ) . getBindableJavaType ( ) ) ) { onViaEmbeddable ( column , obj , metamodel , ( Map < String , Object ...
public class RestrictionValidator { /** * Validates the number of digits present in the received { @ code value } . * @ param totalDigits The number of total digits . * @ param value The { @ link Double } to be validated . */ public static void validateTotalDigits ( int totalDigits , double value ) { } }
String doubleValue = String . valueOf ( value ) ; int numberOfDigits ; if ( value != ( ( int ) value ) ) { numberOfDigits = doubleValue . length ( ) - 1 ; } else { numberOfDigits = doubleValue . length ( ) ; } if ( numberOfDigits != totalDigits ) { throw new RestrictionViolationException ( "Violation of fractionDigits ...
public class EnvironmentClassLoader { /** * Adds self as a listener . */ private void initListeners ( ) { } }
ClassLoader parent = getParent ( ) ; for ( ; parent != null ; parent = parent . getParent ( ) ) { if ( parent instanceof EnvironmentClassLoader ) { EnvironmentClassLoader loader = ( EnvironmentClassLoader ) parent ; if ( _stopListener == null ) _stopListener = new WeakStopListener ( this ) ; loader . addListener ( _sto...
public class DateFuncSup { /** * set date to next years * @ param next count of next years to set to * @ return < code > this < / code > */ public DateFuncSup nextYear ( int next ) { } }
Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( date ) ; cal . add ( Calendar . YEAR , next ) ; date . setTime ( cal . getTimeInMillis ( ) ) ; return this ;
public class DrawerBuilder { /** * get the adapter ( null safe ) * @ return the FastAdapter used with this drawer */ protected FastAdapter < IDrawerItem > getAdapter ( ) { } }
if ( mAdapter == null ) { mAdapter = FastAdapter . with ( Arrays . asList ( mHeaderAdapter , mItemAdapter , mFooterAdapter ) , Arrays . < IAdapterExtension < IDrawerItem > > asList ( mExpandableExtension ) ) ; mAdapter . withSelectable ( true ) ; mAdapter . withMultiSelect ( false ) ; mAdapter . withAllowDeselection ( ...
public class BdbStorageConfiguration { /** * Clean up the environment object for the given storage engine */ @ Override public void removeStorageEngine ( StorageEngine < ByteArray , byte [ ] , byte [ ] > engine ) { } }
String storeName = engine . getName ( ) ; BdbStorageEngine bdbEngine = ( BdbStorageEngine ) engine ; synchronized ( lock ) { // Only cleanup the environment if it is per store . We cannot // cleanup a shared ' Environment ' object if ( useOneEnvPerStore ) { Environment environment = this . environments . get ( storeNam...
public class LocalTranCoordImpl { /** * Removes the provided < CODE > resource < / CODE > from the list of resources * that need to be cleaned - up when the LTC completes . * This method should be called when the application completes the RMLT . * @ param resource The < CODE > OnePhaseXAResource < / CODE > to sto...
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "delistFromCleanup" , resource ) ; if ( LocalTranCurrentImpl . globalTranExists ( ) ) { final IllegalStateException ise = new IllegalStateException ( "Cannot delist Resource from cleanup. A Global transaction is active." ) ; FFDCFilter . processException ( ise , "com.ibm...
public class nat64 { /** * Use this API to fetch all the nat64 resources that are configured on netscaler . */ public static nat64 [ ] get ( nitro_service service ) throws Exception { } }
nat64 obj = new nat64 ( ) ; nat64 [ ] response = ( nat64 [ ] ) obj . get_resources ( service ) ; return response ;
public class Utils { /** * Converts the day of the week from android . text . format . Time to java . util . Calendar */ public static int convertDayOfWeekFromTimeToCalendar ( int timeDayOfWeek ) { } }
switch ( timeDayOfWeek ) { case Time . MONDAY : return Calendar . MONDAY ; case Time . TUESDAY : return Calendar . TUESDAY ; case Time . WEDNESDAY : return Calendar . WEDNESDAY ; case Time . THURSDAY : return Calendar . THURSDAY ; case Time . FRIDAY : return Calendar . FRIDAY ; case Time . SATURDAY : return Calendar . ...
public class LessParser { /** * Read a quoted string . * @ param quote the quote character . * @ return the string with quotes */ private String readQuote ( char quote ) { } }
StringBuilder builder = cachesBuilder ; builder . setLength ( 0 ) ; readQuote ( quote , builder ) ; String str = builder . toString ( ) ; builder . setLength ( 0 ) ; return str ;
public class ComponentTagHandlerDelegate { /** * If the binding attribute was specified , use that in conjuction with our componentType String variable to call * createComponent on the Application , otherwise just pass the componentType String . < p / > If the binding was used , * then set the ValueExpression " bin...
if ( _componentBuilderHandlerDelegate != null ) { // the call to Application . createComponent ( FacesContext , Resource ) // is delegated because we don ' t have here the required Resource instance return _componentBuilderHandlerDelegate . createComponent ( ctx ) ; } UIComponent c = null ; FacesContext faces = ctx . g...
public class BytecodeHelper { /** * / * public void dup ( ) { * mv . visitInsn ( DUP ) ; */ private static boolean hasGenerics ( Parameter [ ] param ) { } }
if ( param . length == 0 ) return false ; for ( Parameter parameter : param ) { ClassNode type = parameter . getType ( ) ; if ( hasGenerics ( type ) ) return true ; } return false ;
public class ByteArrayValueData { /** * { @ inheritDoc } */ protected boolean internalEquals ( ValueData another ) { } }
if ( another instanceof ByteArrayValueData ) { return Arrays . equals ( ( ( ByteArrayValueData ) another ) . value , value ) ; } return false ;
public class PathNormalizer { /** * Normalizes all the paths in a Set . * @ param paths * @ return */ public static final Set < String > normalizePaths ( Set < String > paths ) { } }
Set < String > ret = new HashSet < > ( ) ; for ( Iterator < String > it = paths . iterator ( ) ; it . hasNext ( ) ; ) { String path = normalizePath ( ( String ) it . next ( ) ) ; ret . add ( path ) ; } return ret ;
public class ParameterUtil { /** * Get parameter value from a string represenation * @ param parameterClass parameter class * @ param value string value representation * @ param sdf SimpleDateFormat used to parse Date from String * @ return parameter value from string representation * @ throws Exception if st...
Object result = value ; if ( result == null ) { return result ; } try { if ( QueryParameter . INTEGER_VALUE . equals ( parameterClass ) ) { result = Integer . parseInt ( value ) ; } else if ( QueryParameter . BYTE_VALUE . equals ( parameterClass ) ) { result = Byte . parseByte ( value ) ; } else if ( QueryParameter . S...
public class ByteCodeWriter { /** * Writes a float */ public void writeFloat ( float v ) throws IOException { } }
int bits = Float . floatToIntBits ( v ) ; _os . write ( bits >> 24 ) ; _os . write ( bits >> 16 ) ; _os . write ( bits >> 8 ) ; _os . write ( bits ) ;
public class SimpleMapSerializer { /** * 简单 map 的反序列化过程 , 用来反序列化 bolt 的 header * { @ link SofaRpcSerialization # deserializeHeader ( com . alipay . remoting . rpc . RequestCommand ) } * @ param bytes bolt header * @ return 反序列化后的 Map 对象 * @ throws DeserializationException DeserializationException */ public Map ...
Map < String , String > map = new HashMap < String , String > ( ) ; if ( bytes == null || bytes . length == 0 ) { return map ; } UnsafeByteArrayInputStream in = new UnsafeByteArrayInputStream ( bytes ) ; try { while ( in . available ( ) > 0 ) { String key = readString ( in ) ; String value = readString ( in ) ; map . p...
public class Transformation2D { /** * be zeroed . */ void transformWithoutShift ( Point2D [ ] pointsIn , int from , int count , Point2D [ ] pointsOut ) { } }
for ( int i = from , n = from + count ; i < n ; i ++ ) { Point2D p = pointsIn [ i ] ; double new_x = xx * p . x + xy * p . y ; double new_y = yx * p . x + yy * p . y ; pointsOut [ i ] . setCoords ( new_x , new_y ) ; }
public class FilterList { /** * Build the address tree from a string of data which contains valid * IPv4 and / or IPv6 addresses . The string array should contain all the * addresses . * @ param data * list of IPv4 and / or IPv6 address which are * to be used to create a new address tree . */ protected void b...
if ( data == null ) { return ; } int length = data . length ; for ( int i = 0 ; i < length ; i ++ ) { addAddressToList ( data [ i ] , validateOnly ) ; }
public class SshPublicKeyFileFactory { /** * Decode an SSH2 encoded public key as specified in the SSH2 transport * protocol . This consists of a String identifier specifying the algorithm * of the public key and the remaining data is formatted depending upon the * public key type . The supported key types are as...
ByteArrayReader bar = new ByteArrayReader ( encoded ) ; try { String algorithm = bar . readString ( ) ; try { SshPublicKey publickey = ( SshPublicKey ) ComponentManager . getInstance ( ) . supportedPublicKeys ( ) . getInstance ( algorithm ) ; publickey . init ( encoded , 0 , encoded . length ) ; return publickey ; } ca...
public class DimensionFromConstraint { /** * Public for Unit test * @ param constraint Constraint value ex : ST _ COORDIM ( the _ geom ) = 3 * @ param columnName Column name ex : the _ geom * @ return The dimension constraint [ 2-3] */ public static int dimensionFromConstraint ( String constraint , String columnN...
Matcher matcher = Z_CONSTRAINT_PATTERN . matcher ( constraint ) ; if ( matcher . find ( ) ) { String extractedColumnName = matcher . group ( 1 ) . replace ( "\"" , "" ) . replace ( "`" , "" ) ; if ( extractedColumnName . equalsIgnoreCase ( columnName ) ) { int constraint_value = Integer . valueOf ( matcher . group ( 8 ...
public class LongTermRetentionBackupsInner { /** * Lists all long term retention backups for a database . * @ param locationName The location of the database * @ param longTermRetentionServerName the String value * @ param longTermRetentionDatabaseName the String value * @ param onlyLatestPerDatabase Whether or...
ServiceResponse < Page < LongTermRetentionBackupInner > > response = listByDatabaseSinglePageAsync ( locationName , longTermRetentionServerName , longTermRetentionDatabaseName , onlyLatestPerDatabase , databaseState ) . toBlocking ( ) . single ( ) ; return new PagedList < LongTermRetentionBackupInner > ( response . bod...
public class FileTransferNegotiator { /** * Returns the file transfer negotiator related to a particular connection . * When this class is requested on a particular connection the file transfer * service is automatically enabled . * @ param connection The connection for which the transfer manager is desired * @...
FileTransferNegotiator fileTransferNegotiator = INSTANCES . get ( connection ) ; if ( fileTransferNegotiator == null ) { fileTransferNegotiator = new FileTransferNegotiator ( connection ) ; INSTANCES . put ( connection , fileTransferNegotiator ) ; } return fileTransferNegotiator ;
public class GeoPackageCoreImpl { /** * { @ inheritDoc } */ @ Override public BoundingBox getBoundingBox ( Projection projection , String table ) { } }
return getBoundingBox ( projection , table , false ) ;
public class Repeater { /** * When using the repeater ' s pad tag , it is possible to require a minimum number of * items render in the repeater . This method pads out the number of items until it * reaches the { @ link org . apache . beehive . netui . tags . databinding . repeater . pad . PadContext } ' s * < co...
if ( _padContext != null && ! _padContext . checkMinRepeat ( _renderedItems ) ) { /* since padding is now running , un - set the current item so that the last item isn ' t accessible during any later data binding */ _currentItem = null ; for ( int i = _renderedItems ; ! _padContext . checkMinRepeat ( i ) ; i ++ ) { _...
public class PartialApplicator { /** * Returns a Function with 5 arguments applied to the supplied HexFunction * @ param t1 Generic argument * @ param t2 Generic argument * @ param t3 Generic argument * @ param t4 Generic argument * @ param t5 Generic argument * @ param hexFunc Function that accepts 6 param...
return ( ) -> hexFunc . apply ( t1 , t2 , t3 , t4 , t5 , t6 ) ;
public class Ssh2Channel { /** * Sends a channel request . Many channels have extensions that are specific * to that particular channel type , an example of which is requesting a * pseudo terminal from an interactive session . * @ param requesttype * the name of the request , for example " pty - req " * @ par...
return sendRequest ( requesttype , wantreply , requestdata , true ) ;
public class JMessageClient { /** * Add sensitive words * @ param words String Set * @ return No content * @ throws APIConnectionException connect exception * @ throws APIRequestException request exception */ public ResponseWrapper addSensitiveWords ( Set < String > words ) throws APIConnectionException , APIRe...
return _sensitiveWordClient . addSensitiveWords ( words ) ;
public class PHPObjectMessage { /** * { @ inheritDoc } */ @ Override public Object send ( String ... arg0 ) throws Exception { } }
LOGGER . info ( "Send called with " + arg0 . length ) ; return object . invoke ( "get" + name ) ;
public class TIFFImageMetadata { /** * See : http : / / download . java . net / media / jai - imageio / javadoc / 1.1 / com / sun / media / imageio / plugins / tiff / package - summary . html */ @ Override protected IIOMetadataNode getStandardChromaNode ( ) { } }
IIOMetadataNode chroma = new IIOMetadataNode ( "Chroma" ) ; // Handle ColorSpaceType ( RGB / CMYK / YCbCr etc ) . . . Entry photometricTag = ifd . getEntryById ( TIFF . TAG_PHOTOMETRIC_INTERPRETATION ) ; int photometricValue = getValueAsInt ( photometricTag ) ; // No default for this tag ! int numChannelsValue = getSam...
public class WorkUnitDao { /** * Note : The ( a ) sub - query is written deliberately before the sub - queries ( b ) and ( c ) . * ( b ) and ( c ) return null values for woit _ ref _ num and waiting _ since . PostgreSQL is only able to * determine the type of this fields if there is a preceding sub - query ( that i...
String clusterCondition = getClusterCondition ( clusterName ) ; String sql = "" // ( a ) completing signals , tasks , human tasks + "SELECT woin.ref_num AS woin_ref_num, " + " '" + WorkType . COMPLETE_WORK_ITEM . name ( ) + "' AS type, " + " woit.ref_num AS woit_ref_num, " + " woit.date...
public class Simulator { /** * Returns the actors to broadcast trace events to . */ private List < Routee > makeRoutes ( ) { } }
return Registry . policies ( settings ) . stream ( ) . map ( policy -> { ActorRef actorRef = context ( ) . actorOf ( Props . create ( PolicyActor . class , policy ) ) ; context ( ) . watch ( actorRef ) ; return new ActorRefRoutee ( actorRef ) ; } ) . collect ( toList ( ) ) ;
public class ShellConsole { /** * Provides a specialized { @ link ShellConsole } to handle line editing , * history and completion . Relies on the JLine library * ( see < a href = " http : / / jline . sourceforge . net " > http : / / jline . sourceforge . net < / a > ) . */ public static ShellConsole getConsole ( S...
// We don ' t want a compile - time dependency on the JLine jar , so use // reflection to load and reference the JLine classes . ClassLoader classLoader = ShellConsole . class . getClassLoader ( ) ; if ( classLoader == null ) { // If the attempt to get a class specific class loader above failed // then fallback to the ...
public class HessianServlet { /** * Initialize the service , including the service object . */ public void init ( ServletConfig config ) throws ServletException { } }
super . init ( config ) ; try { if ( _homeImpl != null ) { } else if ( getInitParameter ( "home-class" ) != null ) { String className = getInitParameter ( "home-class" ) ; Class < ? > homeClass = loadClass ( className ) ; _homeImpl = homeClass . newInstance ( ) ; init ( _homeImpl ) ; } else if ( getInitParameter ( "ser...
public class RouteVersionFilter { /** * Filters route matches by specified version . * @ param < T > The target type * @ param < R > The return type * @ param request The HTTP request * @ return A filtered list of route matches */ @ Override public < T , R > Predicate < UriRouteMatch < T , R > > filter ( HttpRe...
ArgumentUtils . requireNonNull ( "request" , request ) ; if ( resolvingStrategies == null || resolvingStrategies . isEmpty ( ) ) { return ( match ) -> true ; } Optional < String > defaultVersion = defaultVersionProvider == null ? Optional . empty ( ) : Optional . of ( defaultVersionProvider . resolveDefaultVersion ( ) ...
public class DataFrames { /** * Convert a datavec schema to a * struct type in spark * @ param schema the schema to convert * @ return the datavec struct type */ public static StructType fromSchema ( Schema schema ) { } }
StructField [ ] structFields = new StructField [ schema . numColumns ( ) ] ; for ( int i = 0 ; i < structFields . length ; i ++ ) { switch ( schema . getColumnTypes ( ) . get ( i ) ) { case Double : structFields [ i ] = new StructField ( schema . getName ( i ) , DataTypes . DoubleType , false , Metadata . empty ( ) ) ;...
public class DeleteHandler { /** * Delete all traits from the specified vertex . * @ param instanceVertex * @ throws AtlasException */ private void deleteAllTraits ( AtlasVertex instanceVertex ) throws AtlasException { } }
List < String > traitNames = GraphHelper . getTraitNames ( instanceVertex ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Deleting traits {} for {}" , traitNames , string ( instanceVertex ) ) ; } String typeName = GraphHelper . getTypeName ( instanceVertex ) ; for ( String traitNameToBeDeleted : traitNames ) { Str...
public class RebootManager { /** * Notify all PendingShutdownObservers of the pending shutdown ! */ protected void notifyObservers ( int level ) { } }
final int warningsLeft = getWarnings ( ) . length - level - 1 ; final long msLeft = _nextReboot - System . currentTimeMillis ( ) ; _observers . apply ( new ObserverList . ObserverOp < PendingShutdownObserver > ( ) { public boolean apply ( PendingShutdownObserver observer ) { observer . shutdownPlanned ( warningsLeft , ...
public class AWSCodeCommitClient { /** * Updates the status of a pull request . * @ param updatePullRequestStatusRequest * @ return Result of the UpdatePullRequestStatus operation returned by the service . * @ throws PullRequestDoesNotExistException * The pull request ID could not be found . Make sure that you ...
request = beforeClientExecution ( request ) ; return executeUpdatePullRequestStatus ( request ) ;
public class ModelMapper { /** * Transform client / server model to a database model * @ param comment - client / server model to transform * @ return the database model */ public DbComment getDbComment ( final Comment comment ) { } }
final DbComment dbComment = new DbComment ( ) ; dbComment . setEntityId ( comment . getEntityId ( ) ) ; dbComment . setEntityType ( comment . getEntityType ( ) ) ; dbComment . setAction ( comment . getAction ( ) ) ; dbComment . setDbCommentText ( comment . getCommentText ( ) ) ; dbComment . setDbCommentedBy ( comment ....
public class RoundHelper { /** * Round using the { @ link RoundingMode # HALF _ EVEN } mode and exponential * representation * @ param dValue * The value to be rounded * @ param nScale * The precision scale * @ return the rounded value */ public static double getRoundedEvenExp ( final double dValue , @ Nonn...
return getRounded ( dValue , nScale , RoundingMode . HALF_EVEN , EDecimalType . EXP ) ;