signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class LockedMessageEnumerationImpl { /** * Returns the consumer session this enumeration contains messages * delivered to . * @ see com . ibm . wsspi . sib . core . LockedMessageEnumeration # getConsumerSession ( ) */ public ConsumerSession getConsumerSession ( ) throws SISessionUnavailableException , SISess...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConsumerSession" ) ; // f173765.2 checkValid ( ) ; // f173765.2 if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getConsumerSession" ) ; // f173765.2 return co...
public class AStar { /** * Set the evaluation heuristic used by the A * algorithm . * @ param heuristic is the evaluation heuristic . * @ return the old heurisstic . */ public AStarHeuristic < ? super PT > setEvaluationHeuristic ( AStarHeuristic < ? super PT > heuristic ) { } }
final AStarHeuristic < ? super PT > old = this . heuristic ; this . heuristic = heuristic ; return old ;
public class Hpack { /** * Encodes an integer in the HPACK prefix format . * This method assumes that the buffer has already had the first 8 - n bits filled . * As such it will modify the last byte that is already present in the buffer , and * potentially add more if required * @ param source The buffer that co...
int twoNminus1 = PREFIX_TABLE [ n ] ; int pos = source . position ( ) - 1 ; if ( value < twoNminus1 ) { source . put ( pos , ( byte ) ( source . get ( pos ) | value ) ) ; } else { source . put ( pos , ( byte ) ( source . get ( pos ) | twoNminus1 ) ) ; value = value - twoNminus1 ; while ( value >= 128 ) { source . put (...
public class EbInterfaceWriter { /** * Create a writer builder for Ebi43InvoiceType . * @ return The builder and never < code > null < / code > */ @ Nonnull public static EbInterfaceWriter < Ebi43InvoiceType > ebInterface43 ( ) { } }
final EbInterfaceWriter < Ebi43InvoiceType > ret = EbInterfaceWriter . create ( Ebi43InvoiceType . class ) ; ret . setNamespaceContext ( EbInterface43NamespaceContext . getInstance ( ) ) ; return ret ;
public class IPv6AddressSection { /** * Returns whether this subnet or address has alphabetic digits when printed . * Note that this method does not indicate whether any address contained within this subnet has alphabetic digits , * only whether the subnet itself when printed has alphabetic digits . * @ return wh...
if ( base > 10 ) { int count = getSegmentCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { IPv6AddressSegment seg = getSegment ( i ) ; if ( seg . hasUppercaseVariations ( base , lowerOnly ) ) { return true ; } } } return false ;
public class SpiceManager { /** * Execute a request . Before invoking the method * { @ link SpiceRequest # loadDataFromNetwork ( ) } , the cache will be checked : * if a result has been cached with the cache key < i > requestCacheKey < / i > , * RoboSpice will consider the parameter < i > cacheExpiryDuration < / ...
final CachedSpiceRequest < T > cachedSpiceRequest = new CachedSpiceRequest < T > ( request , requestCacheKey , cacheExpiryDuration ) ; execute ( cachedSpiceRequest , requestListener ) ;
public class IndicatorSkin { /** * * * * * * Initialization * * * * * */ private void initGraphics ( ) { } }
// Set initial size if ( Double . compare ( gauge . getPrefWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getPrefHeight ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getHeight ( ) , 0.0 ) <= 0 ) { if ( gauge . getPrefWidth ( ) > 0 && gauge . getPrefHeight (...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcBoundaryNodeConditionWarping ( ) { } }
if ( ifcBoundaryNodeConditionWarpingEClass == null ) { ifcBoundaryNodeConditionWarpingEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 49 ) ; } return ifcBoundaryNodeConditionWarpingEClass ;
public class Sample { /** * Create a SampleCreator to execute create . * @ param pathAssistantSid The unique ID of the Assistant . * @ param pathTaskSid The unique ID of the Task associated with this Sample . * @ param language An ISO language - country string of the sample . * @ param taggedText The text examp...
return new SampleCreator ( pathAssistantSid , pathTaskSid , language , taggedText ) ;
public class DAO { /** * / * - - - - - [ Helpers ] - - - - - */ private Object [ ] values ( T record , int order [ ] ) { } }
Object args [ ] = new Object [ order . length ] ; for ( int i = 0 ; i < args . length ; i ++ ) args [ i ] = getColumnValue ( order [ i ] , record ) ; return args ;
public class SqlManagerImpl { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . store . SqlManager # existSql ( java . lang . String ) */ @ Override public boolean existSql ( final String sqlPath ) { } }
if ( ! cache ) { return sqlLoader . existSql ( sqlPath ) ; } else { return sqlMap . get ( sqlPath . replace ( "." , "/" ) ) != null ; }
public class GenMapAndTopicListModule { /** * Read a file and process it for list information . * @ param ref system path of the file to process * @ throws DITAOTException if processing failed */ private void processFile ( final Reference ref ) throws DITAOTException { } }
currentFile = ref . filename ; assert currentFile . isAbsolute ( ) ; logger . info ( "Processing " + currentFile ) ; final String [ ] params = { currentFile . toString ( ) } ; try { XMLReader xmlSource = getXmlReader ( ref . format ) ; for ( final XMLFilter f : getProcessingPipe ( currentFile ) ) { f . setParent ( xmlS...
public class FieldSet { /** * Useful for implementing * { @ link Message . Builder # setRepeatedField ( Descriptors . FieldDescriptor , int , Object ) } . */ @ SuppressWarnings ( "unchecked" ) public void setRepeatedField ( final FieldDescriptorType descriptor , final int index , final Object value ) { } }
if ( ! descriptor . isRepeated ( ) ) { throw new IllegalArgumentException ( "getRepeatedField() can only be called on repeated fields." ) ; } final Object list = getField ( descriptor ) ; if ( list == null ) { throw new IndexOutOfBoundsException ( ) ; } verifyType ( descriptor . getLiteType ( ) , value ) ; ( ( List < O...
public class GhprbExtensionDescriptor { /** * Don ' t mutate the list from Jenkins , they will persist ; * @ return list of extensions */ private static List < GhprbExtensionDescriptor > getExtensions ( ) { } }
List < GhprbExtensionDescriptor > list = new ArrayList < GhprbExtensionDescriptor > ( ) ; list . addAll ( getExtensionList ( ) ) ; return list ;
public class SystemFunctionSet { /** * @ see org . s1 . objects . Objects # merge ( java . util . List ) * @ param args * @ return */ @ MapMethod public Map < String , Object > merge ( List < Map < String , Object > > args ) { } }
return Objects . merge ( args ) ;
public class AuthenticationApi { /** * Sign - out a logged in user * Sign - out the current user and invalidate either the current token or all tokens associated with the user . * @ param authorization The OAuth 2 bearer access token you received from [ / auth / v3 / oauth / token ] ( / reference / authentication /...
com . squareup . okhttp . Call call = signOut1ValidateBeforeCall ( authorization , global , redirectUri , null , null ) ; Type localVarReturnType = new TypeToken < ModelApiResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class ClassFinder { /** * Get the ClassFinder instance for this invocation . */ public static ClassFinder instance ( Context context ) { } }
ClassFinder instance = context . get ( classFinderKey ) ; if ( instance == null ) instance = new ClassFinder ( context ) ; return instance ;
public class MailTransport { /** * Actually send the given array of MimeMessages via JavaMail . * @ param aAllMessages * Email data objects to send . May be < code > null < / code > . * @ return A non - < code > null < / code > map of the failed messages */ @ Nonnull public ICommonsOrderedMap < IMutableEmailData ...
final ICommonsOrderedMap < IMutableEmailData , MailTransportError > aFailedMessages = new CommonsLinkedHashMap < > ( ) ; if ( aAllMessages != null ) { final ICommonsList < IMutableEmailData > aRemainingMessages = new CommonsArrayList < > ( aAllMessages ) ; MailSendException aExceptionToBeRemembered = null ; try ( final...
public class ChargingStationEventListener { /** * Handles the { @ link ConfigurationItemsReceivedEvent } . * @ param event the event to handle . */ @ EventHandler public void handle ( ConfigurationItemsReceivedEvent event ) { } }
ChargingStation chargingStation = repository . findOne ( event . getChargingStationId ( ) . getId ( ) ) ; if ( chargingStation != null ) { LOG . debug ( "found chargingstation: " + chargingStation . getId ( ) + " setting configurationitems" ) ; if ( event . getRequestedKeys ( ) . isEmpty ( ) ) { // no ' requested keys ...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcApproval ( ) { } }
if ( ifcApprovalEClass == null ) { ifcApprovalEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 22 ) ; } return ifcApprovalEClass ;
public class Jingle { /** * Return the XML representation of the packet . * @ return the XML string */ @ Override protected IQChildElementXmlStringBuilder getIQChildElementBuilder ( IQChildElementXmlStringBuilder buf ) { } }
if ( getInitiator ( ) != null ) { buf . append ( " initiator=\"" ) . append ( getInitiator ( ) ) . append ( '"' ) ; } if ( getResponder ( ) != null ) { buf . append ( " responder=\"" ) . append ( getResponder ( ) ) . append ( '"' ) ; } if ( getAction ( ) != null ) { buf . append ( " action=\"" ) . append ( getAction ( ...
public class Logger { /** * Issue a formatted log message with a level of FATAL . * @ param format the format string as per { @ link String # format ( String , Object . . . ) } or resource bundle key therefor * @ param param1 the sole parameter */ public void fatalf ( String format , Object param1 ) { } }
if ( isEnabled ( Level . FATAL ) ) { doLogf ( Level . FATAL , FQCN , format , new Object [ ] { param1 } , null ) ; }
public class Consequent { /** * Modifies the proposition set according to the activation degree ( computed * in the Antecedent of the Rule ) and the implication operator ( given in the * RuleBlock ) * @ param activationDegree is the activation degree computed in the Antecedent * of the Rule * @ param implicat...
if ( ! isLoaded ( ) ) { throw new RuntimeException ( String . format ( "[consequent error] consequent <%s> is not loaded" , text ) ) ; } for ( Proposition proposition : conclusions ) { if ( proposition . getVariable ( ) . isEnabled ( ) ) { if ( ! proposition . getHedges ( ) . isEmpty ( ) ) { final int lastIndex = propo...
public class StringRequestConverterFunction { /** * Converts the specified { @ link AggregatedHttpMessage } to a { @ link String } . */ @ Override public Object convertRequest ( ServiceRequestContext ctx , AggregatedHttpMessage request , Class < ? > expectedResultType ) throws Exception { } }
if ( expectedResultType == String . class || expectedResultType == CharSequence . class ) { final MediaType contentType = request . contentType ( ) ; if ( contentType != null && contentType . is ( MediaType . ANY_TEXT_TYPE ) ) { return request . content ( contentType . charset ( ) . orElse ( ArmeriaHttpUtil . HTTP_DEFA...
public class WebSocketScopeManager { /** * Remove connection from scope . * @ param conn * WebSocketConnection */ public void removeConnection ( WebSocketConnection conn ) { } }
if ( conn != null ) { WebSocketScope scope = getScope ( conn ) ; if ( scope != null ) { scope . removeConnection ( conn ) ; if ( ! scope . isValid ( ) ) { // scope is not valid . delete this . removeWebSocketScope ( scope ) ; } } }
public class ComponentGeneratorsUtil { /** * Return weather a given method is visible in JS ( JsInterop ) . It will be the case if it ' s public * and it ' s class / interface has the { @ link JsType } annotation , or if it has the { @ link JsMethod } * annotation . * @ param method The method to check * @ retu...
return ( hasAnnotation ( method . getEnclosingElement ( ) , JsType . class ) && method . getModifiers ( ) . contains ( Modifier . PUBLIC ) ) || hasAnnotation ( method , JsMethod . class ) ;
public class CompletableFutureLite { /** * This method enables to exceptionally complete the future with the given { @ code throwable } . * It will be nothing changed if the future was already completed or canceled in advance . * @ param throwable the throwable used to exceptionally complete the future . * @ retu...
synchronized ( lock ) { if ( isDone ( ) ) { return false ; } this . throwable = throwable ; lock . notifyAll ( ) ; return true ; }
public class LinkedList { /** * Add a < code > LinkedListNode < / code > to the list . If the < code > LinkedList < / code > is empty then the first and * last nodes are set to the added node . * @ param node * The < code > LinkedListNode < / code > to be added */ public void add ( final T node ) { } }
if ( this . firstNode == null ) { this . firstNode = node ; this . lastNode = node ; } else { this . lastNode . setNext ( node ) ; node . setPrevious ( this . lastNode ) ; this . lastNode = node ; } this . size ++ ;
public class Workgroups { /** * Retrieve a workgroup or all workgroups . */ @ Override @ Path ( "/{groupName}" ) @ ApiOperation ( value = "Retrieve a workgroup or all workgroups" , notes = "If groupName is not present, returns all workgroups." , response = Workgroup . class , responseContainer = "List" ) public JSONObj...
UserServices userServices = ServiceLocator . getUserServices ( ) ; try { String groupName = getSegment ( path , 1 ) ; if ( groupName == null ) // check parameter groupName = getParameters ( headers ) . get ( "name" ) ; if ( groupName != null ) { Workgroup group = userServices . getWorkgroup ( groupName ) ; if ( group =...
public class IdGenerators { /** * Create a Flake - based { @ link IdGenerator } using the given * { @ link MachineIdProvider } . * @ return the { @ link IdGenerator } */ public static IdGenerator newFlakeIdGenerator ( MachineIdProvider machineIdProvider ) { } }
EncodingProvider encodingProvider = new FlakeEncodingProvider ( machineIdProvider . getMachineId ( ) ) ; return new DefaultIdGenerator ( new SystemTimeProvider ( ) , encodingProvider ) ;
public class CmsLinkUpdateUtil { /** * Decodes entities in a string if it isn ' t null . < p > * @ param value the string for which to decode entities * @ return the string with the decoded entities */ protected static String decodeEntities ( String value ) { } }
if ( value != null ) { value = Translate . decode ( value ) ; } return value ;
public class GetSecurityConfigurationsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetSecurityConfigurationsRequest getSecurityConfigurationsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getSecurityConfigurationsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getSecurityConfigurationsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getSecurityConfigurationsRequest . getNext...
public class druidGLexer { /** * $ ANTLR start " PARTITION " */ public final void mPARTITION ( ) throws RecognitionException { } }
try { int _type = PARTITION ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 591:17 : ( ( ' PARTITION ' | ' partition ' ) ) // druidG . g : 591:18 : ( ' PARTITION ' | ' partition ' ) { // druidG . g : 591:18 : ( ' PARTITION ' | ' partition ' ) int alt8 = 2 ; int LA8_0 = input . LA ( 1 ) ; if ( ( LA8_0 == 'P' ) ...
public class DataSetUtils { public static int getBitSize ( long value ) { } }
if ( value > Integer . MAX_VALUE ) { return 64 - Integer . numberOfLeadingZeros ( ( int ) ( value >> 32 ) ) ; } else { return 32 - Integer . numberOfLeadingZeros ( ( int ) value ) ; }
public class Selenium2Script { /** * XMLファイルを読み込んでDOMにパースします 。 * @ param file * XMLファイル * @ return DOM */ private Document parse ( File file ) { } }
try { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; builder . setEntityResolver ( new EntityResolver ( ) { @ Override public InputSource resolveEntity ( String publicId , String systemId ) throws SAXException , IOException { retu...
public class CommonOps_ZDRM { /** * Performs the following operation : < br > * < br > * c = c + a * b < br > * c < sub > ij < / sub > = c < sub > ij < / sub > + & sum ; < sub > k = 1 : n < / sub > { a < sub > ik < / sub > * b < sub > kj < / sub > } * @ param a The left matrix in the multiplication operation . ...
if ( b . numCols >= EjmlParameters . MULT_COLUMN_SWITCH ) { MatrixMatrixMult_ZDRM . multAdd_reorder ( a , b , c ) ; } else { MatrixMatrixMult_ZDRM . multAdd_small ( a , b , c ) ; }
public class CreateLoggerDefinitionRequest { /** * Tag ( s ) to add to the new resource * @ param tags * Tag ( s ) to add to the new resource * @ return Returns a reference to this object so that method calls can be chained together . */ public CreateLoggerDefinitionRequest withTags ( java . util . Map < String ,...
setTags ( tags ) ; return this ;
public class ProductSegmentation { /** * Gets the mobileApplicationSegment value for this ProductSegmentation . * @ return mobileApplicationSegment * The mobile application segmentation . * < p > This attribute is optional . */ public com . google . api . ads . admanager . axis . v201808 . MobileApplicationTargetin...
return mobileApplicationSegment ;
public class CmsResourceTypeStatResultList { /** * Removes result row representing given results . < p > * @ param layout with results * @ param result to be removed */ private void removeRow ( VerticalLayout layout , CmsResourceTypeStatResult result ) { } }
Component componentToRemove = null ; Iterator < Component > iterator = layout . iterator ( ) ; while ( iterator . hasNext ( ) ) { Component component = iterator . next ( ) ; if ( component instanceof HorizontalLayout ) { if ( result . equals ( ( ( HorizontalLayout ) component ) . getData ( ) ) ) { componentToRemove = c...
public class KeyVaultClientBaseImpl { /** * Deletes a secret from a specified key vault . * The DELETE operation applies to any secret stored in Azure Key Vault . DELETE cannot be applied to an individual version of a secret . This operation requires the secrets / delete permission . * @ param vaultBaseUrl The vaul...
return ServiceFuture . fromResponse ( deleteSecretWithServiceResponseAsync ( vaultBaseUrl , secretName ) , serviceCallback ) ;
public class HttpRequester { /** * Gets response as string . * @ param uri the uri * @ param header the header * @ return the response as string */ public static String getResponseAsString ( String uri , Header header ) { } }
HttpGet httpGet = new HttpGet ( uri ) ; httpGet . setHeader ( header ) ; request ( httpGet ) ; return request ( httpGet ) ;
public class Parser { /** * Parse a given XML resource file * @ param license the license res id * @ return the list of parsed libraries */ public static ChangeLog parse ( Context ctx , @ XmlRes int license ) { } }
ChangeLog clog = new ChangeLog ( ) ; // Get the XMLParser XmlPullParser parser = ctx . getResources ( ) . getXml ( license ) ; // Begin parsing try { parser . next ( ) ; parser . require ( XmlPullParser . START_DOCUMENT , null , null ) ; parser . nextTag ( ) ; parser . require ( XmlPullParser . START_TAG , null , DOCUM...
public class GitService { /** * Initializes war configuration directory for a Cadmium war . * @ param uri The remote Git repository ssh URI . * @ param branch The remote branch to checkout . * @ param root The shared root . * @ param warName The name of the war file . * @ param historyManager The history mana...
initializeBaseDirectoryStructure ( root , warName ) ; String warDir = FileSystemManager . getChildDirectoryIfExists ( root , warName ) ; Properties configProperties = configManager . getDefaultProperties ( ) ; GitLocation gitLocation = new GitLocation ( uri , branch , configProperties . getProperty ( "config.git.ref.sh...
public class Attributes2Impl { /** * Returns the current value of an attribute ' s " specified " flag . * @ param qName The XML qualified ( prefixed ) name . * @ return current flag value * @ exception java . lang . IllegalArgumentException When the * supplied name does not identify an attribute . */ public boo...
int index = getIndex ( qName ) ; if ( index < 0 ) throw new IllegalArgumentException ( "No such attribute: " + qName ) ; return specified [ index ] ;
public class Tokenizer { /** * string = ' " ' { char } ' " ' | " ' " { char } " ' " . * char = unescaped | " \ " ( ' " ' | " \ " | " / " | " b " | " f " | " n " | " r " | " t " | " u " hex hex hex hex ) . * unescaped = any printable Unicode character except ' " ' , " ' " or " \ " . */ private Token consumeString ( ...
StringBuilder sb = new StringBuilder ( ) ; int l = line ; int c = column ; Token T ; nextChar ( ) ; while ( moreChars ( ) && ch != quote ) { if ( ch == '\\' ) { nextChar ( ) ; switch ( ch ) { case '"' : case '\\' : case '/' : sb . append ( ch ) ; nextChar ( ) ; break ; case 'b' : sb . append ( '\b' ) ; nextChar ( ) ; b...
public class SocketAddressResolver { /** * Resolves a { @ link io . lettuce . core . RedisURI } to a { @ link java . net . SocketAddress } . * @ param redisURI must not be { @ literal null } . * @ param dnsResolver must not be { @ literal null } . * @ return the resolved { @ link SocketAddress } . */ public stati...
if ( redisURI . getSocket ( ) != null ) { return redisURI . getResolvedAddress ( ) ; } try { InetAddress [ ] inetAddress = dnsResolver . resolve ( redisURI . getHost ( ) ) ; if ( inetAddress . length == 0 ) { return InetSocketAddress . createUnresolved ( redisURI . getHost ( ) , redisURI . getPort ( ) ) ; } return new ...
public class BaseSolver { /** * Applies one algorithm on one problem until any condition is met or exception is raised . * This method just removes code duplicities since most solvers has identical this part of solving . It is not * obligatory to use this method however , change it if necessary ( for example algori...
PreciseTimestamp startPreciseTimestamp = null ; Exception algorithmException = null ; Configuration bestConfiguration = null ; int optimizeCounter = 0 ; try { startPreciseTimestamp = new PreciseTimestamp ( ) ; algorithm . init ( objectiveProblem ) ; this . sendMessage ( new MessageSolverStart ( algorithm , objectivePro...
public class LdapIdentityStoreDefinitionWrapper { /** * Evaluate and return the callerSearchBase . * @ param immediateOnly If true , only return a non - null value if the setting is either an * immediate EL expression or not set by an EL expression . If false , return the * value regardless of where it is evaluat...
try { return elHelper . processString ( "callerSearchBase" , this . idStoreDefinition . callerSearchBase ( ) , immediateOnly ) ; } catch ( IllegalArgumentException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isWarningEnabled ( ) ) { Tr . warning ( tc , "JAVAEESEC_WARNING_IDSTORE_CONFIG" , new Object [ ]...
public class URLHelper { /** * URL - encode the passed value automatically handling charset issues . This is * a ripped , optimized version of URLEncoder . encode but without the * UnsupportedEncodingException . * @ param sValue * The value to be encoded . May not be < code > null < / code > . * @ param aChar...
ValueEnforcer . notNull ( sValue , "Value" ) ; ValueEnforcer . notNull ( aCharset , "Charset" ) ; NonBlockingCharArrayWriter aCAW = null ; try { final int nLen = sValue . length ( ) ; boolean bChanged = false ; final StringBuilder aSB = new StringBuilder ( nLen * 2 ) ; final char [ ] aSrcChars = sValue . toCharArray ( ...
public class ThrottledApiHandler { /** * Get a listing of all league entries in the team ' s leagues * @ param teamId The id of the team * @ return A list of league entries * @ see < a href = https : / / developer . riotgames . com / api / methods # ! / 593/1861 > Official API documentation < / a > */ public Futu...
return new ApiFuture < > ( ( ) -> handler . getLeagueEntries ( teamId ) ) ;
public class CommerceRegionLocalServiceWrapper { /** * Returns the commerce region matching the UUID and group . * @ param uuid the commerce region ' s UUID * @ param groupId the primary key of the group * @ return the matching commerce region , or < code > null < / code > if a matching commerce region could not ...
return _commerceRegionLocalService . fetchCommerceRegionByUuidAndGroupId ( uuid , groupId ) ;
public class DiSHPreferenceVectorIndex { /** * Determines the preference vector according to the specified neighbor ids . * @ param relation the database storing the objects * @ param neighborIDs the list of ids of the neighbors in each dimension * @ param msg a string buffer for debug messages * @ return the p...
if ( strategy . equals ( Strategy . APRIORI ) ) { return determinePreferenceVectorByApriori ( relation , neighborIDs , msg ) ; } if ( strategy . equals ( Strategy . MAX_INTERSECTION ) ) { return determinePreferenceVectorByMaxIntersection ( neighborIDs , msg ) ; } throw new IllegalStateException ( "Should never happen!"...
public class SnowizardClient { /** * Get a new ID from Snowizard * @ return generated ID * @ throws SnowizardClientException * when unable to get an ID from any host */ public long getId ( ) throws SnowizardClientException { } }
for ( final String host : hosts ) { try { final SnowizardResponse snowizard = executeRequest ( host ) ; if ( snowizard != null ) { return snowizard . getId ( 0 ) ; } } catch ( final Exception ex ) { LOGGER . warn ( "Unable to get ID from host ({})" , host ) ; } } throw new SnowizardClientException ( "Unable to generate...
public class CharAccessor { /** * ( non - Javadoc ) * @ see com . impetus . kundera . property . PropertyAccessor # fromBytes ( byte [ ] ) */ @ Override public Character fromBytes ( Class targetClass , byte [ ] data ) { } }
if ( data == null || data . length != 2 ) { if ( log . isWarnEnabled ( ) ) { log . warn ( "Data length is not matching" ) ; } return 0x0 ; } return ( char ) ( ( 0xff & data [ 0 ] ) << 8 | ( 0xff & data [ 1 ] ) << 0 ) ;
public class AmountFormatContextBuilder { /** * Sets the { @ link javax . money . MonetaryContext } to be used , when amount ' s are parsed . * @ param monetaryAmountBuilder the monetary amount factory , not { @ code null } . * @ return this builder for chaining . */ public AmountFormatContextBuilder setMonetaryAmo...
Objects . requireNonNull ( monetaryAmountBuilder ) ; return set ( MonetaryAmountFactory . class , monetaryAmountBuilder ) ;
public class SVD { /** * Computes the SVD using Octave . * @ param matrix a file containing a matrix * @ param dimensions the number of singular values to calculate * @ return an array of { @ code Matrix } objects for the U , S , and V matrices * in that order * @ throws UnsupportedOperationException if the O...
try { // create the octave file for executing File octaveFile = File . createTempFile ( "octave-svds" , ".m" ) ; File uOutput = File . createTempFile ( "octave-svds-U" , ".dat" ) ; File sOutput = File . createTempFile ( "octave-svds-S" , ".dat" ) ; File vOutput = File . createTempFile ( "octave-svds-V" , ".dat" ) ; oct...
public class ECPImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . ECP__RS_NAME : setRSName ( RS_NAME_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class FileConvert { /** * Print ATOM record in the following syntax * < pre > * ATOM 1 N ASP A 15 110.964 24.941 59.191 1.00 83.44 N * COLUMNS DATA TYPE FIELD DEFINITION * 1 - 6 Record name " ATOM " * 7 - 11 Integer serial Atom serial number . * 13 - 16 Atom name Atom name . * 17 Character altLoc A...
Group g = a . getGroup ( ) ; GroupType type = g . getType ( ) ; String record = "" ; if ( type . equals ( GroupType . HETATM ) ) { record = "HETATM" ; } else { record = "ATOM " ; } // format output . . . String resName = g . getPDBName ( ) ; String pdbcode = g . getResidueNumber ( ) . toString ( ) ; int seri = a . get...
public class AssignmentServiceProvider { /** * for test purpose */ static AssignmentService override ( AssignmentStrategy strategy ) { } }
Holder . INSTANCE . setAssignmentService ( new AssignmentServiceImpl ( strategy ) ) ; return get ( ) ;
public class DefaultOutputConnection { /** * Handles a batch start . */ private void doStartBatch ( String batchID ) { } }
if ( currentBatch != null && currentBatch . id ( ) . equals ( batchID ) ) { currentBatch . handleStart ( ) ; }
public class INodeDirectory { /** * Add new inode to the parent if specified . * Optimized version of addNode ( ) if parent is not null . * @ return parent INode if new inode is inserted * or null if it already exists . * @ throws FileNotFoundException if parent does not exist or * is not a directory . */ INo...
// insert into the parent children list newNode . name = localname ; if ( parent . addChild ( newNode , inheritPermission , propagateModTime , childIndex ) == null ) return null ; return parent ;
public class MediaTypeSet { /** * Finds the { @ link MediaType } in this { @ link List } that matches the specified media range . * @ return the { @ link MediaType } that matches the specified media range . * { @ link Optional # empty ( ) } if there are no matches */ public Optional < MediaType > match ( MediaType ...
requireNonNull ( range , "range" ) ; for ( MediaType candidate : mediaTypes ) { if ( candidate . belongsTo ( range ) ) { // With only one specified range , there is no way for candidates to have priority over each // other , we just return the first match . return Optional . of ( candidate ) ; } } return Optional . emp...
public class CmsADEConfigData { /** * Gets the configuration for the available properties . < p > * @ return the configuration for the available properties */ public List < CmsPropertyConfig > getPropertyConfiguration ( ) { } }
CmsADEConfigData parentData = parent ( ) ; List < CmsPropertyConfig > parentProperties ; if ( ( parentData != null ) && ! m_data . isDiscardInheritedProperties ( ) ) { parentProperties = parentData . getPropertyConfiguration ( ) ; } else { parentProperties = Collections . emptyList ( ) ; } List < CmsPropertyConfig > re...
public class IfcMaterialProfileSetImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcMaterialProfile > getMaterialProfiles ( ) { } }
return ( EList < IfcMaterialProfile > ) eGet ( Ifc4Package . Literals . IFC_MATERIAL_PROFILE_SET__MATERIAL_PROFILES , true ) ;
public class MapExtensions { /** * Remove pairs with the given keys from the map . * @ param < K > type of the map keys . * @ param < V > type of the map values . * @ param map the map to update . * @ param keysToRemove the keys of the pairs to remove . * @ since 2.15 */ public static < K , V > void operator_...
for ( final Object key : keysToRemove ) { map . remove ( key ) ; }
public class ProducerSequenceFactory { /** * bitmap cache get - > * background thread hand - off - > multiplex - > bitmap cache - > decode - > * branch on separate images * - > exif resize and rotate - > exif thumbnail creation * - > local image resize and rotate - > add meta data producer - > multiplex - > enc...
if ( mLocalAssetFetchSequence == null ) { LocalAssetFetchProducer localAssetFetchProducer = mProducerFactory . newLocalAssetFetchProducer ( ) ; mLocalAssetFetchSequence = newBitmapCacheGetToLocalTransformSequence ( localAssetFetchProducer ) ; } return mLocalAssetFetchSequence ;
public class AttachmentPart { /** * Gets the value of the MIME header whose name is " Content - Type " . * @ return a < code > String < / code > giving the value of the * " Content - Type " header or < code > null < / code > if there * is none */ public String getContentType ( ) { } }
String [ ] values = getMimeHeader ( "Content-Type" ) ; if ( values != null && values . length > 0 ) return values [ 0 ] ; return null ;
public class CheckRangeHandler { /** * Constructor . * @ param field The basefield owner of this listener ( usually null and set on setOwner ( ) ) . * @ param dStartRange Start of range ( inclusive ) . * @ param dEndRange End of range ( inclusive ) . */ public void init ( BaseField field , double dStartRange , do...
super . init ( field ) ; m_dStartRange = dStartRange ; m_dEndRange = dEndRange ; m_bScreenMove = true ; m_bInitMove = false ; m_bReadMove = false ;
public class KVStore { /** * Put a map of ( key , value ) pair into the store . The value could be any type * that supported by { @ link ValueObject } * @ param kvMap a map of { key , value } pair */ @ Override public KVStore putValues ( Map < String , Object > kvMap ) { } }
for ( String key : kvMap . keySet ( ) ) { put ( key , ValueObject . of ( kvMap . get ( key ) ) ) ; } return this ;
public class PlaybackView { /** * Used to update the play / pause button . * Should be synchronize with the player playing state . * See also : { @ link CheerleaderPlayer # isPlaying ( ) } . * @ param isPlaying true if a track is currently played . */ private void setPlaying ( boolean isPlaying ) { } }
if ( isPlaying ) { mPlayPause . setImageResource ( R . drawable . ic_pause_white ) ; } else { mPlayPause . setImageResource ( R . drawable . ic_play_white ) ; }
public class OptimizeEngineFactory { /** * Create encrypt optimize engine instance . * @ param encryptRule encrypt rule * @ param sqlStatement sql statement * @ param parameters parameters * @ return encrypt optimize engine instance */ public static OptimizeEngine newInstance ( final EncryptRule encryptRule , f...
if ( sqlStatement instanceof InsertStatement ) { return new EncryptInsertOptimizeEngine ( encryptRule , ( InsertStatement ) sqlStatement , parameters ) ; } return new EncryptDefaultOptimizeEngine ( ) ;
public class BatchResources { /** * Deletes the batch having the given ID . * @ param req HTTPServlet request . Cannot be null . * @ param batchId The batch ID to retrieve . * @ return An empty body if the delete was successful . * @ throws WebApplicationException If an error occurs . */ @ DELETE @ Produces ( M...
_validateBatchId ( batchId ) ; PrincipalUser currentOwner = validateAndGetOwner ( req , null ) ; BatchMetricQuery batch = batchService . findBatchById ( batchId ) ; if ( batch != null ) { PrincipalUser actualOwner = userService . findUserByUsername ( batch . getOwnerName ( ) ) ; validateResourceAuthorization ( req , ac...
public class ObjectRange { /** * Iterates over all values and returns true if one value matches . * @ see # containsWithinBounds ( Object ) */ @ Override public boolean contains ( Object value ) { } }
final Iterator < Comparable > iter = new StepIterator ( this , 1 ) ; if ( value == null ) { return false ; } while ( iter . hasNext ( ) ) { if ( DefaultTypeTransformation . compareEqual ( value , iter . next ( ) ) ) return true ; } return false ;
public class RedisRecordCursor { /** * Otherwise they need to be found by scanning Redis */ private boolean fetchKeys ( ) { } }
try ( Jedis jedis = jedisPool . getResource ( ) ) { switch ( split . getKeyDataType ( ) ) { case STRING : { String cursor = SCAN_POINTER_START ; if ( redisCursor != null ) { cursor = redisCursor . getStringCursor ( ) ; } log . debug ( "Scanning new Redis keys from cursor %s . %d values read so far" , cursor , totalValu...
public class Gridmix { /** * Write random bytes at the path provided . * @ see org . apache . hadoop . mapred . gridmix . GenerateData */ protected void writeInputData ( long genbytes , Path ioPath ) throws IOException , InterruptedException { } }
final Configuration conf = getConf ( ) ; final GridmixJob genData = new GenerateData ( conf , ioPath , genbytes ) ; submitter . add ( genData ) ; LOG . info ( "Generating " + StringUtils . humanReadableInt ( genbytes ) + " of test data..." ) ; // TODO add listeners , use for job dependencies TimeUnit . SECONDS . sleep ...
public class AbstractStructrCmisService { /** * Returns the CMIS info that is defined in the given Structr type , or null . * @ param type * @ return */ public CMISInfo getCMISInfo ( final Class < ? extends GraphObject > type ) { } }
try { return type . newInstance ( ) . getCMISInfo ( ) ; } catch ( Throwable t ) { } return null ;
public class CPTaxCategoryPersistenceImpl { /** * Creates a new cp tax category with the primary key . Does not add the cp tax category to the database . * @ param CPTaxCategoryId the primary key for the new cp tax category * @ return the new cp tax category */ @ Override public CPTaxCategory create ( long CPTaxCat...
CPTaxCategory cpTaxCategory = new CPTaxCategoryImpl ( ) ; cpTaxCategory . setNew ( true ) ; cpTaxCategory . setPrimaryKey ( CPTaxCategoryId ) ; cpTaxCategory . setCompanyId ( companyProvider . getCompanyId ( ) ) ; return cpTaxCategory ;
public class CmsModuleManager { /** * Returns a map of modules found in the given RFS absolute path . < p > * @ param rfsAbsPath the path to look for module distributions * @ return a map of < code > { @ link CmsModule } < / code > objects for keys and filename for values * @ throws CmsConfigurationException if s...
Map < CmsModule , String > modules = new HashMap < CmsModule , String > ( ) ; if ( rfsAbsPath == null ) { return modules ; } File folder = new File ( rfsAbsPath ) ; if ( folder . exists ( ) ) { // list all child resources in the given folder File [ ] folderFiles = folder . listFiles ( ) ; if ( folderFiles != null ) { f...
public class FileSystemContext { /** * Closes all the resources associated with the context . Make sure all the resources are released * back to this context before calling this close . After closing the context , all the resources * that acquired from this context might fail . Only call this when you are done with...
if ( ! mClosed . get ( ) ) { // Setting closed should be the first thing we do because if any of the close operations // fail we ' ll only have a half - closed object and performing any more operations or closing // again on a half - closed object can possibly result in more errors ( i . e . NPE ) . Setting // closed f...
public class Track { /** * XML stream object serialization */ private static String url ( final Track track ) { } }
return track . getLinks ( ) . isEmpty ( ) ? null : track . getLinks ( ) . get ( 0 ) . getHref ( ) . toString ( ) ;
public class PluginContext { /** * / * Notifies all PluginListeners of a Plugin being added to this class . */ protected void firePluginAddedEvent ( PluginEvent event ) { } }
PluginListener [ ] listeners = new PluginListener [ mPluginListeners . size ( ) ] ; listeners = mPluginListeners . toArray ( listeners ) ; for ( int i = 0 ; i < listeners . length ; i ++ ) { listeners [ i ] . pluginAdded ( event ) ; }
public class HashUtils { /** * Hashes data with the specified hashing algorithm . Returns a hexadecimal result . * @ since 1.1 * @ param data the data to hash * @ param alg the hashing algorithm to use * @ return the hexadecimal hash of the data * @ throws NoSuchAlgorithmException the algorithm is not support...
return toHex ( hash ( data , alg ) ) ;
public class Solo { /** * Clicks an ActionBar Home / Up button . */ public void clickOnActionBarHomeButton ( ) { } }
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "clickOnActionBarHomeButton()" ) ; } instrumentation . runOnMainSync ( new Runnable ( ) { @ Override public void run ( ) { clicker . clickOnActionBarHomeButton ( ) ; } } ) ;
public class AptControlImplementation { /** * Initializes the list of ContextField declared directly by this ControlImpl */ private ArrayList < AptContextField > initContexts ( ) { } }
ArrayList < AptContextField > contexts = new ArrayList < AptContextField > ( ) ; if ( _implDecl == null || _implDecl . getFields ( ) == null ) return contexts ; Collection < FieldDeclaration > declaredFields = _implDecl . getFields ( ) ; for ( FieldDeclaration fieldDecl : declaredFields ) { if ( fieldDecl . getAnnotati...
public class JsonArray { /** * Adds the specified number to self . * @ param number the number that needs to be added to the array . */ public void add ( Number number ) { } }
elements . add ( number == null ? JsonNull . INSTANCE : new JsonPrimitive ( number ) ) ;
public class GetLifecyclePolicyPreviewResult { /** * The results of the lifecycle policy preview request . * @ param previewResults * The results of the lifecycle policy preview request . */ public void setPreviewResults ( java . util . Collection < LifecyclePolicyPreviewResult > previewResults ) { } }
if ( previewResults == null ) { this . previewResults = null ; return ; } this . previewResults = new java . util . ArrayList < LifecyclePolicyPreviewResult > ( previewResults ) ;
public class BaseWindowedBolt { /** * define a session processing time window * @ param size window size , i . e . , session gap */ public BaseWindowedBolt < T > sessionTimeWindow ( Time size ) { } }
long s = size . toMilliseconds ( ) ; ensurePositiveTime ( s ) ; setSizeAndSlide ( s , DEFAULT_SLIDE ) ; this . windowAssigner = ProcessingTimeSessionWindows . withGap ( s ) ; return this ;
public class PoolablePreparedStatement { /** * Method setSQLXML . * @ param parameterIndex * @ param xmlObject * @ throws SQLException * @ see java . sql . PreparedStatement # setSQLXML ( int , SQLXML ) */ @ Override public void setSQLXML ( int parameterIndex , SQLXML xmlObject ) throws SQLException { } }
internalStmt . setSQLXML ( parameterIndex , xmlObject ) ;
public class XMLDecoder { /** * Reads the next object . * @ return the next object * @ exception ArrayIndexOutOfBoundsException * if no more objects to read */ @ SuppressWarnings ( "nls" ) public Object readObject ( ) { } }
if ( inputStream == null ) { return null ; } if ( saxHandler == null ) { saxHandler = new SAXHandler ( ) ; try { SAXParserFactory . newInstance ( ) . newSAXParser ( ) . parse ( inputStream , saxHandler ) ; } catch ( Exception e ) { this . listener . exceptionThrown ( e ) ; } } if ( readObjIndex >= readObjs . size ( ) )...
public class EnforcementJobRestEntity { /** * Enables an enforcement job * < pre > * GET / enforcements / { agreementId } * Request : * GET / enforcements HTTP / 1.1 * Response : * Accpets application / xml or application / json * { @ code * The enforcement job with agreement - uuid e3bc4f6a - 5f58-453b...
logger . debug ( "StartOf startEnforcementJob - Start /enforcementJobs" ) ; EnforcementJobHelperE enforcementJobHelper = getHelper ( ) ; if ( enforcementJobHelper . startEnforcementJob ( agreementId ) ) return buildResponse ( HttpStatus . ACCEPTED , "The enforcement job with agreement-uuid " + agreementId + " has start...
public class ElementImpl { /** * Return the index this element has in its parent children list . When determine the index only elements of the same kind * are counted ; returns - 1 if this element is the only child of its kind . This helper method is used by { @ link # trace ( ) } . * @ return this element index or...
ElementImpl parent = ( ElementImpl ) getParent ( ) ; if ( parent == null ) { return - 1 ; } Node n = parent . node . getFirstChild ( ) ; int index = 0 ; int twinsCount = 0 ; boolean indexFound = false ; while ( n != null ) { if ( n == node ) { indexFound = true ; } if ( n . getNodeType ( ) == Node . ELEMENT_NODE && n ....
public class FTPServerFacade { /** * Asynchronous ; return before completion . * Start the outgoing transfer * reading the data from the supplied data source . * Any exception that would occure will not be thrown but * returned through the local control channel . */ public void retrieve ( DataSource source ) { ...
try { localControlChannel . resetReplyCount ( ) ; TransferContext context = createTransferContext ( ) ; if ( session . serverMode == Session . SERVER_PASSIVE ) { runTask ( createPassiveConnectTask ( source , context ) ) ; } else { runTask ( createActiveConnectTask ( source , context ) ) ; } } catch ( Exception e ) { ex...
public class BaseTable { /** * Requery the table . * < p > NOTE : You do not need to Open to do a seek or addNew . * The record pointer is positioned before the first record at BOF . * @ exception DBException */ public void open ( ) throws DBException { } }
if ( this . isOpen ( ) ) return ; // Ignore if already open m_bIsOpen = false ; this . getRecord ( ) . handleInitialKey ( ) ; // Set up the smaller key this . getRecord ( ) . handleEndKey ( ) ; // Set up the larger key this . doOpen ( ) ; // Now do the physical open in sub class . m_bIsOpen = true ; m_iRecordStatus = D...
public class Auth { /** * Logs into the Cloud SDK with a specific user ( does not retrigger auth flow if user is already * configured for the system ) . * @ param user a user email * @ throws AppEngineException when there is an issue with the auth flow */ public void login ( String user ) throws AppEngineExceptio...
Preconditions . checkNotNull ( user ) ; if ( ! EMAIL_PATTERN . matcher ( user ) . find ( ) ) { throw new AppEngineException ( "Invalid email address: " + user ) ; } try { runner . run ( ImmutableList . of ( "auth" , "login" , user ) , null ) ; } catch ( ProcessHandlerException | IOException ex ) { throw new AppEngineEx...
public class Levy { /** * Sets the scale of the Levy distribution * @ param scale the new scale value , must be positive */ public void setScale ( double scale ) { } }
if ( scale <= 0 || Double . isNaN ( scale ) || Double . isInfinite ( scale ) ) throw new ArithmeticException ( "Scale must be a positive value, not " + scale ) ; this . scale = scale ; this . logScale = log ( scale ) ;
public class ClasspathScanner { /** * Returns the fully qualified class names of * all the classes in the classpath . Checks * directories and zip files . The FilenameFilter * will be applied only to files that are in the * zip files and the directories . In other words , * the filter will not be used to sort...
// for performance we most likely only want to do this once for each interpreter session , // classpath should not change dynamically ChorusLog log = ChorusLogFactory . getLog ( ClasspathScanner . class ) ; log . debug ( "Getting file names " + Thread . currentThread ( ) . getName ( ) ) ; long start = System . currentT...
public class TextToSpeech { /** * Create a custom model . * Creates a new empty custom voice model . You must specify a name for the new custom model . You can optionally * specify the language and a description for the new model . The model is owned by the instance of the service whose * credentials are used to ...
Validator . notNull ( createVoiceModelOptions , "createVoiceModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getS...
public class Dimension { /** * Method to add an UoM to this dimension . * @ param _ uom UoM to add */ private void addUoM ( final UoM _uom ) { } }
this . uoMs . add ( _uom ) ; if ( _uom . getId ( ) == this . baseUoMId ) { this . baseUoM = _uom ; }
public class ScoreTemplate { /** * Returns the number value associated to an attribute , as * a double . * @ throws RuntimeException if sa doesn ' t accept boolean value */ public double getAttributeNumber ( ScoreAttribute sa ) { } }
if ( ! ( sa . getDefaultValue ( ) instanceof Number ) ) throw new RuntimeException ( sa . toString ( ) + " is not a number attribute" ) ; return ( ( Number ) getAttributeObject ( sa ) ) . doubleValue ( ) ;
public class TabularDataConverter { /** * A map is translated into a TabularData with a rowtype with two entries : " value " and " key " */ private boolean checkForMapValue ( TabularType pType ) { } }
CompositeType rowType = pType . getRowType ( ) ; // Two entries in the row : " key " and " value " return rowType . containsKey ( TD_KEY_VALUE ) && rowType . containsKey ( TD_KEY_KEY ) && rowType . keySet ( ) . size ( ) == 2 ;