signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class StandardExpressions { /** * Obtain the variable expression evaluator ( implementation of { @ link IStandardVariableExpressionEvaluator } )
* registered by the Standard Dialect that is being currently used .
* Normally , there should be no need to obtain this object from the developers ' code ( only int... | final Object expressionEvaluator = configuration . getExecutionAttributes ( ) . get ( STANDARD_VARIABLE_EXPRESSION_EVALUATOR_ATTRIBUTE_NAME ) ; if ( expressionEvaluator == null || ( ! ( expressionEvaluator instanceof IStandardVariableExpressionEvaluator ) ) ) { throw new TemplateProcessingException ( "No Standard Varia... |
public class TSDataOptimizerTask { /** * Start creating the optimized file . This operation resets the state of the
* optimizer task , so it can be re - used for subsequent invocations .
* @ return A completeable future that yields the newly created file . */
public CompletableFuture < NewFile > run ( ) { } } | LOG . log ( Level . FINE , "starting optimized file creation for {0} files" , files . size ( ) ) ; CompletableFuture < NewFile > fileCreation = new CompletableFuture < > ( ) ; final List < TSData > fjpFiles = this . files ; // We clear out files below , which makes createTmpFile see an empty map if we don ' t use a sep... |
public class FileComparer { /** * Reads a file and returns the content as List
* @ param f
* @ return
* @ throws IOException */
public List < String > getFileLinesAsList ( File f ) throws IOException { } } | BufferedReader br = new BufferedReader ( new InputStreamReader ( new DataInputStream ( new FileInputStream ( f ) ) ) ) ; List < String > result = new LinkedList < String > ( ) ; String strLine ; while ( ( strLine = br . readLine ( ) ) != null ) { result . add ( strLine ) ; } br . close ( ) ; return result ; |
public class PropertiesFileLoader { /** * Saves changes in properties file . It reads the property file into memory , modifies it and saves it back to the file .
* @ throws IOException */
public synchronized void persistProperties ( ) throws IOException { } } | beginPersistence ( ) ; // Read the properties file into memory
// Shouldn ' t be so bad - it ' s a small file
List < String > content = readFile ( propertiesFile ) ; BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( propertiesFile ) , StandardCharsets . UTF_8 ) ) ; try { for ( Str... |
public class druidGLexer { /** * $ ANTLR start " ID " */
public final void mID ( ) throws RecognitionException { } } | try { int _type = ID ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 712:5 : ( ( ' a ' . . ' z ' | ' A ' . . ' Z ' | ' _ ' ) ( ' a ' . . ' z ' | ' A ' . . ' Z ' | ' 0 ' . . ' 9 ' | ' _ ' ) * )
// druidG . g : 712:7 : ( ' a ' . . ' z ' | ' A ' . . ' Z ' | ' _ ' ) ( ' a ' . . ' z ' | ' A ' . . ' Z ' | ' 0 ' . . ... |
public class JsonHelper { /** * Return the field with name in JSON as a string , a boolean , a number or a node .
* @ param json json
* @ param name node name
* @ return the field */
public static Object getElement ( final JsonNode json , final String name ) { } } | if ( json != null && name != null ) { JsonNode node = json ; for ( String nodeName : name . split ( "\\." ) ) { if ( node != null ) { if ( nodeName . matches ( "\\d+" ) ) { node = node . get ( Integer . parseInt ( nodeName ) ) ; } else { node = node . get ( nodeName ) ; } } } if ( node != null ) { if ( node . isNumber ... |
public class ScriptService { /** * Return all scripts of a given type
* @ param type integer value of type
* @ return Array of scripts of the given type */
public Script [ ] getScripts ( Integer type ) { } } | ArrayList < Script > returnData = new ArrayList < > ( ) ; PreparedStatement statement = null ; ResultSet results = null ; try ( Connection sqlConnection = SQLService . getInstance ( ) . getConnection ( ) ) { statement = sqlConnection . prepareStatement ( "SELECT * FROM " + Constants . DB_TABLE_SCRIPT + " ORDER BY " + C... |
public class ShallowEtagHeaderFilter { /** * Generate the ETag header value from the given response body byte array .
* < p > The default implementation generates an MD5 hash .
* @ param bytes the response bdoy as byte array
* @ return the ETag header value
* @ see org . springframework . util . DigestUtils */
... | StringBuilder builder = new StringBuilder ( "\"0" ) ; DigestUtils . appendMd5DigestAsHex ( bytes , builder ) ; builder . append ( '"' ) ; return builder . toString ( ) ; |
public class BeanInterfaceProxy { /** * { @ inheritDoc }
* If a getter method is encountered then this method returns the stored value from the bean state ( or null if the
* field has not been set ) .
* If a setter method is encountered then the bean state is updated with the value of the first argument and the
... | final String methodName = method . getName ( ) ; if ( methodName . startsWith ( GET_PREFIX ) ) { if ( method . getParameterTypes ( ) . length > 0 ) { throw new IllegalArgumentException ( String . format ( "method %s.%s() should have no parameters to be a valid getter" , method . getDeclaringClass ( ) . getName ( ) , me... |
public class DerValue { /** * Returns an ASN . 1 OCTET STRING
* @ return the octet string held in this DER value */
public byte [ ] getOctetString ( ) throws IOException { } } | byte [ ] bytes ; if ( tag != tag_OctetString && ! isConstructed ( tag_OctetString ) ) { throw new IOException ( "DerValue.getOctetString, not an Octet String: " + tag ) ; } bytes = new byte [ length ] ; // Note : do not tempt to call buffer . read ( bytes ) at all . There ' s a
// known bug that it returns - 1 instead ... |
public class TableVersionErrorMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TableVersionError tableVersionError , ProtocolMarshaller protocolMarshaller ) { } } | if ( tableVersionError == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( tableVersionError . getTableName ( ) , TABLENAME_BINDING ) ; protocolMarshaller . marshall ( tableVersionError . getVersionId ( ) , VERSIONID_BINDING ) ; protocolMarsh... |
public class RaygunClient { /** * Initializes the Raygun client . This expects that you have placed the API key in your
* AndroidManifest . xml , in a meta - data element .
* @ param context The context of the calling Android activity . */
public static void init ( Context context ) { } } | String apiKey = readApiKey ( context ) ; init ( context , apiKey ) ; |
public class FSAUtils { /** * Calculate fan - out ratio ( how many nodes have a given number of outgoing arcs ) .
* @ param fsa The automaton to calculate fanout for .
* @ param root The starting node for calculations .
* @ return The returned map contains keys for the number of outgoing arcs and
* an associate... | final int [ ] result = new int [ 256 ] ; fsa . visitInPreOrder ( new StateVisitor ( ) { public boolean accept ( int state ) { int count = 0 ; for ( int arc = fsa . getFirstArc ( state ) ; arc != 0 ; arc = fsa . getNextArc ( arc ) ) { count ++ ; } result [ count ] ++ ; return true ; } } ) ; TreeMap < Integer , Integer >... |
public class CmsDialog { /** * Builds the standard javascript for submitting the dialog . < p >
* @ return the standard javascript for submitting the dialog */
@ Override public String dialogScriptSubmit ( ) { } } | if ( useNewStyle ( ) ) { return super . dialogScriptSubmit ( ) ; } StringBuffer result = new StringBuffer ( 512 ) ; result . append ( "function submitAction(actionValue, theForm, formName) {\n" ) ; result . append ( "\tif (theForm == null) {\n" ) ; result . append ( "\t\ttheForm = document.forms[formName];\n" ) ; resul... |
public class HashSSORealm { public Credential getSingleSignOn ( HttpRequest request , HttpResponse response ) { } } | String ssoID = null ; Cookie [ ] cookies = request . getCookies ( ) ; for ( int i = 0 ; i < cookies . length ; i ++ ) { if ( cookies [ i ] . getName ( ) . equals ( SSO_COOKIE_NAME ) ) { ssoID = cookies [ i ] . getValue ( ) ; break ; } } if ( log . isDebugEnabled ( ) ) log . debug ( "get ssoID=" + ssoID ) ; Principal pr... |
public class NavigationMapboxMap { /** * The maximum preferred frames per second at which to render the map .
* This property only takes effect when the application has limited resources , such as when
* the device is running on battery power . By default , this is set to 20fps .
* Throttling will also only take ... | if ( mapFpsDelegate != null ) { mapFpsDelegate . updateMaxFpsThreshold ( maxFpsThreshold ) ; } else { settings . updateMaxFps ( maxFpsThreshold ) ; } |
public class CorcInputFormat { /** * Gets the StructTypeInfo that declares the columns to be read from the configuration */
static StructTypeInfo getTypeInfo ( Configuration conf ) { } } | StructTypeInfo inputTypeInfo = ( StructTypeInfo ) TypeInfoUtils . getTypeInfoFromTypeString ( conf . get ( INPUT_TYPE_INFO ) ) ; LOG . debug ( "Got input typeInfo from conf: {}" , inputTypeInfo ) ; return inputTypeInfo ; |
public class RunnersApi { /** * Get details of a runner .
* < pre > < code > GitLab Endpoint : GET / runners / : id < / code > < / pre >
* @ param runnerId Runner id to get details for
* @ return RunnerDetail instance .
* @ throws GitLabApiException if any exception occurs */
public RunnerDetail getRunnerDetail... | if ( runnerId == null ) { throw new RuntimeException ( "runnerId cannot be null" ) ; } Response response = get ( Response . Status . OK , null , "runners" , runnerId ) ; return ( response . readEntity ( RunnerDetail . class ) ) ; |
public class Pack { /** * Pack the images provided
* @ param images The list of sprite objects pointing at the images to be packed
* @ param width The width of the sheet to be generated
* @ param height The height of the sheet to be generated
* @ param border The border between sprites
* @ param out The file ... | Collections . sort ( images , new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { Sprite a = ( Sprite ) o1 ; Sprite b = ( Sprite ) o2 ; int asize = a . getHeight ( ) ; int bsize = b . getHeight ( ) ; return bsize - asize ; } } ) ; int x = 0 ; int y = 0 ; BufferedImage result = new BufferedImage ( width ... |
public class Selenified { /** * Sets any additional headers for the web services calls for each instance of the test suite being executed .
* @ param clazz - the test suite class , used for making threadsafe storage of
* application , allowing suites to have independent applications
* under test , run at the same... | context . setAttribute ( clazz . getClass ( ) . getName ( ) + SERVICES_USER , servicesUser ) ; context . setAttribute ( clazz . getClass ( ) . getName ( ) + SERVICES_PASS , servicesPass ) ; |
public class ContentSpec { /** * Sets the InjectionOptions that will be used by the Builder when building a book .
* @ param injectionOptions The InjectionOptions to be used when building a book . */
public void setInjectionOptions ( final InjectionOptions injectionOptions ) { } } | if ( injectionOptions == null && this . injectionOptions == null ) { return ; } else if ( injectionOptions == null ) { removeChild ( this . injectionOptions ) ; this . injectionOptions = null ; } else if ( this . injectionOptions == null ) { this . injectionOptions = new KeyValueNode < InjectionOptions > ( CommonConsta... |
public class LineParser { /** * Returns an argument map fitting the given value key set ( using defined types ) .
* @ param arguments input arguments to test arguments against
* @ return argument map with correct value types */
public Map < SkbShellArgument , Object > getArgMap ( SkbShellArgument [ ] arguments ) { ... | Map < SkbShellArgument , Object > ret = new LinkedHashMap < SkbShellArgument , Object > ( ) ; if ( arguments != null ) { for ( Entry < String , String > entry : this . getArgMap ( ) . entrySet ( ) ) { for ( SkbShellArgument ssa : arguments ) { if ( ssa . getKey ( ) . equals ( entry . getKey ( ) ) ) { switch ( ssa . get... |
public class ElementWithCardinalityImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case SimpleAntlrPackage . ELEMENT_WITH_CARDINALITY__ELEMENT : return getElement ( ) ; case SimpleAntlrPackage . ELEMENT_WITH_CARDINALITY__CARDINALITY : return getCardinality ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class FileExecutor { /** * 获取文件后缀 ( 包括点号 )
* @ param fileName 文件名
* @ return 后缀
* @ since 1.1.0 */
public static String getSuffix ( String fileName ) { } } | return fileName . substring ( fileName . lastIndexOf ( ValueConsts . DOT_SIGN ) ) ; |
public class BaseMessageEndpointFactory { /** * Get the EJBMethodInfo object associated with a specified Method object .
* @ param method - the target of this request .
* @ return EJBMethodInfo for target of this request . Note , a null reference
* is returned if Method is not a method of this EJB component . */
... | // Get target method signature .
String targetSignature = MethodAttribUtils . methodSignature ( method ) ; // Search array of EJBMethodInfo object until the one that matches
// target signature is found or all array elements are processed .
EJBMethodInfoImpl minfo = null ; int n = ivMdbMethods . length ; for ( int i = ... |
public class Agg { /** * Get a { @ link Collector } that calculates the derived < code > RANK ( ) < / code > function given a specific ordering . */
public static < T , U > Collector < T , ? , Optional < Long > > rankBy ( U value , Function < ? super T , ? extends U > function , Comparator < ? super U > comparator ) { ... | return Collector . of ( ( ) -> new long [ ] { - 1L } , ( l , v ) -> { if ( l [ 0 ] == - 1L ) l [ 0 ] = 0L ; if ( comparator . compare ( value , function . apply ( v ) ) > 0 ) l [ 0 ] = l [ 0 ] + 1L ; } , ( l1 , l2 ) -> { l1 [ 0 ] = ( l1 [ 0 ] == - 1 ? 0L : l1 [ 0 ] ) + ( l2 [ 0 ] == - 1 ? 0L : l2 [ 0 ] ) ; return l1 ; ... |
public class Metrics { /** * GZip compress a string of bytes
* @ param input
* @ return a byte array */
public static byte [ ] gzip ( String input ) { } } | ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; GZIPOutputStream gzos = null ; try { gzos = new GZIPOutputStream ( baos ) ; gzos . write ( input . getBytes ( "UTF-8" ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { if ( gzos != null ) { try { gzos . close ( ) ; } catch ( IOException ... |
public class AmazonRoute53Client { /** * Gets information about the traffic policy instances that you created by using the current AWS account .
* < note >
* After you submit an < code > UpdateTrafficPolicyInstance < / code > request , there ' s a brief delay while Amazon Route 53
* creates the resource record se... | request = beforeClientExecution ( request ) ; return executeListTrafficPolicyInstances ( request ) ; |
public class XmlUtils { /** * Returns the attribute with the given name from the given node .
* If the respective attribute could not be obtained , the given
* default value will be returned
* @ param node The node to obtain the attribute from
* @ param attributeName The name of the attribute
* @ param defaul... | NamedNodeMap attributes = node . getAttributes ( ) ; Node attributeNode = attributes . getNamedItem ( attributeName ) ; if ( attributeNode == null ) { return defaultValue ; } String value = attributeNode . getNodeValue ( ) ; if ( value == null ) { return defaultValue ; } return value ; |
public class JDBDT { /** * Delete all data from a table , subject to a < code > WHERE < / code >
* clause .
* @ param table Table .
* @ param where < code > WHERE < / code > clause
* @ param args < code > WHERE < / code > clause arguments , if any .
* @ return Number of deleted entries .
* @ see # deleteAll... | return DBSetup . deleteAll ( CallInfo . create ( ) , table , where , args ) ; |
public class AttributeEditorUtil { /** * creates a RepeatingView providing a suitable editor field for every attribute in the list .
* @ param values map used for saving the data @ see org . openengsb . ui . common . wicket . model . MapModel */
public static RepeatingView createFieldList ( String id , List < Attribu... | RepeatingView fields = new RepeatingView ( id ) ; for ( AttributeDefinition a : attributes ) { WebMarkupContainer row = new WebMarkupContainer ( a . getId ( ) ) ; MapModel < String , String > model = new MapModel < String , String > ( values , a . getId ( ) ) ; row . add ( createEditorField ( "row" , model , a ) ) ; fi... |
public class ActionConfigurationMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ActionConfiguration actionConfiguration , ProtocolMarshaller protocolMarshaller ) { } } | if ( actionConfiguration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( actionConfiguration . getConfiguration ( ) , CONFIGURATION_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: ... |
public class Zone { /** * Adds a Record to the Zone
* @ param r The record to be added
* @ see Record */
public void addRecord ( Record r ) { } } | Name name = r . getName ( ) ; int rtype = r . getRRsetType ( ) ; synchronized ( this ) { RRset rrset = findRRset ( name , rtype ) ; if ( rrset == null ) { rrset = new RRset ( r ) ; addRRset ( name , rrset ) ; } else { rrset . addRR ( r ) ; } } |
public class CommonsLogger { /** * Delegates to the { @ link Log # error ( Object ) } method of the underlying
* { @ link Log } instance .
* However , this form avoids superfluous object creation when the logger is disabled
* for level ERROR .
* @ param format the format string
* @ param arguments a list of 3... | if ( logger . isErrorEnabled ( ) ) { FormattingTuple ft = MessageFormatter . arrayFormat ( format , arguments ) ; logger . error ( ft . getMessage ( ) , ft . getThrowable ( ) ) ; } |
public class MultiPolygon { /** * Create a new instance of this class by passing in a formatted valid JSON String . If you are
* creating a MultiPolygon object from scratch it is better to use one of the other provided
* static factory methods such as { @ link # fromPolygons ( List ) } .
* @ param json a formatte... | GsonBuilder gson = new GsonBuilder ( ) ; gson . registerTypeAdapterFactory ( GeoJsonAdapterFactory . create ( ) ) ; return gson . create ( ) . fromJson ( json , MultiPolygon . class ) ; |
public class AbstractPrintQuery { /** * Get the object returned by the given select statement .
* @ param < T > class the return value will be casted to
* @ param _ selectBldr select bldr the object is wanted for
* @ return object for the select statement
* @ throws EFapsException on error */
@ SuppressWarnings... | final OneSelect oneselect = this . selectStmt2OneSelect . get ( _selectBldr . toString ( ) ) ; return oneselect == null ? null : ( T ) oneselect . getObject ( ) ; |
public class SecondaryRecordConverter { /** * Get the data on the end of this converter chain .
* @ return The raw data . */
public Object getData ( ) { } } | try { Object objValue = super . getData ( ) ; // Get the actual key data .
if ( objValue == null ) objValue = m_strNullValue ; if ( objValue == null ) return null ; if ( objValue . getClass ( ) == m_fieldKey . getDataClass ( ) ) m_fieldKey . setData ( objValue ) ; else m_fieldKey . setString ( objValue . toString ( ) )... |
public class Positions { /** * Get the { @ link Collection } of set ( 1 ) bits inside a word or long word
* @ param i
* @ return
* The not null { @ link Collection } of the indexes of set bits .
* The { @ link Collection } implementation is an { @ link LinkedList } . */
public static Collection < Integer > ofSe... | final Collection < Integer > c = new LinkedList < Integer > ( ) ; int k = 0 ; while ( i != 0 ) { if ( ( i & 1L ) != 0 ) { c . add ( k ) ; } k ++ ; i >>>= 1 ; } return c ; |
public class FIODataPoint { /** * Updates the data point data
* @ param dp JsonObect with the data */
void update ( JsonObject dp ) { } } | for ( int i = 0 ; i < dp . names ( ) . size ( ) ; i ++ ) { datapoint . put ( dp . names ( ) . get ( i ) , dp . get ( dp . names ( ) . get ( i ) ) ) ; } |
public class RedisInner { /** * Regenerate Redis cache ' s access keys . This operation requires write permission to the cache resource .
* @ param resourceGroupName The name of the resource group .
* @ param name The name of the Redis cache .
* @ param keyType The Redis access key to regenerate . Possible values... | return regenerateKeyWithServiceResponseAsync ( resourceGroupName , name , keyType ) . map ( new Func1 < ServiceResponse < RedisAccessKeysInner > , RedisAccessKeysInner > ( ) { @ Override public RedisAccessKeysInner call ( ServiceResponse < RedisAccessKeysInner > response ) { return response . body ( ) ; } } ) ; |
public class MoreExecutors { /** * Converts the given ScheduledThreadPoolExecutor into a
* ScheduledExecutorService that exits when the application is complete . It
* does so by using daemon threads and adding a shutdown hook to wait for
* their completion .
* < p > This is mainly for fixed thread pools .
* S... | return new Application ( ) . getExitingScheduledExecutorService ( executor , terminationTimeout , timeUnit ) ; |
public class TimerService { /** * Check whether the timeout for the given key and ticket is still valid ( not yet unregistered
* and not yet overwritten ) .
* @ param key for which to check the timeout
* @ param ticket of the timeout
* @ return True if the timeout ticket is still valid ; otherwise false */
publ... | if ( timeouts . containsKey ( key ) ) { Timeout < K > timeout = timeouts . get ( key ) ; return timeout . getTicket ( ) . equals ( ticket ) ; } else { return false ; } |
public class XbaseFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EObject create ( EClass eClass ) { } } | switch ( eClass . getClassifierID ( ) ) { case XbasePackage . XIF_EXPRESSION : return createXIfExpression ( ) ; case XbasePackage . XSWITCH_EXPRESSION : return createXSwitchExpression ( ) ; case XbasePackage . XCASE_PART : return createXCasePart ( ) ; case XbasePackage . XBLOCK_EXPRESSION : return createXBlockExpressio... |
public class UserTagHandler { /** * Iterate over all TagAttributes and set them on the FaceletContext ' s VariableMapper , then include the target
* Facelet . Finally , replace the old VariableMapper .
* @ see TagAttribute # getValueExpression ( FaceletContext , Class )
* @ see javax . el . VariableMapper
* @ s... | AbstractFaceletContext actx = ( AbstractFaceletContext ) ctx ; // eval include
try { String [ ] names = null ; ValueExpression [ ] values = null ; if ( this . _vars . length > 0 ) { names = new String [ _vars . length ] ; values = new ValueExpression [ _vars . length ] ; for ( int i = 0 ; i < _vars . length ; i ++ ) { ... |
public class StencilOperands { /** * Coerce to a collection
* @ param val
* Object to be coerced .
* @ return The Collection coerced value . */
public Collection < ? > toCollection ( Object val ) { } } | if ( val == null ) { return Collections . emptyList ( ) ; } else if ( val instanceof Collection < ? > ) { return ( Collection < ? > ) val ; } else if ( val . getClass ( ) . isArray ( ) ) { return newArrayList ( ( Object [ ] ) val ) ; } else if ( val instanceof Map < ? , ? > ) { return ( ( Map < ? , ? > ) val ) . entryS... |
public class DeploymentMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Deployment deployment , ProtocolMarshaller protocolMarshaller ) { } } | if ( deployment == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deployment . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( deployment . getStatus ( ) , STATUS_BINDING ) ; protocolMarshaller . marshall ( deployment . getTaskDe... |
public class Timestamp { /** * Returns a Timestamp , precise to the second , with a given local offset .
* This is equivalent to the corresponding Ion value
* { @ code YYYY - MM - DDThh : mm : ss . sss + - oo : oo } , where { @ code oo : oo } represents
* the hour and minutes of the local offset from UTC .
* @ ... | // Tease apart the whole and fractional seconds .
// Storing them separately is silly .
int s = second . intValue ( ) ; BigDecimal frac = second . subtract ( BigDecimal . valueOf ( s ) ) ; return new Timestamp ( Precision . SECOND , year , month , day , hour , minute , s , frac , offset , APPLY_OFFSET_YES ) ; |
public class SegmentIndexBuffer { /** * Reads from the specified < code > channel < / code > into this SegmentIndexBuffer .
* @ param channel - the readable channel
* @ return the number of bytes read from the specified channel .
* @ throws IOException */
public int read ( ReadableByteChannel channel ) throws IOE... | // Header : segId ( 4 ) , lastForcedTime ( 8 ) , size ( 4)
ByteBuffer header = ByteBuffer . allocate ( HEADER_LENGTH ) ; read ( channel , header , HEADER_LENGTH , "Invalid Header" ) ; int segmentId = header . getInt ( 0 ) ; long lastForcedTime = header . getLong ( 4 ) ; int size = header . getInt ( 12 ) ; // Data
int d... |
public class CmsFlexCacheKey { /** * Returns resource name from given key name . < p >
* @ param keyName given name of key .
* @ return name of resource if key is valid , otherwise " " */
public static String getResourceName ( String keyName ) { } } | if ( keyName . endsWith ( CmsFlexCache . CACHE_OFFLINESUFFIX ) | keyName . endsWith ( CmsFlexCache . CACHE_ONLINESUFFIX ) ) { return keyName . split ( " " ) [ 0 ] ; } else { return "" ; } |
public class CommandLineRunner { /** * < p > run . < / p >
* @ param args a { @ link java . lang . String } object .
* @ throws java . lang . Exception if any . */
public void run ( String ... args ) throws Exception { } } | List < String > parameters = parseCommandLine ( args ) ; if ( ! parameters . isEmpty ( ) ) { runClassicRunner ( parameters ) ; } |
public class ReflectionUtils { /** * Returns the sum of the object transformation cost for each class in the source
* argument list .
* @ param srcArgs the source arguments
* @ param destArgs the destination arguments
* @ return the accumulated weight for all arguments */
public static float getTypeDifferenceWe... | float weight = 0.0f ; for ( int i = 0 ; i < srcArgs . length ; i ++ ) { Class < ? > srcClass = srcArgs [ i ] ; Class < ? > destClass = destArgs [ i ] ; weight += getTypeDifferenceWeight ( srcClass , destClass ) ; if ( weight == Float . MAX_VALUE ) { break ; } } return weight ; |
public class GreenMailBean { /** * Creates the server setup , depending on the protocol flags .
* @ return the configured server setups . */
private ServerSetup [ ] createServerSetup ( ) { } } | List < ServerSetup > setups = new ArrayList < > ( ) ; if ( smtpProtocol ) { smtpServerSetup = createTestServerSetup ( ServerSetup . SMTP ) ; setups . add ( smtpServerSetup ) ; } if ( smtpsProtocol ) { smtpsServerSetup = createTestServerSetup ( ServerSetup . SMTPS ) ; setups . add ( smtpsServerSetup ) ; } if ( pop3Proto... |
public class MyProxy { /** * Retrieves credential information from MyProxy server .
* @ param credential
* The local GSI credentials to use for authentication .
* @ param params
* The parameters for the info operation .
* @ exception MyProxyException
* If an error occurred during the operation .
* @ retur... | if ( credential == null ) { throw new IllegalArgumentException ( "credential == null" ) ; } if ( params == null ) { throw new IllegalArgumentException ( "params == null" ) ; } String msg = params . makeRequest ( ) ; CredentialInfo [ ] creds = null ; Socket gsiSocket = null ; OutputStream out = null ; InputStream in = n... |
public class Gram { /** * Completes a GSI delegation handshake with a globus job manager
* that has agreed to a ( previously sent ) GRAM " renew " request . After
* the job manager receives the last token in the handshake , it responds
* with a message following the GRAM protocol indicating delegation success
*... | byte [ ] input = new byte [ 0 ] ; byte [ ] output = null ; do { output = produceRenewToken ( context , context . initDelegation ( newCred , null , 0 , input , 0 , input . length ) ) ; out . writeToken ( output ) ; if ( ! context . isDelegationFinished ( ) ) { input = consumeRenewToken ( context , in . readHandshakeToke... |
public class AuditCollectorUtil { /** * Get code quality audit results */
private static Audit getCodeQualityAudit ( JSONArray jsonArray , JSONArray global ) { } } | LOGGER . info ( "NFRR Audit Collector auditing CODE_QUALITY" ) ; Audit audit = new Audit ( ) ; audit . setType ( AuditType . CODE_QUALITY ) ; Audit basicAudit ; if ( ( basicAudit = doBasicAuditCheck ( jsonArray , global , AuditType . CODE_QUALITY ) ) != null ) { return basicAudit ; } audit . setAuditStatus ( AuditStatu... |
public class Requests { /** * Create a new { @ link PublishDelete } instance for a link between two
* { @ link Identifier } instances in order to delete its metadata that matches
* the given filter .
* @ param i1 the first { @ link Identifier } of the link
* @ param i2 the second { @ link Identifier } of the li... | PublishDelete pd = createPublishDelete ( ) ; fillIdentifierHolder ( pd , i1 , i2 ) ; pd . setFilter ( filter ) ; return pd ; |
public class ClassUtils { /** * 根据Field类型设置值
* @ param field */
public static void setFieldValeByType ( Field field , Object obj , String value ) throws Exception { } } | Class < ? > type = field . getType ( ) ; String typeName = type . getName ( ) ; if ( typeName . equals ( "int" ) ) { if ( value . equals ( "" ) ) { value = "0" ; } field . set ( obj , Integer . valueOf ( value ) ) ; } else if ( typeName . equals ( "long" ) ) { if ( value . equals ( "" ) ) { value = "0" ; } field . set ... |
public class ApiClient { /** * { @ link # execute ( Call , Type ) }
* @ param < T > Type
* @ param call An instance of the Call object
* @ throws ApiException If fail to execute the call
* @ return ApiResponse & lt ; T & gt ; */
public < T > ApiResponse < T > execute ( Call call ) throws ApiException { } } | return execute ( call , null ) ; |
public class MDRRGImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . MDRRG__RG_LENGTH : setRGLength ( RG_LENGTH_EDEFAULT ) ; return ; case AfplibPackage . MDRRG__TRIPLETS : getTriplets ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ; |
public class OperationsInner { /** * Get available resource provider actions ( operations ) .
* Lists all available actions exposed by the Data Migration Service resource provider .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; Servi... | return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < ServiceOperationInner > > , Page < ServiceOperationInner > > ( ) { @ Override public Page < ServiceOperationInner > call ( ServiceResponse < Page < ServiceOperationInner > > response ) { return response . body ( ) ; } } ) ; |
public class SparkComputationGraph { /** * Score the examples individually , using the default batch size { @ link # DEFAULT _ EVAL _ SCORE _ BATCH _ SIZE } . Unlike { @ link # calculateScore ( JavaRDD , boolean ) } ,
* this method returns a score for each example separately . If scoring is needed for specific exampl... | return scoreExamplesMultiDataSet ( data , includeRegularizationTerms , DEFAULT_EVAL_SCORE_BATCH_SIZE ) ; |
public class DefaultResourceCache { /** * ( non - Javadoc )
* @ see
* org . javamoney . moneta . loader . format . ResourceCache # write ( java . lang . String
* , byte [ ] ) */
@ Override public void write ( String resourceId , byte [ ] data ) { } } | try { File file = this . cachedResources . get ( resourceId ) ; if ( Objects . isNull ( file ) ) { file = new File ( localDir , resourceId + SUFFIX ) ; Files . write ( file . toPath ( ) , data ) ; this . cachedResources . put ( resourceId , file ) ; } else { Files . write ( file . toPath ( ) , data ) ; } } catch ( Exce... |
public class Issue { /** * Set up the screen input fields . */
public void setupFields ( ) { } } | FieldInfo field = null ; field = new FieldInfo ( this , ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field . setHidden ( true ) ; field = new FieldInfo ( this , LAST_CHANGED , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Date . class ) ;... |
public class BasicApiConnection { /** * To be migrated from { @ class ApiConnection } */
@ Override void confirmLogin ( String token , String username , String password ) throws IOException , LoginFailedException , MediaWikiApiErrorException { } } | super . confirmLogin ( token , username , password ) ; |
public class MultipleLoaderClassResolver { /** * Loads class from multiple ClassLoader .
* If this method can not load target class ,
* it tries to add package java . lang ( default package )
* and load target class .
* Still , if it can not the class , throws ClassNotFoundException .
* ( behavior is put toge... | "unchecked" , "rawtypes" } ) public Class classForName ( String className , Map loaderMap ) throws ClassNotFoundException { Collection < ClassLoader > loaders = null ; // add context - classloader
loaders = new HashSet < ClassLoader > ( ) ; loaders . add ( Thread . currentThread ( ) . getContextClassLoader ( ) ) ; if (... |
public class SettingsPack { /** * Starts the dht node and makes the trackerless service available to
* torrents .
* @ param value
* @ return this */
public SettingsPack enableDht ( boolean value ) { } } | sp . set_bool ( settings_pack . bool_types . enable_dht . swigValue ( ) , value ) ; return this ; |
public class MergePolicyValidator { /** * Checks the merge policy configuration in the context of an { @ link ICache } .
* @ param mergePolicyClassname the configured merge policy of the cache
* @ param mergeTypeProvider the { @ link SplitBrainMergeTypeProvider } of the cache
* @ param mergePolicyProvider the { @... | if ( mergePolicyProvider == null ) { return ; } Object mergePolicyInstance = getMergePolicyInstance ( mergePolicyProvider , mergePolicyClassname ) ; checkMergePolicy ( mergeTypeProvider , mergePolicyInstance ) ; |
public class MediaApi { /** * Create open media interaction
* Create a new open media interaction
* @ param mediatype The media channel . ( required )
* @ param createData Request parameters . ( required )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API ... | com . squareup . okhttp . Call call = createOpenMediaValidateBeforeCall ( mediatype , createData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class PatternsImpl { /** * Returns an application version ' s patterns .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param getPatternsOptionalParameter the object representing the optional parameters to be set before calling this API
* @ throws IllegalArgumentException t... | return getPatternsWithServiceResponseAsync ( appId , versionId , getPatternsOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class Promise { /** * see IPromise ( inheriting Callback ) interface */
@ Override public IPromise < T > thenAnd ( Supplier < IPromise < T > > callable ) { } } | Promise res = new Promise < > ( ) ; then ( new Callback < T > ( ) { @ Override public void complete ( T result , Object error ) { if ( Actor . isError ( error ) ) { res . complete ( null , error ) ; } else { IPromise < T > call = null ; call = callable . get ( ) . then ( res ) ; } } } ) ; return res ; |
public class OpenIabHelper { /** * Queries the inventory . This will query all owned items from the server , as well as
* information on additional skus , if specified . This method may block or take long to execute .
* Do not call from the UI thread . For that , use the non - blocking version { @ link # queryInven... | if ( Utils . uiThread ( ) ) { throw new IllegalStateException ( "Must not be called from the UI thread" ) ; } final Appstore appstore = this . appstore ; final AppstoreInAppBillingService appStoreBillingService = this . appStoreBillingService ; if ( setupState != SETUP_RESULT_SUCCESSFUL || appstore == null || appStoreB... |
public class IcsAbsSpinner { /** * Jump directly to a specific item in the adapter data . */
public void setSelection ( int position , boolean animate ) { } } | // Animate only if requested position is already on screen somewhere
boolean shouldAnimate = animate && mFirstPosition <= position && position <= mFirstPosition + getChildCount ( ) - 1 ; setSelectionInt ( position , shouldAnimate ) ; |
public class FunctionParamBuilder { /** * Add optional parameters of the given type to the end of the param list .
* @ param types Types for each optional parameter . The builder will make them
* undefine - able .
* @ return False if this is called after var args are added . */
public boolean addOptionalParams ( ... | if ( hasVarArgs ( ) ) { return false ; } for ( JSType type : types ) { newParameter ( registry . createOptionalType ( type ) ) . setOptionalArg ( true ) ; } return true ; |
public class SDVariable { /** * See { @ link # add ( String , SDVariable ) } */
public SDVariable add ( SDVariable other ) { } } | return add ( sameDiff . generateNewVarName ( AddOp . OP_NAME , 0 ) , other ) ; |
public class TransliteratorRegistry { /** * Remove a source - target / variant from the specDAG . */
private void removeSTV ( String source , String target , String variant ) { } } | // assert ( source . length ( ) > 0 ) ;
// assert ( target . length ( ) > 0 ) ;
CaseInsensitiveString cisrc = new CaseInsensitiveString ( source ) ; CaseInsensitiveString citrg = new CaseInsensitiveString ( target ) ; CaseInsensitiveString civar = new CaseInsensitiveString ( variant ) ; Map < CaseInsensitiveString , Li... |
public class FSDirectory { /** * Add node to parent node when loading the image . */
INodeDirectory addToParent ( byte [ ] src , INodeDirectory parentINode , INode newNode , boolean propagateModTime , int childIndex ) { } } | // NOTE : This does not update space counts for parents
// add new node to the parent
INodeDirectory newParent = null ; writeLock ( ) ; try { try { newParent = rootDir . addToParent ( src , newNode , parentINode , false , propagateModTime , childIndex ) ; cacheName ( newNode ) ; } catch ( FileNotFoundException e ) { re... |
public class JsonSerializer { /** * Serializes an object into JSON output .
* @ param writer { @ link JsonWriter } used to write the serialized JSON
* @ param value Object to serialize
* @ param ctx Context for the full serialization process
* @ throws JsonSerializationException if an error occurs during the se... | serialize ( writer , value , ctx , JsonSerializerParameters . DEFAULT ) ; |
public class Spinner { /** * Set an adapter for this Spinner .
* @ param adapter */
public void setAdapter ( SpinnerAdapter adapter ) { } } | if ( mAdapter != null ) mAdapter . unregisterDataSetObserver ( mDataSetObserver ) ; mRecycler . clear ( ) ; mAdapter = adapter ; mAdapter . registerDataSetObserver ( mDataSetObserver ) ; onDataChanged ( ) ; if ( mPopup != null ) mPopup . setAdapter ( new DropDownAdapter ( adapter ) ) ; else mTempAdapter = new DropDownA... |
public class RecordReaderConverter { /** * Write all values from the specified record reader to the specified record writer .
* Optionally , close the record writer on completion
* @ param reader Record reader ( source of data )
* @ param writer Record writer ( location to write data )
* @ param closeOnCompleti... | if ( ! reader . hasNext ( ) ) { throw new UnsupportedOperationException ( "Cannot convert RecordReader: reader has no next element" ) ; } while ( reader . hasNext ( ) ) { writer . write ( reader . next ( ) ) ; } if ( closeOnCompletion ) { writer . close ( ) ; } |
public class MutableRoaringArray { /** * Append copies of the values AFTER a specified key ( may or may not be present ) to end .
* @ param highLowContainer the other array
* @ param beforeStart given key is the largest key that we won ' t copy */
protected void appendCopiesAfter ( PointableRoaringArray highLowCont... | int startLocation = highLowContainer . getIndex ( beforeStart ) ; if ( startLocation >= 0 ) { startLocation ++ ; } else { startLocation = - startLocation - 1 ; } extendArray ( highLowContainer . size ( ) - startLocation ) ; for ( int i = startLocation ; i < highLowContainer . size ( ) ; ++ i ) { this . keys [ this . si... |
public class HadoopPath { /** * TBD : performance , avoid initOffsets */
private byte [ ] resolve0 ( ) { } } | byte [ ] to = new byte [ path . length ] ; int nc = getNameCount ( ) ; int [ ] lastM = new int [ nc ] ; int lastMOff = - 1 ; int m = 0 ; for ( int i = 0 ; i < nc ; i ++ ) { int n = offsets [ i ] ; int len = ( i == offsets . length - 1 ) ? ( path . length - n ) : ( offsets [ i + 1 ] - n - 1 ) ; if ( len == 1 && path [ n... |
public class TimeArrayTimeZoneRule { /** * / * Get UTC of the time with the raw / dst offset */
private long getUTC ( long time , int raw , int dst ) { } } | if ( timeType != DateTimeRule . UTC_TIME ) { time -= raw ; } if ( timeType == DateTimeRule . WALL_TIME ) { time -= dst ; } return time ; |
public class DurableOutputHandler { /** * Create a CardinalityInfo reply .
* @ param target The target ME for this reply .
* @ param reqID The request ID of the original request message .
* @ param card The cardinality to record on this message . */
protected static ControlCardinalityInfo createCardinalityInfo ( ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createCardinalityInfo" , new Object [ ] { MP , target , new Long ( reqID ) , new Integer ( card ) } ) ; ControlCardinalityInfo msg = null ; try { // Create and initialize the message
msg = MessageProcessor . getControlMessa... |
public class InstanceRequestMap { /** * Sets both the minimum and the maximum number of instances to be requested from the given instance type .
* @ param instanceType
* the type of instance to request
* @ param number
* the minimum and the maximum number of instances to request */
public void setNumberOfInstan... | setMinimumNumberOfInstances ( instanceType , number ) ; setMaximumNumberOfInstances ( instanceType , number ) ; |
public class PersistenceBrokerImpl { /** * Store all object references that < b > obj < / b > points to .
* All objects which we have a FK pointing to ( Via ReferenceDescriptors ) will be
* stored if auto - update is true < b > AND < / b > the member field containing the object
* reference is NOT null .
* With ... | // get all members of obj that are references and store them
Collection listRds = cld . getObjectReferenceDescriptors ( ) ; // return if nothing to do
if ( listRds == null || listRds . size ( ) == 0 ) { return ; } Iterator i = listRds . iterator ( ) ; while ( i . hasNext ( ) ) { ObjectReferenceDescriptor rds = ( Object... |
public class SwaptionDataLattice { /** * Get a view of the locations of swaptions in this lattice .
* The keys of the map are the levels of moneyness for which there are swaptions , sorted in ascending order .
* The entries for each moneyness consist of an array of arrays { maturities , tenors } , each sorted in as... | // See if the map has already been instantiated .
if ( keyMap != null ) { return Collections . unmodifiableMap ( keyMap ) ; } // Otherwise create the map and return it .
Map < Integer , List < Set < Integer > > > newMap = new HashMap < > ( ) ; for ( DataKey key : entryMap . keySet ( ) ) { if ( ! newMap . containsKey ( ... |
public class Player { /** * Starts the thread of a robot in the player ' s thread group
* @ param newRobot the robot to start */
public void startRobot ( Robot newRobot ) { } } | newRobot . getData ( ) . setActiveState ( DEFAULT_START_STATE ) ; Thread newThread = new Thread ( robotsThreads , newRobot , "Bot-" + newRobot . getSerialNumber ( ) ) ; newThread . start ( ) ; // jumpstarts the robot |
public class FlowEventService { /** * Stores a single flow event row
* @ param event
* @ throws IOException */
public void addEvent ( FlowEvent event ) throws IOException { } } | Put p = createPutForEvent ( event ) ; Table eventTable = null ; try { eventTable = hbaseConnection . getTable ( TableName . valueOf ( Constants . FLOW_EVENT_TABLE ) ) ; eventTable . put ( p ) ; } finally { if ( eventTable != null ) { eventTable . close ( ) ; } } |
public class ConstructorWriterImpl { /** * { @ inheritDoc } */
@ Override public void setSummaryColumnStyle ( HtmlTree tdTree ) { } } | if ( foundNonPubConstructor ) tdTree . addStyle ( HtmlStyle . colLast ) ; else tdTree . addStyle ( HtmlStyle . colOne ) ; |
public class JettyServletWebServerFactory { /** * Return the Jetty { @ link Configuration } s that should be applied to the server .
* @ param webAppContext the Jetty { @ link WebAppContext }
* @ param initializers the { @ link ServletContextInitializer } s to apply
* @ return configurations to apply */
protected... | List < Configuration > configurations = new ArrayList < > ( ) ; configurations . add ( getServletContextInitializerConfiguration ( webAppContext , initializers ) ) ; configurations . addAll ( getConfigurations ( ) ) ; configurations . add ( getErrorPageConfiguration ( ) ) ; configurations . add ( getMimeTypeConfigurati... |
public class CollectionDescriptorConstraints { /** * Ensures that the given collection descriptor has the collection - class property if necessary .
* @ param collDef The collection descriptor
* @ param checkLevel The current check level ( this constraint is checked in basic ( partly ) and strict )
* @ exception ... | if ( CHECKLEVEL_NONE . equals ( checkLevel ) ) { return ; } if ( collDef . hasProperty ( PropertyHelper . OJB_PROPERTY_ARRAY_ELEMENT_CLASS_REF ) ) { // an array cannot have a collection - class specified
if ( collDef . hasProperty ( PropertyHelper . OJB_PROPERTY_COLLECTION_CLASS ) ) { throw new ConstraintException ( "C... |
public class BaseFont { /** * Gets the width of a < CODE > String < / CODE > in points taking kerning
* into account .
* @ param text the < CODE > String < / CODE > to get the width of
* @ param fontSize the font size
* @ return the width in points */
public float getWidthPointKerned ( String text , float fontS... | float size = getWidth ( text ) * 0.001f * fontSize ; if ( ! hasKernPairs ( ) ) return size ; int len = text . length ( ) - 1 ; int kern = 0 ; char c [ ] = text . toCharArray ( ) ; for ( int k = 0 ; k < len ; ++ k ) { kern += getKerning ( c [ k ] , c [ k + 1 ] ) ; } return size + kern * 0.001f * fontSize ; |
public class ReservoirItemsUnion { /** * This either merges sketchIn into gadget _ or gadget _ into sketchIn . If merging into sketchIn
* with isModifiable set to false , copies elements from sketchIn first , leaving original
* unchanged .
* @ param sketchIn Sketch with new samples from which to draw
* @ param ... | if ( sketchIn . getN ( ) <= sketchIn . getK ( ) ) { twoWayMergeInternalStandard ( sketchIn ) ; } else if ( gadget_ . getN ( ) < gadget_ . getK ( ) ) { // merge into sketchIn , so swap first
final ReservoirItemsSketch < T > tmpSketch = gadget_ ; gadget_ = ( isModifiable ? sketchIn : sketchIn . copy ( ) ) ; twoWayMergeIn... |
public class ObjectToJsonConverter { /** * Setup the context with the limits given in the request or with the default limits if not . In all cases ,
* hard limits as defined in the servlet configuration are never exceeded .
* @ param pOpts options used for parsing . */
void setupContext ( JsonConvertOptions pOpts )... | ObjectSerializationContext stackContext = new ObjectSerializationContext ( pOpts ) ; stackContextLocal . set ( stackContext ) ; |
public class CatalogUtil { /** * Read a hashed password from password .
* SHA * hash it once to match what we will get from the wire protocol
* and then hex encode it */
private static String extractPassword ( String password , ClientAuthScheme scheme ) { } } | MessageDigest md = null ; try { md = MessageDigest . getInstance ( ClientAuthScheme . getDigestScheme ( scheme ) ) ; } catch ( final NoSuchAlgorithmException e ) { hostLog . l7dlog ( Level . FATAL , LogKeys . compiler_VoltCompiler_NoSuchAlgorithm . name ( ) , e ) ; System . exit ( - 1 ) ; } final byte passwordHash [ ] ... |
public class GregorianCalendar { /** * Set hour , minutes , second and milliseconds to zero .
* @ param d Date
* @ return Modified date */
@ SuppressWarnings ( "deprecation" ) private Date setHourToZero ( Date in ) { } } | final Date d = new Date ( in . getTime ( ) ) ; d . setHours ( 0 ) ; d . setMinutes ( 0 ) ; d . setSeconds ( 0 ) ; // a trick to set milliseconds to zero
long t = d . getTime ( ) / 1000 ; t = t * 1000 ; return new Date ( t ) ; |
public class RunnersApi { /** * Remove a runner .
* < pre > < code > GitLab Endpoint : DELETE / runners / : id < / code > < / pre >
* @ param runnerId The ID of a runner
* @ throws GitLabApiException if any exception occurs */
public void removeRunner ( Integer runnerId ) throws GitLabApiException { } } | if ( runnerId == null ) { throw new RuntimeException ( "runnerId cannot be null" ) ; } delete ( Response . Status . NO_CONTENT , null , "runners" , runnerId ) ; |
public class Keys { /** * Tests whether the
* " Java Cryptography Extension ( JCE ) Unlimited Strength Jurisdiction Policy Files " is
* correctly installed .
* @ return If strong keys can be used , true , otherwise false . */
public static boolean canUseStrongKeys ( ) { } } | try { int maxKeyLen = Cipher . getMaxAllowedKeyLength ( Crypto . CIPHER_ALGORITHM ) ; return maxKeyLen > 128 ; } catch ( NoSuchAlgorithmException e ) { throw new IllegalStateException ( "Algorithm unavailable: " + Crypto . CIPHER_ALGORITHM , e ) ; } |
public class JCusparse { /** * Description : Wrapper that un - sorts sparse matrix stored in CSR format
* ( without exposing the permutation ) . */
public static int cusparseScsr2csru ( cusparseHandle handle , int m , int n , int nnz , cusparseMatDescr descrA , Pointer csrVal , Pointer csrRowPtr , Pointer csrColInd ,... | return checkResult ( cusparseScsr2csruNative ( handle , m , n , nnz , descrA , csrVal , csrRowPtr , csrColInd , info , pBuffer ) ) ; |
public class DatasourceJBossASClient { /** * Checks to see if there is already a datasource with the given name .
* @ param datasourceName the name to check
* @ return true if there is a datasource with the given name already in existence
* @ throws Exception any error */
public boolean isDatasource ( String data... | Address addr = Address . root ( ) . add ( SUBSYSTEM , SUBSYSTEM_DATASOURCES ) ; String haystack = DATA_SOURCE ; return null != findNodeInList ( addr , haystack , datasourceName ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.