signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ISUPMessageFactoryImpl { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . isup . ISUPMessageFactory # createINR ( ) */
@ Override public InformationRequestMessage createINR ( ) { } } | InformationRequestMessage msg = new InformationRequestMessageImpl ( _INR_HOLDER . mandatoryCodes , _INR_HOLDER . mandatoryVariableCodes , _INR_HOLDER . optionalCodes , _INR_HOLDER . mandatoryCodeToIndex , _INR_HOLDER . mandatoryVariableCodeToIndex , _INR_HOLDER . optionalCodeToIndex ) ; return msg ; |
public class ConfigEvaluator { /** * Process and evaluate a raw String value . */
private Object convertStringToSingleValue ( String rawValue , ExtendedAttributeDefinition attrDef , EvaluationContext context , boolean ignoreWarnings ) throws ConfigEvaluatorException { } } | String value = processString ( rawValue , attrDef , context , ignoreWarnings ) ; return evaluateString ( value , attrDef , context ) ; |
public class BackedHashMap { /** * doTimeBasedWrites - called periodically when time - based - writes is configured */
public void doTimeBasedWrites ( boolean forceWrite ) { } } | // create local variable - JIT performance improvement
final boolean isTraceOn = com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINER ) ) { LoggingUtil . SESSION_LOGGER_WAS . entering ( methodClassName , methodNames [ DO... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcAnnotationFillAreaOccurrence ( ) { } } | if ( ifcAnnotationFillAreaOccurrenceEClass == null ) { ifcAnnotationFillAreaOccurrenceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 15 ) ; } return ifcAnnotationFillAreaOccurrenceEClass ; |
public class AcpService { /** * 功能 : 前台交易构造HTTP POST自动提交表单 < br >
* @ param action 表单提交地址 < br >
* @ param hiddens 以MAP形式存储的表单键值 < br >
* @ param encoding 上送请求报文域encoding字段的值 < br >
* @ return 构造好的HTTP POST交易表单 < br > */
public static String createAutoFormHtml ( String reqUrl , Map < String , String > hiddens ,... | StringBuffer sf = new StringBuffer ( ) ; sf . append ( "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + encoding + "\"/></head><body>" ) ; sf . append ( "<form id = \"pay_form\" action=\"" + reqUrl + "\" method=\"post\">" ) ; if ( null != hiddens && 0 != hiddens . size ( ) ) { Set < Entry... |
public class SyncAgentsInner { /** * Gets a sync agent .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server on which the sync agent is hosted .
* @ param s... | return getWithServiceResponseAsync ( resourceGroupName , serverName , syncAgentName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class FullScreenImageGalleryActivity { /** * region Helper Methods */
private void bindViews ( ) { } } | viewPager = ( ViewPager ) findViewById ( R . id . vp ) ; toolbar = ( Toolbar ) findViewById ( R . id . toolbar ) ; |
public class ListNetworks { /** * Login using ovh . conf
* @ throws IOException */
public static void main ( String [ ] args ) throws IOException { } } | ApiOvhCore core = new ApiOvhCore ( ) ; ApiOvhCloud cloud = new ApiOvhCloud ( core ) ; ArrayList < String > projects = cloud . project_GET ( ) ; for ( String project : projects ) { System . out . println ( project ) ; ArrayList < OvhNetwork > networds = cloud . project_serviceName_network_private_GET ( project ) ; List ... |
public class CoreOAuthConsumerSupport { /** * Selects a proxy for the given URL .
* @ param requestTokenURL The URL
* @ return The proxy . */
protected Proxy selectProxy ( URL requestTokenURL ) { } } | try { List < Proxy > selectedProxies = getProxySelector ( ) . select ( requestTokenURL . toURI ( ) ) ; return selectedProxies . isEmpty ( ) ? Proxy . NO_PROXY : selectedProxies . get ( 0 ) ; } catch ( URISyntaxException e ) { throw new IllegalArgumentException ( e ) ; } |
public class AbstractBlockingQueue { /** * Returns the number of additional elements that this queue can ideally
* ( in the absence of memory or resource constraints ) accept without
* blocking , or < tt > Integer . MAX _ VALUE < / tt > if there is no intrinsic
* limit .
* < p > Note that you < em > cannot < / ... | int readLocation = this . readLocation ; int writeLocation = this . writeLocation ; if ( writeLocation < readLocation ) writeLocation += capacity ; return ( capacity - 1 ) - ( writeLocation - readLocation ) ; |
public class JFapByteBuffer { /** * Puts a short into the byte buffer .
* @ param item */
public synchronized void putShort ( short item ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putShort" , Short . valueOf ( item ) ) ; checkValid ( ) ; getCurrentByteBuffer ( 2 ) . putShort ( item ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "putSho... |
public class ConfigHandler { /** * Helper method to decode and analyze the chunk .
* @ param chunk the chunk to analyze . */
private void decodeChunk ( InetSocketAddress address , final ByteBuf chunk ) { } } | responseContent . writeBytes ( chunk ) ; String currentChunk = responseContent . toString ( CharsetUtil . UTF_8 ) ; int separatorIndex = currentChunk . indexOf ( "\n\n\n\n" ) ; if ( separatorIndex > 0 ) { String rawConfig = currentChunk . substring ( 0 , separatorIndex ) . trim ( ) . replace ( "$HOST" , address . getAd... |
public class AtomicBiInteger { /** * Atomically adds the given deltas to the current hi and lo values .
* @ param deltaHi the delta to apply to the hi value
* @ param deltaLo the delta to apply to the lo value */
public void add ( int deltaHi , int deltaLo ) { } } | while ( true ) { long encoded = get ( ) ; long update = encode ( getHi ( encoded ) + deltaHi , getLo ( encoded ) + deltaLo ) ; if ( compareAndSet ( encoded , update ) ) return ; } |
public class KeyPairFactory { /** * Factory method for creating a new { @ link KeyPairGenerator } from the given parameters .
* @ param algorithm
* the algorithm
* @ param keySize
* the key size
* @ param secureRandom
* the secure random
* @ return the new { @ link KeyPairGenerator } from the given parame... | final KeyPairGenerator generator = KeyPairGenerator . getInstance ( algorithm ) ; generator . initialize ( keySize , secureRandom ) ; return generator ; |
public class QueryReferenceBroker { /** * Retrieve a single Reference .
* This implementation retrieves a referenced object from the data backend
* if < b > cascade - retrieve < / b > is true or if < b > forced < / b > is true .
* @ param obj - object that will have it ' s field set with a referenced object .
*... | PersistentField refField ; Object refObj = null ; pb . getInternalCache ( ) . enableMaterializationCache ( ) ; try { Identity id = getReferencedObjectIdentity ( obj , rds , cld ) ; if ( id != null ) { refObj = pb . createProxy ( rds . getItemClass ( ) , id ) ; } refField = rds . getPersistentField ( ) ; refField . set ... |
public class Database { /** * Find documents using an index
* @ param selectorJson String representation of a JSON object describing criteria used to
* select documents . For example :
* { @ code " { \ " selector \ " : { < your data here > } } " } .
* @ param classOfT The class of Java objects to be returned
... | return findByIndex ( selectorJson , classOfT , new FindByIndexOptions ( ) ) ; |
public class XMLHelper { /** * Helper program : Extracts the specified XPATH expression
* from an XML - String .
* @ param node the node
* @ param xPath the x path
* @ return NodeList
* @ throws XPathExpressionException the x path expression exception */
public static Node getElementB ( Node node , String xPa... | XPathExpression expr = xpath . compile ( xPath ) ; return getElementB ( node , expr ) ; |
public class SafeDatasetCommit { /** * Commit the output data of a dataset . */
private void commitDataset ( Collection < TaskState > taskStates , DataPublisher publisher ) { } } | try { publisher . publish ( taskStates ) ; } catch ( Throwable t ) { log . error ( "Failed to commit dataset" , t ) ; setTaskFailureException ( taskStates , t ) ; } |
public class GosuRefactorUtil { /** * Finds a bounding parent of any of the possible types passed in from the list of locations , starting at the position
* given . */
public static IParsedElement boundingParent ( List < IParseTree > locations , int position , Class < ? extends IParsedElement > ... possibleTypes ) { ... | IParseTree location = IParseTree . Search . getDeepestLocation ( locations , position , true ) ; IParsedElement pe = null ; if ( location != null ) { pe = location . getParsedElement ( ) ; while ( pe != null && ! isOneOfTypes ( pe , possibleTypes ) ) { pe = pe . getParent ( ) ; } } return pe ; |
public class UIContextImpl { /** * Sets the component in this UIC which is to be the focus of the client browser cursor . The id of the component is
* used to find the focussed element in the rendered html . Since id could be different in different contexts the
* context of the component is also needed .
* @ para... | this . focussed = component ; this . focussedUIC = uic ; |
public class DJBarChartBuilder { /** * Adds the specified serie column to the dataset with custom label .
* @ param column the serie column
* @ param label column the custom label */
public DJBarChartBuilder addSerie ( AbstractColumn column , String label ) { } } | getDataset ( ) . addSerie ( column , label ) ; return this ; |
public class Functions { /** * Swap the input pair and return the swapped pair .
* @ return A function that gets the swapped pair { @ code Iterable } */
public static < S , T > Function < Pair < S , T > , Pair < T , S > > swappedPair ( ) { } } | return ( Function < Pair < S , T > , Pair < T , S > > ) ( Function < ? , ? > ) SWAPPED_PAIR_FUNCTION ; |
public class ApiOvhPackxdsl { /** * Get this object properties
* REST : GET / pack / xdsl / { packName } / exchangeAccount / services / { domain }
* @ param packName [ required ] The internal name of your pack
* @ param domain [ required ] */
public OvhExchangeAccountService packName_exchangeAccount_services_doma... | String qPath = "/pack/xdsl/{packName}/exchangeAccount/services/{domain}" ; StringBuilder sb = path ( qPath , packName , domain ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhExchangeAccountService . class ) ; |
public class AbstractTheDavidboxOperation { /** * { @ inheritDoc } */
public LinkedHashMap < String , String > buildHttpArguments ( ) { } } | // Init http arguments
LinkedHashMap < String , String > httpArguments = new LinkedHashMap < String , String > ( ) ; return httpArguments ; |
public class Positions { /** * Get a writable position of type { @ code type } . No checking can be done to ensure that { @ code type } conforms to
* { @ code T } .
* @ param type not { @ code null }
* @ return Position . Writable */
public static < T > Position . Writable < T > writable ( final Type type ) { } } | return writable ( type , noop ( ) ) ; |
public class TypeReferenceService { /** * This performs the same function as { @ link TypeReferenceService # getPackageUseFrequencies ( ProjectModel , Set , Set , int , boolean ) } ,
* however it is designed to use a { @ link ProjectModelTraversal } instead of only { @ link ProjectModel } .
* This is useful for cas... | Map < String , Integer > packageUseCount = new HashMap < > ( ) ; getPackageUseFrequencies ( packageUseCount , projectTraversal , includeTags , excludeTags , nameDepth , recursive ) ; return packageUseCount ; |
public class XNElement { /** * Returns the content of the first child which has the given name .
* @ param name the child name
* @ param namespace the namespace URI
* @ return the content or null if no such child */
public String childValue ( String name , String namespace ) { } } | for ( XNElement e : children ) { if ( Objects . equals ( e . name , name ) && Objects . equals ( e . namespace , namespace ) ) { return e . content ; } } return null ; |
public class ProductSearchClient { /** * Asynchronous API that imports a list of reference images to specified product sets based on a
* list of image information .
* < p > The [ google . longrunning . Operation ] [ google . longrunning . Operation ] API can be used to keep
* track of the progress and results of ... | return importProductSetsOperationCallable ( ) . futureCall ( request ) ; |
public class AtomicSparseVector { /** * { @ inheritDoc } */
public double getAndAdd ( int index , double delta ) { } } | writeLock . lock ( ) ; double value = vector . get ( index ) ; vector . set ( index , value + delta ) ; writeLock . unlock ( ) ; return value ; |
public class CalendarPath { /** * Method to construct the less than or equals expression for date
* @ param value the date value
* @ return Expression */
public Expression < java . sql . Date > lte ( java . sql . Date value ) { } } | SimpleDateFormat formatter = getDateFormatter ( ) ; String valueString = "'" + formatter . format ( value ) + "'" ; return new Expression < java . sql . Date > ( this , Operation . lte , valueString ) ; |
public class Base64 { /** * Encodes up to the first three bytes of array < var > threeBytes < / var > and
* returns a four - byte array in Base64 notation . The actual number of
* significant bytes in your array is given by < var > numSigBytes < / var > . The
* array < var > threeBytes < / var > needs only be as ... | _encode3to4 ( threeBytes , 0 , numSigBytes , b4 , 0 , options ) ; return b4 ; |
public class FormTool { /** * Constructs an option entry for a select menu with the specified
* name , value , item , and selected value . */
public String fixedOption ( String name , String value , String item , Object selectedValue ) { } } | StringBuilder buf = new StringBuilder ( ) ; buf . append ( "<option value=\"" ) . append ( value ) . append ( "\"" ) ; if ( selectedValue . equals ( value ) ) { buf . append ( " selected" ) ; } buf . append ( ">" ) . append ( item ) . append ( "</option>" ) ; return buf . toString ( ) ; |
public class StorableIntrospector { /** * Returns a new modifiable mapping of method signatures to methods .
* @ return map of { @ link # createSig signatures } to methods */
private static Map < String , Method > gatherAllDeclaredMethods ( Class clazz ) { } } | Map < String , Method > methods = new HashMap < String , Method > ( ) ; gatherAllDeclaredMethods ( methods , clazz ) ; return methods ; |
public class FileDownloadNotificationHelper { /** * Clear and cancel all notifications which inside this helper { @ link # notificationArray } . */
public void clear ( ) { } } | @ SuppressWarnings ( "unchecked" ) SparseArray < BaseNotificationItem > cloneArray = ( SparseArray < BaseNotificationItem > ) notificationArray . clone ( ) ; notificationArray . clear ( ) ; for ( int i = 0 ; i < cloneArray . size ( ) ; i ++ ) { final BaseNotificationItem n = cloneArray . get ( cloneArray . keyAt ( i ) ... |
public class EmailSettingsApi { /** * Get inbound settings .
* Returns inbound settings .
* @ return ApiResponse & lt ; GetInboundResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public ApiResponse < GetInboundResponse > getInboundSe... | com . squareup . okhttp . Call call = getInboundSettingsValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < GetInboundResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class ExpectedConditions { /** * An expectation for checking that there is at least one element present on a web page .
* @ param locator used to find the element
* @ return the list of WebElements once they are located */
public static ExpectedCondition < List < WebElement > > presenceOfAllElementsLocatedBy... | return new ExpectedCondition < List < WebElement > > ( ) { @ Override public List < WebElement > apply ( WebDriver driver ) { List < WebElement > elements = driver . findElements ( locator ) ; return elements . size ( ) > 0 ? elements : null ; } @ Override public String toString ( ) { return "presence of any elements l... |
public class Int2ObjectCache { /** * Overloaded version of { @ link Map # containsKey ( Object ) } that takes a primitive int key .
* @ param key for indexing the { @ link Map }
* @ return true if the key is found otherwise false . */
public boolean containsKey ( final int key ) { } } | boolean found = false ; @ DoNotSub final int setNumber = Hashing . hash ( key , mask ) ; @ DoNotSub final int setBeginIndex = setNumber << setSizeShift ; for ( @ DoNotSub int i = setBeginIndex , setEndIndex = setBeginIndex + setSize ; i < setEndIndex ; i ++ ) { if ( null == values [ i ] ) { break ; } if ( key == keys [... |
public class Database { public DbHistory [ ] get_class_property_history ( String classname , String propname ) throws DevFailed { } } | return databaseDAO . get_class_property_history ( this , classname , propname ) ; |
public class HttpClientBuilder { /** * Configures a key store for the current SSL host ( see
* { @ link # ssl ( String ) } ) . If set , SSL server validation will be used ( i . e .
* the server certificate will be requested and validated ) .
* @ param urlURL from which to obtain key store
* @ param passwordkey ... | if ( sslHostConfig == null ) { throw new IllegalStateException ( "ssl(String) must be called before this" ) ; } sslHostConfig . keyStoreUrl = url ; sslHostConfig . keyStorePassword = password ; return this ; |
public class APSPSolver { /** * Draw a graph representing this { @ link APSPSolver } ' s { @ link ConstraintNetwork } . This method depends on the Prefuse library . */
public void draw ( ) { } } | // Now plot the STP with the Utility . PlotSTPTemporalModule class
PlotSTPTemporalModule view ; Toolkit tk = Toolkit . getDefaultToolkit ( ) ; int xSize = ( ( int ) tk . getScreenSize ( ) . getWidth ( ) ) ; int ySize = ( ( int ) tk . getScreenSize ( ) . getHeight ( ) ) ; // int ySize = 500;
// GIVE tm TO VISIUALIZER
vi... |
public class JMStats { /** * Cal double .
* @ param < N > the type parameter
* @ param numberList the number list
* @ param calFunction the cal function
* @ return the double */
public static < N extends Number > double cal ( List < N > numberList , Function < DoubleStream , OptionalDouble > calFunction ) { } } | return JMCollections . isNullOrEmpty ( numberList ) ? 0 : calFunction . apply ( numberList . stream ( ) . mapToDouble ( Number :: doubleValue ) ) . orElse ( 0 ) ; |
public class XMLConfiguration { protected void initListener ( XmlParser . Node node ) { } } | String className = node . getString ( "listener-class" , false , true ) ; Object listener = null ; try { Class listenerClass = getWebApplicationContext ( ) . loadClass ( className ) ; listener = listenerClass . newInstance ( ) ; } catch ( Exception e ) { log . warn ( "Could not instantiate listener " + className , e ) ... |
public class ParamSupport { /** * simply send our name and value to our parent < transform > tag */
@ Override public int doEndTag ( ) throws JspException { } } | Tag t = findAncestorWithClass ( this , TransformSupport . class ) ; if ( t == null ) { throw new JspTagException ( Resources . getMessage ( "PARAM_OUTSIDE_TRANSFORM" ) ) ; } TransformSupport parent = ( TransformSupport ) t ; Object value = this . value ; if ( value == null ) { if ( bodyContent == null || bodyContent . ... |
public class GoogleMapsTileMath { /** * Create a transform that converts meters to tile - relative pixels
* @ param tx The x coordinate of the tile
* @ param ty The y coordinate of the tile
* @ param zoomLevel the zoom level
* @ return AffineTransform with meters to pixels transformation */
public AffineTransfo... | AffineTransform result = new AffineTransform ( ) ; double scale = 1.0 / resolution ( zoomLevel ) ; int nTiles = 2 << ( zoomLevel - 1 ) ; int px = tx * - 256 ; int py = ( nTiles - ty ) * - 256 ; // flip y for upper - left origin
result . scale ( 1 , - 1 ) ; result . translate ( px , py ) ; result . scale ( scale , scale... |
public class IonReaderBinaryUserX { /** * Facet support */
@ Override public < T > T asFacet ( Class < T > facetType ) { } } | if ( facetType == SpanProvider . class ) { return facetType . cast ( new SpanProviderFacet ( ) ) ; } // TODO amzn / ion - java / issues / 17 support seeking over InputStream
if ( _input instanceof FromByteArray ) { if ( facetType == SeekableReader . class ) { return facetType . cast ( new SeekableReaderFacet ( ) ) ; } ... |
public class SslUtils { /** * Creates an { @ link SSLContext } that allows all requests , regardless of certificate issues .
* @ return an all - accepting { @ link SSLContext } */
public static SSLContext acceptingSslContext ( ) { } } | try { SSLContext sslContext = SSLContext . getInstance ( "SSL" ) ; sslContext . init ( null , TRUST_MANAGERS , new SecureRandom ( ) ) ; return sslContext ; } catch ( NoSuchAlgorithmException | KeyManagementException ex ) { throw new RuntimeException ( "Unable to create issue-ignoring SSLContext: " + ex . getMessage ( )... |
public class GameSessionConnectionInfoMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GameSessionConnectionInfo gameSessionConnectionInfo , ProtocolMarshaller protocolMarshaller ) { } } | if ( gameSessionConnectionInfo == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( gameSessionConnectionInfo . getGameSessionArn ( ) , GAMESESSIONARN_BINDING ) ; protocolMarshaller . marshall ( gameSessionConnectionInfo . getIpAddress ( ) , I... |
public class UserDataHelper { /** * Configures the agent from VMWare .
* @ param logger a logger
* @ return the agent ' s data , or null if they could not be parsed */
public AgentProperties findParametersForVmware ( Logger logger ) { } } | logger . info ( "User data are being retrieved for VMWare..." ) ; AgentProperties result = null ; File propertiesFile = new File ( "/tmp/roboconf.properties" ) ; try { int retries = 30 ; while ( ( ! propertiesFile . exists ( ) || ! propertiesFile . canRead ( ) ) && retries -- > 0 ) { logger . fine ( "Agent tries to rea... |
public class XID { /** * Serializes an XID object binarily to a data output stream .
* @ param id
* XID to be serialized .
* @ param dos
* Data output stream to store XID serialization . */
public static void write ( XID id , DataOutputStream dos ) throws IOException { } } | dos . writeLong ( id . uuid . getMostSignificantBits ( ) ) ; dos . writeLong ( id . uuid . getLeastSignificantBits ( ) ) ; |
public class CmsXsltUtil { /** * Converts a delimiter separated format string int o colgroup html fragment . < p >
* @ param formatString the formatstring to convert
* @ param delimiter the delimiter the formats ( l , r or c ) are delimited with
* @ return the resulting colgroup HTML */
private static String getC... | StringBuffer colgroup = new StringBuffer ( 128 ) ; String [ ] formatStrings = formatString . split ( delimiter ) ; colgroup . append ( "<colgroup>" ) ; for ( int i = 0 ; i < formatStrings . length ; i ++ ) { colgroup . append ( "<col align=\"" ) ; char align = formatStrings [ i ] . trim ( ) . charAt ( 0 ) ; switch ( al... |
public class MetricUtils { /** * make taskId = 0 and streamId empty . */
public static String task2compName ( String old ) { } } | String [ ] parts = old . split ( DELIM ) ; if ( parts . length >= 7 ) { parts [ 0 ] = MetaType . COMPONENT . getV ( ) + parts [ 0 ] . charAt ( 1 ) ; parts [ parts . length - 3 ] = EMPTY ; parts [ parts . length - 4 ] = "0" ; } return concat ( parts ) ; |
public class MathFunctions { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > convert radians to degrees . < / i > < / div >
* < div color = ' red ' styl... | JcNumber ret = new JcNumber ( null , this . argument , new FunctionInstance ( FUNCTION . Math . DEGREES , 1 ) ) ; QueryRecorder . recordInvocationConditional ( this , "degrees" , ret ) ; return ret ; |
public class EnvelopesApi { /** * Retrieves the current metadata of a ChunkedUpload .
* @ param accountId The external account number ( int ) or account ID Guid . ( required )
* @ param chunkedUploadId ( required )
* @ return ChunkedUploadResponse */
public ChunkedUploadResponse getChunkedUpload ( String accountI... | return getChunkedUpload ( accountId , chunkedUploadId , null ) ; |
public class NarGnuConfigureMojo { /** * JDK 1.4 compatibility */
private static String arraysToString ( final Object [ ] a ) { } } | if ( a == null ) { return "null" ; } final int iMax = a . length - 1 ; if ( iMax == - 1 ) { return "[]" ; } final StringBuilder b = new StringBuilder ( ) ; b . append ( '[' ) ; for ( int i = 0 ; ; i ++ ) { b . append ( String . valueOf ( a [ i ] ) ) ; if ( i == iMax ) { return b . append ( ']' ) . toString ( ) ; } b . ... |
public class CreatePhoneCountryConstantsClass { /** * read phone trunk an exit code map from property file .
* @ return map of country code and combined string of trunk an exit code */
public static Map < String , String > readPhoneTrunkAndExitCodes ( final Locale plocale ) { } } | final PhoneCountryTrunkAndExitCodesConstants phoneTrunkAndExitCodes = GWT . create ( PhoneCountryTrunkAndExitCodesConstants . class ) ; return phoneTrunkAndExitCodes . phoneTrunkAndExitCodes ( ) ; |
public class ComponentWrapper { /** * Wraps the specified { @ link Window } into a UI . Adds the specified pop - up
* window to a simple , empty vertical layout .
* @ param window the pop - up window to wrap
* @ return an application displaying that pop - up window */
public UI wrapWindow ( Window window ) { } } | final UI ui = wrapLayout ( new VerticalLayout ( ) ) ; ui . addWindow ( window ) ; return ui ; |
public class PBaseValueEqual { /** * In where null or empty values means that no predicate is added to the query .
* That is , only add the IN predicate if the values are not null or empty .
* Without this we typically need to code an < code > if < / code > block to only add
* the IN predicate if the collection i... | expr ( ) . inOrEmpty ( _name , values ) ; return _root ; |
public class MethodDelegation { /** * Delegates any intercepted method to invoke a non - { @ code static } method on the instance of the supplied field . To be
* considered a valid delegation target , a method must be visible and accessible to the instrumented type . This is the
* case if the method ' s declaring t... | return withDefaultConfiguration ( ) . toField ( name , fieldLocatorFactory , methodGraphCompiler ) ; |
public class MappedParametrizedObjectEntry { /** * Parse named parameter as Long .
* @ param name
* parameter name
* @ return Long value
* @ throws RepositoryConfigurationException */
public Long getParameterLong ( String name ) throws RepositoryConfigurationException { } } | try { return StringNumberParser . parseLong ( getParameterValue ( name ) ) ; } catch ( NumberFormatException e ) { throw new RepositoryConfigurationException ( name + ": unparseable Long. " + e , e ) ; } |
public class ntp_sync { /** * < pre >
* Converts API response of bulk operation into object and returns the object array in case of get request .
* < / pre > */
protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } } | ntp_sync_responses result = ( ntp_sync_responses ) service . get_payload_formatter ( ) . string_to_resource ( ntp_sync_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , result . e... |
public class CommunicationManager { /** * Removes specified torrent from storage .
* @ param torrentHash specified torrent hash */
public void removeTorrent ( String torrentHash ) { } } | logger . debug ( "Stopping seeding " + torrentHash ) ; final Pair < SharedTorrent , LoadedTorrent > torrents = torrentsStorage . remove ( torrentHash ) ; SharedTorrent torrent = torrents . first ( ) ; if ( torrent != null ) { torrent . setClientState ( ClientState . DONE ) ; torrent . closeFully ( ) ; } List < SharingP... |
public class PropertyService { /** * Determines , based on the name of a property , if we expect the value might contain a password .
* @ param name property name .
* @ return true if the property value might be expected to contain a password , otherwise false . */
public static final boolean isPassword ( String na... | return PASSWORD_PROPS . contains ( name ) || name . toLowerCase ( ) . contains ( DataSourceDef . password . name ( ) ) ; |
public class LayerDrawable { /** * Sets the drawable for the layer at the specified index .
* @ param index The index of the layer to modify , must be in the range { @ code
* 0 . . . getNumberOfLayers ( ) - 1 } .
* @ param drawable The drawable to set for the layer .
* @ attr ref android . R . styleable # Layer... | if ( index >= mLayerState . mNum ) { throw new IndexOutOfBoundsException ( ) ; } final ChildDrawable [ ] layers = mLayerState . mChildren ; final ChildDrawable childDrawable = layers [ index ] ; if ( childDrawable . mDrawable != null ) { if ( drawable != null ) { final Rect bounds = childDrawable . mDrawable . getBound... |
public class CmsValueCompareBean { /** * Gets the value for the first version . < p >
* @ return the value for the first version */
@ Column ( header = "V1 (%(v1))" , order = 40 ) public String getV1 ( ) { } } | return CmsValueCompareBean . formatContentValueForDiffTable ( m_cms , m_elemComp , m_elemComp . getVersion1 ( ) ) ; |
public class br_replicateconfig { /** * < pre >
* Use this operation to replicate Repeater config in bulk .
* < / pre > */
public static br_replicateconfig [ ] replicate ( nitro_service client , br_replicateconfig [ ] resources ) throws Exception { } } | if ( resources == null ) throw new Exception ( "Null resource array" ) ; if ( resources . length == 1 ) return ( ( br_replicateconfig [ ] ) resources [ 0 ] . perform_operation ( client , "replicate" ) ) ; return ( ( br_replicateconfig [ ] ) perform_operation_bulk_request ( client , resources , "replicate" ) ) ; |
public class ThriftRangeUtils { /** * Returns the computed token range splits of the specified token range .
* @ param deepTokenRange the token range to be splitted .
* @ return the list of token range splits , which are also token ranges . */
public List < DeepTokenRange > getSplits ( DeepTokenRange deepTokenRange... | String start = tokenAsString ( ( Comparable ) deepTokenRange . getStartToken ( ) ) ; String end = tokenAsString ( ( Comparable ) deepTokenRange . getEndToken ( ) ) ; List < String > endpoints = deepTokenRange . getReplicas ( ) ; for ( String endpoint : endpoints ) { try { ThriftClient client = ThriftClient . build ( en... |
public class UserProfileExample { /** * Add an action to the user profile .
* This method demonstrates how we can use a keyAsColumn map field ( the
* actions field of the UserActionsModel ) to add values to the map without
* having to do a get / update / put operation . When doing the put , it won ' t
* remove ... | // Create a new UserActionsModel , and add a new actions map to it with a
// single action value . Even if one exists in this row , since it has a lone
// keyAsColumn field , it won ' t remove any actions that already exist in the
// actions column family .
UserActionsModel actionsModel = UserActionsModel . newBuilder ... |
public class ExceptionParser { /** * Tries to detect if Throwable is caused by broken connection . If detected
* returns level , else return SEVERE .
* @ param level
* @ param thr
* @ return */
public static final Level brokenConnection ( Level level , Throwable thr ) { } } | if ( thr instanceof EOFException ) { return level ; } if ( thr instanceof ClosedChannelException ) { return level ; } if ( ( thr instanceof IOException ) && ( "Broken pipe" . equals ( thr . getMessage ( ) ) || "Connection reset by peer" . equals ( thr . getMessage ( ) ) ) ) { return level ; } if ( ( thr instanceof Conn... |
public class Application { /** * Checks if a given method exists in a given class
* @ param controllerMethod The method to check
* @ param controllerClass The class to check
* @ return True if the method exists , false otherwise */
private static boolean methodExists ( String controllerMethod , Class < ? > contro... | Objects . requireNonNull ( controllerMethod , Required . CONTROLLER_METHOD . toString ( ) ) ; Objects . requireNonNull ( controllerClass , Required . CONTROLLER_CLASS . toString ( ) ) ; return Arrays . stream ( controllerClass . getMethods ( ) ) . anyMatch ( method -> method . getName ( ) . equals ( controllerMethod ) ... |
public class ManagementLocksInner { /** * Gets a management lock at the subscription level .
* @ param lockName The name of the lock to get .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ManagementLockObjectInner object */
public Observable < Servic... | if ( lockName == null ) { throw new IllegalArgumentException ( "Parameter lockName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( this . client . apiVersio... |
public class CqlIdentifier { /** * Creates an identifier from its { @ link CqlIdentifier CQL form } . */
@ NonNull public static CqlIdentifier fromCql ( @ NonNull String cql ) { } } | Preconditions . checkNotNull ( cql , "cql must not be null" ) ; final String internal ; if ( Strings . isDoubleQuoted ( cql ) ) { internal = Strings . unDoubleQuote ( cql ) ; } else { internal = cql . toLowerCase ( ) ; Preconditions . checkArgument ( ! Strings . needsDoubleQuotes ( internal ) , "Invalid CQL form [%s]: ... |
public class PropertiesManagers { /** * Build a new manager for the given properties file .
* @ param < T >
* the type of key used for the new manager
* @ param file
* the file system location of the properties represented here
* @ param keyType
* the enumeration of keys in the properties file
* @ param e... | Translator < T > translator = getEnumTranslator ( keyType ) ; return new PropertiesManager < T > ( file , getDefaultProperties ( keyType , translator ) , translator , evaluator , executor ) { @ Override protected Retriever createRetriever ( ) { return new AddOnRetriever ( true , super . createRetriever ( ) , retrievers... |
public class MultipartConfigTypeImpl { /** * Returns the < code > max - request - size < / code > element
* @ return the node defined for the element < code > max - request - size < / code > */
public Long getMaxRequestSize ( ) { } } | if ( childNode . getTextValueForPatternName ( "max-request-size" ) != null && ! childNode . getTextValueForPatternName ( "max-request-size" ) . equals ( "null" ) ) { return Long . valueOf ( childNode . getTextValueForPatternName ( "max-request-size" ) ) ; } return null ; |
public class Utils { /** * Generate a list of scope names .
* @ param scopes
* An array of { @ link Scope } . If { @ code null } is given ,
* { @ code null } is returned .
* @ return
* A string containing scope names using white spaces as
* the delimiter .
* @ since 2.5 */
public static String stringifySc... | if ( scopes == null ) { return null ; } String [ ] array = new String [ scopes . length ] ; for ( int i = 0 ; i < scopes . length ; ++ i ) { array [ i ] = ( scopes [ i ] == null ) ? null : scopes [ i ] . getName ( ) ; } return join ( array , " " ) ; |
public class ImageBuilder { /** * Build a local image with its local path .
* @ param jrImage the local image params
* @ param skipImagesFolder skip imagesFolder prefix addition
* @ return the JavaFX image object */
private Image buildLocalImage ( final AbstractBaseImage jrImage , final boolean skipImagesFolder )... | final StringBuilder sb = new StringBuilder ( ) ; if ( jrImage . path ( ) != null && ! jrImage . path ( ) . isEmpty ( ) ) { sb . append ( jrImage . path ( ) ) . append ( Resources . PATH_SEP ) ; } sb . append ( jrImage . name ( ) ) ; if ( jrImage . extension ( ) != null ) { sb . append ( jrImage . extension ( ) ) ; } re... |
public class CommonOps_DSCC { /** * Computes the minimum of each row in the input matrix and returns the results in a vector : < br >
* < br >
* b < sub > j < / sub > = min ( i = 1 : n ; a < sub > ji < / sub > )
* @ param input Input matrix
* @ param output Optional storage for output . Reshaped into a column v... | if ( output == null ) { output = new DMatrixRMaj ( input . numRows , 1 ) ; } else { output . reshape ( input . numRows , 1 ) ; } if ( gw == null ) gw = new IGrowArray ( input . numRows ) ; else { gw . reshape ( input . numRows ) ; Arrays . fill ( gw . data , 0 , input . numRows , 0 ) ; } Arrays . fill ( output . data ,... |
public class LogicBindings { /** * A boolean binding that is ` true ` only when all dependent observable boolean values
* are ` true ` .
* This can be useful in cases where the
* { @ link Bindings # and ( javafx . beans . value . ObservableBooleanValue , javafx . beans . value . ObservableBooleanValue ) }
* wit... | return Bindings . createBooleanBinding ( ( ) -> ! Arrays . stream ( values ) . filter ( observable -> ! observable . getValue ( ) ) . findAny ( ) . isPresent ( ) , values ) ; |
public class AbstractNGramExtractor { /** * Count tuples counter .
* @ param hString the h string
* @ return the counter */
public Counter < Tuple > countTuples ( @ NonNull HString hString ) { } } | return getValueCalculator ( ) . adjust ( Counters . newCounter ( streamTuples ( hString ) ) ) ; |
public class Options { /** * Create the options string sent with a connect message .
* If includeAuth is true the auth information is included :
* If the server URIs have auth info it is used . Otherwise the userInfo is used .
* @ param serverURI the current server uri
* @ param includeAuth tells the options to... | StringBuilder connectString = new StringBuilder ( ) ; connectString . append ( "{" ) ; appendOption ( connectString , Options . OPTION_LANG , Nats . CLIENT_LANGUAGE , true , false ) ; appendOption ( connectString , Options . OPTION_VERSION , Nats . CLIENT_VERSION , true , true ) ; if ( this . connectionName != null ) {... |
public class ShowCumulatedProducersAction { /** * Checks whether given decorator stat lines contain something besides cumulated stat .
* @ param decorator { @ link ProducerDecoratorBean } */
private boolean hasAnyStat ( ProducerDecoratorBean decorator ) { } } | for ( ProducerAO producer : decorator . getProducers ( ) ) { for ( StatLineAO line : producer . getLines ( ) ) { if ( ! CUMULATED_STAT_NAME_VALUE . equals ( line . getStatName ( ) ) ) { return true ; } } } return false ; |
public class AtomixAgent { /** * Configures and creates a new logger for the given namespace .
* @ param namespace the namespace from which to create the logger configuration
* @ return a new agent logger */
static Logger createLogger ( Namespace namespace ) { } } | String logConfig = namespace . getString ( "log_config" ) ; if ( logConfig != null ) { System . setProperty ( "logback.configurationFile" , logConfig ) ; } System . setProperty ( "atomix.log.directory" , namespace . getString ( "log_dir" ) ) ; System . setProperty ( "atomix.log.level" , namespace . getString ( "log_lev... |
public class AdminSysteminfoAction { @ Execute public HtmlResponse index ( ) { } } | return asHtml ( path_AdminSysteminfo_AdminSysteminfoJsp ) . renderWith ( data -> { registerEnvItems ( data ) ; registerPropItems ( data ) ; registerFessPropItems ( data ) ; registerBugReportItems ( data ) ; } ) ; |
public class GraphicalModel { /** * Add a binary factor , where we just want to hard - code the value of the factor .
* @ param a The index of the first variable .
* @ param b The index of the second variable .
* @ param value A mapping from assignments of the two variables , to a factor value .
* @ return a re... | int [ ] variableDims = getVariableSizes ( ) ; assert a < variableDims . length ; assert b < variableDims . length ; return addStaticFactor ( new int [ ] { a , b } , new int [ ] { variableDims [ a ] , variableDims [ b ] } , assignment -> value . apply ( assignment [ 0 ] , assignment [ 1 ] ) ) ; |
public class SourceInfoProtoFileParser { private void doCustomOption ( final CustomOptionContext ctx , final ParserRuleContext parentCtx ) { } } | locationBuilder . addLocation ( ) . setAllSpan ( parentCtx ) ; locationBuilder . addOptionLocation ( ) . setAllSpan ( parentCtx ) . comments ( parentCtx ) . addOptionNameLocation ( ) . setAllSpan ( ctx . customOptionName ( ) ) ; for ( final CustomOptionNamePartContext namePart : ctx . customOptionName ( ) . customOptio... |
public class Tile { /** * Defines the text size that will be used for the title ,
* subtitle and text in the different skins .
* @ param SIZE */
public void setTextSize ( final TextSize SIZE ) { } } | if ( null == textSize ) { _textSize = SIZE ; fireTileEvent ( REDRAW_EVENT ) ; } else { textSize . set ( SIZE ) ; } |
public class ConfigurationContext { /** * Usual extension registration from { @ link ru . vyarus . dropwizard . guice . GuiceBundle . Builder # extensions ( Class [ ] ) }
* or { @ link ru . vyarus . dropwizard . guice . module . installer . bundle . GuiceyBootstrap # extensions ( Class [ ] ) } .
* @ param extension... | for ( Class < ? > extension : extensions ) { register ( ConfigItem . Extension , extension ) ; } |
public class CPOptionUtil { /** * Returns the last cp option in the ordered set where uuid = & # 63 ; .
* @ param uuid the uuid
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the last matching cp option , or < code > null < / code > if a matching ... | return getPersistence ( ) . fetchByUuid_Last ( uuid , orderByComparator ) ; |
public class ContentSpecProcessor { /** * Does the post Validation step on a Content Spec .
* @ param processorData The data to be used during processing .
* @ return True if the content spec is valid . */
protected boolean doSecondValidationPass ( final ProcessorData processorData ) { } } | // Validate the content specification now that we have most of the data from the REST API
LOG . info ( "Starting second validation pass..." ) ; final ContentSpec contentSpec = processorData . getContentSpec ( ) ; return validator . postValidateContentSpec ( contentSpec , processorData . getUsername ( ) ) ; |
public class GroupElement { /** * Creates a new group element in PRECOMP representation .
* @ param curve The curve .
* @ param ypx The $ y + x $ value .
* @ param ymx The $ y - x $ value .
* @ param xy2d The $ 2 * d * x * y $ value .
* @ return The group element in PRECOMP representation . */
public static o... | return new org . mariadb . jdbc . internal . com . send . authentication . ed25519 . math . GroupElement ( curve , Representation . PRECOMP , ypx , ymx , xy2d , null ) ; |
public class TransmissionData { /** * Returns true iff this transmission is a user request .
* @ return Returns true iff this transmission is a user request . */
protected boolean isUserRequest ( ) { } } | if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isUserRequest" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isUserRequest" , "" + isUserRequest ) ; return isUserRequest ; |
public class Sources { /** * Gets a source that joins the given sources end to end .
* When closed , the returned source will ensure the wrapped sources are
* all closed .
* @ param sources the iterator of sources to join .
* @ param < T > the type .
* @ return the joined source . */
public static < T > Sourc... | return join ( Arrays . asList ( sources ) ) ; |
public class LogHelper { /** * Check if logging is enabled for the passed logger based on the error level
* provider by the passed object
* @ param aLogger
* The logger . May not be < code > null < / code > .
* @ param aErrorLevelProvider
* The error level provider . May not be < code > null < / code > .
* ... | return isEnabled ( aLogger , aErrorLevelProvider . getErrorLevel ( ) ) ; |
public class DefaultInputResolver { /** * Internal methods */
@ SuppressWarnings ( "resource" ) private static WstxInputSource sourceFromSS ( WstxInputSource parent , ReaderConfig cfg , String refName , int xmlVersion , StreamSource ssrc ) throws IOException , XMLStreamException { } } | InputBootstrapper bs ; Reader r = ssrc . getReader ( ) ; String pubId = ssrc . getPublicId ( ) ; String sysId0 = ssrc . getSystemId ( ) ; URL ctxt = ( parent == null ) ? null : parent . getSource ( ) ; URL url = ( sysId0 == null || sysId0 . length ( ) == 0 ) ? null : URLUtil . urlFromSystemId ( sysId0 , ctxt ) ; final ... |
public class LocationDBResourceStore { /** * / * ( non - Javadoc )
* @ see org . archive . wayback . ResourceStore # retrieveResource ( org . archive . wayback . core . SearchResult ) */
public Resource retrieveResource ( CaptureSearchResult result ) throws ResourceNotAvailableException { } } | // extract ARC filename
String fileName = result . getFile ( ) ; if ( fileName == null || fileName . length ( ) < 1 ) { throw new ResourceNotAvailableException ( "No ARC/WARC name in search result..." , fileName ) ; } String urls [ ] ; try { urls = db . nameToUrls ( fileName ) ; } catch ( IOException e1 ) { // e1 . pri... |
public class PrefsConfig { /** * Sets the value of the specified preference , overriding the value defined in the
* configuration files shipped with the application . */
public void setValue ( String name , float value ) { } } | Float oldValue = null ; if ( _prefs . get ( name , null ) != null || _props . getProperty ( name ) != null ) { oldValue = Float . valueOf ( _prefs . getFloat ( name , super . getValue ( name , 0f ) ) ) ; } _prefs . putFloat ( name , value ) ; _propsup . firePropertyChange ( name , oldValue , Float . valueOf ( value ) )... |
public class ElemForEach { /** * This function is called after everything else has been
* recomposed , and allows the template to set remaining
* values that may be based on some other property that
* depends on recomposition .
* NEEDSDOC @ param sroot
* @ throws TransformerException */
public void compose ( ... | super . compose ( sroot ) ; int length = getSortElemCount ( ) ; for ( int i = 0 ; i < length ; i ++ ) { getSortElem ( i ) . compose ( sroot ) ; } java . util . Vector vnames = sroot . getComposeState ( ) . getVariableNames ( ) ; if ( null != m_selectExpression ) m_selectExpression . fixupVariables ( vnames , sroot . ge... |
public class snmp_user { /** * < pre >
* Use this operation to modify SNMP User .
* < / pre > */
public static snmp_user update ( nitro_service client , snmp_user resource ) throws Exception { } } | resource . validate ( "modify" ) ; return ( ( snmp_user [ ] ) resource . update_resource ( client ) ) [ 0 ] ; |
public class Section { /** * This method will handle creating the tagId attribute . The tagId attribute indentifies the
* tag in the generated HTML . There is a lookup table created in JavaScript mapping the < coe > tagId < / code >
* to the actual name . The tagId is also run through the naming service so it can b... | assert ( _name != null ) ; // @ todo : this is busted . It should be writing out inline .
String realName = rewriteName ( _name ) ; String idScript = mapLegacyTagId ( _name , realName ) ; // some tags will output the id attribute themselves so they don ' t write this out
renderAttribute ( buffer , "id" , realName ) ; r... |
public class ASTHelpers { /** * Returns the target type of the tree at the given { @ link VisitorState } ' s path , or else { @ code
* null } .
* < p > For example , the target type of an assignment expression is the variable ' s type , and the
* target type of a return statement is the enclosing method ' s type ... | if ( ! ( state . getPath ( ) . getLeaf ( ) instanceof ExpressionTree ) ) { return null ; } TreePath parent = state . getPath ( ) ; ExpressionTree current ; do { current = ( ExpressionTree ) parent . getLeaf ( ) ; parent = parent . getParentPath ( ) ; } while ( parent != null && parent . getLeaf ( ) . getKind ( ) == Kin... |
public class CommandFactory { /** * This command accelerates the ball with the given power in the given direction .
* @ param power Power is between minpower ( - 100 ) and maxpower ( + 100 ) .
* @ param direction Direction is relative to the body of the player . */
public void addKickCommand ( int power , int direc... | StringBuilder buf = new StringBuilder ( ) ; buf . append ( "(kick " ) ; buf . append ( power ) ; buf . append ( ' ' ) ; buf . append ( direction ) ; buf . append ( ')' ) ; fifo . add ( fifo . size ( ) , buf . toString ( ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.