signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GetCloudFormationStackRecordsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetCloudFormationStackRecordsRequest getCloudFormationStackRecordsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getCloudFormationStackRecordsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getCloudFormationStackRecordsRequest . getPageToken ( ) , PAGETOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to ...
public class XMLStreamReaderAsync { /** * / * Public methods */ @ Override public ISynchronizationPoint < Exception > start ( ) { } }
SynchronizationPoint < Exception > sp = new SynchronizationPoint < > ( ) ; io . canStartReading ( ) . listenAsync ( new Task . Cpu . FromRunnable ( ( ) -> { try { Starter start = new Starter ( io , defaultEncoding , charactersBuffersSize , maxBuffers ) ; stream = start . start ( ) ; next ( ) . listenInline ( sp ) ; } c...
public class LogRef { /** * * Service listener entry point . Releases the log service object if * one * has been fetched . * * * @ param evt * Service event */ public void serviceChanged ( ServiceEvent evt ) { } }
if ( evt . getServiceReference ( ) == logSR && evt . getType ( ) == ServiceEvent . UNREGISTERING ) { ungetLogService ( ) ; }
public class StockholmFileParser { /** * Parses a Stockholm file and returns a { @ link StockholmStructure } object with its content . This method returns * just after reaching the end of structure delimiter line ( " / / " ) , leaving any remaining empty lines unconsumed . * @ param scanner * from where to read t...
if ( scanner == null ) { if ( internalScanner != null ) { scanner = internalScanner ; } else { throw new IllegalArgumentException ( "No Scanner defined" ) ; } } String line = null ; int linesCount = 0 ; try { while ( scanner . hasNextLine ( ) ) { line = scanner . nextLine ( ) ; // if the file is empty // this condition...
public class Vector { /** * Returns the index of the last occurrence of the specified element in * this vector , searching backwards from { @ code index } , or returns - 1 if * the element is not found . * More formally , returns the highest index { @ code i } such that * < tt > ( i & nbsp ; & lt ; = & nbsp ; i...
if ( index >= elementCount ) throw new IndexOutOfBoundsException ( index + " >= " + elementCount ) ; if ( o == null ) { for ( int i = index ; i >= 0 ; i -- ) if ( elementData [ i ] == null ) return i ; } else { for ( int i = index ; i >= 0 ; i -- ) if ( o . equals ( elementData [ i ] ) ) return i ; } return - 1 ;
public class InternalLocaleBuilder { /** * Set extension / private subtags in a single string representation */ public InternalLocaleBuilder setExtensions ( String subtags ) throws LocaleSyntaxException { } }
if ( subtags == null || subtags . length ( ) == 0 ) { clearExtensions ( ) ; return this ; } subtags = subtags . replaceAll ( BaseLocale . SEP , LanguageTag . SEP ) ; StringTokenIterator itr = new StringTokenIterator ( subtags , LanguageTag . SEP ) ; List < String > extensions = null ; String privateuse = null ; int par...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcFurnitureType ( ) { } }
if ( ifcFurnitureTypeEClass == null ) { ifcFurnitureTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 262 ) ; } return ifcFurnitureTypeEClass ;
public class ConnectionFactoryRegistry { /** * Add a { @ link ConnectionFactory } to this registry . * @ param connectionFactory the connection factory */ public void addConnectionFactory ( ConnectionFactory < ? > connectionFactory ) { } }
if ( connectionFactories . containsKey ( connectionFactory . getProviderId ( ) ) ) { throw new IllegalArgumentException ( "A ConnectionFactory for provider '" + connectionFactory . getProviderId ( ) + "' has already been registered" ) ; } Class < ? > apiType = GenericTypeResolver . resolveTypeArgument ( connectionFacto...
public class CrawlOverview { /** * Saves a screenshot of every new state . */ @ Override public void onNewState ( CrawlerContext context , StateVertex vertex ) { } }
LOG . debug ( "onNewState" ) ; StateBuilder state = outModelCache . addStateIfAbsent ( vertex ) ; visitedStates . putIfAbsent ( state . getName ( ) , vertex ) ; saveScreenshot ( context . getBrowser ( ) , state . getName ( ) , vertex ) ; outputBuilder . persistDom ( state . getName ( ) , context . getBrowser ( ) . getU...
public class HyperionClient { /** * Return the headers for the supplied request * @ param request The data service request * @ return The headers */ protected Headers getHeaders ( Request request ) { } }
Headers . Builder headers = new Headers . Builder ( ) ; MultiMap resolvedHeaders = null ; if ( headerFactory != null ) resolvedHeaders = headerFactory . getHeaders ( ) ; if ( hasEntries ( resolvedHeaders ) ) resolvedHeaders = resolvedHeaders . merge ( request . getHeaders ( ) ) ; else resolvedHeaders = request . getHea...
public class EnsemblRestClientFactory { /** * Create and return a new sequence service with the specified endpoint URL . * @ since 1.3 * @ param endpointUrl endpoint URL , must not be null * @ return a new sequence service with the specified endpoint URL */ public SequenceService createSequenceService ( final Str...
return new RestAdapter . Builder ( ) . setEndpoint ( endpointUrl ) . setErrorHandler ( errorHandler ) . setConverter ( new JacksonSequenceConverter ( jsonFactory ) ) . build ( ) . create ( SequenceService . class ) ;
public class Utils { /** * Returns the given date time formatted using the given format and timezone . * @ param dt The date to format ( in milliseconds ) * @ param tz The timezone for the date ( or null ) * @ param format The format to use for the date * @ return The formatted date */ static public String getF...
SimpleDateFormat df = new SimpleDateFormat ( format ) ; if ( tz != null ) df . setTimeZone ( tz ) ; return df . format ( new Date ( dt ) ) ;
public class InputStreamOrByteBufferAdapter { /** * Read a long at a specific offset ( without changing the current read point ) . * @ param offset * The buffer offset to read from . * @ return The long at the buffer offset . * @ throws IOException * If there was an exception while reading . */ public long re...
final int bytesToRead = Math . max ( 0 , offset + 8 - used ) ; if ( bytesToRead > 0 ) { readMore ( bytesToRead ) ; } return ( ( buf [ offset ] & 0xffL ) << 56 ) | ( ( buf [ offset + 1 ] & 0xffL ) << 48 ) | ( ( buf [ offset + 2 ] & 0xffL ) << 40 ) | ( ( buf [ offset + 3 ] & 0xffL ) << 32 ) | ( ( buf [ offset + 4 ] & 0xf...
public class RosterExchangeManager { /** * Fires roster exchange listeners . */ private void fireRosterExchangeListeners ( Jid from , Iterator < RemoteRosterEntry > remoteRosterEntries ) { } }
RosterExchangeListener [ ] listeners ; synchronized ( rosterExchangeListeners ) { listeners = new RosterExchangeListener [ rosterExchangeListeners . size ( ) ] ; rosterExchangeListeners . toArray ( listeners ) ; } for ( RosterExchangeListener listener : listeners ) { listener . entriesReceived ( from , remoteRosterEntr...
public class Distribution { /** * < pre > * Must be in increasing order of ` value ` field . * < / pre > * < code > repeated . google . api . Distribution . Exemplar exemplars = 10 ; < / code > */ public java . util . List < ? extends com . google . api . Distribution . ExemplarOrBuilder > getExemplarsOrBuilderLi...
return exemplars_ ;
public class WebcamLogConfigurator { /** * Configure SLF4J . * @ param is input stream to logback configuration xml */ public static void configure ( InputStream is ) { } }
ClassLoader cl = Thread . currentThread ( ) . getContextClassLoader ( ) ; try { String [ ] names = { "ch.qos.logback.classic.LoggerContext" , "ch.qos.logback.classic.joran.JoranConfigurator" , } ; for ( String name : names ) { Class . forName ( name , false , cl ) ; } ch . qos . logback . classic . LoggerContext contex...
public class PinView { /** * Clear PinBoxes values */ public void clear ( ) { } }
for ( int i = 0 ; i < mNumberPinBoxes ; i ++ ) { getPinBox ( i ) . getText ( ) . clear ( ) ; } checkPinBoxesAvailableOrder ( ) ;
public class AbsFilesScanner { /** * / * list */ public List < T > list ( File [ ] files , int start , int count ) { } }
final List < T > results = new ArrayList < > ( ) ; scan ( files , start , count , new Function < File , Void > ( ) { @ Override public Void apply ( File file ) { results . add ( file2list ( file ) ) ; return null ; } } ) ; return results ;
public class PoolStatisticsImpl { /** * Add delta to total usage time * @ param delta The value */ public void deltaTotalUsageTime ( long delta ) { } }
if ( enabled . get ( ) && delta > 0 ) { totalUsageTime . addAndGet ( delta ) ; totalUsageTimeInvocations . incrementAndGet ( ) ; if ( delta > maxUsageTime . get ( ) ) maxUsageTime . set ( delta ) ; }
public class CmsJspImageBean { /** * Adds a number of size variations to the source set . < p > * In case the screen size is not really known , it may be a good idea to add * some variations for large images to make sure there are some common options in case the basic * image is very large . < p > * @ param min...
int imageWidth = getWidth ( ) ; if ( imageWidth > minWidth ) { // only add variants in case the image is larger then the given minimum int srcSetMaxWidth = getSrcSetMaxWidth ( ) ; for ( double factor : m_sizeVariants ) { long width = Math . round ( imageWidth * factor ) ; if ( width > srcSetMaxWidth ) { if ( width <= m...
public class RottenTomatoesApi { /** * Detailed information on a specific movie specified by Id . * @ param movieId RT Movie ID to locate * @ return * @ throws RottenTomatoesException */ public RTMovie getDetailedInfo ( int movieId ) throws RottenTomatoesException { } }
properties . clear ( ) ; properties . put ( ApiBuilder . PROPERTY_ID , String . valueOf ( movieId ) ) ; properties . put ( ApiBuilder . PROPERTY_URL , URL_MOVIES_INFO ) ; return response . getResponse ( RTMovie . class , properties ) ;
public class EmbeddableTransactionImpl { /** * Called by interceptor when incoming reply arrives . * This polices the single threaded operation of the transaction . */ @ Override public void resumeAssociation ( ) { } }
final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resumeAssociation" ) ; resumeAssociation ( true ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resumeAssociation" ) ;
public class CommercePriceEntryPersistenceImpl { /** * Returns the commerce price entry where commercePriceListId = & # 63 ; and CPInstanceUuid = & # 63 ; or throws a { @ link NoSuchPriceEntryException } if it could not be found . * @ param commercePriceListId the commerce price list ID * @ param CPInstanceUuid the...
CommercePriceEntry commercePriceEntry = fetchByC_C ( commercePriceListId , CPInstanceUuid ) ; if ( commercePriceEntry == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commercePriceListId=" ) ; msg . append ( commercePriceListId ) ; msg . append ( ", C...
public class DefaultLdapAccountStateHandler { /** * Handle an account state warning produced by ldaptive account state machinery . * Override this method to provide custom warning message handling . * @ param warning the account state warning messages . * @ param response Ldaptive authentication response . * @ ...
LOGGER . debug ( "Handling account state warning [{}]" , warning ) ; if ( warning == null ) { LOGGER . debug ( "Account state warning not defined" ) ; return ; } if ( warning . getExpiration ( ) != null ) { val expDate = DateTimeUtils . zonedDateTimeOf ( warning . getExpiration ( ) ) ; val ttl = ZonedDateTime . now ( Z...
public class DomUtils { /** * To get all the textual content in the dom * @ param document * @ param individualTokens : default True : when set to true , each text node from dom is used to build the * text content : when set to false , the text content of whole is obtained at once . * @ return */ public static ...
String textContent = null ; if ( individualTokens ) { List < String > tokens = getTextTokens ( document ) ; textContent = StringUtils . join ( tokens , "," ) ; } else { textContent = document . getDocumentElement ( ) . getTextContent ( ) . trim ( ) . replaceAll ( "\\s+" , "," ) ; } return textContent ;
public class HttpJsonRpcClient { /** * Create a new instance of { @ link OkHttpClient } . Sub - class my override this method to customize * the { @ link OkHttpClient } instance . * @ return * @ since 0.9.1.6 */ protected OkHttpClient buildHttpClient ( ) { } }
OkHttpClient . Builder builder = new OkHttpClient . Builder ( ) . readTimeout ( readTimeoutMs , TimeUnit . MILLISECONDS ) . writeTimeout ( writeTimeoutMs , TimeUnit . MILLISECONDS ) ; OkHttpClient client = builder . build ( ) ; return client ;
public class Util { /** * write a command to the output stream */ static void write ( Command cmd , OutputStream out ) throws UnsupportedEncodingException , IOException { } }
encode ( cmd . getCommand ( ) , out ) ; for ( Parameter param : cmd . getParameters ( ) ) { encode ( String . format ( "=%s=%s" , param . getName ( ) , param . hasValue ( ) ? param . getValue ( ) : "" ) , out ) ; } String tag = cmd . getTag ( ) ; if ( ( tag != null ) && ! tag . equals ( "" ) ) { encode ( String . forma...
public class GinMapBinder { /** * Returns a binding builder used to add a new entry in the map . Each key must be distinct ( and * non - null ) . Bound providers will be evaluated each time the map is injected . * It is an error to call this method without also calling one of the { @ code to } methods on the * re...
BindingRecorder recorder = createRecorder ( ) ; if ( key instanceof String ) { recorder . bindConstant ( ) . to ( ( String ) key ) ; } else if ( key instanceof Enum < ? > ) { recorder . bindConstant ( ) . to ( ( Enum ) key ) ; } else if ( key instanceof Integer ) { recorder . bindConstant ( ) . to ( ( Integer ) key ) ;...
public class Proxy { /** * called from generated proxies */ private < J , T extends Proxy < J > > T marshalConstructor ( final int opcode , final J implementation , final int version , final Class < T > newProxyCls , final long argsPointer ) { } }
try { final long wlProxy = WaylandClientCore . INSTANCE ( ) . wl_proxy_marshal_array_constructor ( this . pointer , opcode , argsPointer , InterfaceMeta . get ( newProxyCls ) . pointer . address ) ; return marshalProxy ( wlProxy , implementation , version , newProxyCls ) ; } catch ( final NoSuchMethodException | Illega...
public class CaseForEqBuilder { /** * Enum */ public < T extends Enum < T > > Cases < T , EnumExpression < T > > then ( T then ) { } }
return thenEnum ( ConstantImpl . create ( then ) ) ;
public class Criteria { /** * Adds and equals ( = ) criteria , * CUST _ ID = 10034 * attribute will NOT be translated into column name * @ param column The column name to be used without translation * @ param value An object representing the value of the column */ public void addColumnEqualTo ( String column , ...
// PAW // SelectionCriteria c = ValueCriteria . buildEqualToCriteria ( column , value , getAlias ( ) ) ; SelectionCriteria c = ValueCriteria . buildEqualToCriteria ( column , value , getUserAlias ( column ) ) ; c . setTranslateAttribute ( false ) ; addSelectionCriteria ( c ) ;
public class UtlJsp { /** * < p > Clip file name from full path . < / p > * @ param pPath string * @ return String file name */ public final String evalFileNameWithoutExtension ( final String pPath ) { } }
int idxStart = 0 ; int idxEnd = pPath . length ( ) ; int lastFs = pPath . lastIndexOf ( '/' ) ; if ( lastFs == - 1 ) { lastFs = pPath . lastIndexOf ( '\\' ) ; } if ( lastFs != - 1 ) { idxStart = lastFs + 1 ; } int idxDot = pPath . lastIndexOf ( '.' ) ; if ( idxDot != - 1 ) { idxEnd = idxDot ; } return pPath . substring...
public class OWLDataMinCardinalityImpl_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 ...
deserialize ( streamReader , instance ) ;
public class Delta { /** * Compute differential coding given an initial value . Output is written * to a provided array : must have length " length " or better . * @ param data * data to be modified * @ param start * starting index * @ param length * number of integers to process * @ param init * init...
for ( int i = length - 1 ; i > 0 ; -- i ) { out [ i ] = data [ start + i ] - data [ start + i - 1 ] ; } out [ 0 ] = data [ start ] - init ; return data [ start + length - 1 ] ;
public class JobServiceClient { /** * Updates specified job . * < p > Typically , updated contents become visible in search results within 10 seconds , but it may * take up to 5 minutes . * < p > Sample code : * < pre > < code > * try ( JobServiceClient jobServiceClient = JobServiceClient . create ( ) ) { *...
UpdateJobRequest request = UpdateJobRequest . newBuilder ( ) . setJob ( job ) . build ( ) ; return updateJob ( request ) ;
public class JournalInputFile { /** * When we have processed the file , move it to the archive directory . */ public void closeAndRename ( File archiveDirectory ) throws JournalException { } }
try { xmlReader . close ( ) ; fileReader . close ( ) ; File archiveFile = new File ( archiveDirectory , file . getName ( ) ) ; /* * java . io . File . renameTo ( ) has a known bug when working across * file - systems , see : * http : / / bugs . sun . com / bugdatabase / view _ bug . do ? bug _ id = 4073756 So * i...
public class KeySet { /** * Creates a key set that will retrieve all rows of a table or index . */ public static KeySet all ( ) { } }
return new KeySet ( true , ImmutableList . < Key > of ( ) , ImmutableList . < KeyRange > of ( ) ) ;
public class OptionGroupOption { /** * The option settings that are available ( and the default value ) for each option in an option group . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setOptionGroupOptionSettings ( java . util . Collection ) } or * { @...
if ( this . optionGroupOptionSettings == null ) { setOptionGroupOptionSettings ( new com . amazonaws . internal . SdkInternalList < OptionGroupOptionSetting > ( optionGroupOptionSettings . length ) ) ; } for ( OptionGroupOptionSetting ele : optionGroupOptionSettings ) { this . optionGroupOptionSettings . add ( ele ) ; ...
public class DefaultPropertyPlaceholderConfigurer { /** * @ param placeholderWithDefault default placeholder * @ param props properties instance * @ param systemPropertiesMode system properties mode * @ return the resolved placeholder */ protected final String resolvePlaceholder ( final String placeholderWithDefa...
String placeholder = getPlaceholder ( placeholderWithDefault ) ; String resolved = super . resolvePlaceholder ( placeholder , props , systemPropertiesMode ) ; if ( resolved == null ) { resolved = getDefault ( placeholderWithDefault ) ; } return resolved ;
public class ImageBandMath { /** * Computes the standard deviation for each pixel across all bands in the { @ link Planar } * image . * @ param input Planar image - not modified * @ param output Gray scale image containing average pixel values - modified * @ param avg Input Gray scale image containing average i...
stdDev ( input , output , avg , 0 , input . getNumBands ( ) - 1 ) ;
public class IdentityOperator { /** * Returns the selected candidates unaltered . * @ param selectedCandidates The candidates to " evolve " ( or do * nothing to in this case ) . * @ param rng A source of randomness ( not used ) . * @ return The unaltered candidates . */ public List < T > apply ( List < T > sele...
return new ArrayList < T > ( selectedCandidates ) ;
public class DeleteWorkGroupRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteWorkGroupRequest deleteWorkGroupRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteWorkGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteWorkGroupRequest . getWorkGroup ( ) , WORKGROUP_BINDING ) ; protocolMarshaller . marshall ( deleteWorkGroupRequest . getRecursiveDeleteOption ( ) , RECURSIV...
public class ZTFilePermissionsUtil { /** * Convert Posix mode to { @ link ZTFilePermissions } * @ param mode * @ return */ static ZTFilePermissions fromPosixFileMode ( int mode ) { } }
ZTFilePermissions permissions = new ZTFilePermissions ( ) ; permissions . setOwnerCanExecute ( ( mode & OWNER_EXECUTE_FLAG ) > 0 ) ; permissions . setGroupCanExecute ( ( mode & GROUP_EXECUTE_FLAG ) > 0 ) ; permissions . setOthersCanExecute ( ( mode & OTHERS_EXECUTE_FLAG ) > 0 ) ; permissions . setOwnerCanWrite ( ( mode...
public class SpatialAnchorsAccountsInner { /** * Regenerate 1 Key of a Spatial Anchors Account . * @ param resourceGroupName Name of an Azure resource group . * @ param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account . * @ param serial serial of key to be regenerated * @ throws Illega...
return regenerateKeysWithServiceResponseAsync ( resourceGroupName , spatialAnchorsAccountName , serial ) . toBlocking ( ) . single ( ) . body ( ) ;
public class MeterValue { /** * Return a new { @ link MeterValue } instance for the given String value . The value may * contain a simple number , or a { @ link Duration duration string } . * @ param value the source value * @ return a { @ link MeterValue } instance */ public static MeterValue valueOf ( String va...
if ( isNumber ( value ) ) { return new MeterValue ( Long . parseLong ( value ) ) ; } return new MeterValue ( durationConverter . convert ( value ) ) ;
public class SegmentConstant { /** * This method parses the given { @ code bytes } from { @ code source } to { @ code byte [ ] } . * @ param bytes are the bytes encoded as { @ link String } in the form { @ code HH ( [ - ] HH ) * } where { @ code HH } is a hex * encoded byte ( [ 0-9A - F ] { 2 } ) . Example : " FE -...
NlsNullPointerException . checkNotNull ( source , bytes ) ; int length = bytes . length ( ) ; if ( ( length == 0 ) || ( length % 3 != 0 ) ) { throw new NlsIllegalArgumentException ( bytes , source ) ; } length = length / 3 ; byte [ ] result = new byte [ length ] ; int start = 0 ; for ( int i = 0 ; i < length ; i ++ ) {...
public class SimpleAuthenticator { /** * Unregisters a PasswordAuthentication with a given URL address . */ public PasswordAuthentication unregisterPasswordAuthentication ( URL pURL ) { } }
return unregisterPasswordAuthentication ( NetUtil . createInetAddressFromURL ( pURL ) , pURL . getPort ( ) , pURL . getProtocol ( ) , null , BASIC ) ;
public class ReportingUtils { /** * handles Hadoop ' old ' and ' new ' API reporting classes , namely { @ link Reporter } and { @ link TaskInputOutputContext } */ @ SuppressWarnings ( { } }
"rawtypes" } ) static void report ( Progressable progressable , Stats stats ) { progressable = ( Progressable ) CompatHandler . unwrap ( progressable ) ; if ( progressable == null || progressable == Reporter . NULL ) { return ; } if ( progressable instanceof Reporter ) { Reporter reporter = ( Reporter ) progressable ; ...
public class CollectorConfiguration { /** * This method merges the supplied configuration into this configuration . If * a conflict is found , if overwrite is true then the supplied config element * will be used , otherwise an exception will be raised . * @ param config The configuration to merge * @ param over...
for ( String key : config . getInstrumentation ( ) . keySet ( ) ) { if ( getInstrumentation ( ) . containsKey ( key ) && ! overwrite ) { throw new IllegalArgumentException ( "Instrumentation for '" + key + "' already exists" ) ; } getInstrumentation ( ) . put ( key , config . getInstrumentation ( ) . get ( key ) ) ; } ...
public class ZipUtil { /** * This method check if the input argument is a zip directory containing files . * @ param key * @ return true if bv is a zip directory containing files , false otherwise . */ static boolean isZipDirectory ( Key key ) { } }
Iced ice = DKV . getGet ( key ) ; if ( ice == null ) throw new H2OIllegalArgumentException ( "Missing data" , "Did not find any data under " + "key " + key ) ; ByteVec bv = ( ByteVec ) ( ice instanceof ByteVec ? ice : ( ( Frame ) ice ) . vecs ( ) [ 0 ] ) ; return isZipDirectory ( bv ) ;
public class BusCommandContextFactory { /** * Creates a new { @ link BusCommandContext } with the given { @ code endpoint } . * @ param endpoint the queue or topic the present request came from * @ return a new { @ link BusCommandContext } */ public BusCommandContext newCommandContext ( Endpoint endpoint ) { } }
return new BusCommandContext ( endpoint , connectionFactoryProvider . getConnectionFactory ( ) , wsEndpoints . getUiClientSessions ( ) , wsEndpoints . getFeedSessions ( ) ) ;
public class SymSpell { /** * / < returns > True if file loaded , or false if file not found . < / returns > */ public boolean loadDictionary ( String corpus , int termIndex , int countIndex ) { } }
File file = new File ( corpus ) ; if ( ! file . exists ( ) ) { return false ; } BufferedReader br = null ; try { br = Files . newBufferedReader ( Paths . get ( corpus ) , StandardCharsets . UTF_8 ) ; } catch ( IOException ex ) { System . out . println ( ex . getMessage ( ) ) ; } if ( br == null ) { return false ; } ret...
public class Loader { /** * Returns the class entry . * @ param name name of the class */ protected ClassEntry getClassEntry ( String name , String pathName ) throws ClassNotFoundException { } }
// Find the path corresponding to the class Path path = getPath ( pathName ) ; if ( path != null && path . length ( ) > 0 ) { return new ClassEntry ( _loader , name , path , path , getCodeSource ( path ) ) ; } else return null ;
public class InternalXbaseWithAnnotationsParser { /** * $ ANTLR start synpred33 _ InternalXbaseWithAnnotations */ public final void synpred33_InternalXbaseWithAnnotations_fragment ( ) throws RecognitionException { } }
// InternalXbaseWithAnnotations . g : 3550:6 : ( ( ( ( ruleJvmFormalParameter ) ) ' : ' ) ) // InternalXbaseWithAnnotations . g : 3550:7 : ( ( ( ruleJvmFormalParameter ) ) ' : ' ) { // InternalXbaseWithAnnotations . g : 3550:7 : ( ( ( ruleJvmFormalParameter ) ) ' : ' ) // InternalXbaseWithAnnotations . g : 3551:7 : ( (...
public class ExtensionConfig { /** * Convert a list of { @ link ExtensionConfig } to a header value * @ param configs the list of extension configs * @ return the header value ( null if no configs present ) */ public static String toHeaderValue ( List < ExtensionConfig > configs ) { } }
if ( ( configs == null ) || ( configs . isEmpty ( ) ) ) { return null ; } StringBuilder parameters = new StringBuilder ( ) ; boolean needsDelim = false ; for ( ExtensionConfig ext : configs ) { if ( needsDelim ) { parameters . append ( ", " ) ; } parameters . append ( ext . getParameterizedName ( ) ) ; needsDelim = tru...
public class ParameterMapEntryMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ParameterMapEntry parameterMapEntry , ProtocolMarshaller protocolMarshaller ) { } }
if ( parameterMapEntry == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( parameterMapEntry . getKey ( ) , KEY_BINDING ) ; protocolMarshaller . marshall ( parameterMapEntry . getValues ( ) , VALUES_BINDING ) ; } catch ( Exception e ) { throw...
public class DatabaseProvider { /** * Use an externally configured DataSource , Flavor , and optionally a shutdown hook . * The shutdown hook may be null if you don ' t want calls to Builder . close ( ) to attempt * any shutdown . The DataSource and Flavor are mandatory . */ @ CheckReturnValue public static Builder...
return new BuilderImpl ( pool . poolShutdown , ( ) -> { try { return pool . dataSource . getConnection ( ) ; } catch ( Exception e ) { throw new DatabaseException ( "Unable to obtain a connection from the DataSource" , e ) ; } } , new OptionsDefault ( pool . flavor ) ) ;
public class BruteForceDiscordImplementation { /** * Finds the best discord . BRUTE FORCE algorithm . * @ param series the data . * @ param windowSize the SAX sliding window size . * @ param globalRegistry the visit registry to use . * @ param nThreshold the z - Normalization threshold value . * @ return the ...
Date start = new Date ( ) ; long distanceCallsCounter = 0 ; double bestSoFarDistance = - 1.0 ; int bestSoFarPosition = - 1 ; VisitRegistry outerRegistry = globalRegistry . clone ( ) ; int outerIdx = - 1 ; while ( - 1 != ( outerIdx = outerRegistry . getNextRandomUnvisitedPosition ( ) ) ) { // outer loop outerRegistry . ...
public class PropertyImpl { /** * { @ inheritDoc } */ public void setValue ( InputStream stream ) throws ValueFormatException , VersionException , LockException , ConstraintViolationException , RepositoryException { } }
setValue ( valueFactory . createValue ( stream ) ) ;
public class ScreenAwtAbstract { /** * Add a keyboard device . */ private void addDeviceKeyboard ( ) { } }
final KeyboardAwt keyboard = new KeyboardAwt ( ) ; addKeyboardListener ( keyboard ) ; devices . put ( Keyboard . class , keyboard ) ; devices . put ( InputDeviceDirectional . class , keyboard ) ;
public class MessageProcessRunnerTask { /** * Run this process . * @ param job The process to run . * @ param properties The properties to pass to this process . */ public void runProcess ( BaseProcess job , Map < String , Object > properties ) { } }
if ( properties == null ) properties = new HashMap < String , Object > ( ) ; Map < String , Object > propMessage = m_message . getMessageHeader ( ) . getProperties ( ) ; if ( propMessage != null ) properties . putAll ( propMessage ) ; properties . put ( DBParams . MESSAGE , m_message ) ; job . init ( this , null , prop...
public class ServiceApiWrapper { /** * Upload content data . * @ param token Comapi access token . * @ param folder Folder name to put the file in . * @ param data Content data . * @ return Observable emitting details of uploaded content . */ Observable < ComapiResult < UploadContentResponse > > doUploadContent...
return wrapObservable ( service . uploadContent ( AuthManager . addAuthPrefix ( token ) , apiSpaceId , folder , name , data . getBody ( ) ) . map ( mapToComapiResult ( ) ) , log , "Uploading content " + name ) ;
public class CheckInstrumentableClassAdapter { /** * Indicate whether or not the target method is instrumentable . * @ param access * the method property flags * @ param methodName * the name of the method * @ return true if the method is not synthetic , is not native , and is * not named toString or hashCo...
if ( ( access & Opcodes . ACC_SYNTHETIC ) != 0 ) { return false ; } if ( ( access & Opcodes . ACC_NATIVE ) != 0 ) { return false ; } if ( ( access & Opcodes . ACC_ABSTRACT ) != 0 ) { return false ; } if ( methodName . equals ( "toString" ) && descriptor . equals ( "()Ljava/lang/String;" ) ) { return false ; } if ( meth...
public class XUnaryOperationImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case XbasePackage . XUNARY_OPERATION__OPERAND : return operand != null ; } return super . eIsSet ( featureID ) ;
public class IpHelper { /** * Determines if a specified host or IP refers to the local machine * @ param addr * String The host / IP * @ return boolean True if the input points to the local machine , otherwise false */ public static boolean isLocalAddress ( String addr ) { } }
try { InetAddress iAddr = InetAddress . getByName ( addr ) ; return isLocalAddress ( iAddr ) ; } catch ( UnknownHostException e ) { return false ; }
public class AndroidMobileCommandHelper { /** * This method forms a { @ link Map } of parameters to * Retrieve visibility and bounds information of the status and navigation bars . * @ return a key - value pair . The key is the command name . The value is a { @ link Map } command arguments . */ public static Map . ...
return new AbstractMap . SimpleEntry < > ( GET_SYSTEM_BARS , ImmutableMap . of ( ) ) ;
public class PatternsImpl { /** * Deletes the patterns with the specified IDs . * @ param appId The application ID . * @ param versionId The version ID . * @ param patternIds The patterns IDs . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the Operat...
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgu...
public class ClassFile { /** * Returns the Procyon field definition for a specified variable , * or null if not found . */ public FieldDeclaration getFieldNode ( String name , String signature ) { } }
for ( EntityDeclaration node : type . getMembers ( ) ) { if ( node . getEntityType ( ) == EntityType . FIELD ) { FieldDeclaration field = ( FieldDeclaration ) node ; if ( field . getName ( ) . equals ( name ) && signature ( field . getReturnType ( ) ) . equals ( signature ) ) { return field ; } } } return null ;
public class CmsDriverManager { /** * Adds a new relation to the given resource . < p > * @ param dbc the database context * @ param resource the resource to add the relation to * @ param target the target of the relation * @ param type the type of the relation * @ param importCase if importing relations * ...
if ( type . isDefinedInContent ( ) ) { throw new CmsIllegalArgumentException ( Messages . get ( ) . container ( Messages . ERR_ADD_RELATION_IN_CONTENT_3 , dbc . removeSiteRoot ( resource . getRootPath ( ) ) , dbc . removeSiteRoot ( target . getRootPath ( ) ) , type . getLocalizedName ( dbc . getRequestContext ( ) . get...
public class DescribeRemediationExecutionStatusRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeRemediationExecutionStatusRequest describeRemediationExecutionStatusRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeRemediationExecutionStatusRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeRemediationExecutionStatusRequest . getConfigRuleName ( ) , CONFIGRULENAME_BINDING ) ; protocolMarshaller . marshall ( describeRemediat...
public class ElevationService { /** * Processess the Javascript response and generates the required objects * that are then passed back to the original callback . * @ param results * @ param status */ public void processResponse ( Object results , Object status ) { } }
ElevationStatus pStatus = ElevationStatus . UNKNOWN_ERROR ; if ( status instanceof String && results instanceof JSObject ) { pStatus = ElevationStatus . valueOf ( ( String ) status ) ; if ( ElevationStatus . OK . equals ( pStatus ) ) { JSObject jsres = ( JSObject ) results ; Object len = jsres . getMember ( "length" ) ...
public class StreamProjection { /** * Projects a { @ link Tuple } { @ link DataStream } to the previously selected fields . * @ return The projected DataStream . * @ see Tuple * @ see DataStream */ public < T0 , T1 > SingleOutputStreamOperator < Tuple2 < T0 , T1 > > projectTuple2 ( ) { } }
TypeInformation < ? > [ ] fTypes = extractFieldTypes ( fieldIndexes , dataStream . getType ( ) ) ; TupleTypeInfo < Tuple2 < T0 , T1 > > tType = new TupleTypeInfo < Tuple2 < T0 , T1 > > ( fTypes ) ; return dataStream . transform ( "Projection" , tType , new StreamProject < IN , Tuple2 < T0 , T1 > > ( fieldIndexes , tTyp...
public class ClassProcessorTask { /** * / * package private */ void markAsProcessed ( final CtClass ctClass , final ClassProcessor processor ) { } }
final ClassFile classFile = ctClass . getClassFile ( ) ; AnnotationsAttribute annotationAttribute = null ; Annotation annotation = null ; for ( final Object attributeObject : classFile . getAttributes ( ) ) { if ( attributeObject instanceof AnnotationsAttribute ) { annotationAttribute = ( AnnotationsAttribute ) attribu...
public class HashUtils { /** * Hashes a string using the SHA - 256 algorithm . * @ since 1.1 * @ param data the string to hash * @ param charset the charset of the string * @ return the SHA - 256 hash of the string * @ throws NoSuchAlgorithmException the algorithm is not supported by existing providers */ pub...
return sha256Hash ( data . getBytes ( charset ) ) ;
public class MergeMojo { /** * Opens an OutputStream , based on the supplied file * @ param target { @ linkplain File } * @ return { @ linkplain OutputStream } * @ throws MojoExecutionException */ protected OutputStream initOutput ( final File file ) throws MojoExecutionException { } }
// stream to return final OutputStream stream ; // plenty of things can go wrong . . . try { // directory ? if ( file . isDirectory ( ) ) { throw new MojoExecutionException ( "File " + file . getAbsolutePath ( ) + " is directory!" ) ; } // already exists & & can ' t remove it ? if ( file . exists ( ) && ! file . delete...
public class MapfishMapContext { /** * Return the map bounds rotated with the set rotation . The bounds are adapted to rounding changes of the * size of the set paint area . * @ return Rotated bounds . */ public MapBounds getRotatedBoundsAdjustedForPreciseRotatedMapSize ( ) { } }
Rectangle2D . Double paintAreaPrecise = getRotatedMapSizePrecise ( ) ; Rectangle paintArea = new Rectangle ( MapfishMapContext . rectangleDoubleToDimension ( paintAreaPrecise ) ) ; return getRotatedBounds ( paintAreaPrecise , paintArea ) ;
public class DateTieredCompactionStrategy { /** * Group files with similar min timestamp into buckets . Files with recent min timestamps are grouped together into * buckets designated to short timespans while files with older timestamps are grouped into buckets representing * longer timespans . * @ param files pa...
// Sort files by age . Newest first . final List < Pair < T , Long > > sortedFiles = Lists . newArrayList ( files ) ; Collections . sort ( sortedFiles , Collections . reverseOrder ( new Comparator < Pair < T , Long > > ( ) { public int compare ( Pair < T , Long > p1 , Pair < T , Long > p2 ) { return p1 . right . compar...
public class CmsEmbeddedDialogHandler { /** * Called when site and or project have been changed . < p > * @ param sitePath the site path to the resource to display * @ param serverLink the server link to the resource to display */ public void onSiteOrProjectChange ( String sitePath , String serverLink ) { } }
if ( m_frame != null ) { m_frame . removeFromParent ( ) ; m_frame = null ; } if ( m_handler != null ) { m_handler . onSiteOrProjectChange ( sitePath , serverLink ) ; } else { Window . Location . assign ( serverLink ) ; }
public class TimestampTracker { /** * Remove a timestamp ( of completed transaction ) */ public synchronized void removeTimestamp ( long ts ) throws NoSuchElementException { } }
Preconditions . checkState ( ! closed , "tracker closed " ) ; Preconditions . checkState ( allocationsInProgress > 0 , "allocationsInProgress should be > 0 " + allocationsInProgress ) ; Objects . requireNonNull ( node ) ; if ( timestamps . remove ( ts ) == false ) { throw new NoSuchElementException ( "Timestamp " + ts ...
public class GDiscreteFourierTransformOps { /** * Performs element - wise complex multiplication between two complex images . * @ param complexA ( Input ) Complex image * @ param complexB ( Input ) Complex image * @ param complexC ( Output ) Complex image */ public static void multiplyComplex ( ImageInterleaved c...
if ( complexB instanceof InterleavedF32 ) { DiscreteFourierTransformOps . multiplyComplex ( ( InterleavedF32 ) complexA , ( InterleavedF32 ) complexB , ( InterleavedF32 ) complexC ) ; } else if ( complexB instanceof InterleavedF64 ) { DiscreteFourierTransformOps . multiplyComplex ( ( InterleavedF64 ) complexA , ( Inter...
public class ElementDiff { /** * Compare two { @ link IChemObject } classes and return the difference as a { @ link String } . * @ param first the first of the two classes to compare * @ param second the second of the two classes to compare * @ return a { @ link String } representation of the difference between t...
IDifference difference = difference ( first , second ) ; if ( difference == null ) { return "" ; } else { return difference . toString ( ) ; }
public class CmsJobEditView { /** * Binds the given component to the given bean property . < p > * @ param field the component * @ param property the bean property */ void bindField ( AbstractField < ? > field , String property ) { } }
m_group . bind ( field , property ) ; field . setCaption ( CmsVaadinUtils . getMessageText ( "label." + property ) ) ; field . setDescription ( CmsVaadinUtils . getMessageText ( "label." + property + ".help" ) ) ;
public class AWSApplicationDiscoveryClient { /** * Creates one or more tags for configuration items . Tags are metadata that help you categorize IT assets . This API * accepts a list of multiple configuration items . * @ param createTagsRequest * @ return Result of the CreateTags operation returned by the service...
request = beforeClientExecution ( request ) ; return executeCreateTags ( request ) ;
public class IntHashMap { /** * Return an array with values in this map * @ return array with values */ public V [ ] getValues ( ) { } }
final V [ ] array = factory . newArray ( elementCount ) ; int i = 0 ; for ( final V v : this ) { array [ i ++ ] = v ; } return array ;
public class AbstractProxyFactory { /** * Returns the invocation handler object of the given proxy object . * @ param obj The object * @ return The invocation handler if the object is an OJB proxy , or < code > null < / code > * otherwise */ public IndirectionHandler getIndirectionHandler ( Object obj ) { } }
if ( obj == null ) { return null ; } else if ( isNormalOjbProxy ( obj ) ) { return getDynamicIndirectionHandler ( obj ) ; } else if ( isVirtualOjbProxy ( obj ) ) { return VirtualProxy . getIndirectionHandler ( ( VirtualProxy ) obj ) ; } else { return null ; }
public class PackagedProgram { /** * Returns the plan as generated from the Pact Assembler . * @ return The program ' s plan . * @ throws ProgramInvocationException Thrown , if an error occurred in the program while * creating the program ' s { @ link Plan } . */ private Plan getPlan ( ) throws ProgramInvocationE...
if ( this . plan == null ) { Thread . currentThread ( ) . setContextClassLoader ( this . userCodeClassLoader ) ; this . plan = createPlanFromProgram ( this . program , this . args ) ; } return this . plan ;
public class AWSCostExplorerClient { /** * Queries for available tag keys and tag values for a specified period . You can search the tag values for an * arbitrary string . * @ param getTagsRequest * @ return Result of the GetTags operation returned by the service . * @ throws LimitExceededException * You made...
request = beforeClientExecution ( request ) ; return executeGetTags ( request ) ;
public class MtasBasicParser { /** * Prevalidate object . * @ param object the object * @ param currentList the current list * @ return the boolean */ Boolean prevalidateObject ( MtasParserObject object , Map < String , List < MtasParserObject > > currentList ) { } }
MtasParserType objectType = object . getType ( ) ; List < MtasParserMapping < ? > > mappings = objectType . getItems ( ) ; if ( mappings . isEmpty ( ) ) { return true ; } for ( MtasParserMapping < ? > mapping : mappings ) { try { precheckMappingConditions ( object , mapping . getConditions ( ) , currentList ) ; return ...
public class DerbyDatabase { /** * Adds a column to a SQL table . The method overrides the original method , * because Derby does not allow for < code > NOT NULL < / code > columns that no * default value is defined . Is such column is created , the default value * for real and integer is < code > 0 < / code > , ...
// CHECKSTYLE : ON String defaultValue = _defaultValue ; if ( defaultValue == null ) { switch ( _columnType ) { case INTEGER : case REAL : defaultValue = "0" ; break ; case DATETIME : case STRING_LONG : case STRING_SHORT : defaultValue = "''" ; break ; default : break ; } } return super . addTableColumn ( _con , _table...
public class GlobalVariablesParser { /** * Parses all variable definitions and adds those to the bean definition * builder as property value . * @ param builder the target bean definition builder . * @ param element the source element . */ private void parseVariableDefinitions ( BeanDefinitionBuilder builder , El...
Map < String , String > testVariables = new LinkedHashMap < String , String > ( ) ; List < Element > variableElements = DomUtils . getChildElementsByTagName ( element , "variable" ) ; for ( Element variableDefinition : variableElements ) { testVariables . put ( variableDefinition . getAttribute ( "name" ) , variableDef...
public class DeploymentOperations { /** * Creates an undeploy operation for each deployment description . * If the { @ link UndeployDescription # isRemoveContent ( ) } returns { @ code true } the content will also be removed from * the content repository . Otherwise the content will remain on the server and only th...
Assertions . requiresNotNullOrNotEmptyParameter ( "undeployDescriptions" , undeployDescriptions ) ; final CompositeOperationBuilder builder = CompositeOperationBuilder . create ( true ) ; for ( UndeployDescription undeployDescription : undeployDescriptions ) { addUndeployOperationStep ( builder , undeployDescription ) ...
public class KeepAliveManager { /** * Transport has received some data so that we can delay sending keepalives . */ public synchronized void onDataReceived ( ) { } }
stopwatch . reset ( ) . start ( ) ; // We do not cancel the ping future here . This avoids constantly scheduling and cancellation in // a busy transport . Instead , we update the status here and reschedule later . So we actually // keep one sendPing task always in flight when there ' re active rpcs . if ( state == Stat...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link LoanRequest } * { @ code > } . * @ param value the value * @ return the JAXB element < loan response > */ @ XmlElementDecl ( namespace = "urn:switchyard-quickstart-demo:library:1.0" , name = "loanResponse" ) publ...
return new JAXBElement < LoanResponse > ( LOAN_RESPONSE_QNAME , LoanResponse . class , null , value ) ;
public class CharData { /** * # end Getters / Setters */ public void setUVs ( float u , float v , float U , float V ) { } }
this . u = u ; this . v = v ; this . U = U ; this . V = V ;
public class Matrix4x3d { /** * Set this matrix to be a simple translation matrix . * The resulting matrix can be multiplied against another transformation * matrix to obtain an additional translation . * @ param x * the offset to translate in x * @ param y * the offset to translate in y * @ param z * t...
if ( ( properties & PROPERTY_IDENTITY ) == 0 ) this . identity ( ) ; m30 = x ; m31 = y ; m32 = z ; properties = PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL ; return this ;
public class ComplexMath_F64 { /** * Converts a complex number into polar notation . * @ param input Standard notation * @ param output Polar notation */ public static void convert ( Complex_F64 input , ComplexPolar_F64 output ) { } }
output . r = input . getMagnitude ( ) ; output . theta = Math . atan2 ( input . imaginary , input . real ) ;
public class StructrLDAPWrapper { /** * - - - - - private methods - - - - - */ public Rdn getRdn ( final LDAPNode node ) throws FrameworkException , LdapInvalidDnException { } }
String name = node . getUserProvidedName ( ) ; if ( name == null ) { name = node . getRdn ( ) ; } return new Rdn ( schemaManager , name ) ;
public class FluentMatchingR { /** * Sets a { @ code result } to be returned from { @ link FluentMatchingR # getMatch ( ) } if no match is * found . */ public FluentMatchingR < T , R > orElse ( R result ) { } }
patterns . add ( Pattern . of ( t -> true , t -> result ) ) ; return this ;
public class vpnvserver { /** * Use this API to fetch filtered set of vpnvserver resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static vpnvserver [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
vpnvserver obj = new vpnvserver ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; vpnvserver [ ] response = ( vpnvserver [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class BaseOsgiServlet { /** * Get the file path from the request . * @ param request * @ return */ public String fixPathInfo ( String path ) { } }
if ( path == null ) return null ; if ( path . startsWith ( "/" ) ) path = path . substring ( 1 ) ; // Resources already start from root / baseURL if ( baseURL == null ) if ( properties != null ) if ( this . getProperty ( BASE_PATH ) != null ) path = this . getProperty ( BASE_PATH ) + path ; return path ;