signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TargetsApi { /** * Acknowledge missed calls * Acknowledge missed calls in the list of recent targets . * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < ApiSucc...
com . squareup . okhttp . Call call = ackRecentMissedCallsValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class ModelsImpl { /** * Create an entity role for an entity in the application . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId The entity model ID . * @ param createPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be se...
return createPrebuiltEntityRoleWithServiceResponseAsync ( appId , versionId , entityId , createPrebuiltEntityRoleOptionalParameter ) . map ( new Func1 < ServiceResponse < UUID > , UUID > ( ) { @ Override public UUID call ( ServiceResponse < UUID > response ) { return response . body ( ) ; } } ) ;
public class XBELValidatorServiceImpl { /** * { @ inheritDoc } */ @ Override public void validate ( String s ) throws ValidationError { } }
try { xv . validate ( s ) ; } catch ( SAXParseException e ) { final String name = e . getSystemId ( ) ; final String msg = e . getMessage ( ) ; final int line = e . getLineNumber ( ) ; final int column = e . getColumnNumber ( ) ; throw new ValidationError ( name , msg , e , line , column ) ; } catch ( SAXException e ) ...
public class AllocationRecorder { /** * Adds a { @ link Sampler } that will get run < b > every time an allocation is performed from Java * code < / b > . Use this with < b > extreme < / b > judiciousness ! * @ param sampler The sampler to add . */ public static void addSampler ( Sampler sampler ) { } }
synchronized ( samplerLock ) { Sampler [ ] samplers = additionalSamplers ; /* create a new list of samplers from the old , adding this sampler */ if ( samplers != null ) { Sampler [ ] newSamplers = new Sampler [ samplers . length + 1 ] ; System . arraycopy ( samplers , 0 , newSamplers , 0 , samplers . length ) ; newSam...
public class CompareUtil { /** * { @ code null } 安全的对象比较 * @ param < T > 被比较对象类型 ( 必须实现Comparable接口 ) * @ param c1 对象1 , 可以为 { @ code null } * @ param c2 对象2 , 可以为 { @ code null } * @ param isNullGreater 当被比较对象为null时是否排在前面 * @ return 比较结果 , 如果c1 & lt ; c2 , 返回数小于0 , c1 = = c2返回0 , c1 & gt ; c2 大于0 * @ see j...
if ( c1 == c2 ) { return 0 ; } else if ( c1 == null ) { return isNullGreater ? 1 : - 1 ; } else if ( c2 == null ) { return isNullGreater ? - 1 : 1 ; } return c1 . compareTo ( c2 ) ;
public class Counters { /** * Transform log space values into a probability distribution in place . On the * assumption that the values in the Counter are in log space , this method * calculates their sum , and then subtracts the log of their sum from each * element . That is , if a counter has keys c1 , c2 , c3 ...
double logsum = logSum ( c ) ; // for ( E key : c . keySet ( ) ) { // c . incrementCount ( key , - logsum ) ; // This should be faster for ( Map . Entry < E , Double > e : c . entrySet ( ) ) { e . setValue ( e . getValue ( ) . doubleValue ( ) - logsum ) ; }
public class VehicleManager { /** * Register to receive a callback when a message with the given key is * received . * @ param key The key you want to receive updates . * @ param listener An listener instance to receive the callback . */ public void addListener ( MessageKey key , VehicleMessage . Listener listene...
addListener ( ExactKeyMatcher . buildExactMatcher ( key ) , listener ) ;
public class XPathParser { /** * Consume an expected token , throwing an exception if it * isn ' t there . * @ param expected The string to be expected . * @ throws javax . xml . transform . TransformerException */ private final void consumeExpected ( String expected ) throws javax . xml . transform . Transformer...
if ( tokenIs ( expected ) ) { nextToken ( ) ; } else { error ( XPATHErrorResources . ER_EXPECTED_BUT_FOUND , new Object [ ] { expected , m_token } ) ; // " Expected " + expected + " , but found : " + m _ token ) ; // Patch for Christina ' s gripe . She wants her errorHandler to return from // this error and continue tr...
public class FeatureServiceImpl { /** * Retrieves the current sprint ' s detail for a given team . * @ param componentId * The ID of the related UI component that will reference * collector item content from this collector * @ param teamId * A given scope - owner ' s source - system ID * @ return A data res...
Component component = componentRepository . findOne ( componentId ) ; if ( ( component == null ) || CollectionUtils . isEmpty ( component . getCollectorItems ( ) ) || CollectionUtils . isEmpty ( component . getCollectorItems ( ) . get ( CollectorType . AgileTool ) ) || ( component . getCollectorItems ( ) . get ( Collec...
public class NestedParser { /** * TODO create a version that allows for multi character operators */ public List < Object > parse ( final String input , final List < String > operators ) { } }
final List < Object > result = new ArrayList < Object > ( ) ; if ( operators . size ( ) != 0 ) { final boolean innerLoop = operators . size ( ) == 1 ; final MiniParser currentParser = innerLoop ? INNER_MINI_PARSER : MINI_PARSER ; final String operator = operators . get ( 0 ) ; final List < String > segments ; if ( oper...
public class CRFClassifier { /** * Used to get the default supplied classifier inside the jar file . THIS * FUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A * SERIALIZED CLASSIFIER STORED INSIDE IT . * @ return The default CRFClassifier in the jar file ( if there is one ) */ public stati...
CRFClassifier < IN > crf = new CRFClassifier < IN > ( ) ; crf . loadDefaultClassifier ( ) ; return crf ;
public class JobSchedulesImpl { /** * Updates the properties of the specified job schedule . * This fully replaces all the updatable properties of the job schedule . For example , if the schedule property is not specified with this request , then the Batch service will remove the existing schedule . Changes to a job ...
updateWithServiceResponseAsync ( jobScheduleId , jobScheduleUpdateParameter , jobScheduleUpdateOptions ) . toBlocking ( ) . single ( ) . body ( ) ;
public class OEntityManager { /** * Sets the received handler as default and merges the classes all together . * @ param iClassHandler */ public synchronized void setClassHandler ( final OEntityManagerClassHandler iClassHandler ) { } }
for ( Entry < String , Class < ? > > entry : classHandler . getClassesEntrySet ( ) ) { iClassHandler . registerEntityClass ( entry . getValue ( ) ) ; } this . classHandler = iClassHandler ;
public class BuildController { /** * Creates a link between a build and another * @ param buildId From this build . . . * @ param targetBuildId . . . to this build * @ return List of builds */ @ RequestMapping ( value = "builds/{buildId}/links/{targetBuildId}" , method = RequestMethod . PUT ) public Build addBuil...
Build build = structureService . getBuild ( buildId ) ; Build targetBuild = structureService . getBuild ( targetBuildId ) ; structureService . addBuildLink ( build , targetBuild ) ; return build ;
public class UserSettingsImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < ModelComparePluginConfiguration > getModelCompares ( ) { } }
return ( EList < ModelComparePluginConfiguration > ) eGet ( StorePackage . Literals . USER_SETTINGS__MODEL_COMPARES , true ) ;
public class Messages { /** * Optionally formats a message for the requested language with * { @ link java . text . MessageFormat } . * @ param message * @ param language * @ param args * @ return the message */ private String formatMessage ( String message , String language , Object ... args ) { } }
if ( args != null && args . length > 0 ) { // only format a message if we have arguments Locale locale = languages . getLocaleOrDefault ( language ) ; MessageFormat messageFormat = new MessageFormat ( message , locale ) ; return messageFormat . format ( args ) ; } return message ;
public class UntagLogGroupRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UntagLogGroupRequest untagLogGroupRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( untagLogGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( untagLogGroupRequest . getLogGroupName ( ) , LOGGROUPNAME_BINDING ) ; protocolMarshaller . marshall ( untagLogGroupRequest . getTags ( ) , TAGS_BINDING ) ; } catch ...
public class GroupsApi { /** * Gets a list of users in a group . * Retrieves a list of users in a group . * @ param accountId The external account number ( int ) or account ID Guid . ( required ) * @ param groupId The ID of the group being accessed . ( required ) * @ return UsersResponse */ public UsersResponse...
return listGroupUsers ( accountId , groupId , null ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Object } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link Object } { @ code > } */ @ XmlElementDecl...
return new JAXBElement < Object > ( __GenericApplicationPropertyOfRasterRelief_QNAME , Object . class , null , value ) ;
public class ns_conf_download_policy { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
ns_conf_download_policy_responses result = ( ns_conf_download_policy_responses ) service . get_payload_formatter ( ) . string_to_resource ( ns_conf_download_policy_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new ni...
public class ComponentRegister { /** * Get instant run dex path , used to catch the branch usingApkSplits = false . */ private static List < String > loadInstantRunDexFile ( ApplicationInfo appInfo ) { } }
List < String > instantRunDexPaths = new ArrayList < > ( ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP && appInfo . splitSourceDirs != null ) { instantRunDexPaths . addAll ( Arrays . asList ( appInfo . splitSourceDirs ) ) ; Log . i ( AndServer . TAG , "InstantRun support was found." ) ; } else ...
public class AbstractWComponent { /** * Create and return an error diagnostic associated to the given error source . * @ param source the source of the error . * @ param message the error message , using { @ link MessageFormat } syntax . * @ param args optional arguments for the message . * @ return an error di...
return new DiagnosticImpl ( Diagnostic . ERROR , source , message , args ) ;
public class Nd4jBlas { /** * Returns the BLAS library vendor * @ return the BLAS library vendor */ @ Override public Vendor getBlasVendor ( ) { } }
int vendor = getBlasVendorId ( ) ; boolean isUnknowVendor = ( ( vendor > Vendor . values ( ) . length - 1 ) || ( vendor <= 0 ) ) ; if ( isUnknowVendor ) { return Vendor . UNKNOWN ; } return Vendor . values ( ) [ vendor ] ;
public class CmsJlanNetworkFile { /** * Gets the file information record . < p > * @ return the file information for this file * @ throws IOException if reading the file information fails */ public FileInfo getFileInfo ( ) throws IOException { } }
try { load ( false ) ; if ( m_resource . isFile ( ) ) { // Fill in a file information object for this file / directory long flen = m_resource . getLength ( ) ; // long alloc = ( flen + 512L ) & 0xFFFFFE00L ; long alloc = flen ; int fattr = 0 ; if ( m_cms . getRequestContext ( ) . getCurrentProject ( ) . isOnlineProject...
public class Router { /** * Specify a middleware that will be called for all HTTP methods * @ param pattern The simple pattern * @ param handler The middleware to call */ public Router all ( @ NotNull final String pattern , @ NotNull final Middleware ... handler ) { } }
get ( pattern , handler ) ; put ( pattern , handler ) ; post ( pattern , handler ) ; delete ( pattern , handler ) ; options ( pattern , handler ) ; head ( pattern , handler ) ; trace ( pattern , handler ) ; connect ( pattern , handler ) ; patch ( pattern , handler ) ; return this ;
public class ClientFactory { /** * Creates a transfer message sender asynchronously . This sender sends message to destination entity via another entity . * This is mainly to be used when sending messages in a transaction . * When messages need to be sent across entities in a single transaction , this can be used t...
Utils . assertNonNull ( "messagingFactory" , messagingFactory ) ; MessageSender sender = new MessageSender ( messagingFactory , viaEntityPath , entityPath , null ) ; return sender . initializeAsync ( ) . thenApply ( ( v ) -> sender ) ;
public class HazelcastPortableMessageFormatter { /** * Method to append writing of a field to hazelcast _ portable . * @ param field JField to write . * < pre > * { @ code * if ( isSetBooleanValues ( ) ) { * portableWriter . writeBooleanArray ( " booleanValues " , com . google . common . primitives . Booleans...
switch ( descriptor . getType ( ) ) { case BYTE : writer . formatln ( "%s.writeByteArray(\"%s\", new %s[0]);" , PORTABLE_WRITER , field . name ( ) , helper . getValueType ( descriptor ) ) ; break ; case BINARY : writer . formatln ( "%s.writeByteArray(\"%s\", new %s[0]);" , PORTABLE_WRITER , field . name ( ) , "byte" ) ...
public class MeshGenerator { /** * Generates a plane on xy . The center is at the middle of the plane . * @ param size The size of the plane to generate , on x and y * @ return The vertex data */ public static VertexData generatePlane ( Vector2f size ) { } }
final VertexData destination = new VertexData ( ) ; final VertexAttribute positionsAttribute = new VertexAttribute ( "positions" , DataType . FLOAT , 3 ) ; destination . addAttribute ( 0 , positionsAttribute ) ; final TFloatList positions = new TFloatArrayList ( ) ; final VertexAttribute normalsAttribute = new VertexAt...
public class DruidQuery { /** * Return this query as a Timeseries query , or null if this query is not compatible with Timeseries . * @ return query */ @ Nullable public TimeseriesQuery toTimeseriesQuery ( ) { } }
if ( grouping == null || grouping . getHavingFilter ( ) != null ) { return null ; } final Granularity queryGranularity ; final boolean descending ; int timeseriesLimit = 0 ; if ( grouping . getDimensions ( ) . isEmpty ( ) ) { queryGranularity = Granularities . ALL ; descending = false ; } else if ( grouping . getDimens...
public class BufferedRandomAccessFile { /** * Write at most " len " bytes to " b " starting at position " off " , and return * the number of bytes written . */ private int writeAtMost ( byte [ ] b , int off , int len ) throws IOException { } }
if ( this . curr_ >= this . hi_ ) { if ( this . hitEOF_ && this . hi_ < this . maxHi_ ) { // at EOF - - bump " hi " this . hi_ = this . maxHi_ ; } else { // slow path - - write current buffer ; read next one this . seek ( this . curr_ ) ; if ( this . curr_ == this . hi_ ) { // appending to EOF - - bump " hi " this . hi...
public class ListPipelinesResult { /** * The pipeline identifiers . If you require additional information about the pipelines , you can use these * identifiers to call < a > DescribePipelines < / a > and < a > GetPipelineDefinition < / a > . * @ param pipelineIdList * The pipeline identifiers . If you require add...
if ( pipelineIdList == null ) { this . pipelineIdList = null ; return ; } this . pipelineIdList = new com . amazonaws . internal . SdkInternalList < PipelineIdName > ( pipelineIdList ) ;
public class Encdec { /** * Encode floats */ public static int enc_floatle ( float f , byte [ ] dst , int di ) { } }
return enc_uint32le ( Float . floatToIntBits ( f ) , dst , di ) ;
public class HttpTemplate { /** * Reads an InputStream as a String allowing for different encoding types . This closes the stream at the end . * @ param inputStream The input stream * @ param connection The HTTP connection object * @ return A String representation of the input stream * @ throws IOException If s...
if ( inputStream == null ) { return null ; } BufferedReader reader = null ; try { String responseEncoding = getResponseEncoding ( connection ) ; if ( izGzipped ( connection ) ) { inputStream = new GZIPInputStream ( inputStream ) ; } final InputStreamReader in = responseEncoding != null ? new InputStreamReader ( inputSt...
public class SemEvalCorpusReader { /** * { @ inheritDoc } */ public Iterator < Document > read ( File file ) { } }
try { return read ( new FileReader ( file ) ) ; } catch ( FileNotFoundException fnfe ) { throw new IOError ( fnfe ) ; }
public class CmsSecurityManager { /** * Creates a new resource with the provided content and properties . < p > * An exception is thrown if a resource with the given name already exists . < p > * @ param context the current request context * @ param resourcePath the name of the resource to create ( full path ) ...
if ( existsResource ( context , resourcePath , CmsResourceFilter . IGNORE_EXPIRATION ) ) { // check if the resource already exists by name throw new CmsVfsResourceAlreadyExistsException ( org . opencms . db . generic . Messages . get ( ) . container ( org . opencms . db . generic . Messages . ERR_RESOURCE_WITH_NAME_ALR...
public class ResourceLoader { /** * Gets all resources with given name at the given source URL . If the URL points to a directory , the name is the * file path relative to this directory . If the URL points to a JAR file , the name identifies an entry in that JAR * file . If the URL points to a JAR file , the resou...
return new ResourceEnumeration < > ( new URL [ ] { source } , name , false ) ;
public class CDownloadRequest { /** * If no progress listener has been set , return the byte sink defined in constructor , otherwise decorate it . * @ return the byte sink to be used for download operations . */ public ByteSink getByteSink ( ) { } }
ByteSink bs = byteSink ; if ( progressListener != null ) { bs = new ProgressByteSink ( bs , progressListener ) ; } return bs ;
public class MetaDataTypeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case DroolsPackage . META_DATA_TYPE__META_VALUE : return getMetaValue ( ) ; case DroolsPackage . META_DATA_TYPE__NAME : return getName ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class AWSStorageGatewayClient { /** * Deletes Challenge - Handshake Authentication Protocol ( CHAP ) credentials for a specified iSCSI target and initiator * pair . * @ param deleteChapCredentialsRequest * A JSON object containing one or more of the following fields : < / p > * < ul > * < li > * < a ...
request = beforeClientExecution ( request ) ; return executeDeleteChapCredentials ( request ) ;
public class LTriBoolFunctionBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */ @ Nonnull public static < R > LTriBoolFunctionBuilder < R > triBoolFunction ( Consumer < LTriBoolFunction <...
return new LTriBoolFunctionBuilder ( consumer ) ;
public class EpiLur { /** * / * ( non - Javadoc ) * @ see com . att . cadi . Lur # clear ( java . security . Principal , java . lang . StringBuilder ) */ @ Override public void clear ( Principal p , StringBuilder report ) { } }
for ( Lur lur : lurs ) { lur . clear ( p , report ) ; }
public class ContinuedFraction { /** * Uses Thompson and Barnett ' s modified Lentz ' s algorithm create an * approximation that should be accurate to full precision . * @ param args the numeric inputs to the continued fraction * @ return the approximate value of the continued fraction */ public double lentz ( do...
double f_n = getB ( 0 , args ) ; if ( f_n == 0.0 ) f_n = 1e-30 ; double c_n , c_0 = f_n ; double d_n , d_0 = 0 ; double delta = 0 ; int j = 0 ; while ( Math . abs ( delta - 1 ) > 1e-15 ) { j ++ ; d_n = getB ( j , args ) + getA ( j , args ) * d_0 ; if ( d_n == 0.0 ) d_n = 1e-30 ; c_n = getB ( j , args ) + getA ( j , arg...
public class LObjIntByteFunctionBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T , R > LObjIntByteFunction < T , R > objIntByteFunctionFrom ( Consumer < LObjIntByteFunctionBuilder < T ,...
LObjIntByteFunctionBuilder builder = new LObjIntByteFunctionBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class log { /** * Private Logger function to handle Log calls * @ param level level of the log message * @ param message log output * @ param throwable */ private static int logger ( int level , String message , Throwable throwable ) { } }
if ( QuickUtils . shouldShowLogs ( ) ) { switch ( level ) { case QuickUtils . DEBUG : return android . util . Log . d ( QuickUtils . TAG , message , throwable ) ; case QuickUtils . VERBOSE : return android . util . Log . v ( QuickUtils . TAG , message , throwable ) ; case QuickUtils . INFO : return android . util . Log...
public class EntityTypesClient { /** * Returns the list of all entity types in the specified agent . * < p > Sample code : * < pre > < code > * try ( EntityTypesClient entityTypesClient = EntityTypesClient . create ( ) ) { * ProjectAgentName parent = ProjectAgentName . of ( " [ PROJECT ] " ) ; * for ( EntityT...
ListEntityTypesRequest request = ListEntityTypesRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . build ( ) ; return listEntityTypes ( request ) ;
public class RewindableReader { /** * Rewinds the reader such that the initial characters are returned when invoking read ( ) . * Throws an exception if more than the buffering limit has already been read . * @ throws IOException */ public void rewind ( ) throws IOException { } }
if ( ! rewindable ) { throw LOG . unableToRewindReader ( ) ; } wrappedReader . unread ( buffer , 0 , pos ) ; pos = 0 ;
public class DrlParser { /** * This will expand the DRL . useful for debugging . * @ param source - * the source which use a DSL * @ param dsl - * the DSL itself . * @ throws DroolsParserException * If unable to expand in any way . */ public String getExpandedDRL ( final String source , final Reader dsl ) t...
DefaultExpanderResolver resolver = getDefaultResolver ( dsl ) ; return getExpandedDRL ( source , resolver ) ;
public class InsertExtractUtils { /** * Extract read values to an object for SCALAR , SPECTRUM and IMAGE * @ param da * @ return single value for SCALAR , array of primitives for SPECTRUM , 2D array of primitives for IMAGE * @ throws DevFailed */ public static Object extractRead ( final DeviceAttribute da , final...
if ( da == null ) { throw DevFailedUtils . newDevFailed ( ERROR_MSG_DA ) ; } return InsertExtractFactory . getAttributeExtractor ( da . getType ( ) ) . extractRead ( da , format ) ;
public class DefaultParser { /** * Handles an unknown token . If the token starts with a dash an * UnrecognizedOptionException is thrown . Otherwise the token is added * to the arguments of the command line . If the stopAtNonOption flag * is set , this stops the parsing and the remaining tokens are added * as -...
if ( token . startsWith ( "-" ) && token . length ( ) > 1 && ! stopAtNonOption ) { throw new UnrecognizedOptionException ( "Unrecognized option: " + token , token ) ; } cmd . addArg ( token ) ; if ( stopAtNonOption ) { skipParsing = true ; }
public class Twilio { /** * Validate that we can connect to the new SSL certificate posted on api . twilio . com . * @ throws com . twilio . exception . CertificateValidationException if the connection fails */ public static void validateSslCertificate ( ) { } }
final NetworkHttpClient client = new NetworkHttpClient ( ) ; final Request request = new Request ( HttpMethod . GET , "https://api.twilio.com:8443" ) ; try { final Response response = client . makeRequest ( request ) ; if ( ! TwilioRestClient . SUCCESS . apply ( response . getStatusCode ( ) ) ) { throw new CertificateV...
public class XmlRepositoryFactory { /** * Reads XML document and returns it content as list of query names * @ param document document which would be read * @ return list of queries names */ private static List < String > getElementsId ( Document document ) { } }
List < String > result = new ArrayList < String > ( ) ; List < Element > elementList = getElements ( document ) ; result = getElementsId ( elementList ) ; return result ;
public class Mediawiki { /** * create the given user account * @ param name * @ param eMail * @ param realname * @ param mailpassword * @ param reason * @ param language * @ throws Exception */ public Api createAccount ( String name , String eMail , String realname , boolean mailpassword , String reason ,...
String createtoken = "?" ; if ( getVersion ( ) . compareToIgnoreCase ( "Mediawiki 1.27" ) >= 0 ) { Api apiResult = this . getQueryResult ( "&meta=tokens&type=createaccount" ) ; super . handleError ( apiResult ) ; createtoken = apiResult . getQuery ( ) . getTokens ( ) . getCreateaccounttoken ( ) ; } Api api = null ; if ...
public class DomainFinalResultHandler { private boolean isDomainOperation ( final ModelNode operation ) { } }
final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; return address . size ( ) == 0 || ! address . getElement ( 0 ) . getKey ( ) . equals ( HOST ) ;
public class Token { /** * This method is deprecated . Please use { @ link # generateToken ( byte [ ] , String , String . . . ) } instead * Generate a token string with secret key , ID and optionally payloads * @ param secret the secret to encrypt to token string * @ param oid the ID of the token ( could be custo...
return generateToken ( secret , Life . SHORT , oid , payload ) ;
public class DeleteCertificateRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteCertificateRequest deleteCertificateRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteCertificateRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteCertificateRequest . getCertificateId ( ) , CERTIFICATEID_BINDING ) ; protocolMarshaller . marshall ( deleteCertificateRequest . getForceDelete ( ) , FORC...
public class StubObject { /** * Create a { @ link StubObject } using the provided user ID and a new object ID * @ param sUserID * User ID * @ return Never < code > null < / code > . */ @ Nonnull public static StubObject createForUser ( @ Nullable final String sUserID ) { } }
return new StubObject ( GlobalIDFactory . getNewPersistentStringID ( ) , sUserID , null ) ;
public class HpelTraceServiceConfig { /** * Retrieves process ID for the current process . * @ return pid string retrieved from the process name . */ public static String getPid ( ) { } }
if ( pid == null ) { String runtimeName = ManagementFactory . getRuntimeMXBean ( ) . getName ( ) ; if ( runtimeName == null ) { pid = "unknown" ; } else { int index = runtimeName . indexOf ( '@' ) ; if ( index < 0 ) { pid = runtimeName ; } else { pid = runtimeName . substring ( 0 , index ) ; } } } return pid ;
public class FileGetPropertiesFromComputeNodeHeaders { /** * Set the file creation time . * @ param ocpCreationTime the ocpCreationTime value to set * @ return the FileGetPropertiesFromComputeNodeHeaders object itself . */ public FileGetPropertiesFromComputeNodeHeaders withOcpCreationTime ( DateTime ocpCreationTime...
if ( ocpCreationTime == null ) { this . ocpCreationTime = null ; } else { this . ocpCreationTime = new DateTimeRfc1123 ( ocpCreationTime ) ; } return this ;
public class SignalUtils { /** * Handle { @ literal INT } signals by calling the specified { @ link Runnable } . * @ param runnable the runnable to call on SIGINT . */ public static void attachSignalHandler ( final Runnable runnable ) { } }
Signal . handle ( SIG_INT , new SignalHandler ( ) { @ Override public void handle ( Signal signal ) { runnable . run ( ) ; } } ) ;
public class URICertStore { /** * Creates a CertStore from information included in the AccessDescription * object of a certificate ' s Authority Information Access Extension . */ static CertStore getInstance ( AccessDescription ad ) { } }
if ( ! ad . getAccessMethod ( ) . equals ( ( Object ) AccessDescription . Ad_CAISSUERS_Id ) ) { return null ; } GeneralNameInterface gn = ad . getAccessLocation ( ) . getName ( ) ; if ( ! ( gn instanceof URIName ) ) { return null ; } URI uri = ( ( URIName ) gn ) . getURI ( ) ; try { return URICertStore . getInstance ( ...
public class DateUtil { /** * Adds a number of seconds to a date returning a new object . * The original { @ code Date } is unchanged . * @ param date the date , not null * @ param amount the amount to add , may be negative * @ return the new { @ code Date } with the amount added * @ throws IllegalArgumentExc...
return roll ( date , amount , CalendarUnit . SECOND ) ;
public class Clock { /** * Sets the current second of the clock * @ param SECOND */ public void setSecond ( final int SECOND ) { } }
second = SECOND % 60 ; calculateAngles ( hour , minute , second ) ; repaint ( getInnerBounds ( ) ) ;
public class RefinePolyLineCorner { /** * Given segment information create a line in general notation which has been normalized */ private void createLine ( int index0 , int index1 , List < Point2D_I32 > contour , LineGeneral2D_F64 line ) { } }
if ( index1 < 0 ) System . out . println ( "SHIT" ) ; Point2D_I32 p0 = contour . get ( index0 ) ; Point2D_I32 p1 = contour . get ( index1 ) ; // System . out . println ( " createLine " + p0 + " " + p1 ) ; work . a . set ( p0 . x , p0 . y ) ; work . b . set ( p1 . x , p1 . y ) ; UtilLine2D_F64 . convert ( work , line ) ...
public class ProxyThread { /** * Tells whether or not the given { @ code address } is a public address of the host , when behind NAT . * Returns { @ code false } if the proxy is not behind NAT . * < strong > Implementation Note : < / strong > Only AWS EC2 NAT detection is supported , by requesting the public IP add...
if ( ! proxyParam . isBehindNat ( ) ) { return false ; } // Support just AWS for now . TransportAddress publicAddress = getAwsCandidateHarvester ( ) . getMask ( ) ; if ( publicAddress == null ) { return false ; } return Arrays . equals ( address . getAddress ( ) , publicAddress . getAddress ( ) . getAddress ( ) ) ;
public class DockerUtils { /** * Finds an image by tag . * @ param imageTag the image tag ( not null ) * @ param images a non - null list of images * @ return an image , or null if none was found */ public static Image findImageByTag ( String imageTag , List < Image > images ) { } }
Image result = null ; for ( Image img : images ) { String [ ] tags = img . getRepoTags ( ) ; if ( tags == null ) continue ; for ( String s : tags ) { if ( s . contains ( imageTag ) ) { result = img ; break ; } } } return result ;
public class SqlTableSession { /** * / * ( non - Javadoc ) * @ see org . parosproxy . paros . db . paros . TableSession # update ( long , java . lang . String ) */ @ Override public synchronized void update ( long sessionId , String sessionName ) throws DatabaseException { } }
SqlPreparedStatementWrapper psUpdate = null ; try { psUpdate = DbSQL . getSingleton ( ) . getPreparedStatement ( "session.ps.update" ) ; psUpdate . getPs ( ) . setLong ( 2 , sessionId ) ; psUpdate . getPs ( ) . setString ( 1 , sessionName ) ; psUpdate . getPs ( ) . executeUpdate ( ) ; } catch ( SQLException e ) { throw...
public class DatabaseConnectionPoliciesInner { /** * Gets a database ' s connection policy , which is used with table auditing . Table auditing is deprecated , use blob auditing instead . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure R...
return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < DatabaseConnectionPolicyInner > , DatabaseConnectionPolicyInner > ( ) { @ Override public DatabaseConnectionPolicyInner call ( ServiceResponse < DatabaseConnectionPolicyInner > response ) { return ...
public class ECKey { /** * Decrypt cipher by AES in SIC ( also know as CTR ) mode * @ param cipher * - proper cipher * @ return decrypted cipher , equal length to the cipher . * @ deprecated should not use EC private scalar value as an AES key */ public byte [ ] decryptAES ( byte [ ] cipher ) { } }
if ( privKey == null ) { throw new MissingPrivateKeyException ( ) ; } if ( ! ( privKey instanceof BCECPrivateKey ) ) { throw new UnsupportedOperationException ( "Cannot use the private key as an AES key" ) ; } AESFastEngine engine = new AESFastEngine ( ) ; SICBlockCipher ctrEngine = new SICBlockCipher ( engine ) ; KeyP...
public class InstrumentationFactory { /** * If < b > ibm < / b > is false , this private method will create a new URLClassLoader and attempt to load * the com . sun . tools . attach . VirtualMachine class from the provided toolsJar file . * If < b > ibm < / b > is true , this private method will ignore the toolsJar...
try { ClassLoader loader = ClassLoader . getSystemClassLoader ( ) ; String cls = vendor . getVirtualMachineClassName ( ) ; // if ( ! vendor . isIBM ( ) ) { loader = new URLClassLoader ( new URL [ ] { ( ( FileResource ) toolsJar ) . toURI ( ) . toURL ( ) } , loader ) ; return loader . loadClass ( cls ) ; } catch ( Excep...
public class AbstractSeeker { /** * Reset * @ param newTolerance * @ param newAction */ public void reset ( double newTolerance , Runnable newAction ) { } }
this . tolerance = newTolerance ; this . action = newAction ; done = false ;
public class AmazonCloudDirectoryClient { /** * Allows a schema to be updated using JSON upload . Only available for development schemas . See < a * href = " https : / / docs . aws . amazon . com / clouddirectory / latest / developerguide / schemas _ jsonformat . html # schemas _ json " > JSON * Schema Format < / a...
request = beforeClientExecution ( request ) ; return executePutSchemaFromJson ( request ) ;
public class JBBPOut { /** * Write bits from a value into the output stream * @ param numberOfBits the number of bits to be saved * @ param value the value which bits must be saved * @ return the DSL session * @ throws IOException it will be thrown for transport errors */ public JBBPOut Bits ( final JBBPBitNumb...
assertNotEnded ( ) ; JBBPUtils . assertNotNull ( numberOfBits , "Number of bits must not be null" ) ; if ( this . processCommands ) { _writeBits ( numberOfBits , value ) ; } return this ;
public class ELImageInputTagBeanInfo { /** * ( non - Javadoc ) * @ see java . beans . SimpleBeanInfo # getPropertyDescriptors ( ) */ @ Override public PropertyDescriptor [ ] getPropertyDescriptors ( ) { } }
List < PropertyDescriptor > proplist = new ArrayList < > ( ) ; try { proplist . add ( new PropertyDescriptor ( "base64" , ELImageInputTag . class , null , "setBase64Expr" ) ) ; } catch ( IntrospectionException ex ) { } try { proplist . add ( new PropertyDescriptor ( "align" , ELImageInputTag . class , null , "setAlignE...
public class NodeUtils { /** * Determines if parent node has children that are all leaves */ public static boolean parentContainsOnlyLeaves ( ParentNode parentNode ) { } }
for ( Node child : parentNode . children ( ) ) { if ( ! isLeaf ( child ) ) return false ; } return true ;
public class Blast { /** * Decode PKWare Compression Library stream . * Format notes : * - First byte is 0 if literals are uncoded or 1 if they are coded . Second * byte is 4 , 5 , or 6 for the number of extra bits in the distance code . * This is the base - 2 logarithm of the dictionary size minus six . * - ...
m_input = input ; m_output = output ; int lit ; /* true if literals are coded */ int dict ; /* log2 ( dictionary size ) - 6 */ int symbol ; /* decoded symbol , extra bits for distance */ int len ; /* length for copy */ int dist ; /* distance for copy */ int copy ; /* copy counter */ // unsigned char * from , * to ; / *...
public class ModeledConnectionGroup { /** * Returns the maximum number of connections that should be allowed to this * connection group overall . If no limit applies , zero is returned . * @ return * The maximum number of connections that should be allowed to this * connection group overall , or zero if no limi...
// Pull default from environment if connection limit is unset Integer value = getModel ( ) . getMaxConnections ( ) ; if ( value == null ) return environment . getDefaultMaxGroupConnections ( ) ; // Otherwise use defined value return value ;
public class WebSphereCDIDeploymentImpl { /** * Shutdown and clean up the whole deployment . The deployment will not be usable after this call has been made . */ @ Override public void shutdown ( ) { } }
if ( this . bootstrap != null ) { AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { @ Override public Void run ( ) { bootstrap . shutdown ( ) ; return null ; } } ) ; this . bootstrap = null ; this . deploymentDBAs . clear ( ) ; this . applicationBDAs . clear ( ) ; this . classloader = null ; this . ...
public class SqlHelper { /** * Example 中包含至少 1 个查询条件 * @ param parameterName 参数名 * @ return */ public static String exampleHasAtLeastOneCriteriaCheck ( String parameterName ) { } }
StringBuilder sql = new StringBuilder ( ) ; sql . append ( "<bind name=\"exampleHasAtLeastOneCriteriaCheck\" value=\"@tk.mybatis.mapper.util.OGNL@exampleHasAtLeastOneCriteriaCheck(" ) ; sql . append ( parameterName ) . append ( ")\"/>" ) ; return sql . toString ( ) ;
public class ThingGroupDocument { /** * Parent group names . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setParentGroupNames ( java . util . Collection ) } or { @ link # withParentGroupNames ( java . util . Collection ) } if you * want to override the e...
if ( this . parentGroupNames == null ) { setParentGroupNames ( new java . util . ArrayList < String > ( parentGroupNames . length ) ) ; } for ( String ele : parentGroupNames ) { this . parentGroupNames . add ( ele ) ; } return this ;
public class WorkbenchEntry { /** * Adds the given visit state to the visit - state queue , and adds this entry to the workbench if it was empty * and not { @ linkplain # acquired } . * @ param visitState the nonempty visit state that must be added to the visit - state queue . * @ param workbench the workbench . ...
assert ! visitState . isEmpty ( ) : visitState ; if ( ASSERTS ) if ( visitStates . contains ( visitState ) ) LOGGER . error ( "Visit state " + visitState + " already in this workbench entry (" + Arrays . asList ( Thread . currentThread ( ) . getStackTrace ( ) ) ) ; final boolean wasEmpty = isEmpty ( ) ; add ( visitStat...
public class MockEC2QueryHandler { /** * Handles " createTags " request and create new Tags . * @ param resourcesSet List of resourceIds . * @ param tagSet Map for key , value of tags . * @ return a CreateTagsResponseType with Status of Tags . */ private CreateTagsResponseType createTags ( final List < String > r...
CreateTagsResponseType ret = new CreateTagsResponseType ( ) ; ret . setRequestId ( UUID . randomUUID ( ) . toString ( ) ) ; mockTagsController . createTags ( resourcesSet , tagSet ) ; ret . setReturn ( true ) ; return ret ;
public class Application { /** * This option is for advanced users only . This is meta information about third - party applications that third - party * vendors use for testing purposes . * @ return This option is for advanced users only . This is meta information about third - party applications that * third - p...
if ( additionalInfo == null ) { additionalInfo = new com . amazonaws . internal . SdkInternalMap < String , String > ( ) ; } return additionalInfo ;
public class CmsXmlContentPropertyHelper { /** * Returns a sitemap or VFS path given a sitemap entry id or structure id . < p > * This method first tries to read a sitemap entry with the given id . If this succeeds , * the sitemap entry ' s sitemap path will be returned . If it fails , the method interprets * the...
CmsResource res = cms . readResource ( id ) ; return cms . getSitePath ( res ) ;
public class ServerRequestInitSession { /** * Update link referrer params like play store referrer params * For link clicked installs link click id is updated when install referrer broadcast is received * Also update any googleSearchReferrer available with play store referrer broadcast * @ see InstallListener *...
// Add link identifier if present String linkIdentifier = prefHelper_ . getLinkClickIdentifier ( ) ; if ( ! linkIdentifier . equals ( PrefHelper . NO_STRING_VALUE ) ) { try { getPost ( ) . put ( Defines . Jsonkey . LinkIdentifier . getKey ( ) , linkIdentifier ) ; getPost ( ) . put ( Defines . Jsonkey . FaceBookAppLinkC...
public class InventoryData { /** * Adds the given source to the list of sources for the widget . * @ param source The source to add to the list of sources */ public void addSource ( String source ) { } }
if ( this . sources == null ) this . sources = new ArrayList < String > ( ) ; this . sources . add ( source ) ;
public class RequestToken { /** * Loads a request token from the bundle * and immediately tries to resume the request with handler * @ param bundle a non null bundle * @ param name the key of the saved token * @ param handler a handler to resume the request with . * @ return the token if resumed , null otherw...
if ( bundle == null ) throw new IllegalArgumentException ( "bunlde cannot be null" ) ; if ( name == null ) throw new IllegalArgumentException ( "name cannot be null" ) ; RequestToken token = bundle . getParcelable ( name ) ; if ( token != null && token . resume ( handler ) ) { return token ; } return null ;
public class DefaultNlsTemplateResolver { /** * This method initializes the { @ link NlsTemplate } s for reverse lookup for { @ link NlsBundle } s . * @ param map the { @ link Map } where to { @ link Map # put ( Object , Object ) register } the { @ link NlsTemplate } s by * their { @ link net . sf . mmm . util . nl...
if ( this . bundleFactory instanceof AbstractNlsBundleFactory ) { Collection < ? extends NlsBundleDescriptor > bundleDescriptors = ( ( AbstractNlsBundleFactory ) this . bundleFactory ) . getNlsBundleDescriptors ( ) ; for ( NlsBundleDescriptor descriptor : bundleDescriptors ) { for ( Provider < NlsTemplate > container :...
public class AccountingDate { /** * Obtains an { @ code AccountingDate } representing a date in the given Accounting calendar * system from the proleptic - year and day - of - year fields . * This returns an { @ code AccountingDate } with the specified fields . * The day must be valid for the year , otherwise an ...
Objects . requireNonNull ( chronology , "A previously setup chronology is required." ) ; YEAR . checkValidValue ( prolepticYear ) ; DAY_OF_YEAR_RANGE . checkValidValue ( dayOfYear , DAY_OF_YEAR ) ; boolean leap = chronology . isLeapYear ( prolepticYear ) ; if ( dayOfYear > WEEKS_IN_YEAR * DAYS_IN_WEEK && ! leap ) { thr...
public class RemoveTargetsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RemoveTargetsRequest removeTargetsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( removeTargetsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( removeTargetsRequest . getRule ( ) , RULE_BINDING ) ; protocolMarshaller . marshall ( removeTargetsRequest . getIds ( ) , IDS_BINDING ) ; protocolMarshaller . marsh...
public class CmsAliasManager { /** * Updates the aliases in the database . < p > * @ param cms the current CMS context * @ param toDelete the collection of aliases to delete * @ param toAdd the collection of aliases to add * @ throws CmsException if something goes wrong */ public synchronized void updateAliases...
checkPermissionsForMassEdit ( cms ) ; Set < CmsUUID > allKeys = new HashSet < CmsUUID > ( ) ; Multimap < CmsUUID , CmsAlias > toDeleteMap = ArrayListMultimap . create ( ) ; // first , group the aliases by structure id for ( CmsAlias alias : toDelete ) { toDeleteMap . put ( alias . getStructureId ( ) , alias ) ; allKeys...
public class CalendarCodeGenerator { /** * Populate the metaZone mapping . */ private void addMetaZones ( TypeSpec . Builder type , Map < String , MetaZone > metazones ) { } }
ClassName metazoneType = ClassName . get ( Types . PACKAGE_CLDR_DATES , "MetaZone" ) ; TypeName mapType = ParameterizedTypeName . get ( MAP , STRING , metazoneType ) ; FieldSpec . Builder field = FieldSpec . builder ( mapType , "metazones" , PROTECTED , STATIC , FINAL ) ; CodeBlock . Builder code = CodeBlock . builder ...
public class WaitForStep { /** * { @ inheritDoc } */ @ Override public void setVariables ( Map < String , String > variables ) { } }
injectVariables ( variables , element ) ; if ( timeoutVariable != null ) { timeout = timeoutVariable . getConvertedValue ( variables ) ; }
public class MessageProcessor { /** * Fire an event notification of type TYPE _ SIB _ SECURITY _ NOT _ AUTHENTICATED * with reason SECURITY _ REASON _ NOT _ AUTHENTICATED . * @ param newState */ private void fireNotAuthenticatedEvent ( String userName ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireNotAuthenticatedEvent" , userName ) ; // Check that we have a RuntimeEventListener if ( _runtimeEventListener != null ) { // Build the message for the Notification String message = nls . getFormattedMessage ( "USER_NOT_...
public class ParametersModule { /** * Creates a module which will bind { @ link Parameters } to the provided { @ code params } and will * also log the contents of the parameters to standard output at level { @ code info } . */ public static ParametersModule createAndDump ( Parameters params ) { } }
log . info ( params . dump ( ) ) ; return new ParametersModule ( params ) ;
public class TableAppender { /** * Open the table , flush all rows from start , but do not freeze the table * @ param util a XMLUtil instance for writing XML * @ param appendable where to write * @ throws IOException if an I / O error occurs during the flush */ public void flushAllAvailableRows ( final XMLUtil ut...
this . appendPreamble ( util , appendable ) ; this . appendRows ( util , appendable , 0 ) ;
public class BpmnParse { /** * Parses a parallel gateway declaration . */ public ActivityImpl parseParallelGateway ( Element parallelGwElement , ScopeImpl scope ) { } }
ActivityImpl activity = createActivityOnScope ( parallelGwElement , scope ) ; activity . setActivityBehavior ( new ParallelGatewayActivityBehavior ( ) ) ; parseAsynchronousContinuationForActivity ( parallelGwElement , activity ) ; parseExecutionListenersOnScope ( parallelGwElement , activity ) ; for ( BpmnParseListener...
public class SecurityActions { /** * Get a Subject instance * @ param subjectFactory The subject factory * @ param domain The domain * @ return The instance */ static Subject createSubject ( final SubjectFactory subjectFactory , final String domain ) { } }
if ( System . getSecurityManager ( ) == null ) return subjectFactory . createSubject ( domain ) ; return AccessController . doPrivileged ( new PrivilegedAction < Subject > ( ) { public Subject run ( ) { return subjectFactory . createSubject ( domain ) ; } } ) ;
public class Query { /** * < pre > * { " $ or " : [ { field : < field > , regex : < ^ string $ > , caseInsensitive : < caseInsensitive > , . . . } , . . . ] } * < / pre > */ public static Query withStrings ( String field , String [ ] values , boolean caseInsensitive ) { } }
if ( caseInsensitive ) { List < Query > regexList = new ArrayList < Query > ( ) ; for ( String value : values ) { regexList . add ( withString ( field , value , true ) ) ; } return Query . or ( regexList ) ; } else { return Query . withValues ( field , Query . in , Literal . values ( values ) ) ; }
public class Util { /** * Get the Bard config object . The properties is set in " bard . properties " . * @ return The config object . */ public static CompositeConfiguration getConfig ( ) { } }
if ( config == null ) { config = new CompositeConfiguration ( ) ; String configFile = "bard.properties" ; if ( Util . class . getClassLoader ( ) . getResource ( configFile ) == null ) { return config ; } try { config . addConfiguration ( new PropertiesConfiguration ( "bard.properties" ) ) ; } catch ( ConfigurationExcep...
public class GreenPepperXmlRpcServer { /** * { @ inheritDoc } */ public String ping ( Vector < Object > repositoryParams ) { } }
try { Repository repository = loadRepository ( repositoryParams ) ; return SUCCESS ; } catch ( GreenPepperServerException e ) { return errorAsString ( e , "" ) ; }