signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class NfsAccessResponse { /** * ( non - Javadoc ) * @ see com . emc . ecs . nfsclient . nfs . NfsResponseBase # unmarshalling ( com . emc . ecs . * nfsclient . rpc . Xdr ) */ public void unmarshalling ( Xdr xdr ) throws RpcException { } }
super . unmarshalling ( xdr ) ; unmarshallingAttributes ( xdr ) ; if ( stateIsOk ( ) ) { _access = xdr . getUnsignedInt ( ) ; }
public class Matchers { /** * Matches a type cast AST node if both of the given matchers match . * @ param typeMatcher The matcher to apply to the type . * @ param expressionMatcher The matcher to apply to the expression . */ public static Matcher < TypeCastTree > typeCast ( final Matcher < Tree > typeMatcher , fin...
return new Matcher < TypeCastTree > ( ) { @ Override public boolean matches ( TypeCastTree t , VisitorState state ) { return typeMatcher . matches ( t . getType ( ) , state ) && expressionMatcher . matches ( t . getExpression ( ) , state ) ; } } ;
public class AbstractLifecycle { /** * Executes stages until the stage requested has been reached . * @ param lifecycleStage The lifecycle stage to reach . * @ throws IllegalStateException If the cycle ends before this stage is reached . */ @ Override public void executeTo ( @ Nonnull final LifecycleStage lifecycle...
boolean foundStage = false ; do { final LifecycleStage nextStage = lifecycleDriver . getNextStage ( ) ; if ( nextStage == null ) { throw new IllegalStateException ( "Never reached stage '" + lifecycleStage . getName ( ) + "' before ending the lifecycle." ) ; } foundStage = nextStage . equals ( lifecycleStage ) ; execut...
public class HelloSignClient { /** * Retrieves the final PDF copy of a signature request , if it exists . * @ param requestId String SignatureRequest ID * @ return File final copy file , or null if it does not yet exist * @ throws HelloSignException thrown if there ' s a problem processing the * HTTP request or...
String url = BASE_URI + SIGNATURE_REQUEST_FINAL_COPY_URI + "/" + requestId ; String filename = FINAL_COPY_FILE_NAME + "." + FINAL_COPY_FILE_EXT ; return httpClient . withAuth ( auth ) . get ( url ) . asFile ( filename ) ;
public class PropertyConverter { /** * Converts a string denoting an amount of time into milliseconds and adds it to the current date . Strings are expected to follow this form where # equals a digit : # M The following are permitted for denoting time : H = hours , M = minutes , S = seconds * @ param time * time ...
Calendar exp = Calendar . getInstance ( ) ; if ( time . endsWith ( "H" ) ) { exp . add ( Calendar . HOUR , Integer . valueOf ( StringUtils . remove ( time , 'H' ) ) ) ; } else if ( time . endsWith ( "M" ) ) { exp . add ( Calendar . MINUTE , Integer . valueOf ( StringUtils . remove ( time , 'M' ) ) ) ; } else if ( time ...
public class PrivateZonesInner { /** * Updates a Private DNS zone . Does not modify virtual network links or DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) . * @ param parameters Pa...
return ServiceFuture . fromResponse ( beginUpdateWithServiceResponseAsync ( resourceGroupName , privateZoneName , parameters , ifMatch ) , serviceCallback ) ;
public class MultiRuntimeConfigurationBuilder { /** * Sets the submission runtime . Submission runtime is used for launching the job driver . * @ param runtimeName the submission runtime name * @ return The builder instance */ public MultiRuntimeConfigurationBuilder setSubmissionRuntime ( final String runtimeName )...
Validate . isTrue ( SUPPORTED_SUBMISSION_RUNTIMES . contains ( runtimeName ) , "Unsupported submission runtime " + runtimeName ) ; Validate . isTrue ( this . submissionRuntime == null , "Submission runtime was already added" ) ; this . submissionRuntime = runtimeName ; return this ;
public class CmsSimpleSearchConfigurationParser { /** * Returns the initial SOLR query . < p > * @ return the SOLR query */ public CmsSolrQuery getInitialQuery ( ) { } }
Map < String , String [ ] > queryParams = new HashMap < String , String [ ] > ( ) ; if ( ! m_cms . getRequestContext ( ) . getCurrentProject ( ) . isOnlineProject ( ) && m_config . isShowExpired ( ) ) { queryParams . put ( "fq" , new String [ ] { "released:[* TO *]" , "expired:[* TO *]" } ) ; } return new CmsSolrQuery ...
public class EncodingWriter { /** * Writes a character buffer using the correct encoding . * @ param cbuf character buffer receiving the data . * @ param off starting offset into the buffer . * @ param len number of characters to write * @ return */ public int write ( OutputStreamWithBuffer os , char [ ] cbuf ,...
for ( int i = 0 ; i < len ; i ++ ) { write ( os , cbuf [ off + i ] ) ; } return len ;
public class BigRational { /** * Reduces this rational number to the smallest numerator / denominator with the same value . * @ return the reduced rational number */ public BigRational reduce ( ) { } }
BigInteger n = numerator . toBigInteger ( ) ; BigInteger d = denominator . toBigInteger ( ) ; BigInteger gcd = n . gcd ( d ) ; n = n . divide ( gcd ) ; d = d . divide ( gcd ) ; return valueOf ( n , d ) ;
public class MetadataWriter { /** * Returns the modifiers for a specified type , including internal ones . * All class modifiers are defined in the JVM specification , table 4.1. */ private static int getTypeModifiers ( TypeElement type ) { } }
int modifiers = ElementUtil . fromModifierSet ( type . getModifiers ( ) ) ; if ( type . getKind ( ) . isInterface ( ) ) { modifiers |= java . lang . reflect . Modifier . INTERFACE | java . lang . reflect . Modifier . ABSTRACT | java . lang . reflect . Modifier . STATIC ; } if ( ElementUtil . isSynthetic ( type ) ) { mo...
public class ImmutableMatrixFactory { /** * Returns an immutable identity matrix of the specified dimension . * @ param size the dimension of the matrix * @ return a < code > size < / code > × < code > size < / code > identity matrix * @ throws IllegalArgumentException if the size is not positive */ public static...
if ( size <= 0 ) throw new IllegalArgumentException ( "Invalid size" ) ; return create ( new ImmutableData ( size , size ) { @ Override public double getQuick ( int row , int col ) { return row == col ? 1 : 0 ; } } ) ;
public class FamilyOrderAnalyzer { /** * { @ inheritDoc } */ @ Override public OrderAnalyzerResult analyze ( ) { } }
seenFamily = null ; final PersonNavigator navigator = new PersonNavigator ( person ) ; for ( final Family family : navigator . getFamilies ( ) ) { setCurrentDate ( null ) ; setSeenEvent ( null ) ; checkFamily ( family ) ; } return getResult ( ) ;
public class Krb5TokenUtils { /** * Generate the service ticket that will be passed to the cluster master for authentication */ public static byte [ ] initiateSecurityContext ( Subject subject , String servicePrincipalName ) throws GSSException { } }
GSSManager manager = GSSManager . getInstance ( ) ; GSSName serverName = manager . createName ( servicePrincipalName , GSSName . NT_HOSTBASED_SERVICE ) ; final GSSContext context = manager . createContext ( serverName , krb5Oid , null , GSSContext . DEFAULT_LIFETIME ) ; // The GSS context initiation has to be performed...
public class DSUtil { /** * Put in < code > newColl < / code > all elements of < code > coll < / code > * that satisfy the predicate < code > pred < / code > . * @ return newColl , the collection with the filtered elements . */ public static < E > Collection < E > filterColl ( Iterable < E > coll , Predicate < E > ...
for ( E elem : coll ) { if ( pred . check ( elem ) ) { newColl . add ( elem ) ; } } return newColl ;
public class ComputerMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Computer computer , ProtocolMarshaller protocolMarshaller ) { } }
if ( computer == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( computer . getComputerId ( ) , COMPUTERID_BINDING ) ; protocolMarshaller . marshall ( computer . getComputerName ( ) , COMPUTERNAME_BINDING ) ; protocolMarshaller . marshall ( ...
public class Parameters { /** * Recherche la valeur d ' un paramètre qui peut être défini par ordre de priorité croissant : < br / > * - dans les paramètres d ' initialisation du filtre ( fichier web . xml dans la webapp ) < br / > * - dans les paramètres du contexte de la webapp avec le préfixe " javamelody...
assert parameter != null ; final String name = parameter . getCode ( ) ; return getParameterValueByName ( name ) ;
public class Iterators { /** * Creates an iterator which subsequently iterates over all given iterators . * @ param iterators An array of iterators . * @ return A composite iterator iterating the values of all given iterators * in given order . */ @ SafeVarargs public static < T > ElementIterator < T > compositeI...
Require . nonNull ( iterators , "iterators" ) ; final Iterator < T > result ; if ( iterators . length == 0 ) { result = Collections . emptyIterator ( ) ; } else if ( iterators . length == 1 ) { if ( iterators [ 0 ] instanceof ElementIterator < ? > ) { return ( ElementIterator < T > ) iterators [ 0 ] ; } result = iterat...
public class ServiceRemoveStepHandler { /** * If the { @ link OperationContext # isResourceServiceRestartAllowed ( ) context allows resource removal } , * attempts to restore services by invoking the { @ code performRuntime } method on the @ { code addOperation } * handler passed to the constructor ; otherwise puts...
if ( context . isResourceServiceRestartAllowed ( ) ) { addOperation . performRuntime ( context , operation , model ) ; } else { context . revertReloadRequired ( ) ; }
public class CommerceWarehouseLocalServiceBaseImpl { /** * Updates the commerce warehouse in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners . * @ param commerceWarehouse the commerce warehouse * @ return the commerce warehouse that was updated */ @ Indexable ( type ...
return commerceWarehousePersistence . update ( commerceWarehouse ) ;
public class SerializerIntrinsics { /** * Insert Dword ( SSE4.1 ) . */ public final void pinsrd ( XMMRegister dst , Register src , Immediate imm8 ) { } }
emitX86 ( INST_PINSRD , dst , src , imm8 ) ;
public class SkuManager { /** * Returns a list of SKU for a store . * @ param appstoreName The app store name . * @ return list of SKU that mapped to the store . Null if the store has no mapped SKUs . * @ throws java . lang . IllegalArgumentException If the store name is null or empty . * @ see # mapSku ( Strin...
if ( TextUtils . isEmpty ( appstoreName ) ) { throw SkuMappingException . newInstance ( SkuMappingException . REASON_STORE_NAME ) ; } Map < String , String > skuMap = sku2storeSkuMappings . get ( appstoreName ) ; return skuMap == null ? null : Collections . unmodifiableList ( new ArrayList < String > ( skuMap . values ...
public class AsyncLookupInBuilder { /** * Get the count of values inside the JSON document . * This method is only available with Couchbase Server 5.0 and later . * @ param path the path inside the document where to get the count from . * @ param optionsBuilder { @ link SubdocOptionsBuilder } * @ return this bu...
if ( path == null ) { throw new IllegalArgumentException ( "Path is mandatory for subdoc get count" ) ; } if ( optionsBuilder . createPath ( ) ) { throw new IllegalArgumentException ( "Options createPath are not supported for lookup" ) ; } this . specs . add ( new LookupSpec ( Lookup . GET_COUNT , path , optionsBuilder...
public class PdfCopyForms { /** * Concatenates a PDF document selecting the pages to keep . The pages are described as * ranges . The page ordering can be changed but * no page repetitions are allowed . * @ param reader the PDF document * @ param ranges the comma separated ranges as described in { @ link Sequen...
fc . addDocument ( reader , SequenceList . expand ( ranges , reader . getNumberOfPages ( ) ) ) ;
public class ModelsEngine { /** * Verify if the current station ( i ) is already into the arrays . * @ param xStation the x coordinate of the stations * @ param yStation the y coordinate of the stations * @ param zStation the z coordinate of the stations * @ param hStation the h value of the stations * @ para...
for ( int j = 0 ; j < i - 1 ; j ++ ) { if ( dEq ( xTmp , xStation [ j ] ) && dEq ( yTmp , yStation [ j ] ) && dEq ( zTmp , zStation [ j ] ) && dEq ( hTmp , hStation [ j ] ) ) { if ( ! doMean ) { throw new IllegalArgumentException ( msg . message ( "verifyStation.equalsStation1" ) + xTmp + "/" + yTmp ) ; } return true ;...
public class JvmAnnotationValueImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case TypesPackage . JVM_ANNOTATION_VALUE__OPERATION : return operation != null ; } return super . eIsSet ( featureID ) ;
public class JWSHeader { /** * Construct JWSHeader from json string . * @ param json * json string . * @ return Constructed JWSHeader */ public static JWSHeader deserialize ( String json ) throws IOException { } }
ObjectMapper mapper = new ObjectMapper ( ) ; return mapper . readValue ( json , JWSHeader . class ) ;
public class SyncRemoteTable { /** * Update the current record . * @ param The data to update . * @ exception DBException File exception . */ public void set ( Object data , int iOpenMode ) throws DBException , RemoteException { } }
synchronized ( m_objSync ) { m_tableRemote . set ( data , iOpenMode ) ; }
public class JdbcUtil { /** * Executes the specified SQL with the specified params and connection . . . * @ param sql the specified SQL * @ param paramList the specified params * @ param connection the specified connection * @ param isDebug the specified debug flag * @ return { @ code true } if success , retu...
if ( isDebug || LOGGER . isTraceEnabled ( ) ) { LOGGER . log ( Level . INFO , "Executing SQL [" + sql + "]" ) ; } final PreparedStatement preparedStatement = connection . prepareStatement ( sql ) ; for ( int i = 1 ; i <= paramList . size ( ) ; i ++ ) { preparedStatement . setObject ( i , paramList . get ( i - 1 ) ) ; }...
public class LocalSuffixFinders { /** * Searches for a distinguishing suffixes by checking for counterexample yielding access sequence transformations in * linear ascending order . * @ param ceQuery * the initial counterexample query * @ param asTransformer * the access sequence transformer * @ param hypOut...
return AcexLocalSuffixFinder . findSuffixIndex ( AcexAnalyzers . LINEAR_FWD , true , ceQuery , asTransformer , hypOutput , oracle ) ;
public class sms_server { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString id_validator = new MPSString ( ) ; id_validator . setConstraintIsReq ( MPSConstants . DELETE_CONSTRAINT , true ) ; id_validator . setConstraintIsReq ( MPSConstants . MODIFY_CONSTRAINT , true ) ; id_validator . validate ( operationType , id , "\"id\"" ) ; MPSString server_n...
public class Serializer { /** * Converts a signed int to a variable length byte array . * The first bit is for continuation info , the other six ( last byte ) or seven ( all other bytes ) bits for data . The * second bit in the last byte indicates the sign of the number . * @ param value the int value . * @ ret...
long absValue = Math . abs ( ( long ) value ) ; if ( absValue < 64 ) { // 2 ^ 6 // encode the number in a single byte if ( value < 0 ) { return new byte [ ] { ( byte ) ( absValue | 0x40 ) } ; } return new byte [ ] { ( byte ) absValue } ; } else if ( absValue < 8192 ) { // 2 ^ 13 // encode the number in two bytes if ( v...
public class AbstractMBeanServerExecutor { /** * { @ inheritDoc } */ public < T > T call ( ObjectName pObjectName , MBeanAction < T > pMBeanAction , Object ... pExtraArgs ) throws IOException , ReflectionException , MBeanException , AttributeNotFoundException , InstanceNotFoundException { } }
InstanceNotFoundException objNotFoundException = null ; for ( MBeanServerConnection server : getMBeanServers ( ) ) { // Only the first MBeanServer holding the MBean wins try { // Still to decide : Should we check eagerly or let an InstanceNotFound Exception // bubble ? Exception bubbling was the former behaviour , so i...
public class AbstractServerConnection { /** * Resets the channel to its original state , effectively disabling all current conduit * wrappers . The current state is encapsulated inside a { @ link ConduitState } object that * can be used the restore the channel . * @ return An opaque representation of the previous...
ConduitState ret = new ConduitState ( channel . getSinkChannel ( ) . getConduit ( ) , channel . getSourceChannel ( ) . getConduit ( ) ) ; channel . getSinkChannel ( ) . setConduit ( originalSinkConduit ) ; channel . getSourceChannel ( ) . setConduit ( originalSourceConduit ) ; return ret ;
public class MathBindings { /** * Binding for { @ link java . lang . Math # copySign ( float , float ) } * @ param magnitude the parameter providing the magnitude of the result * @ param sign the parameter providing the sign of the result * @ return a value with the magnitude of { @ code magnitude } * and the s...
return createFloatBinding ( ( ) -> Math . copySign ( magnitude . get ( ) , sign . get ( ) ) , magnitude , sign ) ;
public class ImageStatistics { /** * Returns the sum of all the pixels in the image . * @ param img Input image . Not modified . */ public static int sum ( GrayS32 img ) { } }
if ( BoofConcurrency . USE_CONCURRENT ) { return ImplImageStatistics_MT . sum ( img ) ; } else { return ImplImageStatistics . sum ( img ) ; }
public class MergedClass { /** * Just create the bytecode for the merged class , but don ' t load it . Since * no ClassInjector is provided to resolve name conflicts , the class name * must be manually provided . * @ param className name to give to merged class * @ param classes Source classes used to derive me...
return buildClassFile ( className , classes , prefixes , null , OBSERVER_DISABLED ) ;
public class PsiToBiopax3Converter { /** * Converts the PSI - MITAB inputStream into BioPAX outputStream . * Streams will be closed by the converter . * @ param inputStream psi - mitab * @ param outputStream biopax * @ param forceInteractionToComplex - always generate Complex instead of MolecularInteraction *...
// check args if ( inputStream == null || outputStream == null ) { throw new IllegalArgumentException ( "convertTab(): " + "one or more null arguments." ) ; } // unmarshall the data , close the stream PsimiTabReader reader = new PsimiTabReader ( ) ; Collection < BinaryInteraction > interactions = reader . read ( inputS...
public class FieldMap { /** * Creates a field map for resources . * @ param props props data */ public void createResourceFieldMap ( Props props ) { } }
byte [ ] fieldMapData = null ; for ( Integer key : RESOURCE_KEYS ) { fieldMapData = props . getByteArray ( key ) ; if ( fieldMapData != null ) { break ; } } if ( fieldMapData == null ) { populateDefaultData ( getDefaultResourceData ( ) ) ; } else { createFieldMap ( fieldMapData ) ; }
public class AbstractCacheService { /** * Registers and { @ link com . hazelcast . cache . impl . CacheEventListener } for specified { @ code cacheNameWithPrefix } * @ param cacheNameWithPrefix the full name of the cache ( including manager scope prefix ) * that { @ link com . hazelcast . cache . impl . CacheEventL...
EventService eventService = nodeEngine . getEventService ( ) ; EventRegistration registration ; if ( localOnly ) { registration = eventService . registerLocalListener ( SERVICE_NAME , cacheNameWithPrefix , listener ) ; } else { registration = eventService . registerListener ( SERVICE_NAME , cacheNameWithPrefix , listen...
public class BatchDetachFromIndexResponseMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BatchDetachFromIndexResponse batchDetachFromIndexResponse , ProtocolMarshaller protocolMarshaller ) { } }
if ( batchDetachFromIndexResponse == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchDetachFromIndexResponse . getDetachedObjectIdentifier ( ) , DETACHEDOBJECTIDENTIFIER_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException...
public class ConfiguredEqualsVerifier { /** * Adds a factory to generate prefabricated values for instance fields of * classes with 1 generic type parameter that EqualsVerifier cannot * instantiate by itself . * @ param < S > The class of the prefabricated values . * @ param otherType The class of the prefabric...
PrefabValuesApi . addGenericPrefabValues ( factoryCache , otherType , factory ) ; return this ;
public class CorpusAdministration { /** * / / / Helper */ protected void writeDatabasePropertiesFile ( String host , String port , String database , String user , String password , boolean useSSL , String schema ) { } }
File file = new File ( System . getProperty ( "annis.home" ) + "/conf" , "database.properties" ) ; try ( BufferedWriter writer = new BufferedWriter ( new FileWriterWithEncoding ( file , "UTF-8" ) ) ; ) { writer . write ( "# database configuration\n" ) ; writer . write ( "datasource.driver=org.postgresql.Driver\n" ) ; w...
public class QuickSort { /** * Conditional swap , only swaps the values if array [ i ] & gt ; array [ j ] * @ param array the array to potentially swap values in * @ param i the 1st index * @ param j the 2nd index */ public static void swapC ( double [ ] array , int i , int j ) { } }
double tmp_i = array [ i ] ; double tmp_j = array [ j ] ; if ( tmp_i > tmp_j ) { array [ i ] = tmp_j ; array [ j ] = tmp_i ; }
public class OperatorSimplifyCursor { /** * Reviewed vs . Feb 8 2011 */ @ Override public Geometry next ( ) { } }
Geometry geometry ; if ( ( geometry = m_inputGeometryCursor . next ( ) ) != null ) // if ( geometry = // m _ inputGeometryCursor - > Next ( ) ) { m_index = m_inputGeometryCursor . getGeometryID ( ) ; if ( ( m_progressTracker != null ) && ! ( m_progressTracker . progress ( - 1 , - 1 ) ) ) throw new RuntimeException ( "u...
public class OperationSlaveStepHandler { /** * Directly handles the op in the standard way the default prepare step handler would * @ param context the operation execution context * @ param operation the operation * @ throws OperationFailedException if no handler is registered for the operation */ private void ad...
final String operationName = operation . require ( OP ) . asString ( ) ; final PathAddress pathAddress = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final OperationEntry entry = context . getRootResourceRegistration ( ) . getOperationEntry ( pathAddress , operationName ) ; if ( entry != null ) { if ( ! ...
public class UnixUserGroupInformation { /** * Read a UGI from the given < code > conf < / code > * The object is expected to store with the property name < code > attr < / code > * as a comma separated string that starts * with the user name followed by group names . * If the property name is not defined , retu...
String [ ] ugi = conf . getStrings ( attr ) ; if ( ugi == null ) { return null ; } UnixUserGroupInformation currentUGI = null ; if ( ugi . length > 0 ) { currentUGI = user2UGIMap . get ( ugi [ 0 ] ) ; } if ( currentUGI == null ) { try { currentUGI = new UnixUserGroupInformation ( ugi ) ; user2UGIMap . put ( currentUGI ...
public class ListStatistics { /** * Instead of just triggering spilling when we have a certain number of * Items on a stream we now have the ability to trigger spilling if the * total size of the Items on a stream goes over a pre - defined limit . * This should allow us to control the memory usage of a stream in ...
long currentTotal ; long currentSize ; synchronized ( this ) { currentTotal = _countTotal ; currentSize = _countTotalBytes ; } if ( ! _spilling ) { // We are not currently spilling so we need to calculate the moving average // for the number of items on our stream and then check the moving average // and the total size...
public class Consumers { /** * Yields the last element . * @ param < E > the iterator element type * @ param iterator the iterator that will be consumed @ throw * IllegalArgumentException if no element is found * @ return the last element */ public static < E > E last ( Iterator < E > iterator ) { } }
return new LastElement < E > ( ) . apply ( iterator ) ;
public class WaitForState { /** * Waits for the element to not be enabled . The provided wait time will be used * and if the element isn ' t present after that time , it will fail , and log * the issue with a screenshot for traceability and added debugging support . * @ param seconds - how many seconds to wait fo...
double end = System . currentTimeMillis ( ) + ( seconds * 1000 ) ; try { double timeTook = elementPresent ( seconds ) ; WebDriverWait wait = new WebDriverWait ( element . getDriver ( ) , ( long ) ( seconds - timeTook ) , DEFAULT_POLLING_INTERVAL ) ; wait . until ( ExpectedConditions . not ( ExpectedConditions . element...
public class VaultsInner { /** * Updates the vault . * @ param resourceGroupName The name of the resource group where the recovery services vault is present . * @ param vaultName The name of the recovery services vault . * @ param vault Recovery Services Vault to be created . * @ throws IllegalArgumentException...
return updateWithServiceResponseAsync ( resourceGroupName , vaultName , vault ) . map ( new Func1 < ServiceResponse < VaultInner > , VaultInner > ( ) { @ Override public VaultInner call ( ServiceResponse < VaultInner > response ) { return response . body ( ) ; } } ) ;
public class DuracloudContentWriter { /** * This method implements the ContentWriter interface for writing content * to a DataStore . In this case , the DataStore is durastore . * @ param spaceId destination space of arg chunkable content * @ param chunkable content to be written * @ throws NotFoundException if...
return write ( spaceId , chunkable , contentProperties , true ) ;
public class CommerceCurrencyPersistenceImpl { /** * Returns the commerce currency where groupId = & # 63 ; and code = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache . * @ param groupId the group ID * @ param code the code * @ return the matching commerce currency , ...
return fetchByG_C ( groupId , code , true ) ;
public class JdbcUtil { /** * Unconditionally close the < code > ResultSet , Statement , Connection < / code > . * Equivalent to { @ link ResultSet # close ( ) } , { @ link Statement # close ( ) } , { @ link Connection # close ( ) } , except any exceptions will be ignored . * This is typically used in finally block...
if ( rs != null ) { try { rs . close ( ) ; } catch ( Exception e ) { logger . error ( "Failed to close ResultSet" , e ) ; } } if ( stmt != null ) { if ( stmt instanceof PreparedStatement ) { try { ( ( PreparedStatement ) stmt ) . clearParameters ( ) ; } catch ( Exception e ) { logger . error ( "Failed to clear paramete...
public class CmsPropertyAdvanced { /** * Performs the define property action , will be called by the JSP page . < p > * @ throws JspException if problems including sub - elements occur */ public void actionDefine ( ) throws JspException { } }
// save initialized instance of this class in request attribute for included sub - elements getJsp ( ) . getRequest ( ) . setAttribute ( SESSION_WORKPLACE_CLASS , this ) ; try { performDefineOperation ( ) ; // set the request parameters before returning to the overview setParamAction ( DIALOG_SHOW_DEFAULT ) ; setParamN...
public class JsonObject { /** * Removes a member with the specified name from this object . If this object contains multiple members with the given * name , only the last one is removed . If this object does not contain a member with the specified name , the object is * not modified . * @ param name * the name ...
if ( name == null ) { throw new NullPointerException ( NAME_IS_NULL ) ; } int index = indexOf ( name ) ; if ( index != - 1 ) { table . remove ( index ) ; names . remove ( index ) ; values . remove ( index ) ; } return this ;
public class DefaultDataBufferFactory { /** * This method will create new DataBuffer of the same dataType & same length * @ param buffer * @ param workspace * @ return */ @ Override public DataBuffer createSame ( DataBuffer buffer , boolean init , MemoryWorkspace workspace ) { } }
return create ( buffer . dataType ( ) , buffer . length ( ) , init , workspace ) ;
public class EarlToHtmlTransformation { /** * Transform EARL result into HTML report using XSLT . * @ param outputDir */ public void earlHtmlReport ( String outputDir ) { } }
ClassLoader cl = Thread . currentThread ( ) . getContextClassLoader ( ) ; String resourceDir = cl . getResource ( "com/occamlab/te/earl/lib" ) . getPath ( ) ; String earlXsl = cl . getResource ( "com/occamlab/te/earl_html_report.xsl" ) . toString ( ) ; File htmlOutput = new File ( outputDir , "result" ) ; htmlOutput . ...
public class IllegalArgumentExceptionMapper { /** * ~ Methods * * * * * */ @ Override public Response toResponse ( IllegalArgumentException ex ) { } }
return Response . status ( Status . BAD_REQUEST ) . entity ( new ErrorMessage ( Status . BAD_REQUEST . getStatusCode ( ) , ex . getMessage ( ) ) ) . type ( MediaType . APPLICATION_JSON_TYPE ) . build ( ) ;
public class UserAttrs { /** * Set user - defined - attribute * @ param path * @ param attribute user : attribute name . user : can be omitted . . user : can be omitted . * @ param value * @ param options * @ throws IOException */ public static final void setIntAttribute ( Path path , String attribute , int v...
attribute = attribute . startsWith ( "user:" ) ? attribute : "user:" + attribute ; Files . setAttribute ( path , attribute , Primitives . writeInt ( value ) , options ) ;
public class GabowSCC { /** * Creates a VertexNumber object for every vertex in the graph and stores * them in a HashMap . */ private void createVertexNumber ( ) { } }
c = graph . vertexSet ( ) . size ( ) ; vertexToVertexNumber = new HashMap < > ( c ) ; for ( V vertex : graph . vertexSet ( ) ) { vertexToVertexNumber . put ( vertex , new VertexNumber < V > ( vertex , 0 ) ) ; } stack = new ArrayDeque < > ( c ) ; B = new ArrayDeque < > ( c ) ;
public class HtmlUtils { /** * Determine if the given < code > value < / code > contains an HTML entity . * @ param value the value to check for an entity * @ return < code > true < / code > if the value contains an entity ; < code > false < / code > otherwise . */ public static boolean containsEntity ( String valu...
assert ( value != null ) : "Parameter 'value' must not be null" ; int pos = value . indexOf ( '&' ) ; if ( pos == - 1 ) return false ; int end = value . indexOf ( ';' ) ; if ( end != - 1 && pos < end ) { // extract the entity and then verify it is // a valid unicode identifier . String entity = value . substring ( pos ...
public class RegisterTaskDefinitionRequest { /** * An array of placement constraint objects to use for the task . You can specify a maximum of 10 constraints per * task ( this limit includes constraints in the task definition and those specified at runtime ) . * < b > NOTE : < / b > This method appends the values t...
if ( this . placementConstraints == null ) { setPlacementConstraints ( new com . amazonaws . internal . SdkInternalList < TaskDefinitionPlacementConstraint > ( placementConstraints . length ) ) ; } for ( TaskDefinitionPlacementConstraint ele : placementConstraints ) { this . placementConstraints . add ( ele ) ; } retur...
public class ElementBase { /** * Returns true if this element may accept a child . Updates the reject reason with the result . * @ return True if this element may accept a child . Updates the reject reason with the result . */ public boolean canAcceptChild ( ) { } }
if ( maxChildren == 0 ) { rejectReason = getDisplayName ( ) + " does not accept any children." ; } else if ( getChildCount ( ) >= maxChildren ) { rejectReason = "Maximum child count exceeded for " + getDisplayName ( ) + "." ; } else { rejectReason = null ; } return rejectReason == null ;
public class HitsMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Hits hits , ProtocolMarshaller protocolMarshaller ) { } }
if ( hits == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( hits . getFound ( ) , FOUND_BINDING ) ; protocolMarshaller . marshall ( hits . getStart ( ) , START_BINDING ) ; protocolMarshaller . marshall ( hits . getCursor ( ) , CURSOR_BINDIN...
public class ChunkedInputStream { /** * read single byte from chunk body . */ public int read ( ) throws IOException { } }
if ( this . bytesRead == this . length ) { // All chunks and final additional chunk are read . // This means we have reached EOF . return - 1 ; } try { // Read a chunk from given input stream when // it is first chunk or all bytes in chunk body is read if ( this . streamBytesRead == 0 || this . chunkPos == this . chunk...
public class EncodingSchemeIDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . ENCODING_SCHEME_ID__ESID_CP : return ESID_CP_EDEFAULT == null ? eSidCP != null : ! ESID_CP_EDEFAULT . equals ( eSidCP ) ; case AfplibPackage . ENCODING_SCHEME_ID__ESID_UD : return ESID_UD_EDEFAULT == null ? eSidUD != null : ! ESID_UD_EDEFAULT . equals ( eSidUD ) ; } return su...
public class ResolveVisitor { /** * and class as property */ private Expression correctClassClassChain ( PropertyExpression pe ) { } }
LinkedList < Expression > stack = new LinkedList < Expression > ( ) ; ClassExpression found = null ; for ( Expression it = pe ; it != null ; it = ( ( PropertyExpression ) it ) . getObjectExpression ( ) ) { if ( it instanceof ClassExpression ) { found = ( ClassExpression ) it ; break ; } else if ( ! ( it . getClass ( ) ...
public class ConstantsSummaryWriterImpl { /** * Get the type column for the constant summary table row . * @ param member the field to be documented . * @ return the type column of the constant table row */ private Content getTypeColumn ( VariableElement member ) { } }
Content anchor = getMarkerAnchor ( currentTypeElement . getQualifiedName ( ) + "." + member . getSimpleName ( ) ) ; Content tdType = HtmlTree . TD ( HtmlStyle . colFirst , anchor ) ; Content code = new HtmlTree ( HtmlTag . CODE ) ; for ( Modifier mod : member . getModifiers ( ) ) { Content modifier = new StringContent ...
public class Util { /** * Helper method for resolving manifest metadata string value * @ return null if key is missing or exception is thrown */ public static String getManifestMetadataString ( Context context , String key ) { } }
if ( context == null ) { throw new IllegalArgumentException ( "Context is null" ) ; } if ( key == null ) { throw new IllegalArgumentException ( "Key is null" ) ; } try { String appPackageName = context . getPackageName ( ) ; PackageManager packageManager = context . getPackageManager ( ) ; PackageInfo packageInfo = pac...
public class ParserAdapter { /** * Process a qualified ( prefixed ) name . * < p > If the name has an undeclared prefix , use only the qname * and make an ErrorHandler . error callback in case the app is * interested . < / p > * @ param qName The qualified ( prefixed ) name . * @ param isAttribute true if thi...
String parts [ ] = nsSupport . processName ( qName , nameParts , isAttribute ) ; if ( parts == null ) { if ( useException ) throw makeException ( "Undeclared prefix: " + qName ) ; reportError ( "Undeclared prefix: " + qName ) ; parts = new String [ 3 ] ; parts [ 0 ] = parts [ 1 ] = "" ; parts [ 2 ] = qName . intern ( )...
public class Arrays { /** * Returns < code > true < / code > if the specified array contains the specified sub - array at the specified index . * @ param array the array to search in * @ param searchFor the sub - array to search for * @ param index the index at which to search * @ return whether or not the spec...
for ( int i = 0 ; i < searchFor . length ; i ++ ) { if ( index + i >= array . length || array [ index + i ] != searchFor [ i ] ) { return false ; } } return true ;
public class StaticMockitoSessionBuilder { /** * Sets up spying for static methods of a class . * @ param clazz The class to set up static spying for * @ return This builder */ @ UnstableApi public < T > StaticMockitoSessionBuilder spyStatic ( Class < T > clazz ) { } }
staticMockings . add ( new StaticMocking < > ( clazz , ( ) -> Mockito . mock ( clazz , withSettings ( ) . defaultAnswer ( CALLS_REAL_METHODS ) ) ) ) ; return this ;
public class AuthorityServiceImpl { /** * { @ inheritDoc } */ @ Override public final List < Authority > findByname ( final String name ) { } }
// Authority auth = this . authorityRepository . findByName ( name ) ; final Authority authority = new Authority ( ) ; authority . setUserRoleName ( UserRoleName . valueOf ( name ) ) ; final List < Authority > authorities = new ArrayList < > ( ) ; authorities . add ( authority ) ; return authorities ;
public class UsersApi { /** * Get User Device Types * Retrieve User & # 39 ; s Device Types * @ param userId User ID . ( required ) * @ param offset Offset for pagination . ( optional ) * @ param count Desired count of items in the result set ( optional ) * @ param includeShared Optional . Boolean ( true / fa...
com . squareup . okhttp . Call call = getUserDeviceTypesValidateBeforeCall ( userId , offset , count , includeShared , null , null ) ; Type localVarReturnType = new TypeToken < DeviceTypesEnvelope > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class ArgumentParser { /** * Handle the - - propertyfile argument . */ private void handleArgPropertyFile ( final String arg , final Deque < String > args ) { } }
final Map . Entry < String , String > entry = parse ( arg . substring ( 2 ) , args ) ; if ( entry . getValue ( ) == null ) { throw new BuildException ( "You must specify a property filename when using the --propertyfile argument" ) ; } propertyFiles . addElement ( entry . getValue ( ) ) ;
public class Stopwatch { /** * Stops the stopwatch . Future reads will return the fixed duration that had * elapsed up to this point . * @ return this { @ code Stopwatch } instance * @ throws IllegalStateException if the stopwatch is already stopped . */ public Stopwatch stop ( ) { } }
long tick = ticker . read ( ) ; Assert . isTrue ( isRunning ) ; isRunning = false ; elapsedNanos += tick - startTick ; return this ;
public class H2InboundLink { /** * ( non - Javadoc ) * @ see com . ibm . ws . http . channel . internal . inbound . HttpInboundLink # destroy ( java . lang . Exception ) */ @ Override public void destroy ( Exception e ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "destroy entry" ) ; } H2StreamProcessor stream ; for ( Integer i : streamTable . keySet ( ) ) { stream = streamTable . get ( i ) ; // notify streams waiting for a window update synchronized ( stream ) { stream . notifyAll ( )...
public class VoiceRecorderDialog { /** * 显示录音对话框 */ public void show ( ) { } }
if ( null == dialog ) { dialog = new Dialog ( context , R . style . HLKLIB_Voice_Recorder_Dialog ) ; View view = View . inflate ( context , R . layout . hlklib_voice_recorder_dialog , null ) ; ViewUtility . bind ( this , view ) ; mImageView = ( ImageView ) view . findViewById ( R . id . hlklib_voice_recorder_image ) ; ...
public class RepositoryContainer { /** * Initialize worspaces ( root node and jcr : system for system workspace ) . * Runs on container start . * @ throws RepositoryException * @ throws RepositoryConfigurationException */ private void init ( ) throws RepositoryException , RepositoryConfigurationException { } }
List < WorkspaceEntry > wsEntries = config . getWorkspaceEntries ( ) ; NodeTypeDataManager typeManager = ( NodeTypeDataManager ) this . getComponentInstanceOfType ( NodeTypeDataManager . class ) ; NamespaceRegistryImpl namespaceRegistry = ( NamespaceRegistryImpl ) this . getComponentInstanceOfType ( NamespaceRegistry ....
public class WTree { /** * Iterate through nodes to check expanded nodes have their child nodes . * If a node is flagged as having children and has none , then load them from the tree model . * @ param node the node to check * @ param expandedRows the expanded rows */ private void processCheckExpandedCustomNodes ...
// Node has no children if ( ! node . hasChildren ( ) ) { return ; } // Check node is expanded boolean expanded = getExpandMode ( ) == WTree . ExpandMode . CLIENT || expandedRows . contains ( node . getItemId ( ) ) ; if ( ! expanded ) { return ; } if ( node . getChildren ( ) . isEmpty ( ) ) { // Add children from the m...
public class GitlabAPI { /** * Get build artifacts of a project build * @ param project The Project * @ param job The build * @ throws IOException on gitlab api call error */ public byte [ ] getJobArtifact ( GitlabProject project , GitlabJob job ) throws IOException { } }
return getJobArtifact ( project . getId ( ) , job . getId ( ) ) ;
public class ReflectionUtils { /** * Create a dynamic proxy that adapts the given { @ link Supplier } to a { @ link Randomizer } . * @ param supplier to adapt * @ param < T > target type * @ return the proxy randomizer */ @ SuppressWarnings ( "unchecked" ) public static < T > Randomizer < T > asRandomizer ( final...
class RandomizerProxy implements InvocationHandler { private final Supplier < ? > target ; private RandomizerProxy ( final Supplier < ? > target ) { this . target = target ; } @ Override public Object invoke ( final Object proxy , final Method method , final Object [ ] args ) throws Throwable { if ( "getRandomValue" . ...
public class JDBC4DatabaseMetaData { /** * Retrieves a description of all the data types supported by this database . */ @ Override public ResultSet getTypeInfo ( ) throws SQLException { } }
checkClosed ( ) ; this . sysCatalog . setString ( 1 , "TYPEINFO" ) ; ResultSet res = this . sysCatalog . executeQuery ( ) ; return res ;
public class EdirEntries { /** * Convert a Instant to the Zulu String format . * See the < a href = " http : / / developer . novell . com / documentation / ndslib / schm _ enu / data / sdk5701 . html " > eDirectory Time attribute syntax definition < / a > for more details . * @ param instant The Date to be converte...
if ( instant == null ) { throw new NullPointerException ( ) ; } try { return EDIR_TIMESTAMP_FORMATTER . format ( instant . atZone ( ZoneOffset . UTC ) ) ; } catch ( DateTimeParseException e ) { throw new IllegalArgumentException ( "unable to format zulu time-string: " + e . getMessage ( ) ) ; }
public class ComputerVisionImpl { /** * This operation generates a list of words , or tags , that are relevant to the content of the supplied image . The Computer Vision API can return tags based on objects , living beings , scenery or actions found in images . Unlike categories , tags are not organized according to a ...
return tagImageWithServiceResponseAsync ( url , tagImageOptionalParameter ) . map ( new Func1 < ServiceResponse < TagResult > , TagResult > ( ) { @ Override public TagResult call ( ServiceResponse < TagResult > response ) { return response . body ( ) ; } } ) ;
public class SystemBar { /** * Set the content layout full the NavigationBar , but do not hide NavigationBar . */ public static void invasionNavigationBar ( Activity activity ) { } }
if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) invasionNavigationBar ( activity . getWindow ( ) ) ;
public class ListOfIfcNormalisedRatioMeasureImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcNormalisedRatioMeasure > getList ( ) { } }
return ( EList < IfcNormalisedRatioMeasure > ) eGet ( Ifc4Package . Literals . LIST_OF_IFC_NORMALISED_RATIO_MEASURE__LIST , true ) ;
public class MultiPartParser { /** * Mime Field strings are treated as UTF - 8 as per https : / / tools . ietf . org / html / rfc7578 # section - 5.1 */ private String takeString ( ) { } }
String s = _string . toString ( ) ; // trim trailing whitespace . if ( s . length ( ) > _length ) s = s . substring ( 0 , _length ) ; _string . reset ( ) ; _length = - 1 ; return s ;
public class CPOptionValuePersistenceImpl { /** * Removes all the cp option values where companyId = & # 63 ; from the database . * @ param companyId the company ID */ @ Override public void removeByCompanyId ( long companyId ) { } }
for ( CPOptionValue cpOptionValue : findByCompanyId ( companyId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpOptionValue ) ; }
public class Reflect { /** * Manually create enum values array without using enum . values ( ) . * @ param enm enum class to query * @ return array of enum values */ @ SuppressWarnings ( "unchecked" ) static < T > T [ ] getEnumConstants ( Class < T > enm ) { } }
return Stream . of ( enm . getFields ( ) ) . filter ( f -> f . getType ( ) == enm ) . map ( f -> { try { return f . get ( null ) ; } catch ( Exception e ) { return null ; } } ) . filter ( Objects :: nonNull ) . toArray ( len -> ( T [ ] ) Array . newInstance ( enm , len ) ) ;
public class DFSClient { /** * Set permissions to a file or directory . * @ param src path name . * @ param permission * @ throws < code > FileNotFoundException < / code > is file does not exist . */ public void setPermission ( String src , FsPermission permission ) throws IOException { } }
checkOpen ( ) ; clearFileStatusCache ( ) ; try { namenode . setPermission ( src , permission ) ; } catch ( RemoteException re ) { throw re . unwrapRemoteException ( AccessControlException . class , FileNotFoundException . class ) ; }
public class AbstractMetricsContext { /** * Starts timer if it is not already started */ private synchronized void startTimer ( ) { } }
if ( timer == null ) { timer = new Timer ( "Timer thread for monitoring " + getContextName ( ) , true ) ; TimerTask task = new TimerTask ( ) { public void run ( ) { try { timerEvent ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } } } ; long millis = period * 1000 ; timer . scheduleAtFixedRate ( task ,...
public class ExceptionDestinationHandlerImpl { /** * Fire an event notification of type TYPE _ SIB _ MESSAGE _ EXCEPTIONED * @ param newState */ private void fireMessageExceptionedEvent ( String apiMsgId , SIMPMessage message , int exceptionReason ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireMessageExceptionedEvent" , new Object [ ] { apiMsgId , message , Integer . valueOf ( exceptionReason ) } ) ; JsMessagingEngine me = _messageProcessor . getMessagingEngine ( ) ; RuntimeEventListener listener = _messagePr...
public class GoogleCloudStorageFileSystem { /** * Releases resources used by this instance . */ public void close ( ) { } }
if ( gcs != null ) { logger . atFine ( ) . log ( "close()" ) ; try { gcs . close ( ) ; } finally { gcs = null ; if ( updateTimestampsExecutor != null ) { try { shutdownExecutor ( updateTimestampsExecutor , /* waitSeconds = */ 10 ) ; } finally { updateTimestampsExecutor = null ; } } if ( cachedExecutor != null ) { try {...
public class ServiceCall { /** * Issues stream of service requests to service which returns stream of service messages back . * @ param publisher of service requests . * @ param responseType type of responses . * @ return flux publisher of service responses . */ public Flux < ServiceMessage > requestBidirectional...
return Flux . from ( publisher ) . switchOnFirst ( ( first , messages ) -> { if ( first . hasValue ( ) ) { ServiceMessage request = first . get ( ) ; String qualifier = request . qualifier ( ) ; if ( methodRegistry . containsInvoker ( qualifier ) ) { // local service . return methodRegistry . getInvoker ( qualifier ) ....
public class JavaScriptExpression { /** * { @ inheritDoc } */ @ Override public Operation listValue ( CssFormatter formatter ) { } }
eval ( formatter ) ; if ( type == LIST ) { Operation op = new Operation ( this ) ; for ( Object obj : ( ( Collection ) result ) ) { op . addOperand ( new ValueExpression ( this , obj ) ) ; } return op ; } else { return super . listValue ( formatter ) ; }
public class EqualsVerifierApi { /** * Adds prefabricated values for instance fields of classes that * EqualsVerifier cannot instantiate by itself . * @ param < S > The class of the prefabricated values . * @ param otherType The class of the prefabricated values . * @ param red An instance of { @ code S } . *...
PrefabValuesApi . addPrefabValues ( factoryCache , otherType , red , black ) ; return this ;
public class RSAUtils { /** * Construct the RSA private key from a key string data . * @ param base64KeyData * RSA private key in base64 ( base64 of { @ link RSAPrivateKey # getEncoded ( ) } ) * @ return * @ throws NoSuchAlgorithmException * @ throws InvalidKeySpecException */ public static RSAPrivateKey buil...
byte [ ] keyData = Base64 . getDecoder ( ) . decode ( base64KeyData ) ; return buildPrivateKey ( keyData ) ;
public class PartnersInner { /** * Creates or updates an integration account partner . * @ param resourceGroupName The resource group name . * @ param integrationAccountName The integration account name . * @ param partnerName The integration account partner name . * @ param partner The integration account part...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , integrationAccountName , partnerName , partner ) . toBlocking ( ) . single ( ) . body ( ) ;