signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class PKIXRevocationChecker { /** * Sets the OCSP responses . These responses are used to determine * the revocation status of the specified certificates when OCSP is used . * @ param responses a map of OCSP responses . Each key is an * { @ code X509Certificate } that maps to the corresponding * DER - en...
if ( responses == null ) { this . ocspResponses = Collections . < X509Certificate , byte [ ] > emptyMap ( ) ; } else { Map < X509Certificate , byte [ ] > copy = new HashMap < > ( responses . size ( ) ) ; for ( Map . Entry < X509Certificate , byte [ ] > e : responses . entrySet ( ) ) { copy . put ( e . getKey ( ) , e . ...
public class SpeakUtil { /** * Notes that the specified user was privy to the specified message . If { @ link * ChatMessage # timestamp } is not already filled in , it will be . */ protected static void noteMessage ( SpeakObject sender , Name username , UserMessage msg ) { } }
// fill in the message ' s time stamp if necessary if ( msg . timestamp == 0L ) { msg . timestamp = System . currentTimeMillis ( ) ; } // Log . info ( " Noted that " + username + " heard " + msg + " . " ) ; // notify any message observers _messageOp . init ( sender , username , msg ) ; _messageObs . apply ( _messageOp ...
public class MetaZone { /** * Find the metazone that applies for a given timestamp . */ public String applies ( ZonedDateTime d ) { } }
long epoch = d . toEpochSecond ( ) ; for ( int i = 0 ; i < size ; i ++ ) { Entry entry = entries [ i ] ; if ( entry . from == - 1 ) { if ( entry . to == - 1 || epoch < entry . to ) { return entry . metazoneId ; } } else if ( entry . to == - 1 ) { if ( entry . from <= epoch ) { return entry . metazoneId ; } } else if ( ...
public class LdapUtils { /** * New pooled connection factory pooled connection factory . * @ param l the ldap properties * @ return the pooled connection factory */ public static PooledConnectionFactory newLdaptivePooledConnectionFactory ( final AbstractLdapProperties l ) { } }
val cp = newLdaptiveBlockingConnectionPool ( l ) ; return new PooledConnectionFactory ( cp ) ;
public class SecStrucCalc { /** * Calculate the coordinates of the H atoms . They are usually * missing in the PDB files as only few experimental methods allow * to resolve their location . */ private void calculateHAtoms ( ) throws StructureException { } }
for ( int i = 0 ; i < groups . length - 1 ; i ++ ) { SecStrucGroup a = groups [ i ] ; SecStrucGroup b = groups [ i + 1 ] ; if ( ! b . hasAtom ( "H" ) ) { // Atom H = calc _ H ( a . getC ( ) , b . getN ( ) , b . getCA ( ) ) ; Atom H = calcSimple_H ( a . getC ( ) , a . getO ( ) , b . getN ( ) ) ; b . setH ( H ) ; } }
public class InstanceValidator { /** * / * private void validateAnswerCode ( List < ValidationMessage > errors , Element value , NodeStack stack , List < Coding > optionList ) { * String system = value . getNamedChildValue ( " system " ) ; * String code = value . getNamedChildValue ( " code " ) ; * boolean found ...
ValueSet vs = resolveBindingReference ( qSrc , ref ) ; if ( warning ( errors , IssueType . CODEINVALID , value . line ( ) , value . col ( ) , stack . getLiteralPath ( ) , vs != null , "ValueSet " + describeReference ( ref ) + " not found" ) ) { try { Coding c = readAsCoding ( value ) ; if ( isBlank ( c . getCode ( ) ) ...
public class DataObject { /** * Returns a String where references to DataObject values are replaced with actual values . * E . g . reference $ { Firstname } will be replaced with property ' Firstname ' value . * @ param format * @ return */ public String format ( String format ) { } }
Matcher m = REF . matcher ( format ) ; StringBuffer sb = new StringBuffer ( ) ; while ( m . find ( ) ) { Object ob = get ( m . group ( 1 ) ) ; if ( ob != null ) { m . appendReplacement ( sb , ob . toString ( ) ) ; } else { m . appendReplacement ( sb , m . group ( ) ) ; } } m . appendTail ( sb ) ; return sb . toString (...
public class AbstractValidate { /** * Method without varargs to increase performance */ public < T extends Iterable < ? > > T noNullElements ( final T iterable , final String message ) { } }
notNull ( iterable ) ; final int index = indexOfNullElement ( iterable ) ; if ( index != - 1 ) { fail ( String . format ( message , index ) ) ; } return iterable ;
public class MetricQueryService { /** * Starts the MetricQueryService actor in the given actor system . * @ param rpcService The rpcService running the MetricQueryService * @ param resourceID resource ID to disambiguate the actor name * @ return actor reference to the MetricQueryService */ public static MetricQue...
String endpointId = resourceID == null ? METRIC_QUERY_SERVICE_NAME : METRIC_QUERY_SERVICE_NAME + "_" + resourceID . getResourceIdString ( ) ; return new MetricQueryService ( rpcService , endpointId , maximumFrameSize ) ;
public class XSynchronizedExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setParam ( XExpression newParam ) { } }
if ( newParam != param ) { NotificationChain msgs = null ; if ( param != null ) msgs = ( ( InternalEObject ) param ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - XbasePackage . XSYNCHRONIZED_EXPRESSION__PARAM , null , msgs ) ; if ( newParam != null ) msgs = ( ( InternalEObject ) newParam ) . eInverseAdd ( this , ...
public class WireTapHelper { /** * If the " org . talend . esb . sam . agent . log . messageContent " property value is " true " then log the message content * If it is " false " then skip the message content logging * Else fall back to global property " log . messageContent " * @ param message * @ param logMes...
/* * If controlling of logging behavior is not allowed externally * then log according to global property value */ if ( ! logMessageContentOverride ) { return logMessageContent ; } Object logMessageContentExtObj = message . getContextualProperty ( EXTERNAL_PROPERTY_NAME ) ; if ( null == logMessageContentExtObj ) { re...
public class RegistriesInner { /** * Regenerates one of the login credentials for the specified container registry . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param name Specifies name of the...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( registr...
public class Node { /** * Insert the specified node into the DOM before this node ( i . e . as a preceding sibling ) . * @ param node to add before this node * @ return this node , for chaining * @ see # after ( Node ) */ public Node before ( Node node ) { } }
Validate . notNull ( node ) ; Validate . notNull ( parentNode ) ; parentNode . addChildren ( siblingIndex , node ) ; return this ;
public class GrantFlowEntitlementsRequest { /** * The list of entitlements that you want to grant . * @ param entitlements * The list of entitlements that you want to grant . */ public void setEntitlements ( java . util . Collection < GrantEntitlementRequest > entitlements ) { } }
if ( entitlements == null ) { this . entitlements = null ; return ; } this . entitlements = new java . util . ArrayList < GrantEntitlementRequest > ( entitlements ) ;
public class SQLParsingEngine { /** * Parse SQL . * @ param useCache use cache or not * @ return parsed SQL statement */ public SQLStatement parse ( final boolean useCache ) { } }
Optional < SQLStatement > cachedSQLStatement = getSQLStatementFromCache ( useCache ) ; if ( cachedSQLStatement . isPresent ( ) ) { return cachedSQLStatement . get ( ) ; } LexerEngine lexerEngine = LexerEngineFactory . newInstance ( dbType , sql ) ; SQLStatement result = SQLParserFactory . newInstance ( dbType , shardin...
public class RefreshMemoryMirror { /** * 判断对象是否过期 * @ param refreshObject * @ return */ private boolean isExpired ( RefreshObject refreshObject ) { } }
if ( refreshObject == null ) { return false ; } Calendar calendar = Calendar . getInstance ( ) ; calendar . setTimeInMillis ( refreshObject . getTimestamp ( ) ) ; // calendar . add ( Calendar . SECOND , period . intValue ( ) ) ; calendar . add ( Calendar . MILLISECOND , period . intValue ( ) ) ; Date now = new Date ( )...
public class BinaryExpressionEvaluator { /** * Utility methods */ static public long div ( double lv , double rv ) { } }
/* * There is often confusion on how integer division , remainder and modulus work on negative numbers . In fact , * there are two valid answers to - 14 div 3 : either ( the intuitive ) - 4 as in the Toolbox , or - 5 as in e . g . * Standard ML [ Paulson91 ] . It is therefore appropriate to explain these operations...
public class StringUtil { /** * Converts the specified byte array into a hexadecimal value and appends it to the specified buffer . */ public static < T extends Appendable > T toHexString ( T dst , byte [ ] src , int offset , int length ) { } }
assert length >= 0 ; if ( length == 0 ) { return dst ; } final int end = offset + length ; final int endMinusOne = end - 1 ; int i ; // Skip preceding zeroes . for ( i = offset ; i < endMinusOne ; i ++ ) { if ( src [ i ] != 0 ) { break ; } } byteToHexString ( dst , src [ i ++ ] ) ; int remaining = end - i ; toHexString...
public class NameNode { /** * Stub for 0.20 clients that don ' t support HDFS - 630 */ public LocatedBlock addBlock ( String src , String clientName ) throws IOException { } }
return addBlock ( src , clientName , null ) ;
public class ProteinNameLister { /** * - - - - - main ( ) method - - - - - */ public static void main ( String [ ] args ) { } }
if ( args . length != 1 ) { System . out . println ( "\nUse Parameter: path (to biopax OWL files)\n" ) ; System . exit ( - 1 ) ; } BioPAXIOHandler reader = new SimpleIOHandler ( ) ; final String pathname = args [ 0 ] ; File testDir = new File ( pathname ) ; /* * Customized Fetcher is to fix the issue with Level2 * - ...
public class UpdatableResultSet { /** * { inheritDoc } . */ public void updateCharacterStream ( int columnIndex , Reader reader , int length ) throws SQLException { } }
updateCharacterStream ( columnIndex , reader , ( long ) length ) ;
public class MyVector { /** * Calculates the associated normalized Vector of this Vector * @ return the associated normalized Vector of this Vector */ public MyVector normalize ( ) { } }
double vmodule = module ( ) ; double [ ] associatedVector = new double [ vector . length ] ; for ( int i = 0 ; i < vector . length ; i ++ ) { associatedVector [ i ] = ( 1 / vmodule ) * vector [ i ] ; } return new MyVector ( associatedVector ) ;
public class FacebookRestClient { /** * Call the specified method , with the given parameters , and return a DOM tree with the results . * @ param method the fieldName of the method * @ param paramPairs a list of arguments to the method * @ throws Exception with a description of any errors given to us by the serv...
HashMap < String , CharSequence > params = new HashMap < String , CharSequence > ( 2 * method . numTotalParams ( ) ) ; params . put ( "method" , method . methodName ( ) ) ; params . put ( "api_key" , _apiKey ) ; params . put ( "v" , TARGET_API_VERSION ) ; String format = getResponseFormat ( ) ; if ( null != format ) { ...
public class MultiContentHandler { /** * Reads the content and adds it into the email . This method is expected to * update the content of the { @ code email } parameter . * While the method signature accepts any { @ link Content } instance as * parameter , the method will fail if anything other than a * { @ li...
if ( email == null ) { throw new IllegalArgumentException ( "[email] cannot be null" ) ; } if ( content == null ) { throw new IllegalArgumentException ( "[content] cannot be null" ) ; } if ( content instanceof MultiContent ) { for ( Content subContent : ( ( MultiContent ) content ) . getContents ( ) ) { delegate . setC...
public class ELHelper { /** * This method will process a configuration value for LdapSearchScope setting in * { @ link LdapIdentityStoreDefinition } . It will first check to see if there is an * EL expression . It there is , it will return the evaluated expression ; otherwise , it * will return the non - EL value...
LdapSearchScope result ; boolean immediate = false ; /* * The expression language value takes precedence over the direct setting . */ if ( expression . isEmpty ( ) ) { /* * Direct setting . */ result = value ; } else { /* * Evaluate the EL expression to get the value . */ Object obj = evaluateElExpression ( expression ...
public class ThriftConnectionPool { /** * 根据配置获取原始连接的方法 * @ param serverInfo * thrift服务器信息 * @ return thrift客户端连接对象 * @ throws ThriftConnectionPoolException * 当获取连接出现问题时抛出该异常 */ private ThriftConnection < T > obtainRawInternalConnection ( ThriftServerInfo serverInfo ) throws ThriftConnectionPoolException { } ...
// 判断单服务还是多服务模式 ThriftConnection < T > connection ; if ( this . thriftServiceType == ThriftServiceType . SINGLE_INTERFACE ) { connection = new DefaultThriftConnection < > ( serverInfo . getHost ( ) , serverInfo . getPort ( ) , this . connectionTimeOut , this . config . getThriftProtocol ( ) , this . config . getClientC...
public class DeviceImpl { /** * remove an attribute of the device . Not possible to remove State or Status * @ param attribute * @ throws DevFailed */ public synchronized void removeAttribute ( final AttributeImpl attribute ) throws DevFailed { } }
if ( attribute . getName ( ) . equalsIgnoreCase ( STATUS_NAME ) || attribute . getName ( ) . equalsIgnoreCase ( STATE_NAME ) ) { return ; } pollingManager . removeAttributePolling ( attribute . getName ( ) ) ; statusImpl . removeAttributeAlarm ( attribute . getName ( ) ) ; stateImpl . removeAttributeAlarm ( attribute ....
public class AtomPlacer3D { /** * Gets the first placed Heavy Atom around atomA which is not atomB . * @ param molecule * @ param atomA Description of the Parameter * @ param atomB Description of the Parameter * @ return The placedHeavyAtom value */ public IAtom getPlacedHeavyAtom ( IAtomContainer molecule , IA...
List < IBond > bonds = molecule . getConnectedBondsList ( atomA ) ; for ( IBond bond : bonds ) { IAtom connectedAtom = bond . getOther ( atomA ) ; if ( isPlacedHeavyAtom ( connectedAtom ) && ! connectedAtom . equals ( atomB ) ) { return connectedAtom ; } } return null ;
public class EntityMappingsImpl { /** * Returns all < code > named - stored - procedure - query < / code > elements * @ return list of < code > named - stored - procedure - query < / code > */ public List < NamedStoredProcedureQuery < EntityMappings < T > > > getAllNamedStoredProcedureQuery ( ) { } }
List < NamedStoredProcedureQuery < EntityMappings < T > > > list = new ArrayList < NamedStoredProcedureQuery < EntityMappings < T > > > ( ) ; List < Node > nodeList = childNode . get ( "named-stored-procedure-query" ) ; for ( Node node : nodeList ) { NamedStoredProcedureQuery < EntityMappings < T > > type = new NamedSt...
public class Model { /** * Overrides attribute values from input map . The input map may have attributes whose name do not match the * attribute names ( columns ) of this model . Such attributes will be ignored . Those values whose names are * not present in the argument map , will stay untouched . The input map ma...
Set < String > changedAttributeNames = hydrate ( input , false ) ; dirtyAttributeNames . addAll ( changedAttributeNames ) ; return ( T ) this ;
public class XPathScanner { /** * Reads the string char by char and returns one token by call . The scanning * starts in the start state , if not further specified before , and specifies * the next scanner state and the type of the future token according to its * first char . As soon as the current char does not ...
// some tokens start in another state than the START state mState = mStartState ; // reset startState mStartState = State . START ; mOutput = new StringBuilder ( ) ; mFinnished = false ; mType = TokenType . INVALID ; mLastPos = mPos ; do { mInput = mQuery . charAt ( mPos ) ; switch ( mState ) { case START : // specify ...
public class MarkerUtil { /** * Create an Eclipse marker for given BugInstance . * @ param javaProject * the project * @ param monitor */ public static void createMarkers ( final IJavaProject javaProject , final SortedBugCollection theCollection , final ISchedulingRule rule , IProgressMonitor monitor ) { } }
if ( monitor . isCanceled ( ) ) { return ; } final List < MarkerParameter > bugParameters = createBugParameters ( javaProject , theCollection , monitor ) ; if ( monitor . isCanceled ( ) ) { return ; } WorkspaceJob wsJob = new WorkspaceJob ( "Creating SpotBugs markers" ) { @ Override public IStatus runInWorkspace ( IPro...
public class CountingLittleEndianDataInputStream { /** * Reads an unsigned { @ code short } as specified by * { @ link DataInputStream # readUnsignedShort ( ) } , except using little - endian * byte order . * @ return the next two bytes of the input stream , interpreted as an * unsigned 16 - bit integer in litt...
byte b1 = readAndCheckByte ( ) ; byte b2 = readAndCheckByte ( ) ; return Ints . fromBytes ( ( byte ) 0 , ( byte ) 0 , b2 , b1 ) ;
public class Hierarchy { /** * Determine if one reference type is a subtype of another . * @ param t * a reference type * @ param possibleSupertype * the possible supertype * @ return true if t is a subtype of possibleSupertype , false if not */ public static boolean isSubtype ( ReferenceType t , ReferenceTyp...
return Global . getAnalysisCache ( ) . getDatabase ( Subtypes2 . class ) . isSubtype ( t , possibleSupertype ) ;
public class CmsSitemapController { /** * Adds the entry to the navigation . < p > * @ param entry the entry */ public void addToNavigation ( CmsClientSitemapEntry entry ) { } }
entry . setInNavigation ( true ) ; CmsSitemapChange change = new CmsSitemapChange ( entry . getId ( ) , entry . getSitePath ( ) , ChangeType . modify ) ; CmsPropertyModification mod = new CmsPropertyModification ( entry . getId ( ) , CmsClientProperty . PROPERTY_NAVTEXT , entry . getTitle ( ) , true ) ; change . setPro...
public class RedisCommandFactory { /** * Returns a Redis Commands interface instance for the given interface . * @ param commandInterface must not be { @ literal null } . * @ param < T > command interface type . * @ return the implemented Redis Commands interface . */ public < T extends Commands > T getCommands (...
LettuceAssert . notNull ( commandInterface , "Redis Command Interface must not be null" ) ; RedisCommandsMetadata metadata = new DefaultRedisCommandsMetadata ( commandInterface ) ; InvocationProxyFactory factory = new InvocationProxyFactory ( ) ; factory . addInterface ( commandInterface ) ; BatchAwareCommandLookupStra...
public class StencilOperands { /** * Given a BigInteger , narrow it to an Integer or Long if it fits and the * arguments class allow it . * The rules are : if either arguments is a BigInteger , no narrowing will occur * if either arguments is a Long , no narrowing to Integer will occur * @ param lhs * the lef...
// coerce to long if possible if ( ! ( lhs instanceof BigInteger || rhs instanceof BigInteger ) && bigi . compareTo ( BIGI_LONG_MAX_VALUE ) <= 0 && bigi . compareTo ( BIGI_LONG_MIN_VALUE ) >= 0 ) { // coerce to int if possible long l = bigi . longValue ( ) ; // coerce to int when possible ( int being so often used in m...
public class MethodContentAnalyzer { /** * Searches for own project method invoke instructions in the given list . * @ param instructions The instructions where to search * @ return The found project methods */ Set < ProjectMethod > findProjectMethods ( final List < Instruction > instructions ) { } }
final Set < ProjectMethod > projectMethods = new HashSet < > ( ) ; addProjectMethods ( instructions , projectMethods ) ; return projectMethods ;
public class AbstractNumber { /** * This method is used in constructor that takes byte [ ] or ByteArrayInputStream as parameter . Decodes digits part . * @ param bis * @ return - number of bytes reads * @ throws IllegalArgumentException - thrown if read error is encountered . */ public int decodeDigits ( ByteArra...
if ( skipDigits ( ) ) { return 0 ; } if ( bis . available ( ) == 0 ) { throw new ParameterException ( "No more data to read." ) ; } // FIXME : we could spare time by passing length arg - or getting it from // bis ? ? int count = 0 ; try { address = "" ; int b = 0 ; while ( bis . available ( ) - 1 > 0 ) { b = ( byte ) b...
public class MolecularFormulaManipulator { /** * Adjust the protonation of a molecular formula . This utility method adjusts the hydrogen isotope count * and charge at the same time . * < pre > * IMolecularFormula mf = MolecularFormulaManipulator . getMolecularFormula ( " [ C6H5O ] - " , bldr ) ; * MolecularFor...
if ( mf == null ) throw new NullPointerException ( "No formula provided" ) ; if ( hcnt == 0 ) return false ; // no protons to add final IChemObjectBuilder bldr = mf . getBuilder ( ) ; final int chg = mf . getCharge ( ) != null ? mf . getCharge ( ) : 0 ; IIsotope proton = null ; int pcount = 0 ; for ( IIsotope iso : mf ...
public class KeyVaultClientBaseImpl { /** * Sets the certificate contacts for the specified key vault . * Sets the certificate contacts for the specified key vault . This operation requires the certificates / managecontacts permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vault...
return setCertificateContactsWithServiceResponseAsync ( vaultBaseUrl , contacts ) . map ( new Func1 < ServiceResponse < Contacts > , Contacts > ( ) { @ Override public Contacts call ( ServiceResponse < Contacts > response ) { return response . body ( ) ; } } ) ;
public class ConfigurationKey { /** * Return the names of the variables specified in the key if any * @ return names ( might be zero sized ) */ public Collection < String > getVariableNames ( ) { } }
ImmutableSet . Builder < String > builder = ImmutableSet . builder ( ) ; for ( ConfigurationKeyPart p : parts ) { if ( p . isVariable ( ) ) { builder . add ( p . getValue ( ) ) ; } } return builder . build ( ) ;
public class ResetPasswordTenantOperationsListener { /** * Implementation */ private TenantOperationResponse prepareResponse ( final ITenant tenant ) { } }
try { sendResetPasswordEmail ( tenant ) ; } catch ( Exception e ) { log . error ( "Failed to send tenant admin email to address {} for tenant {}" , tenant . getAttribute ( ADMIN_CONTACT_EMAIL ) , tenant . getName ( ) , e ) ; final TenantOperationResponse error = new TenantOperationResponse ( this , TenantOperationRespo...
public class PreferenceActivity { /** * Obtains the text of the back button from the activity ' s theme . */ private void obtainBackButtonText ( ) { } }
CharSequence text ; try { text = ThemeUtil . getText ( this , R . attr . backButtonText ) ; } catch ( NotFoundException e ) { text = getText ( R . string . back_button_text ) ; } setBackButtonText ( text ) ;
public class ForwardBuilder { /** * Retrieves all end - entity certificates which satisfy constraints * and requirements specified in the parameters and PKIX state . */ private void getMatchingEECerts ( ForwardState currentState , List < CertStore > certStores , Collection < X509Certificate > eeCerts ) throws IOExcep...
if ( debug != null ) { debug . println ( "ForwardBuilder.getMatchingEECerts()..." ) ; } /* * Compose a certificate matching rule to filter out * certs which don ' t satisfy constraints * First , retrieve clone of current target cert constraints , * and then add more selection criteria based on current validation ...
public class StagePathUtils { /** * = = = = = helper method = = = = = */ private static String getChannelId ( Long pipelineId ) { } }
Channel channel = ArbitrateConfigUtils . getChannel ( pipelineId ) ; return String . valueOf ( channel . getId ( ) ) ;
public class ClusterManager { /** * converts a long to a dot delimited IP address string . */ public String convertIPBackToString ( long ip ) { } }
StringBuffer sb = new StringBuffer ( 16 ) ; sb . append ( Long . toString ( ( ip >> 24 ) & 0xFF ) ) ; sb . append ( '.' ) ; sb . append ( Long . toString ( ( ip >> 16 ) & 0xFF ) ) ; sb . append ( '.' ) ; sb . append ( Long . toString ( ( ip >> 8 ) & 0xFF ) ) ; sb . append ( '.' ) ; sb . append ( Long . toString ( ip & ...
public class Location { /** * Return a new { @ link Point } from { @ code this } location . If the * { @ link # latitude ( ) } or the { @ link # longitude ( ) } is not given , * { @ link Optional # empty ( ) } is returned * @ return a new { @ link Point } if the latitude and longitude is given , * { @ link Opti...
return latitude ( ) . flatMap ( lat -> longitude ( ) . map ( lon -> WayPoint . of ( lat , lon , _elevation , null ) ) ) ;
public class PrcAccEntryCopy { /** * < p > Process entity request . < / p > * @ param pAddParam additional param , e . g . return this line ' s * document in " nextEntity " for farther process * @ param pRequestData Request Data * @ param pEntity Entity to process * @ return Entity processed for farther proce...
AccountingEntry entity = this . srvOrm . retrieveEntity ( pAddParam , pEntity ) ; AccountingEntries doc = getSrvOrm ( ) . retrieveEntityById ( pAddParam , AccountingEntries . class , entity . getSourceId ( ) ) ; if ( ! doc . getIdDatabaseBirth ( ) . equals ( getSrvOrm ( ) . getIdDatabase ( ) ) ) { throw new ExceptionWi...
public class Counters { /** * Divides every non - zero count in target by the corresponding value in the * denominator Counter . Beware that this can give NaN values for zero counts * in the denominator counter ! */ public static < E > void divideInPlace ( Counter < E > target , Counter < E > denominator ) { } }
for ( E key : target . keySet ( ) ) { target . setCount ( key , target . getCount ( key ) / denominator . getCount ( key ) ) ; }
public class AmazonDynamoDBAsyncClient { /** * Retrieves information about the table , including the current status of * the table , the primary key schema and when the table was created . * If the table does not exist , Amazon DynamoDB returns a * < code > ResourceNotFoundException < / code > . * @ param descr...
return executorService . submit ( new Callable < DescribeTableResult > ( ) { public DescribeTableResult call ( ) throws Exception { return describeTable ( describeTableRequest ) ; } } ) ;
public class SimplifyVisitor { /** * Helpers . */ private static boolean isConstant ( @ Nullable ExprRootNode exprRoot ) { } }
return exprRoot != null && SimplifyExprVisitor . isConstant ( exprRoot . getRoot ( ) ) ;
public class JsMainAdminServiceImpl { /** * Creates SIBDestination objects and is added to destination list . * Destination is constructed from the queue or topic tags in server . xml * Creates default queue or topic if not provided by user in server . xml * Deals with destinations only of type Queue or Topic *...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "populateDestinations" , new Object [ ] { properties , destinationList , destinationLocalizationList , meName , destinationType , configAdmin } ) ; } String [ ] destinations = ( String [ ] ) properties . get ( destinationT...
public class SwingGroovyMethods { /** * Overloads the left shift operator to provide an easy way to add * components to a menu . < p > * @ param self a JMenu * @ param gstr a GString to be added to the menu . * @ return same menu , after the value was added to it . * @ since 1.6.4 */ public static JMenu leftS...
self . add ( gstr . toString ( ) ) ; return self ;
public class DRL6Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 771:1 : short _ key : { . . . } ? = > id = ID ; */ public final void short_key ( ) throws RecognitionException { } }
Token id = null ; try { // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 772:5 : ( { . . . } ? = > id = ID ) // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 772:12 : { . . . } ? = > id = ID { if ( ! ( ( ( helper . validateIdentifierKey ( DroolsSoftKey...
public class GenbankReaderHelper { /** * Selecting lazySequenceLoad = true will parse the Genbank file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk . This allows the loading of large Genbank files where you are only interested * in o...
if ( ! lazySequenceLoad ) { return readGenbankProteinSequence ( file ) ; } GenbankReader < ProteinSequence , AminoAcidCompound > GenbankProxyReader = new GenbankReader < ProteinSequence , AminoAcidCompound > ( file , new GenericGenbankHeaderParser < ProteinSequence , AminoAcidCompound > ( ) , new FileProxyProteinSequen...
public class AbstractBaseDestinationHandler { /** * Add data to given object for message store persistence . * @ param hm */ public void addPersistentData ( HashMap hm ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addPersistentData" , hm ) ; hm . put ( "name" , definition . getName ( ) ) ; hm . put ( "uuid" , definition . getUUID ( ) . toByteArray ( ) ) ; hm . put ( "maxReliability" , Integer . valueOf ( definition . getMaxReliabilit...
public class Authentication { /** * Checks if a username is locked because of to many failed login attempts * @ param username The username to check * @ return true if the user has a lock , false otherwise */ public boolean userHasLock ( String username ) { } }
Objects . requireNonNull ( username , Required . USERNAME . toString ( ) ) ; boolean lock = false ; Config config = Application . getInstance ( Config . class ) ; Cache cache = Application . getInstance ( CacheProvider . class ) . getCache ( CacheName . AUTH ) ; AtomicInteger counter = cache . getCounter ( username ) ;...
public class BotMetadataMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BotMetadata botMetadata , ProtocolMarshaller protocolMarshaller ) { } }
if ( botMetadata == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( botMetadata . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( botMetadata . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( botMe...
public class Swift { /** * Url encode object path , and concatenate to current container URL to get full URL * @ param path The object path * @ return The object url */ private String getObjectUrl ( CPath path ) { } }
String containerUrl = getCurrentContainerUrl ( ) ; return containerUrl + path . getUrlEncoded ( ) ;
public class RestoreAgent { /** * Change the state of the restore agent based on the current state . */ private void changeState ( ) { } }
if ( m_state == State . RESTORE ) { fetchSnapshotTxnId ( ) ; exitRestore ( ) ; m_state = State . REPLAY ; /* * Add the interest here so that we can use the barriers in replay * agent to synchronize . */ m_snapshotMonitor . addInterest ( this ) ; m_replayAgent . replay ( ) ; } else if ( m_state == State . REPLAY ) { m...
public class ProcessorDecimalFormat { /** * Receive notification of the start of an element . * @ param handler The calling StylesheetHandler / TemplatesBuilder . * @ param uri The Namespace URI , or the empty string if the * element has no Namespace URI or if Namespace * processing is not being performed . *...
DecimalFormatProperties dfp = new DecimalFormatProperties ( handler . nextUid ( ) ) ; dfp . setDOMBackPointer ( handler . getOriginatingNode ( ) ) ; dfp . setLocaterInfo ( handler . getLocator ( ) ) ; setPropertiesFromAttributes ( handler , rawName , attributes , dfp ) ; handler . getStylesheet ( ) . setDecimalFormat (...
public class OStringSerializerEmbedded { /** * Serialize the class name size + class name + object content * @ param iValue */ public StringBuilder toStream ( final StringBuilder iOutput , Object iValue ) { } }
if ( iValue != null ) { if ( ! ( iValue instanceof OSerializableStream ) ) throw new OSerializationException ( "Cannot serialize the object since it's not implements the OSerializableStream interface" ) ; OSerializableStream stream = ( OSerializableStream ) iValue ; iOutput . append ( iValue . getClass ( ) . getName ( ...
public class ExtendedAttributeDefinitionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . config . internal . services . ExtendedAttributeDefinition # getAttributeName ( ) */ @ Override public String getAttributeName ( ) { } }
if ( delegate instanceof AttributeDefinitionSpecification ) { return ( ( AttributeDefinitionSpecification ) delegate ) . getAttributeName ( ) ; } return delegate . getName ( ) ;
public class KernelMatrix { /** * Centers the matrix in feature space according to Smola et Schoelkopf , * Learning with Kernels p . 431 Alters the input matrix . If you still need the * original matrix , use * < code > centeredMatrix = centerKernelMatrix ( uncenteredMatrix . copy ( ) ) { < / code > * @ param m...
// FIXME : implement more efficiently . Maybe in matrix class itself ? final double [ ] [ ] normalizingMatrix = new double [ matrix . length ] [ matrix [ 0 ] . length ] ; for ( double [ ] row : normalizingMatrix ) { Arrays . fill ( row , 1.0 / matrix [ 0 ] . length ) ; } return times ( plusEquals ( minusEquals ( minus ...
public class VectorMath { /** * Adds two { @ code DoubleVector } s with some scalar weight for each { @ code * DoubleVector } . * @ param vector1 The vector values should be added to . * @ param weight1 The weight of values in { @ code vector1} * @ param vector2 The vector values that should be added to { @ cod...
if ( vector2 . length ( ) != vector1 . length ( ) ) throw new IllegalArgumentException ( "Vectors of different sizes cannot be added" ) ; int length = vector2 . length ( ) ; for ( int i = 0 ; i < length ; ++ i ) { double value = vector1 . get ( i ) * weight1 + vector2 . get ( i ) * weight2 ; vector1 . set ( i , value )...
public class MimeType { /** * public int getMxb ( ) { return Caster . toIntValue ( properties . get ( " mxb " ) , DEFAULT _ MXB ) ; } * public double getMxt ( ) { return Caster . toDoubleValue ( properties . get ( " mxt " ) , DEFAULT _ MXT ) ; } */ private String getProperty ( String name ) { } }
if ( properties != null ) { String value = properties . get ( name ) ; if ( value != null ) return value ; Iterator < Entry < String , String > > it = properties . entrySet ( ) . iterator ( ) ; Entry < String , String > e ; while ( it . hasNext ( ) ) { e = it . next ( ) ; if ( name . equalsIgnoreCase ( e . getKey ( ) )...
public class PKIXParameters { /** * Sets the { @ code Set } of most - trusted CAs . * Note that the { @ code Set } is copied to protect against * subsequent modifications . * @ param trustAnchors a { @ code Set } of { @ code TrustAnchor } s * @ throws InvalidAlgorithmParameterException if the specified * { @ ...
if ( trustAnchors == null ) { throw new NullPointerException ( "the trustAnchors parameters must" + " be non-null" ) ; } if ( trustAnchors . isEmpty ( ) ) { throw new InvalidAlgorithmParameterException ( "the trustAnchors " + "parameter must be non-empty" ) ; } for ( Iterator < TrustAnchor > i = trustAnchors . iterator...
public class QueryableStateClient { /** * Returns a future holding the request result . * @ param jobId JobID of the job the queryable state belongs to . * @ param queryableStateName Name under which the state is queryable . * @ param key The key we are interested in . * @ param keyTypeHintA { @ link TypeHint }...
Preconditions . checkNotNull ( keyTypeHint ) ; TypeInformation < K > keyTypeInfo = keyTypeHint . getTypeInfo ( ) ; return getKvState ( jobId , queryableStateName , key , keyTypeInfo , stateDescriptor ) ;
public class WsByteBufferPoolManagerImpl { /** * Allocate the direct ByteBuffer that will be wrapped by the * input WsByteBuffer object . * @ param buffer * @ param size * @ param overrideRefCount */ protected WsByteBufferImpl allocateBufferDirect ( WsByteBufferImpl buffer , int size , boolean overrideRefCount ...
DirectByteBufferHelper directByteBufferHelper = this . directByteBufferHelper . get ( ) ; ByteBuffer byteBuffer ; if ( directByteBufferHelper != null ) { byteBuffer = directByteBufferHelper . allocateDirectByteBuffer ( size ) ; } else { byteBuffer = ByteBuffer . allocateDirect ( size ) ; } buffer . setByteBufferNonSafe...
public class IOUtils { /** * < p > read . < / p > * @ param reader a { @ link java . io . Reader } object . * @ param length a int . * @ return a { @ link java . lang . String } object . */ public static String read ( Reader reader , int length ) { } }
try { char [ ] buffer = new char [ length ] ; int offset = 0 ; int rest = length ; int len ; while ( ( len = reader . read ( buffer , offset , rest ) ) != - 1 ) { rest -= len ; offset += len ; if ( rest == 0 ) { break ; } } return new String ( buffer , 0 , length - rest ) ; } catch ( IOException ex ) { throw new Illega...
public class StringUtil { /** * Generate string of value and type . * @ param value to inspect * @ return string of value : type */ public static String typeValueString ( final Object value ) { } }
StringBuilder sb = new StringBuilder ( valueString ( value ) ) ; return sb . append ( " :" ) . append ( typeString ( value ) ) . toString ( ) ;
public class BitVector { /** * accelerating methods */ @ Override public long getBits ( int position , int length ) { } }
checkBitsLength ( length ) ; return getBitsAdj ( adjPosition ( position , length ) , length ) ;
public class ImageGridViewAdapter { /** * Click an image * @ param index * @ return True if handled here ; False , let the caller handle it , i . e . launch 3rd party app to open attachment */ public boolean clickOn ( int index ) { } }
ImageItem item = getItem ( index ) ; if ( item == null || TextUtils . isEmpty ( item . mimeType ) ) { return false ; } // For non - image items , the first tap will start it downloading if ( ! Util . isMimeTypeImage ( item . mimeType ) ) { // It is being downloaded , do nothing ( prevent double tap , etc ) if ( downloa...
public class XalanAuthorizationHelperBean { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . security . xslt . IAuthorizationHelper # canRender ( java . lang . String , java . lang . String ) */ @ Override public boolean canRender ( final String userName , final String fname ) { } }
if ( userName == null || fname == null ) { return false ; } final IAuthorizationPrincipal userPrincipal = this . getUserPrincipal ( userName ) ; if ( userPrincipal == null ) { return false ; } final String portletId ; try { final IPortletDefinition portletDefinition = this . portletDefinitionRegistry . getPortletDefini...
public class TableMgr { /** * Creates a new table having the specified name and schema . * @ param tblName * the name of the new table * @ param sch * the table ' s schema * @ param tx * the transaction creating the table */ public void createTable ( String tblName , Schema sch , Transaction tx ) { } }
if ( tblName != TCAT_TBLNAME && tblName != FCAT_TBLNAME ) formatFileHeader ( tblName , tx ) ; // Optimization : store the ti tiMap . put ( tblName , new TableInfo ( tblName , sch ) ) ; // insert one record into tblcat RecordFile tcatfile = tcatInfo . open ( tx , true ) ; tcatfile . insert ( ) ; tcatfile . setVal ( TCAT...
public class CmsFormatterConfiguration { /** * Gets the formatters which are available for the given container type and width . < p > * @ param containerTypes the container types ( comma separated ) * @ param containerWidth the container width * @ return the list of available formatters */ public List < I_CmsForm...
return new ArrayList < I_CmsFormatterBean > ( Collections2 . filter ( m_allFormatters , new MatchesTypeOrWidth ( containerTypes , containerWidth ) ) ) ;
public class LockResourceImpl { /** * Signal a waiter . * We need to pass objectName because the name in { # objectName } is unrealible . * @ param conditionId * @ param maxSignalCount * @ param objectName * @ see InternalLockNamespace */ public void signal ( String conditionId , int maxSignalCount , String o...
if ( waiters == null ) { return ; } Set < WaitersInfo . ConditionWaiter > waiters ; WaitersInfo condition = this . waiters . get ( conditionId ) ; if ( condition == null ) { return ; } else { waiters = condition . getWaiters ( ) ; } if ( waiters == null ) { return ; } Iterator < WaitersInfo . ConditionWaiter > iterator...
public class ValidationMatcherUtils { /** * Checks if expression is a validation matcher expression . * @ param expression the expression to check * @ return */ public static boolean isValidationMatcherExpression ( String expression ) { } }
return expression . startsWith ( Citrus . VALIDATION_MATCHER_PREFIX ) && expression . endsWith ( Citrus . VALIDATION_MATCHER_SUFFIX ) ;
public class ResultUtils { /** * Flattening is important for simple cases : when querying for count ( or other aggregated function ) or * for single field ( column ) . * @ param object result object * @ param returnClass expected type * @ return either object itself or just object field ( extracted ) */ public ...
Object res = object ; if ( ! ODocument . class . isAssignableFrom ( returnClass ) ) { ODocument doc = null ; if ( object instanceof ODocument ) { doc = ( ODocument ) object ; } if ( object instanceof OIdentifiable ) { // most likely OrientVertex , which is returned under graph connection , even for partial requests fin...
public class Strings { /** * Returns the first valid string in the given set . * @ param strings * a set of strings . * @ return * the first valid string in the set , or null if none is valid . */ public static String firstValidOf ( String ... strings ) { } }
if ( strings != null ) { for ( int i = 0 ; i < strings . length ; ++ i ) { if ( Strings . isValid ( strings [ i ] ) ) { return strings [ i ] ; } } } return null ;
public class DecimalFormat { /** * Fix for prefix and suffix in Ticket 11805. */ private void formatAffix2Attribute ( boolean isPrefix , Field fieldType , StringBuffer buf , int offset , int symbolSize ) { } }
int begin ; begin = offset ; if ( ! isPrefix ) { begin += buf . length ( ) ; } addAttribute ( fieldType , begin , begin + symbolSize ) ;
public class MQMessageUtils { /** * 将FlatMessage按指定的字段值hash拆分 * @ param flatMessage flatMessage * @ param partitionsNum 分区数量 * @ param pkHashConfigs hash映射 * @ return 拆分后的flatMessage数组 */ public static FlatMessage [ ] messagePartition ( FlatMessage flatMessage , Integer partitionsNum , String pkHashConfigs ) { ...
if ( partitionsNum == null ) { partitionsNum = 1 ; } FlatMessage [ ] partitionMessages = new FlatMessage [ partitionsNum ] ; if ( flatMessage . getIsDdl ( ) ) { partitionMessages [ 0 ] = flatMessage ; } else { if ( flatMessage . getData ( ) != null && ! flatMessage . getData ( ) . isEmpty ( ) ) { String database = flat...
public class InternalXbaseParser { /** * InternalXbase . g : 342:1 : ruleOpCompare : ( ( rule _ _ OpCompare _ _ Alternatives ) ) ; */ public final void ruleOpCompare ( ) throws RecognitionException { } }
int stackSize = keepStackSize ( ) ; try { // InternalXbase . g : 346:2 : ( ( ( rule _ _ OpCompare _ _ Alternatives ) ) ) // InternalXbase . g : 347:2 : ( ( rule _ _ OpCompare _ _ Alternatives ) ) { // InternalXbase . g : 347:2 : ( ( rule _ _ OpCompare _ _ Alternatives ) ) // InternalXbase . g : 348:3 : ( rule _ _ OpCom...
public class ModelsImpl { /** * Gets information about the hierarchical entity model . * @ param appId The application ID . * @ param versionId The version ID . * @ param hEntityId The hierarchical entity extractor ID . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws Er...
return getHierarchicalEntityWithServiceResponseAsync ( appId , versionId , hEntityId ) . toBlocking ( ) . single ( ) . body ( ) ;
public class AbstractAlchemyEntity { /** * Set the score ( 0.0 = neutral ) . * @ param score score */ public void setScore ( Double score ) { } }
if ( score == null ) { score = Constants . DEFAULT_SCORE ; } this . score = score ;
public class HTODDynacache { /** * initfileManager ( ) * Initialize the file manager instance . Caching within the filemanager is * experimental so it is disabled here . */ void initFileManager ( ) throws IOException , FileManagerException { } }
final String methodName = "initFileManager()" ; object_filemgr = new FileManagerImpl ( filename + object_suffix + ".htod" , // filename false , // automatic coalesce , not reccomended "rw" , // " r " or " rw " physical_disk_manager , // physical file layer this ) ; if ( ! this . disableDependencyId ) { dependency_filem...
public class DefaultGroovyMethods { /** * Returns < code > true < / code > if the intersection of two iterables is empty . * < pre class = " groovyTestCase " > assert [ 1,2,3 ] . disjoint ( [ 3,4,5 ] ) = = false < / pre > * < pre class = " groovyTestCase " > assert [ 1,2 ] . disjoint ( [ 3,4 ] ) = = true < / pre > ...
Collection leftCol = asCollection ( left ) ; Collection rightCol = asCollection ( right ) ; if ( leftCol . isEmpty ( ) || rightCol . isEmpty ( ) ) return true ; Collection pickFrom = new TreeSet ( new NumberAwareComparator ( ) ) ; pickFrom . addAll ( rightCol ) ; for ( final Object o : leftCol ) { if ( pickFrom . conta...
public class Collections { /** * Returns a synchronized ( thread - safe ) map backed by the specified * map . In order to guarantee serial access , it is critical that * < strong > all < / strong > access to the backing map is accomplished * through the returned map . < p > * It is imperative that the user manu...
return new SynchronizedMap < > ( m ) ;
public class IsDateWithTime { /** * Creates a matcher that matches when the examined { @ linkplain Date } has the given values < code > hour < / code > in a 24 * hours clock period , < code > minute < / code > , < code > sec < / code > and < code > millis < / code > . */ public static Matcher < Date > hasHourMinSecAn...
return new IsDateWithTime ( hour , minute , second , millisecond ) ;
public class AbstractTokenizer { /** * This is an optional operation , by default supported . * @ return The next token in the token stream . * @ throws java . util . NoSuchElementException * if the token stream has no more tokens . */ public T peek ( ) { } }
if ( nextToken == null ) { nextToken = getNext ( ) ; } if ( nextToken == null ) { throw new NoSuchElementException ( ) ; } return nextToken ;
public class GitHubWebHook { /** * Receives the webhook call * @ param event GH event type . Never null * @ param payload Payload from hook . Never blank */ @ SuppressWarnings ( "unused" ) @ RequirePostWithGHHookPayload public void doIndex ( @ Nonnull @ GHEventHeader GHEvent event , @ Nonnull @ GHEventPayload Strin...
GHSubscriberEvent subscriberEvent = new GHSubscriberEvent ( SCMEvent . originOf ( Stapler . getCurrentRequest ( ) ) , event , payload ) ; from ( GHEventsSubscriber . all ( ) ) . filter ( isInterestedIn ( event ) ) . transform ( processEvent ( subscriberEvent ) ) . toList ( ) ;
public class ListQualificationRequestsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListQualificationRequestsRequest listQualificationRequestsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listQualificationRequestsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listQualificationRequestsRequest . getQualificationTypeId ( ) , QUALIFICATIONTYPEID_BINDING ) ; protocolMarshaller . marshall ( listQualificationRequest...
public class RandomFactory { /** * This method returns new onject implementing Random interface , initialized with seed value * @ param seed seed for this rng object * @ return object implementing Random interface */ public Random getNewRandomInstance ( long seed ) { } }
try { Random t = ( Random ) randomClass . newInstance ( ) ; if ( t . getStatePointer ( ) != null ) { // TODO : attach this thing to deallocator // if it ' s stateless random - we just don ' t care then } t . setSeed ( seed ) ; return t ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class Command { /** * / * package */ void bind ( String shortcut ) { } }
String normalized = CommandUtil . validateShortcut ( shortcut ) ; if ( normalized == null ) { throw new IllegalArgumentException ( "Invalid shortcut specifier: " + shortcut ) ; } if ( shortcutBindings . add ( normalized ) ) { shortcutChanged ( normalized , false ) ; }
public class Promises { /** * Transforms a { @ link Stream } of { @ link AsyncSupplier } * { @ code tasks } to a collection of { @ code Promise } s . */ public static < T > Iterator < Promise < T > > asPromises ( @ NotNull Stream < ? extends AsyncSupplier < ? extends T > > tasks ) { } }
return asPromises ( tasks . iterator ( ) ) ;
public class GenericType { /** * Returns the array component type if this type represents an array ( { @ code int [ ] } , { @ code T [ ] } , * { @ code < ? extends Map < String , Integer > [ ] > } etc . ) , or else { @ code null } is returned . */ @ Nullable @ SuppressWarnings ( "unchecked" ) public final GenericType...
TypeToken < ? > componentTypeToken = token . getComponentType ( ) ; return ( componentTypeToken == null ) ? null : new GenericType ( componentTypeToken ) ;
public class CommonOps_DSCC { /** * Creates a diagonal matrix from an array . Elements in the array can be offset . * @ param A ( Optional ) Storage for diagonal matrix . If null a new one will be declared . * @ param values First index in the diagonal matirx * @ param length Length of the diagonal matrix * @ p...
int N = length ; if ( A == null ) A = new DMatrixSparseCSC ( N , N , N ) ; else A . reshape ( N , N , N ) ; A . nz_length = N ; for ( int i = 0 ; i < N ; i ++ ) { A . col_idx [ i + 1 ] = i + 1 ; A . nz_rows [ i ] = i ; A . nz_values [ i ] = values [ offset + i ] ; } return A ;
public class RdfConverter { /** * Writes triples to determine the statements with the highest rank . */ void writeBestRankTriples ( ) { } }
for ( Resource resource : this . rankBuffer . getBestRankedStatements ( ) ) { try { this . rdfWriter . writeTripleUriObject ( resource , RdfWriter . RDF_TYPE , RdfWriter . WB_BEST_RANK . toString ( ) ) ; } catch ( RDFHandlerException e ) { throw new RuntimeException ( e . getMessage ( ) , e ) ; } } this . rankBuffer . ...
public class GrpcUtils { /** * Converts wire type to proto type . * @ param info the wire representation to convert * @ return converted proto representation */ public static alluxio . grpc . MountPointInfo toProto ( MountPointInfo info ) { } }
return alluxio . grpc . MountPointInfo . newBuilder ( ) . setUfsUri ( info . getUfsUri ( ) ) . setUfsType ( info . getUfsType ( ) ) . setUfsCapacityBytes ( info . getUfsCapacityBytes ( ) ) . setReadOnly ( info . getReadOnly ( ) ) . putAllProperties ( info . getProperties ( ) ) . setShared ( info . getShared ( ) ) . bui...