signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ListStackSetOperationsResult { /** * A list of < code > StackSetOperationSummary < / code > structures that contain summary information about operations for
* the specified stack set .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setSummarie... | if ( this . summaries == null ) { setSummaries ( new com . amazonaws . internal . SdkInternalList < StackSetOperationSummary > ( summaries . length ) ) ; } for ( StackSetOperationSummary ele : summaries ) { this . summaries . add ( ele ) ; } return this ; |
public class MavenDependencies { /** * Creates a new { @ link MavenDependencyExclusion } instance from the specified , required arguments
* @ param groupId A groupId of the new { @ link MavenDependencyExclusion } instance .
* @ param artifactId An artifactId of the new { @ link MavenDependencyExclusion } instance .... | if ( groupId == null || groupId . length ( ) == 0 ) { throw new IllegalArgumentException ( "groupId must be specified" ) ; } if ( artifactId == null || artifactId . length ( ) == 0 ) { throw new IllegalArgumentException ( "groupId must be specified" ) ; } final MavenDependencyExclusion exclusion = new MavenDependencyEx... |
public class Ui { /** * Get Background color if the attr is color value
* @ param context Context
* @ param attrs AttributeSet
* @ return Color */
public static int getBackgroundColor ( Context context , AttributeSet attrs ) { } } | int color = Color . TRANSPARENT ; if ( isHaveAttribute ( attrs , "background" ) ) { int styleId = attrs . getStyleAttribute ( ) ; int [ ] attributesArray = new int [ ] { android . R . attr . background } ; try { TypedArray typedArray = context . obtainStyledAttributes ( styleId , attributesArray ) ; if ( typedArray . l... |
public class RedisClusterClient { /** * Connect asynchronously to a Redis Cluster using pub / sub connections . Use the supplied { @ link RedisCodec codec } to
* encode / decode keys and values . Connecting asynchronously requires an initialized topology . Call { @ link # getPartitions ( ) }
* first , otherwise the... | return transformAsyncConnectionException ( connectClusterPubSubAsync ( codec ) , getInitialUris ( ) ) ; |
public class DateUtils { /** * Converts a { @ code Date } into a { @ code Calendar } .
* @ param date the date to convert to a Calendar
* @ return the created Calendar
* @ throws NullPointerException if null is passed in
* @ since 3.0 */
public static Calendar toCalendar ( final Date date ) { } } | final Calendar c = Calendar . getInstance ( ) ; c . setTime ( date ) ; return c ; |
public class DFAs { /** * Calculates the complement ( negation ) of a DFA , and returns the result as a new DFA .
* Note that unlike { @ link MutableDFA # flipAcceptance ( ) } , undefined transitions are treated as leading to a rejecting
* sink state ( and are thus turned into an accepting sink ) .
* @ param dfa ... | return complement ( dfa , inputAlphabet , new CompactDFA < > ( inputAlphabet ) ) ; |
public class AcceptHeaders { /** * Gets the strings from a comma - separated list .
* All " * " entries are replaced with { @ code null } keys .
* @ param header the header value .
* @ return the listed items in order of appearance or { @ code null } if the header didn ' t contain any entries . */
public static M... | if ( header == null ) return null ; header = header . trim ( ) ; if ( header . length ( ) == 0 ) return null ; Map < String , QualityValue > result = new LinkedHashMap < String , QualityValue > ( ) ; int offset = 0 ; while ( true ) { int endIndex = header . indexOf ( ',' , offset ) ; String content ; if ( endIndex < 0 ... |
public class WaitQueue { /** * The calling thread MUST be the thread that uses the signal .
* If the Signal is waited on , context . stop ( ) will be called when the wait times out , the Signal is signalled ,
* or the waiting thread is interrupted .
* @ return */
public Signal register ( TimerContext context ) { ... | assert context != null ; RegisteredSignal signal = new TimedSignal ( context ) ; queue . add ( signal ) ; return signal ; |
public class Constants { /** * Returns the value of the system property
* { @ link SDKGlobalConfiguration # DEFAULT _ S3 _ STREAM _ BUFFER _ SIZE } as an
* Integer ; or null if not set . This method exists for backward
* compatibility reasons . */
public static Integer getS3StreamBufferSize ( ) { } } | String s = System . getProperty ( SDKGlobalConfiguration . DEFAULT_S3_STREAM_BUFFER_SIZE ) ; if ( s == null ) return null ; try { return Integer . valueOf ( s ) ; } catch ( Exception e ) { log . warn ( "Unable to parse buffer size override from value: " + s ) ; } return null ; |
public class ClassObj { /** * This returns an ordered list of the Predicates which underly the class ' s
* MethodObjs , with no duplicate elements . This is valuable because a single
* predicate may be the basis for multiple MethodObjs ( getters , setters , etc . )
* @ return */
public List < KbPredicate > getMet... | Set < KbPredicate > set = new HashSet < KbPredicate > ( ) ; for ( MethodObj method : getMethods ( ) ) { set . add ( method . getPredicate ( ) ) ; } List < KbPredicate > list = new ArrayList ( set ) ; Collections . sort ( list , new Comparator < KbPredicate > ( ) { @ Override public int compare ( KbPredicate o1 , KbPred... |
public class CertificateManager { /** * This method decodes a PKCS12 format key store from its encrypted byte stream .
* @ param base64String The base 64 encoded , password encrypted PKCS12 byte stream .
* @ param password The password that was used to encrypt the byte stream .
* @ return The PKCS12 format key st... | logger . entry ( ) ; byte [ ] bytes = Base64Utils . decode ( base64String ) ; try ( ByteArrayInputStream in = new ByteArrayInputStream ( bytes ) ) { KeyStore keyStore = KeyStore . getInstance ( KEY_STORE_FORMAT ) ; keyStore . load ( in , password ) ; logger . exit ( ) ; return keyStore ; } catch ( IOException | KeyStor... |
public class OHCacher { /** * - - - IMPLEMENTED CACHE METHODS - - - */
@ Override public Promise get ( String key ) { } } | try { byte [ ] bytes = cache . get ( keyToBytes ( key ) ) ; if ( bytes != null ) { return Promise . resolve ( bytesToValue ( bytes ) ) ; } } catch ( Throwable cause ) { logger . warn ( "Unable to read data from off-heap cache!" , cause ) ; } return Promise . resolve ( ( Object ) null ) ; |
public class FileUtil { /** * Finds a free file ( i . e non - existing ) in specified directory , using specified pattern .
* for example :
* findFreeFile ( myDir , " sample $ { i } . xml " , false )
* will search for free file in order :
* sample1 . xml , sample2 . xml , sample3 . xml and so on
* if tryEmpty... | String name = StringUtil . suggest ( new Filter < String > ( ) { @ Override public boolean select ( String name ) { return ! new File ( dir , name ) . exists ( ) ; } } , pattern , tryEmptyVar ) ; return new File ( dir , name ) ; |
public class BaseProxySelector { /** * { @ inheritDoc } */
@ Override public void connectFailed ( final URI uri , final SocketAddress sa , final IOException ioe ) { } } | if ( uri == null || sa == null || ioe == null ) { throw new IllegalArgumentException ( "Arguments can not be null." ) ; } final ProxyDecorator p = proxies . get ( sa ) ; if ( p != null ) { if ( p . failed ( ) >= 3 ) { proxies . remove ( sa ) ; } } else { if ( defaultSelector != null ) { defaultSelector . connectFailed ... |
public class ProgramHelper { /** * Calls a program and returns any output generated .
* @ param response details of what to invoke ( output will be added ) .
* @ param timeout maximum time ( in milliseconds ) for program execution . */
public void execute ( ProgramResponse response , int timeout ) { } } | ProcessBuilder builder = createProcessBuilder ( response ) ; invokeProgram ( builder , response , timeout ) ; |
public class PrettyTimeFormat { /** * Convenience format method .
* @ param ref
* The date of reference .
* @ param then
* The future date .
* @ return a relative format date as text representation */
public String format ( Date ref , Date then ) { } } | return prettyTime . format ( DurationHelper . calculateDuration ( ref , then , prettyTime . getUnits ( ) ) ) ; |
public class X509CRLImpl { /** * return the DeltaCRLIndicatorExtension , if any .
* @ returns DeltaCRLIndicatorExtension or null ( if no such extension )
* @ throws IOException on error */
public DeltaCRLIndicatorExtension getDeltaCRLIndicatorExtension ( ) throws IOException { } } | Object obj = getExtension ( PKIXExtensions . DeltaCRLIndicator_Id ) ; return ( DeltaCRLIndicatorExtension ) obj ; |
public class QuadTree { /** * Returns the cell of this element
* @ param coordinates
* @ return */
protected QuadTree findIndex ( INDArray coordinates ) { } } | // Compute the sector for the coordinates
boolean left = ( coordinates . getDouble ( 0 ) <= ( boundary . getX ( ) + boundary . getHw ( ) / 2 ) ) ; boolean top = ( coordinates . getDouble ( 1 ) <= ( boundary . getY ( ) + boundary . getHh ( ) / 2 ) ) ; // top left
QuadTree index = getNorthWest ( ) ; if ( left ) { // left... |
public class JcrStorageDao { /** * TODO remove */
public DataSource [ ] getDataSources ( ) { } } | Entity [ ] entities ; try { entities = getEntitiesByClassName ( StorageConstants . DATASOURCES_ROOT , DataSource . class . getName ( ) ) ; } catch ( NotFoundException e ) { // never happening
throw new RuntimeException ( e ) ; } DataSource [ ] dataSources = new DataSource [ entities . length ] ; System . arraycopy ( en... |
public class WTree { /** * Map item ids to the row index .
* @ param expandedOnly include expanded only
* @ return the map of item ids to their row index . */
private Map < String , List < Integer > > createItemIdIndexMap ( final boolean expandedOnly ) { } } | Map < String , List < Integer > > map = new HashMap < > ( ) ; TreeItemModel treeModel = getTreeModel ( ) ; int rows = treeModel . getRowCount ( ) ; Set < String > expanded = null ; WTree . ExpandMode mode = getExpandMode ( ) ; if ( expandedOnly ) { expanded = getExpandedRows ( ) ; if ( mode == WTree . ExpandMode . LAZY... |
public class TableSawQuandlSession { /** * Create a Quandl session with detailed SessionOptions . No attempt will be made to read the java property < em > quandl . auth . token < / em > even
* if available . Note creating this object does not make any actual API requests , the token is used in subsequent requests .
... | ArgumentChecker . notNull ( sessionOptions , "sessionOptions" ) ; ArgumentChecker . notNull ( restDataProvider , "restDataProvider" ) ; return new TableSawQuandlSession ( sessionOptions , restDataProvider , new ClassicMetaDataPackager ( ) ) ; |
public class NewJFrame { /** * Validate and set the datetime field on the screen given a date .
* @ param dateTime The datetime object */
public void setDateTime ( Date dateTime ) { } } | String dateTimeString = "" ; if ( dateTime != null ) dateTimeString = dateTimeFormat . format ( dateTime ) ; jTextField4 . setText ( dateTimeString ) ; |
public class Builder { /** * Add the exceptions to ignore / retry - on .
* @ param exceptions retry should continue when such exceptions are thrown
* @ return the Builder for chaining */
@ SafeVarargs public final Builder retryOn ( Class < ? extends Exception > ... exceptions ) { } } | for ( Class < ? extends Exception > exception : exceptions ) { retriableExceptions . add ( checkNotNull ( exception ) ) ; } return this ; |
public class Attributes { /** * / * [ deutsch ]
* < p > Erzeugt einen neuen Attributschl & uuml ; ssel . < / p >
* @ param < A > generic immutable type of attribute value
* @ param name name of attribute
* @ param type type of attribute
* @ return new attribute key
* @ since 3.13/4.10 */
public static < A >... | return PredefinedKey . valueOf ( name , type ) ; |
public class MonitoringController { /** * jmxValue = x | y | z pourra aussi être utilisé par munin notamment */
private void doJmxValue ( HttpServletResponse httpResponse , String jmxValueParameter ) throws IOException { } } | httpResponse . setContentType ( "text/plain" ) ; httpResponse . getWriter ( ) . write ( MBeans . getConvertedAttributes ( jmxValueParameter ) ) ; httpResponse . flushBuffer ( ) ; |
public class MDAGMap { /** * 前缀查询
* @ param key
* @ return */
public LinkedList < Entry < String , V > > commonPrefixSearchWithValue ( String key ) { } } | return commonPrefixSearchWithValue ( key . toCharArray ( ) , 0 ) ; |
public class AbstractJsonDeserializer { /** * Convenience method for subclasses .
* @ param paramName the name of the parameter
* @ param errorMessage the errormessage to add to the exception if the param does not exist .
* @ param mapToUse The map to use as inputsource for parameters . Should not be null .
* @... | Boolean result = getTypedParam ( paramName , errorMessage , Boolean . class , mapToUse ) ; if ( result == null ) { String s = getTypedParam ( paramName , errorMessage , String . class , mapToUse ) ; if ( s != null ) { return Boolean . parseBoolean ( s ) ; } } return result ; |
public class SmoothieMap { /** * If the specified key is not already associated with a value ( or is mapped to { @ code null } ) ,
* attempts to compute its value using the given mapping function and enters it into this map
* unless { @ code null } .
* < p > If the function returns { @ code null } no mapping is r... | if ( mappingFunction == null ) throw new NullPointerException ( ) ; long hash ; return segment ( segmentIndex ( hash = keyHashCode ( key ) ) ) . computeIfAbsent ( this , hash , key , mappingFunction ) ; |
public class NodeUtil { /** * Determines whether the given name can appear on the right side of the dot operator . Many
* properties ( like reserved words ) cannot , in ES3. */
static boolean isValidPropertyName ( FeatureSet mode , String name ) { } } | if ( isValidSimpleName ( name ) ) { return true ; } else { return mode . has ( Feature . KEYWORDS_AS_PROPERTIES ) && TokenStream . isKeyword ( name ) ; } |
public class XMLUtil { /** * Write an enumeration value .
* @ param < T > is the type of the enumeration .
* @ param document is the XML document to explore .
* @ param type is the type of the enumeration .
* @ param value is the value to put in the document .
* @ param path is the list of and ended by the at... | assert document != null : AssertMessages . notNullParameter ( 0 ) ; return setAttributeEnum ( document , type , true , value , path ) ; |
public class RpcProtocolVersionsUtil { /** * Returns true if first Rpc Protocol Version is greater than or equal to the second one . Returns
* false otherwise . */
@ VisibleForTesting static boolean isGreaterThanOrEqualTo ( Version first , Version second ) { } } | if ( ( first . getMajor ( ) > second . getMajor ( ) ) || ( first . getMajor ( ) == second . getMajor ( ) && first . getMinor ( ) >= second . getMinor ( ) ) ) { return true ; } return false ; |
public class ThreadPoolJobManager { /** * Called by spring after constructing the java bean . */
@ PostConstruct public final void init ( ) { } } | long timeToKeepAfterAccessInMillis = this . jobQueue . getTimeToKeepAfterAccessInMillis ( ) ; if ( timeToKeepAfterAccessInMillis >= 0 ) { if ( TimeUnit . SECONDS . toMillis ( this . abandonedTimeout ) >= this . jobQueue . getTimeToKeepAfterAccessInMillis ( ) ) { final String msg = String . format ( "%s abandonTimeout m... |
public class HttpInputStream { /** * Returns the number of bytes that can be read without blocking .
* @ return the number of available bytes
* @ exception IOException if an I / O error has occurred */
public int available ( ) throws IOException { } } | // PK79219 start
long longLeft = limit - total ; if ( longLeft > Integer . MAX_VALUE ) return ( ( count - pos ) + in . available ( ) ) ; else return Math . min ( ( count - pos ) + in . available ( ) , ( int ) longLeft ) ; // PK79219 end |
public class Beta { /** * Inverse of regularized incomplete beta function . */
public static double inverseRegularizedIncompleteBetaFunction ( double alpha , double beta , double p ) { } } | final double EPS = 1.0E-8 ; double pp , t , u , err , x , al , h , w , afac ; double a1 = alpha - 1. ; double b1 = beta - 1. ; if ( p <= 0.0 ) { return 0.0 ; } if ( p >= 1.0 ) { return 1.0 ; } if ( alpha >= 1. && beta >= 1. ) { pp = ( p < 0.5 ) ? p : 1. - p ; t = Math . sqrt ( - 2. * Math . log ( pp ) ) ; x = ( 2.30753... |
public class RestUriVariablesFactory { /** * Returns the uri variables needed for a " query " request
* @ param entityInfo
* @ param where
* @ param fieldSet
* @ param params
* @ return all uriVariables needed for the api call */
public Map < String , String > getUriVariablesForQuery ( BullhornEntityInfo enti... | Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; uriVariables . put ( WHERE , where ) ; return uriVariables ; |
public class StatsValues { /** * Helper method to parse string representation
* of value item to number or boolean type
* @ param value string representation of value item
* @ return parsed value item */
private Object parseValue ( String value ) { } } | // Try to parse value as number
try { return Double . valueOf ( value ) ; } catch ( NumberFormatException ignored ) { } if ( value . equals ( "true" ) || value . equals ( "false" ) ) return Boolean . valueOf ( value ) ; throw new IllegalArgumentException ( "Only number or boolean stats values allowed" ) ; |
public class HealthPinger { /** * Helper method to perform the proper health conversion .
* @ param input the response input
* @ return the converted output . */
private static Observable < PingServiceHealth > mapToServiceHealth ( final String scope , final ServiceType type , final Observable < ? extends CouchbaseR... | return input . map ( new Func1 < CouchbaseResponse , PingServiceHealth > ( ) { @ Override public PingServiceHealth call ( CouchbaseResponse response ) { DiagnosticRequest request = ( DiagnosticRequest ) response . request ( ) ; String id = "0x" + Integer . toHexString ( request . localSocket ( ) . hashCode ( ) ) ; retu... |
public class GoogleGeoCoder { /** * { @ inheritDoc } */
@ Override public GeocodingResult [ ] geocode ( final String placeName ) { } } | logger . debug ( "Querying Google APIs for place: " + placeName ) ; final GeoApiContext context = new GeoApiContext . Builder ( ) . apiKey ( key ) . build ( ) ; GeocodingResult [ ] results ; try { results = GeocodingApi . geocode ( context , placeName ) . await ( ) ; } catch ( Exception e ) { logger . error ( "Problem ... |
public class YarnRegistryViewForProviders { /** * Get the absolute path to where the service has registered itself .
* This includes the base registry path
* Null until the service is registered
* @ return the service registration path . */
public String getAbsoluteSelfRegistrationPath ( ) { } } | if ( selfRegistrationPath == null ) { return null ; } String root = registryOperations . getConfig ( ) . getTrimmed ( RegistryConstants . KEY_REGISTRY_ZK_ROOT , RegistryConstants . DEFAULT_ZK_REGISTRY_ROOT ) ; return RegistryPathUtils . join ( root , selfRegistrationPath ) ; |
public class Util { /** * Join several objects into a string */
static < T > String join ( Iterable < T > elems , String delim ) { } } | if ( elems == null ) return "" ; StringBuilder result = new StringBuilder ( ) ; for ( T elem : elems ) result . append ( elem ) . append ( delim ) ; if ( result . length ( ) > 0 ) result . setLength ( result . length ( ) - delim . length ( ) ) ; return result . toString ( ) ; |
public class ModuleAssets { /** * Process an Asset .
* @ param asset Asset
* @ param locale Locale
* @ return integer representing the success ( 204 = no content ) of processing
* @ throws IllegalArgumentException if asset is null .
* @ throws IllegalArgumentException if asset has no id .
* @ throws Illegal... | assertNotNull ( asset , "asset" ) ; final String assetId = getResourceIdOrThrow ( asset , "asset" ) ; final String spaceId = getSpaceIdOrThrow ( asset , "asset" ) ; final String environmentId = asset . getEnvironmentId ( ) ; return service . process ( spaceId , environmentId , assetId , locale ) . blockingFirst ( ) . c... |
public class AbstractFedoraBinary { /** * ( non - Javadoc )
* @ see org . fcrepo . kernel . api . models . FedoraBinary # setProxyURL ( ) */
@ Override public void setProxyURL ( final String url ) throws RepositoryRuntimeException { } } | try { getNode ( ) . setProperty ( PROXY_FOR , url ) ; // clear redirect property , in case it used to be a redirect
getNode ( ) . setProperty ( REDIRECTS_TO , ( Value ) null ) ; } catch ( final RepositoryException e ) { throw new RepositoryRuntimeException ( e ) ; } |
public class Datatype_Builder { /** * Replaces the value to be returned by { @ link Datatype # getHasToBuilderMethod ( ) } by applying
* { @ code mapper } to it and using the result .
* @ return this { @ code Builder } object
* @ throws NullPointerException if { @ code mapper } is null or returns null
* @ throw... | Objects . requireNonNull ( mapper ) ; return setHasToBuilderMethod ( mapper . apply ( getHasToBuilderMethod ( ) ) ) ; |
public class ProxyBranchImpl { /** * Call this method when a subsequent request must be proxied through the branch .
* @ param request */
public void proxySubsequentRequest ( MobicentsSipServletRequest sipServletRequest ) { } } | SipServletRequestImpl request = ( SipServletRequestImpl ) sipServletRequest ; MobicentsSipServletResponse lastFinalResponse = ( MobicentsSipServletResponse ) request . getLastFinalResponse ( ) ; if ( lastFinalResponse != null && lastFinalResponse . isMessageSent ( ) ) { // https : / / code . google . com / p / sipservl... |
public class AddOnWrapper { /** * Sets the issues that the wrapped add - on or its extensions might have that prevent them from being run .
* The contents should be in HTML .
* @ param runningIssues the running issues of the add - on or its extensions , empty if there ' s no issues .
* @ param addOnIssues { @ cod... | Validate . notNull ( runningIssues , "Parameter runningIssues must not be null." ) ; this . runningIssues = runningIssues ; this . addOnRunningIssues = addOnIssues ; |
public class WaiterList { /** * Adds waiter to queue and waits until releaseAll method call or thread is
* interrupted .
* @ param waiter
* @ return */
public Reason wait ( T waiter ) { } } | return wait ( waiter , Long . MAX_VALUE , TimeUnit . MILLISECONDS ) ; |
public class JarDiffHandler { /** * so it can be used to generate jardiff */
private String getRealPath ( String path ) throws IOException { } } | URL fileURL = _servletContext . getResource ( path ) ; File tempDir = ( File ) _servletContext . getAttribute ( "javax.servlet.context.tempdir" ) ; // download file into temp dir
if ( fileURL != null ) { File newFile = File . createTempFile ( "temp" , ".jar" , tempDir ) ; if ( download ( fileURL , newFile ) ) { String ... |
public class ConditionEvaluationReport { /** * Attempt to find the { @ link ConditionEvaluationReport } for the specified bean
* factory .
* @ param beanFactory the bean factory ( may be { @ code null } )
* @ return the { @ link ConditionEvaluationReport } or { @ code null } */
public static ConditionEvaluationRe... | if ( beanFactory != null && beanFactory instanceof ConfigurableBeanFactory ) { return ConditionEvaluationReport . get ( ( ConfigurableListableBeanFactory ) beanFactory ) ; } return null ; |
public class InChITautomerGenerator { /** * Public method to get tautomers for an input molecule , based on the InChI which will be calculated by JNI - InChI .
* @ param mol molecule for which to generate tautomers
* @ return a list of tautomers , if any
* @ throws CDKException
* @ throws CloneNotSupportedExcep... | String opt = "" ; if ( ( flags & KETO_ENOL ) != 0 ) opt += " -KET" ; if ( ( flags & ONE_FIVE_SHIFT ) != 0 ) opt += " -15T" ; InChIGenerator gen = InChIGeneratorFactory . getInstance ( ) . getInChIGenerator ( mol , opt ) ; String inchi = gen . getInchi ( ) ; String aux = gen . getAuxInfo ( ) ; long [ ] amap = new long [... |
public class AuthyClientInstance { /** * Gets or create user .
* @ param principal the principal
* @ return the or create user */
@ SneakyThrows public User getOrCreateUser ( final Principal principal ) { } } | val attributes = principal . getAttributes ( ) ; if ( ! attributes . containsKey ( this . mailAttribute ) ) { throw new IllegalArgumentException ( "No email address found for " + principal . getId ( ) ) ; } if ( ! attributes . containsKey ( this . phoneAttribute ) ) { throw new IllegalArgumentException ( "No phone numb... |
public class IfmapJ { /** * Create a new { @ link SSRC } object to operate on the given configuration
* using basic authentication .
* @ param config
* the configuration parameter for the new SSRC
* @ return a new { @ link SSRC } that uses basic authentication
* @ throws InitializationException
* if the SSR... | TrustManager [ ] trustManagers = IfmapJHelper . getTrustManagers ( config . trustStorePath , config . trustStorePassword ) ; SSRC ssrc = new SsrcImpl ( config . url , config . username , config . password , trustManagers , config . initialConnectionTimeout ) ; if ( config . threadSafe ) { return new ThreadSafeSsrc ( ss... |
public class AbstractClient { /** * Tries to execute an RPC defined as a { @ link RpcCallable } . Metrics will be recorded based on
* the provided rpc name .
* If a { @ link UnavailableException } occurs , a reconnection will be tried through
* { @ link # connect ( ) } and the action will be re - executed .
* @... | try ( Timer . Context ctx = MetricsSystem . timer ( getQualifiedMetricName ( rpcName ) ) . time ( ) ) { return retryRPCInternal ( rpc , ( ) -> { MetricsSystem . counter ( getQualifiedRetryMetricName ( rpcName ) ) . inc ( ) ; return null ; } ) ; } catch ( Exception e ) { MetricsSystem . counter ( getQualifiedFailureMetr... |
public class WSRdbSpiLocalTransactionImpl { /** * Rollback a local transaction
* @ exception ResourceException - Possible causes for this exception are :
* 1 ) if there is no transaction active that can be rolledback
* 2 ) rollback was called from an invalid transaction state */
public void rollback ( ) throws Re... | if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "rollback" , ivMC ) ; // if the MC marked Stale , it means the user requested a purge pool with an immediate option
// so don ' t allow any work on the mc
if ( ivMC . _mcStale ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale" ) ; throw new ... |
public class SentryAppender { /** * Transforms a { @ link Level } into an { @ link Event . Level } .
* @ param level original level as defined in logback .
* @ return log level used within sentry . */
protected static Event . Level formatLevel ( Level level ) { } } | if ( level . isGreaterOrEqual ( Level . ERROR ) ) { return Event . Level . ERROR ; } else if ( level . isGreaterOrEqual ( Level . WARN ) ) { return Event . Level . WARNING ; } else if ( level . isGreaterOrEqual ( Level . INFO ) ) { return Event . Level . INFO ; } else if ( level . isGreaterOrEqual ( Level . ALL ) ) { r... |
public class TypedValue { /** * Get UTF - 8 byte array from int . The given byte array yields a string
* representation if read with parseString ( ) .
* @ param mValue
* Int to encode as UTF - 8 byte array .
* @ return UTF - 8 - encoded byte array of int . */
public static byte [ ] getBytes ( final int mValue )... | final byte [ ] tmpBytes = new byte [ 5 ] ; int position = 0 ; tmpBytes [ position ++ ] = ( byte ) ( mValue ) ; if ( mValue > 63 || mValue < - 64 ) { tmpBytes [ position - 1 ] |= 128 ; tmpBytes [ position ++ ] = ( byte ) ( mValue >> 7 ) ; if ( mValue > 8191 || mValue < - 8192 ) { tmpBytes [ position - 1 ] |= 128 ; tmpBy... |
public class CmsSiteManagerImpl { /** * Checks whether a given root path is a site root . < p >
* @ param rootPath a root path
* @ return true if the given path is the path of a site root */
public boolean isSiteRoot ( String rootPath ) { } } | String siteRoot = getSiteRoot ( rootPath ) ; rootPath = CmsStringUtil . joinPaths ( rootPath , "/" ) ; return rootPath . equals ( siteRoot ) ; |
public class MutableRoaringBitmap { /** * If present remove the specified integers ( effectively , sets its bit value to false )
* @ param x integer value representing the index in a bitmap */
@ Override public void remove ( final int x ) { } } | final short hb = BufferUtil . highbits ( x ) ; final int i = highLowContainer . getIndex ( hb ) ; if ( i < 0 ) { return ; } getMappeableRoaringArray ( ) . setContainerAtIndex ( i , highLowContainer . getContainerAtIndex ( i ) . remove ( BufferUtil . lowbits ( x ) ) ) ; if ( highLowContainer . getContainerAtIndex ( i ) ... |
public class ChartComputator { /** * Translates chart value into raw pixel value . Returned value is absolute pixel X coordinate . If this method
* return
* 0 that means left most pixel of the screen . */
public float computeRawX ( float valueX ) { } } | // TODO : ( contentRectMinusAllMargins . width ( ) / currentViewport . width ( ) ) can be recalculated only when viewport
// change .
final float pixelOffset = ( valueX - currentViewport . left ) * ( contentRectMinusAllMargins . width ( ) / currentViewport . width ( ) ) ; return contentRectMinusAllMargins . left + pixe... |
public class MessagingContext { /** * Builds a list of messaging contexts .
* @ param domain the domain
* @ param applicationName the name of the agent ' s application
* @ param instance the current instance
* @ param thoseThat whether we target " those that import " or " those that export "
* @ return a non ... | Map < String , MessagingContext > result = new HashMap < > ( ) ; for ( ImportedVariable var : ComponentHelpers . findAllImportedVariables ( instance . getComponent ( ) ) . values ( ) ) { String componentOrApplicationTemplateName = VariableHelpers . parseVariableName ( var . getName ( ) ) . getKey ( ) ; if ( result . co... |
public class JSONUtil { /** * JSON字符串转为实体类对象 , 转换异常将被抛出
* @ param < T > Bean类型
* @ param jsonString JSON字符串
* @ param beanType 实体类对象类型
* @ return 实体类对象
* @ since 4.3.2 */
public static < T > T toBean ( String jsonString , Type beanType , boolean ignoreError ) { } } | return toBean ( parseObj ( jsonString ) , beanType , ignoreError ) ; |
public class EventHandlerCache { /** * returns the cached path - based external event
* @ param bucket
* @ return Cached Item */
public static List < ExternalEvent > getPathExternalEvents ( String bucket ) { } } | if ( myPathCache . get ( bucket ) != null ) return myPathCache . get ( bucket ) ; else if ( bucket . indexOf ( '/' ) > 0 ) { // We could have a sub - path
return getPathExternalEvents ( bucket . substring ( 0 , bucket . lastIndexOf ( '/' ) ) ) ; } return null ; |
public class FastMath { /** * Sine function .
* @ param x Argument .
* @ return sin ( x ) */
public static double sin ( double x ) { } } | boolean negative = false ; int quadrant = 0 ; double xa ; double xb = 0.0 ; /* Take absolute value of the input */
xa = x ; if ( x < 0 ) { negative = true ; xa = - xa ; } /* Check for zero and negative zero */
if ( xa == 0.0 ) { long bits = Double . doubleToLongBits ( x ) ; if ( bits < 0 ) { return - 0.0 ; } return 0.0... |
public class MediaManagementApi { /** * Release the snapshot
* Release the snapshot specified .
* @ param snapshotId Id of the snapshot ( required )
* @ param releaseSnapshotBody ( optional )
* @ return ApiSuccessResponse
* @ throws ApiException If fail to call the API , e . g . server error or cannot deseria... | ApiResponse < ApiSuccessResponse > resp = releaseSnapshotWithHttpInfo ( snapshotId , releaseSnapshotBody ) ; return resp . getData ( ) ; |
public class Table { /** * To put a table within the existing table at the given position
* generateTable will of course re - arrange the widths of the columns .
* @ param aTable the table you want to insert
* @ param aLocation a < CODE > Point < / CODE > */
public void insertTable ( Table aTable , Point aLocatio... | if ( aTable == null ) { throw new NullPointerException ( "insertTable - table has null-value" ) ; } if ( aLocation == null ) { throw new NullPointerException ( "insertTable - point has null-value" ) ; } mTableInserted = true ; aTable . complete ( ) ; if ( aLocation . y > columns ) { throw new IllegalArgumentException (... |
public class CmsImportExportManager { /** * Sets whether colliding resources should be overwritten during the import for a
* specified import implementation . < p >
* v1 and v2 imports ( without resource UUIDs in the manifest ) * MUST * overwrite colliding
* resources . Don ' t forget to set this flag back to it ... | if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_IMPORTEXPORT_SET_OVERWRITE_PARAMETER_1 , Boolean . toString ( overwriteCollidingResources ) ) ) ; } m_overwriteCollidingResources = overwriteCollidingResources ; |
public class StereoTool { /** * Gets the tetrahedral handedness of four atoms - three of which form the
* ' base ' of the tetrahedron , and the other the apex . Note that it assumes
* a right - handed coordinate system , and that the points { A , B , C } are in
* a counter - clockwise order in the plane they shar... | Point3d pointA = baseAtomA . getPoint3d ( ) ; Point3d pointB = baseAtomB . getPoint3d ( ) ; Point3d pointC = baseAtomC . getPoint3d ( ) ; Point3d pointD = apexAtom . getPoint3d ( ) ; return StereoTool . getHandedness ( pointA , pointB , pointC , pointD ) ; |
public class InfinispanCache { /** * An advanced cache that does not return the value of the previous value in
* case of replacement .
* @ param _ cacheName cache wanted
* @ param < K > Key
* @ param < V > Value
* @ return an AdvancedCache from Infinispan with Ignore return values */
public < K , V > Advanced... | return this . container . < K , V > getCache ( _cacheName , true ) . getAdvancedCache ( ) . withFlags ( Flag . IGNORE_RETURN_VALUES , Flag . SKIP_REMOTE_LOOKUP , Flag . SKIP_CACHE_LOAD ) ; |
public class RMQSink { /** * Called when new data arrives to the sink , and forwards it to RMQ .
* @ param value
* The incoming data */
@ Override public void invoke ( IN value ) { } } | try { byte [ ] msg = schema . serialize ( value ) ; if ( publishOptions == null ) { channel . basicPublish ( "" , queueName , null , msg ) ; } else { boolean mandatory = publishOptions . computeMandatory ( value ) ; boolean immediate = publishOptions . computeImmediate ( value ) ; Preconditions . checkState ( ! ( retur... |
public class DZcs_print { /** * Prints a sparse matrix .
* @ param A
* sparse matrix ( triplet ot column - compressed )
* @ param brief
* print all of A if false , a few entries otherwise
* @ return true if successful , false on error */
public static boolean cs_print ( DZcs A , boolean brief , OutputStream o... | int p , j , m , n , nzmax , nz , Ap [ ] , Ai [ ] ; DZcsa Ax = new DZcsa ( ) ; PrintStream out = new PrintStream ( output ) ; if ( A == null ) { out . print ( "(null)\n" ) ; return ( false ) ; } m = A . m ; n = A . n ; Ap = A . p ; Ai = A . i ; Ax . x = A . x ; nzmax = A . nzmax ; nz = A . nz ; /* out . printf ( " CXSpa... |
public class ApiBuilder { public static void sse ( @ NotNull String path , @ NotNull Consumer < SseClient > client ) { } } | staticInstance ( ) . sse ( prefixPath ( path ) , client ) ; |
public class AliasDestinationImpl { /** * Returns the appropriate destination reliability based out of SIBDestinationReliabilityType
* @ param reliability
* @ return */
private String getDestinationReliability ( String reliability ) { } } | String rel = null ; if ( reliability . equals ( JsAdminConstants . BESTEFFORTNONPERSISTENT ) ) { rel = SIBDestinationReliabilityType . BEST_EFFORT_NONPERSISTENT ; } else if ( reliability . equals ( JsAdminConstants . EXPRESSNONPERSISTENT ) ) { rel = SIBDestinationReliabilityType . EXPRESS_NONPERSISTENT ; } else if ( re... |
public class GzipHeader { /** * Read a byte .
* We do not expect to get a - 1 reading . If we do , we throw exception .
* Update the crc as we go .
* @ param in InputStream to read .
* @ param crc CRC to update .
* @ param buffer Buffer to read into .
* @ param offset Offset to start filling buffer at .
*... | for ( int i = offset ; i < length ; i ++ ) { buffer [ offset + i ] = ( byte ) readByte ( in , crc ) ; } return length ; |
public class EncryptionUtil { /** * Provides basic encryption on a String . */
public String encrypt ( String toEncrypt ) throws DuraCloudRuntimeException { } } | try { byte [ ] input = toEncrypt . getBytes ( "UTF-8" ) ; cipher . init ( Cipher . ENCRYPT_MODE , key ) ; byte [ ] cipherText = cipher . doFinal ( input ) ; return encodeBytes ( cipherText ) ; } catch ( Exception e ) { throw new DuraCloudRuntimeException ( e ) ; } |
public class ExceptionUtils { /** * Re - throws the given { @ code Throwable } in scenarios where the signatures allows only IOExceptions
* ( and RuntimeException and Error ) .
* < p > Throws this exception directly , if it is an IOException , a RuntimeException , or an Error . Otherwise it
* wraps it in an IOExc... | if ( t instanceof IOException ) { throw ( IOException ) t ; } else if ( t instanceof RuntimeException ) { throw ( RuntimeException ) t ; } else if ( t instanceof Error ) { throw ( Error ) t ; } else { throw new IOException ( t . getMessage ( ) , t ) ; } |
public class CmsPublishManager { /** * Publishes the current project , printing messages to a shell report . < p >
* @ param cms the cms request context
* @ return the publish history id of the published project
* @ throws Exception if something goes wrong
* @ see CmsShellReport */
public CmsUUID publishProject... | return publishProject ( cms , new CmsShellReport ( cms . getRequestContext ( ) . getLocale ( ) ) ) ; |
public class FNCImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setXUnitBase ( Integer newXUnitBase ) { } } | Integer oldXUnitBase = xUnitBase ; xUnitBase = newXUnitBase ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . FNC__XUNIT_BASE , oldXUnitBase , xUnitBase ) ) ; |
public class FileLogSet { /** * Adds a file name to the files list at the specified index . If adding
* this file would cause the number of files to exceed the maximum , remove
* all files after the specified index , and then remove the oldest files
* until the number is reduced to the maximum .
* @ param index... | if ( maxFiles > 0 ) { int numFiles = files . size ( ) ; int maxDateFiles = getMaxDateFiles ( ) ; // If there is no max or we have fewer than max , then we ' re done .
if ( maxDateFiles <= 0 || numFiles < maxDateFiles ) { files . add ( index , file ) ; } else { // The file names we deal with ( messages _ xx . xx . xx _ ... |
public class OrgAPI { /** * Creates a new organization
* @ param data
* The data for the new organization
* @ return The data for the newly created organization */
public OrganizationCreateResponse createOrganization ( OrganizationCreate data ) { } } | return getResourceFactory ( ) . getApiResource ( "/org/" ) . entity ( data , MediaType . APPLICATION_JSON_TYPE ) . post ( OrganizationCreateResponse . class ) ; |
public class BccClient { /** * Creating a customized image which can be used for creating instance in the future .
* You can create an image from an instance or you can create from an snapshot .
* The parameters of instanceId and snapshotId can no be null simultaneously .
* when both instanceId and snapshotId are... | checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getImageName ( ) , "request imageName should not be empty." ) ; if ( Strings . isNullOrEmpty ( requ... |
public class Program { /** * Create a new , random program tree from the given ( non ) terminal
* operations with the desired depth . The created program tree is a
* < em > full < / em > tree .
* @ param depth the desired depth of the program tree
* @ param operations the list of < em > non < / em > - terminal ... | return of ( depth , operations , terminals , RandomRegistry . getRandom ( ) ) ; |
public class VFSUtils { /** * Get the name .
* @ param uri the uri
* @ return name from uri ' s path */
public static String getName ( URI uri ) { } } | if ( uri == null ) { throw MESSAGES . nullArgument ( "uri" ) ; } String name = uri . getPath ( ) ; if ( name != null ) { // TODO : Not correct for certain uris like jar : . . . ! /
int lastSlash = name . lastIndexOf ( '/' ) ; if ( lastSlash > 0 ) { name = name . substring ( lastSlash + 1 ) ; } } return name ; |
public class NotificationHubsInner { /** * Creates / Updates an authorization rule for a NotificationHub .
* @ param resourceGroupName The name of the resource group .
* @ param namespaceName The namespace name .
* @ param notificationHubName The notification hub name .
* @ param authorizationRuleName Authoriza... | if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( namespaceName == null ) { throw new IllegalArgumentException ( "Parameter namespaceName is required and cannot be null." ) ; } if ( notificationHubName == null ) { throw new I... |
public class UniversalNamespaceCache { /** * This method looks at an attribute and stores it , if it is a namespace
* attribute .
* @ param attribute
* to examine */
private void storeAttribute ( Attr attribute ) { } } | // examine the attributes in namespace xmlns
if ( attribute . getNamespaceURI ( ) != null && attribute . getNamespaceURI ( ) . equals ( XMLConstants . XMLNS_ATTRIBUTE_NS_URI ) ) { // Default namespace xmlns = " uri goes here "
if ( attribute . getNodeName ( ) . equals ( XMLConstants . XMLNS_ATTRIBUTE ) ) { putInCache (... |
public class FollowUpPromptMarshaller { /** * Marshall the given parameter object . */
public void marshall ( FollowUpPrompt followUpPrompt , ProtocolMarshaller protocolMarshaller ) { } } | if ( followUpPrompt == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( followUpPrompt . getPrompt ( ) , PROMPT_BINDING ) ; protocolMarshaller . marshall ( followUpPrompt . getRejectionStatement ( ) , REJECTIONSTATEMENT_BINDING ) ; } catch ( ... |
public class UcsApi { /** * Get the lucene indexes for ucs
* This request returns all the lucene indexes for contact .
* @ param luceneIndexesData Request parameters . ( optional )
* @ return ApiResponse & lt ; ConfigResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or canno... | com . squareup . okhttp . Call call = getLuceneIndexesValidateBeforeCall ( luceneIndexesData , null , null ) ; Type localVarReturnType = new TypeToken < ConfigResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class ApiOvhOrder { /** * Create order
* REST : POST / order / dedicated / server / { serviceName } / bandwidth / { duration }
* @ param bandwidth [ required ] Bandwidth to allocate
* @ param type [ required ] bandwidth type
* @ param serviceName [ required ] The internal name of your dedicated server
... | String qPath = "/order/dedicated/server/{serviceName}/bandwidth/{duration}" ; StringBuilder sb = path ( qPath , serviceName , duration ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "bandwidth" , bandwidth ) ; addBody ( o , "type" , type ) ; String resp = exec ( qPath , "POST" ,... |
public class DSLMapLexer { /** * $ ANTLR start " RIGHT _ SQUARE " */
public final void mRIGHT_SQUARE ( ) throws RecognitionException { } } | try { int _type = RIGHT_SQUARE ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / main / resources / org / drools / compiler / lang / dsl / DSLMap . g : 301:9 : ( ' ] ' )
// src / main / resources / org / drools / compiler / lang / dsl / DSLMap . g : 301:11 : ' ] '
{ match ( ']' ) ; if ( state . failed ) return ; } stat... |
public class AtomicUndoManager { /** * Utility method that records a change that can be undone / redone . */
@ SuppressWarnings ( "UnusedDeclaration" ) public void recordChange ( StateEditable change ) { } } | beginUndoAtom ( ) ; try { StateEdit transaction = new StateEdit ( change ) ; transaction . end ( ) ; addEdit ( transaction ) ; } finally { endUndoAtom ( ) ; } |
public class GroupsApi { /** * Join a public group as a member .
* < br >
* This method requires authentication with ' write ' permission .
* < br >
* @ param groupId ( Required ) The NSID of the group to join .
* @ param acceptRules If the group has rules , they must be displayed to the user prior to joining... | JinxUtils . validateParams ( groupId ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.groups.join" ) ; params . put ( "group_id" , groupId ) ; if ( acceptRules ) { params . put ( "accept_rules" , "true" ) ; } return jinx . flickrPost ( params , Response . class ) ; |
public class SetterUtil { /** * Sets the given parameter on the object while smartly parsing the value .
* For example , if the value can be interpreted as an integer , will invoke
* the setFoo ( int ) or setFoo ( Integer ) methods of the given object as opposed
* to just dummily invoking the setFoo ( String ) me... | for ( Setter s : c_setters ) { try { s . set ( obj , method , value ) ; return ; } catch ( Exception e ) { } } throw new NoSuchMethodException ( "No valid setter found for " + method + "(\"" + value + "\")" ) ; |
public class RelationalOperationsMatrix { /** * with the interior of Point B . */
private void boundaryAreaInteriorPoint_ ( int cluster , int id_a , int id_b ) { } } | if ( m_matrix [ MatrixPredicate . BoundaryInterior ] == 0 ) return ; int clusterParentage = m_topo_graph . getClusterParentage ( cluster ) ; if ( ( clusterParentage & id_a ) != 0 && ( clusterParentage & id_b ) != 0 ) { m_matrix [ MatrixPredicate . BoundaryInterior ] = 0 ; } |
public class RelationalOperationsMatrix { /** * Returns true if the relation holds . */
static boolean polylineRelatePolyline_ ( Polyline polyline_a , Polyline polyline_b , double tolerance , String scl , ProgressTracker progress_tracker ) { } } | RelationalOperationsMatrix relOps = new RelationalOperationsMatrix ( ) ; relOps . resetMatrix_ ( ) ; relOps . setPredicates_ ( scl ) ; relOps . setLineLinePredicates_ ( ) ; Envelope2D env_a = new Envelope2D ( ) , env_b = new Envelope2D ( ) ; polyline_a . queryEnvelope2D ( env_a ) ; polyline_b . queryEnvelope2D ( env_b ... |
public class CapsuleUtils { /** * Compute the squash operation used in CapsNet
* The formula is ( | | s | | ^ 2 / ( 1 + | | s | | ^ 2 ) ) * ( s / | | s | | ) .
* Canceling one | | s | | gives | | s | | * s / ( ( 1 + | | s | | ^ 2)
* @ param SD The SameDiff environment
* @ param x The variable to squash
* @ re... | SDVariable squaredNorm = SD . math . square ( x ) . sum ( true , dim ) ; SDVariable scale = SD . math . sqrt ( squaredNorm . plus ( 1e-5 ) ) ; return x . times ( squaredNorm ) . div ( squaredNorm . plus ( 1.0 ) . times ( scale ) ) ; |
public class AWSWAFRegionalClient { /** * Inserts or deletes < a > SizeConstraint < / a > objects ( filters ) in a < a > SizeConstraintSet < / a > . For each
* < code > SizeConstraint < / code > object , you specify the following values :
* < ul >
* < li >
* Whether to insert or delete the object from the array... | request = beforeClientExecution ( request ) ; return executeUpdateSizeConstraintSet ( request ) ; |
public class CollectionDef { /** * < code > optional . tensorflow . CollectionDef . BytesList bytes _ list = 2 ; < / code > */
public org . tensorflow . framework . CollectionDef . BytesList getBytesList ( ) { } } | if ( kindCase_ == 2 ) { return ( org . tensorflow . framework . CollectionDef . BytesList ) kind_ ; } return org . tensorflow . framework . CollectionDef . BytesList . getDefaultInstance ( ) ; |
public class DB { /** * Selects a taxonomy term .
* @ param taxonomy The taxonomy name .
* @ param name The term name .
* @ return The taxonomy term or { @ code null } if none .
* @ throws SQLException on database error . */
public TaxonomyTerm selectTaxonomyTerm ( final String taxonomy , final String name ) th... | Connection conn = null ; PreparedStatement stmt = null ; ResultSet rs = null ; long taxonomyTermId = 0L ; long termId = 0L ; String description = "" ; Timer . Context ctx = metrics . selectTaxonomyTermTimer . time ( ) ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( selectTaxonom... |
public class TimeExpression { /** * Create a minutes expression ( range 0-59)
* @ return minute */
public NumberExpression < Integer > minute ( ) { } } | if ( minutes == null ) { minutes = Expressions . numberOperation ( Integer . class , Ops . DateTimeOps . MINUTE , mixin ) ; } return minutes ; |
public class TypeWrapper { /** * Unwrap the given type , effectively returning the original non - serializable type .
* @ param type the type to unwrap
* @ return the original non - serializable type */
@ SuppressWarnings ( "unchecked" ) public static < T extends Type > T unwrap ( T type ) { } } | Type unwrapped = type ; while ( unwrapped instanceof SerializableTypeProxy ) { unwrapped = ( ( SerializableTypeProxy ) type ) . getTypeProvider ( ) . getType ( ) ; } return ( T ) unwrapped ; |
public class BasePersonAttributeDao { /** * Takes a & lt ; String , List & lt ; Object & gt ; & gt ; Map and coverts it to a & lt ; String , Object & gt ; Map . This implementation takes
* the first value of each List to use as the value for the new Map .
* @ param multivaluedUserAttributes The attribute map to fla... | if ( ! this . enabled ) { return null ; } if ( multivaluedUserAttributes == null ) { return null ; } // Convert the < String , List < Object > results map to a < String , Object > map using the first value of each List
final Map < String , Object > userAttributes = new LinkedHashMap < > ( multivaluedUserAttributes . si... |
public class JdbcUtil { /** * Executes the specified SQL with the specified connection .
* @ param sql the specified SQL
* @ param connection connection the specified connection
* @ param isDebug the specified debug flag
* @ return { @ code true } if success , returns { @ false } otherwise
* @ throws SQLExcep... | if ( isDebug || LOGGER . isTraceEnabled ( ) ) { LOGGER . log ( Level . INFO , "Executing SQL [" + sql + "]" ) ; } final Statement statement = connection . createStatement ( ) ; final boolean isSuccess = ! statement . execute ( sql ) ; statement . close ( ) ; return isSuccess ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.