signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Mockito { /** * Additional method helps users of JDK7 + to hide heap pollution / unchecked generics array creation */
@ SuppressWarnings ( { } } | "unchecked" , "varargs" } ) @ CheckReturnValue public static Stubber doThrow ( Class < ? extends Throwable > toBeThrown , Class < ? extends Throwable > ... toBeThrownNext ) { return MOCKITO_CORE . stubber ( ) . doThrow ( toBeThrown , toBeThrownNext ) ; |
public class GenerateHalDocsJsonMojo { /** * Get constant field value .
* @ param javaClazz QDox class
* @ param javaField QDox field
* @ param compileClassLoader Classloader for compile dependencies
* @ param fieldType Field type
* @ return Value */
@ SuppressWarnings ( "unchecked" ) private < T > T getStati... | try { Class < ? > clazz = compileClassLoader . loadClass ( javaClazz . getFullyQualifiedName ( ) ) ; Field field = clazz . getField ( javaField . getName ( ) ) ; return ( T ) field . get ( fieldType ) ; } catch ( ClassNotFoundException | NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAcces... |
public class Utils { /** * Split - out the path , query , and fragment parts of the given URI string . The URI is
* expected to that obtained from a GET or other HTTP request . The extracted parts
* are not decoded . For example , if the URI string is :
* < pre >
* / foo / bar ? x = % 20 + y = 2%20 # thisbethef... | assert uriStr != null ; assert uriPath != null ; assert uriQuery != null ; assert uriFragment != null ; // Find location of query ( ? ) and fragment ( # ) markers , if any .
int quesInx = uriStr . indexOf ( '?' ) ; int hashInx = uriStr . indexOf ( '#' ) ; if ( hashInx >= 0 && quesInx >= 0 && hashInx < quesInx ) { // Te... |
public class ComponentBindingsProviderFactoryMBeanImpl { /** * ( non - Javadoc )
* @ see com . sixdimensions . wcm . cq . component . bindings . jmx .
* ComponentBindingsProviderFactoryMBean # getLoadedResourceTypes ( ) */
@ Override @ Description ( "Gets all of th resource types which have bound Component Bindings... | Set < String > types = ( ( ComponentBindingsProviderFactoryImpl ) componentBindingsProviderFactory ) . getLoadedResourceTypes ( ) ; return types . toArray ( new String [ types . size ( ) ] ) ; |
public class VcfReader { /** * Stream the specified readable .
* @ param readable readable to stream , must not be null
* @ param listener event based reader callback , must not be null
* @ throws IOException if an I / O error occurs */
public static void stream ( final Readable readable , final VcfStreamListener... | StreamingVcfParser . stream ( readable , listener ) ; |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcAppliedValueRelationship ( ) { } } | if ( ifcAppliedValueRelationshipEClass == null ) { ifcAppliedValueRelationshipEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 23 ) ; } return ifcAppliedValueRelationshipEClass ; |
public class CategoryGraph { /** * Intrinsic information content ( Seco Etal . 2004 ) allows to compute information content from the structure of the taxonomy ( no corpus needed ) .
* IC ( n ) = 1 - log ( hypo ( n ) + 1 ) / log ( # cat )
* hypo ( n ) is the ( recursive ) number of hyponyms of a node n . Recursive m... | int node = category . getPageId ( ) ; int hyponymCount = getHyponymCountMap ( ) . get ( node ) ; int numberOfNodes = this . getNumberOfNodes ( ) ; if ( hyponymCount > numberOfNodes ) { throw new WikiApiException ( "Something is wrong with the hyponymCountMap. " + hyponymCount + " hyponyms, but only " + numberOfNodes + ... |
public class RuleClassifier { /** * The following three functions are used for the prediction */
protected double [ ] firstHit ( Instance inst ) { } } | boolean fired = false ; int countFired = 0 ; double [ ] votes = new double [ this . numClass ] ; for ( int j = 0 ; j < this . ruleSet . size ( ) ; j ++ ) { if ( this . ruleSet . get ( j ) . ruleEvaluate ( inst ) == true ) { countFired = countFired + 1 ; for ( int z = 0 ; z < this . numClass ; z ++ ) { votes [ z ] = thi... |
public class FoxHttpAnnotationParser { /** * Parse the given interface for the use of FoxHttp
* @ param serviceInterface interface to parse
* @ param foxHttpClient FoxHttpClient to use
* @ param < T > interface class to parse
* @ return Proxy of the interface
* @ throws FoxHttpRequestException */
@ SuppressWa... | try { Method [ ] methods = serviceInterface . getDeclaredMethods ( ) ; for ( Method method : methods ) { FoxHttpMethodParser foxHttpMethodParser = new FoxHttpMethodParser ( ) ; foxHttpMethodParser . parseMethod ( method , foxHttpClient ) ; FoxHttpRequestBuilder foxHttpRequestBuilder = new FoxHttpRequestBuilder ( foxHtt... |
public class ManagementGroupVertex { /** * Returns the list of successors of this group vertex . A successor is a group vertex which can be reached via a
* group edge originating at this group vertex .
* @ return the list of successors of this group vertex . */
public List < ManagementGroupVertex > getSuccessors ( ... | final List < ManagementGroupVertex > successors = new ArrayList < ManagementGroupVertex > ( ) ; for ( ManagementGroupEdge edge : this . forwardEdges ) { successors . add ( edge . getTarget ( ) ) ; } return successors ; |
public class WebAppConfigurator { /** * Create a configuration item using the current source .
* See { @ link # getConfigSource ( ) } and { @ link # getLibraryURI ( ) } .
* @ param value The value to place in the configuration item . A null value
* may be provided .
* @ param comparator The comparator to be use... | return new ConfigItemImpl < T > ( value , getConfigSource ( ) , getLibraryURI ( ) , comparator ) ; |
public class StringUtils { /** * Return encoded string by given charset .
* @ param source source string to be handle .
* @ param sourceCharset source string charset name .
* @ param encodingCharset want encoding to which charset .
* @ return a new string has been encoded .
* @ throws IllegalArgumentException... | byte [ ] sourceBytes ; String encodeString = null ; try { sourceBytes = source . getBytes ( sourceCharset ) ; encodeString = new String ( sourceBytes , encodingCharset ) ; } catch ( UnsupportedEncodingException e ) { throw new IllegalArgumentException ( String . format ( "Unsupported encoding:%s or %s" , sourceCharset ... |
public class AsyncFile { /** * Creates a directory by creating all nonexistent parent directories first .
* @ param executor executor for running tasks in other thread
* @ param dir the directory to create
* @ param attrs an optional list of file attributes to set atomically when creating the directory */
public ... | return ofBlockingRunnable ( executor , ( ) -> { try { Files . createDirectories ( dir , attrs ) ; } catch ( IOException e ) { throw new UncheckedException ( e ) ; } } ) ; |
public class Activator { /** * Gets Configuration Admin service from service registry .
* @ param bundleContext bundle context
* @ return configuration admin service
* @ throws IllegalStateException - If no Configuration Admin service is available */
private ConfigurationAdmin getConfigurationAdmin ( final Bundle... | final ServiceReference ref = bundleContext . getServiceReference ( ConfigurationAdmin . class . getName ( ) ) ; if ( ref == null ) { throw new IllegalStateException ( "Cannot find a configuration admin service" ) ; } return ( ConfigurationAdmin ) bundleContext . getService ( ref ) ; |
public class MultiRowJdbcPersonAttributeDao { /** * The { @ link Map } of columns from a name column to value columns . Keys are Strings ,
* Values are Strings or { @ link java . util . List } of Strings .
* @ param nameValueColumnMap The Map of name column to value column ( s ) . */
public void setNameValueColumnM... | if ( nameValueColumnMap == null ) { this . nameValueColumnMappings = null ; } else { final Map < String , Set < String > > mappings = MultivaluedPersonAttributeUtils . parseAttributeToAttributeMapping ( nameValueColumnMap ) ; if ( mappings . containsValue ( null ) ) { throw new IllegalArgumentException ( "nameValueColu... |
public class ResourceManagerBase { /** * Called by the engine when it has decided configuration has changed . Care should be taken to ensure continuity of operation despite
* configuration change - resource amount currently in used should not be reset for example . < br >
* Note that the RM key can change , but nev... | this . definition = configuration ; this . key = configuration . getKey ( ) . toLowerCase ( ) ; this . currentProperties = new HashMap < > ( ) ; // Add hard - coded defaults to properties
setDefaultProperties ( ) ; // Add values from new configuration to properties
this . currentProperties . putAll ( configuration . ge... |
public class UserAgentParserImpl { /** * Sort by size and alphabet , so the first match can be returned immediately */
static Rule [ ] getOrderedRules ( final Rule [ ] rules ) { } } | final Comparator < Rule > c = Comparator . comparing ( Rule :: getSize ) . reversed ( ) . thenComparing ( Rule :: getPattern ) ; final Rule [ ] result = Arrays . copyOf ( rules , rules . length ) ; parallelSort ( result , c ) ; return result ; |
public class GeometryExtrude { /** * Extract the linestring " roof " .
* @ param lineString
* @ param height
* @ return */
public static Geometry extractRoof ( LineString lineString , double height ) { } } | LineString result = ( LineString ) lineString . copy ( ) ; result . apply ( new TranslateCoordinateSequenceFilter ( height ) ) ; return result ; |
public class WritableSessionCache { /** * Signal that the transaction that was active and in which this session participated has completed and that this session
* should no longer use a transaction - specific workspace cache . */
private void completeTransaction ( final String txId , String wsName ) { } } | getWorkspace ( ) . clear ( ) ; // reset the ws cache to the shared ( global one )
setWorkspaceCache ( sharedWorkspaceCache ( ) ) ; // and clear some tx specific data
COMPLETE_FUNCTION_BY_TX_AND_WS . compute ( txId , ( transactionId , funcsByWsName ) -> { funcsByWsName . remove ( wsName ) ; if ( funcsByWsName . isEmpty ... |
public class FileUtils { /** * Reads an { @ link ImmutableListMultimap } from a { @ link CharSource } , where each line is a
* key , a tab character ( " \ t " ) , and a value . Blank lines and lines beginning with " # " are ignored . */
public static ImmutableListMultimap < String , File > loadStringToFileListMultima... | return loadMultimap ( source , Functions . < String > identity ( ) , FileFunction . INSTANCE , IsCommentLine . INSTANCE ) ; |
public class ThrowUnchecked { /** * Throws the root cause of the given exception if it is unchecked or an
* instance of any of the given declared types . Otherwise , it is thrown as
* an UndeclaredThrowableException . If the root cause is null , then the
* original exception is thrown . This method only returns n... | Throwable root = t ; while ( root != null ) { Throwable cause = root . getCause ( ) ; if ( cause == null ) { break ; } root = cause ; } fireDeclared ( root , declaredTypes ) ; |
public class LevelDB { /** * Try to avoid use - after close since that has the tendency of crashing the JVM . This doesn ' t
* prevent methods that retrieved the instance from using it after close , but hopefully will
* catch most cases ; otherwise , we ' ll need some kind of locking . */
DB db ( ) { } } | DB _db = this . _db . get ( ) ; if ( _db == null ) { throw new IllegalStateException ( "DB is closed." ) ; } return _db ; |
public class CmsFormatterBeanParser { /** * Parses the mappings . < p >
* @ param formatterLoc the formatter value location
* @ return the mappings */
private List < CmsMetaMapping > parseMetaMappings ( I_CmsXmlContentLocation formatterLoc ) { } } | List < CmsMetaMapping > mappings = new ArrayList < CmsMetaMapping > ( ) ; for ( I_CmsXmlContentValueLocation mappingLoc : formatterLoc . getSubValues ( N_META_MAPPING ) ) { String key = CmsConfigurationReader . getString ( m_cms , mappingLoc . getSubValue ( N_KEY ) ) ; String element = CmsConfigurationReader . getStrin... |
public class JcrStatement { @ Override public boolean execute ( String sql ) throws SQLException { } } | notClosed ( ) ; warning = null ; moreResults = 0 ; try { // Convert the supplied SQL into JCR - SQL2 . . .
String jcrSql2 = connection . nativeSQL ( sql ) ; // Create the query . . .
final QueryResult jcrResults = getJcrRepositoryDelegate ( ) . execute ( jcrSql2 , this . sqlLanguage ) ; results = new JcrResultSet ( thi... |
public class DescribeImportTasksRequest { /** * An array of name - value pairs that you provide to filter the results for the < code > DescribeImportTask < / code >
* request to a specific subset of results . Currently , wildcard values aren ' t supported for filters .
* < b > NOTE : < / b > This method appends the... | if ( this . filters == null ) { setFilters ( new java . util . ArrayList < ImportTaskFilter > ( filters . length ) ) ; } for ( ImportTaskFilter ele : filters ) { this . filters . add ( ele ) ; } return this ; |
public class Router { /** * Specify a middleware that will be called for a matching HTTP CONNECT
* @ param pattern The simple pattern
* @ param handlers The middleware to call */
public Router connect ( @ NotNull final String pattern , @ NotNull final IMiddleware ... handlers ) { } } | addPattern ( "CONNECT" , pattern , handlers , connectBindings ) ; return this ; |
public class ActiveSyncManager { /** * Clean up tasks to stop sync point after we have journaled .
* @ param syncPoint the sync point to stop
* @ throws InvalidPathException */
public void stopSyncPostJournal ( AlluxioURI syncPoint ) throws InvalidPathException { } } | MountTable . Resolution resolution = mMountTable . resolve ( syncPoint ) ; long mountId = resolution . getMountId ( ) ; // Remove initial sync thread
Future < ? > syncFuture = mSyncPathStatus . remove ( syncPoint ) ; if ( syncFuture != null ) { syncFuture . cancel ( true ) ; } if ( mFilterMap . get ( mountId ) . isEmpt... |
public class Endpoint { /** * Creates a new host { @ link Endpoint } .
* @ deprecated Use { @ link # of ( String , int ) } and { @ link # withWeight ( int ) } ,
* e . g . { @ code Endpoint . of ( " foo . com " , 80 ) . withWeight ( 500 ) } . */
@ Deprecated public static Endpoint of ( String host , int port , int w... | return of ( host , port ) . withWeight ( weight ) ; |
public class hqlParser { /** * hql . g : 544:1 : multiplyExpression : unaryExpression ( ( STAR ^ | DIV ^ ) unaryExpression ) * ; */
public final hqlParser . multiplyExpression_return multiplyExpression ( ) throws RecognitionException { } } | hqlParser . multiplyExpression_return retval = new hqlParser . multiplyExpression_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token STAR204 = null ; Token DIV205 = null ; ParserRuleReturnScope unaryExpression203 = null ; ParserRuleReturnScope unaryExpression206 = null ; CommonTree STAR20... |
public class DefaultGroovyMethods { /** * Returns the first item from the Iterable .
* < pre class = " groovyTestCase " >
* def set = [ 3 , 4 , 2 ] as LinkedHashSet
* assert set . first ( ) = = 3
* / / check original is unaltered
* assert set = = [ 3 , 4 , 2 ] as Set
* < / pre >
* The first element return... | Iterator < T > iterator = self . iterator ( ) ; if ( ! iterator . hasNext ( ) ) { throw new NoSuchElementException ( "Cannot access first() element from an empty Iterable" ) ; } return iterator . next ( ) ; |
public class ItemsMergeImpl { /** * blockyTandemMergeSortRecursion ( ) is called by blockyTandemMergeSort ( ) .
* In addition to performing the algorithm ' s top down recursion ,
* it manages the buffer swapping that eliminates most copying .
* It also maps the input ' s pre - sorted blocks into the subarrays
*... | // Important note : grpStart and grpLen do NOT refer to positions in the underlying array .
// Instead , they refer to the pre - sorted blocks , such as block 0 , block 1 , etc .
assert ( grpLen > 0 ) ; if ( grpLen == 1 ) { return ; } final int grpLen1 = grpLen / 2 ; final int grpLen2 = grpLen - grpLen1 ; assert ( grpL... |
public class InvocationDecoder { /** * Splits out the query string and unescape the value . */
public void splitQueryAndUnescape ( I invocation , byte [ ] rawURIBytes , int uriLength ) throws IOException { } } | for ( int i = 0 ; i < uriLength ; i ++ ) { if ( rawURIBytes [ i ] == '?' ) { i ++ ; // XXX : should be the host encoding ?
String queryString = byteToChar ( rawURIBytes , i , uriLength - i , "ISO-8859-1" ) ; invocation . setQueryString ( queryString ) ; uriLength = i - 1 ; break ; } } String rawURIString = byteToChar (... |
public class Batch { /** * / * ( non - Javadoc )
* @ see com . googlecode . batchfb . Batcher # graph ( java . lang . String , com . googlecode . batchfb . Param [ ] ) */
@ Override public GraphRequest < JsonNode > graph ( String object , Param ... params ) { } } | return this . graph ( object , JsonNode . class , params ) ; |
public class CompactOffHeapLinearHashTable { /** * Returns " insert " position in terms of consequent putValue ( ) */
public long remove ( long addr , long posToRemove ) { } } | long posToShift = posToRemove ; while ( true ) { posToShift = step ( posToShift ) ; // volatile read not needed because removed is performed under exclusive lock
long entryToShift = readEntry ( addr , posToShift ) ; if ( empty ( entryToShift ) ) break ; long insertPos = hlPos ( key ( entryToShift ) ) ; // the following... |
public class Features { /** * Add a feature . Stores its interface , and all sub interfaces which describe also a { @ link Feature } annotated by
* { @ link FeatureInterface } .
* @ param feature The feature to add .
* @ throws LionEngineException If feature is not annotated by { @ link FeatureInterface } or alre... | if ( ! isAnnotated ( feature ) ) { throw new LionEngineException ( ERROR_FEATURE_NOT_ANNOTATED + feature . getClass ( ) ) ; } final Feature old ; // CHECKSTYLE IGNORE LINE : InnerAssignment
if ( ( old = typeToFeature . put ( feature . getClass ( ) , feature ) ) != null ) { throw new LionEngineException ( ERROR_FEATURE_... |
public class SpringSecurityUserManager { /** * { @ inheritDoc } */
@ Override public void logout ( User appSensorUser ) { } } | logger . info ( "Request received to logout user <{}>." , appSensorUser . getUsername ( ) ) ; userResponseCache . setUserLoggedOut ( appSensorUser . getUsername ( ) ) ; |
public class MediaClient { /** * Retrieve the media information of an object in Bos bucket .
* @ param request The request object containing all options for retrieving media information .
* @ return The media information of an object in Bos bucket . */
public GetMediaInfoOfFileResponse getMediaInfoOfFile ( GetMedia... | checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getBucket ( ) , "The parameter bucket should NOT be null or empty string." ) ; checkStringNotEmpty ( request . getKey ( ) , "The parameter key should NOT be null or empty string." ) ; InternalRequest internalRequest... |
public class LogViewer { /** * Runs LogViewer using values in System Properties to find custom levels and header .
* @ param args
* - command line arguments to LogViewer
* @ return code indicating status of the execution : 0 on success , 1 otherwise . */
public int execute ( String [ ] args ) { } } | Map < String , LevelDetails > levels = readLevels ( System . getProperty ( "logviewer.custom.levels" ) ) ; String [ ] header = readHeader ( System . getProperty ( "logviewer.custom.header" ) ) ; return execute ( args , levels , header ) ; |
public class EndpointLinksResolver { /** * Resolves links to the known endpoints based on a request with the given
* { @ code requestUrl } .
* @ param requestUrl the url of the request for the endpoint links
* @ return the links */
public Map < String , Link > resolveLinks ( String requestUrl ) { } } | String normalizedUrl = normalizeRequestUrl ( requestUrl ) ; Map < String , Link > links = new LinkedHashMap < > ( ) ; links . put ( "self" , new Link ( normalizedUrl ) ) ; for ( ExposableEndpoint < ? > endpoint : this . endpoints ) { if ( endpoint instanceof ExposableWebEndpoint ) { collectLinks ( links , ( ExposableWe... |
public class HiveRegistrationPolicyBase { /** * Determine whether a database or table name is valid .
* A name is valid if and only if : it starts with an alphanumeric character , contains only alphanumeric characters
* and ' _ ' , and is NOT composed of numbers only . */
protected static boolean isNameValid ( Stri... | Preconditions . checkNotNull ( name ) ; name = name . toLowerCase ( ) ; return VALID_DB_TABLE_NAME_PATTERN_1 . matcher ( name ) . matches ( ) && VALID_DB_TABLE_NAME_PATTERN_2 . matcher ( name ) . matches ( ) ; |
public class TraceTurboFilter { /** * Initialize and add this turbo filter to the loggerFactory . */
@ Override public void start ( ) { } } | LoggerContext loggerFactory = ( LoggerContext ) LoggerFactory . getILoggerFactory ( ) ; setContext ( loggerFactory ) ; loggerFactory . addTurboFilter ( this ) ; super . start ( ) ; |
public class DogmaApi { /** * Get effect information ( asynchronously ) Get information on a dogma effect
* - - - This route expires daily at 11:05
* @ param effectId
* A dogma effect ID ( required )
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* ... | com . squareup . okhttp . Call call = getDogmaEffectsEffectIdValidateBeforeCall ( effectId , datasource , ifNoneMatch , callback ) ; Type localVarReturnType = new TypeToken < DogmaEffectResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ; |
public class CmsProperty { /** * Returns the map value representation for the given String . < p >
* The given value is split along the < code > | < / code > char , the map keys and values are separated by a < code > = < / code > . < p >
* @ param value the value to create the map representation for
* @ return th... | if ( value == null ) { return null ; } List < String > entries = createListFromValue ( value ) ; Iterator < String > i = entries . iterator ( ) ; Map < String , String > result = new HashMap < String , String > ( entries . size ( ) ) ; boolean rebuildDelimiters = false ; if ( value . indexOf ( VALUE_MAP_DELIMITER_REPLA... |
public class XlsUtil { /** * 导出list对象到excel
* @ param config 配置
* @ param list 导出的list
* @ param outputStream 输出流
* @ return 处理结果 , true成功 , false失败
* @ throws Exception */
public static boolean list2Xls ( ExcelConfig config , List < ? > list , OutputStream outputStream ) throws Exception { } } | try { String [ ] header = config . getHeaders ( ) ; String [ ] names = config . getNames ( ) ; String [ ] values ; WritableWorkbook wb = Workbook . createWorkbook ( outputStream ) ; String sheetName = ( config . getSheet ( ) != null && ! config . getSheet ( ) . equals ( "" ) ) ? config . getSheet ( ) : ( "sheet" + conf... |
public class SizeDAOValidatorsRule { /** * ( non - Javadoc )
* @ see net . leadware . persistence . tools . validator . base . AbstractDAOValidatorsRule # getValidators ( ) */
@ Override protected Annotation [ ] getValidators ( ) { } } | // Si l ' annotation en cours est nulle
if ( this . annotation == null ) { // On retourne null
return null ; } // Si l ' annotation en cours n ' est pas de l ' instance
if ( ! ( annotation instanceof SizeDAOValidators ) ) { // On retourne null
return null ; } // On caste
SizeDAOValidators castedValidators = ( SizeDAOVa... |
public class LogUtils { /** * Creates a Writer used to write test results to the log . xml file .
* @ param logDir
* The directory containing the test session results .
* @ param callpath
* A test session identifier .
* @ return A PrintWriter object , or { @ code null } if one could not be
* created .
* @... | if ( logDir != null ) { File dir = new File ( logDir , callpath ) ; String path = logDir . toString ( ) + "/" + callpath . split ( "/" ) [ 0 ] ; System . setProperty ( "PATH" , path ) ; dir . mkdir ( ) ; File f = new File ( dir , "log.xml" ) ; f . delete ( ) ; BufferedWriter writer = new BufferedWriter ( new OutputStre... |
public class XMLChecker { /** * Checks if the specified part of a character array matches the < em > PubidLiteral < / em >
* production .
* See : < a href = " http : / / www . w3 . org / TR / REC - xml # NT - PubidLiteral " > Definition of PubidLiteral < / a > .
* @ param ch the character array that contains the ... | // Minimum length is 3
if ( length < 3 ) { throw new InvalidXMLException ( "Minimum length for the 'PubidLiteral' production is 3 characters." ) ; } int lastIndex = start + length - 1 ; char firstChar = ch [ 0 ] ; char lastChar = ch [ lastIndex ] ; // First and last char : single qoute ( apostrophe )
String otherAllowe... |
public class MappingDataTypeCompletion { /** * This method wraps the variable that holds data property values with a data type predicate .
* It will replace the variable with a new function symbol and update the rule atom .
* However , if the users already defined the data - type in the mapping , this method simply... | if ( term instanceof Function ) { Function function = ( Function ) term ; Predicate functionSymbol = function . getFunctionSymbol ( ) ; if ( function . isDataTypeFunction ( ) || ( functionSymbol instanceof URITemplatePredicate ) || ( functionSymbol instanceof BNodePredicate ) ) { // NO - OP for already assigned datatyp... |
public class XPathParser { /** * Given an string , init an XPath object for selections ,
* in order that a parse doesn ' t
* have to be done each time the expression is evaluated .
* @ param compiler The compiler object .
* @ param expression A string conforming to the XPath grammar .
* @ param namespaceConte... | m_ops = compiler ; m_namespaceContext = namespaceContext ; m_functionTable = compiler . getFunctionTable ( ) ; Lexer lexer = new Lexer ( compiler , namespaceContext , this ) ; lexer . tokenize ( expression ) ; m_ops . setOp ( 0 , OpCodes . OP_XPATH ) ; m_ops . setOp ( OpMap . MAPINDEX_LENGTH , 2 ) ; // Patch for Christ... |
public class ServiceContainerHelper { /** * Ensures the specified service is stopped .
* @ param controller a service controller */
public static void stop ( ServiceController < ? > controller ) { } } | try { transition ( controller , State . DOWN ) ; } catch ( StartException e ) { // This can ' t happen
throw new IllegalStateException ( e ) ; } |
public class ConvertBufferedImage { /** * Converts a buffered image into an image of the specified type . In a ' dst ' image is provided
* it will be used for output , otherwise a new image will be created . */
public static < T extends ImageGray < T > > T convertFromSingle ( BufferedImage src , T dst , Class < T > t... | if ( type == GrayU8 . class ) { return ( T ) convertFrom ( src , ( GrayU8 ) dst ) ; } else if ( GrayI16 . class . isAssignableFrom ( type ) ) { return ( T ) convertFrom ( src , ( GrayI16 ) dst , ( Class ) type ) ; } else if ( type == GrayF32 . class ) { return ( T ) convertFrom ( src , ( GrayF32 ) dst ) ; } else { thro... |
public class ApplicationGatewaysInner { /** * Gets the backend health of the specified application gateway in a resource group .
* @ param resourceGroupName The name of the resource group .
* @ param applicationGatewayName The name of the application gateway .
* @ param serviceCallback the async ServiceCallback t... | return ServiceFuture . fromResponse ( backendHealthWithServiceResponseAsync ( resourceGroupName , applicationGatewayName ) , serviceCallback ) ; |
public class ConnectionManagerServiceImpl { /** * Returns the connection manager for this configuration .
* This method lazily initializes the connection manager service if necessary .
* @ param ref reference to the connection factory .
* @ param svc the connection factory service
* @ return the connection mana... | final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getConnectionManager" , refInfo , svc ) ; ConnectionManager cm ; lock . readLock ( ) . lock ( ) ; try { if ( pm == null ) try { // Switch to write lock for lazy initialization
lock . readLo... |
public class ApiOvhEmailpro { /** * Alter this object properties
* REST : PUT / email / pro / { service }
* @ param body [ required ] New object properties
* @ param service [ required ] The internal name of your pro organization
* API beta */
public void service_PUT ( String service , OvhService body ) throws ... | String qPath = "/email/pro/{service}" ; StringBuilder sb = path ( qPath , service ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ; |
public class AbstractWSingleSelectList { /** * { @ inheritDoc } */
@ Override protected boolean doHandleRequest ( final Request request ) { } } | // First we need to figure out if the new selection is the same as the
// previous selection .
final Object newSelection = getRequestValue ( request ) ; final Object priorSelection = getValue ( ) ; boolean changed = ! Util . equals ( newSelection , priorSelection ) ; if ( changed ) { setData ( newSelection ) ; } return... |
public class Entity { /** * Method getListTypeValues .
* @ param valuesClass Class < T > .
* @ return Collection < T > . */
< T extends ListValue > Collection < T > getListTypeValues ( Class < T > valuesClass ) { } } | return instance . get ( ) . listTypeValues ( valuesClass ) ; |
public class ProductSearchClient { /** * Formats a string containing the fully - qualified path to represent a product resource .
* @ deprecated Use the { @ link ProductName } class instead . */
@ Deprecated public static final String formatProductName ( String project , String location , String product ) { } } | return PRODUCT_PATH_TEMPLATE . instantiate ( "project" , project , "location" , location , "product" , product ) ; |
public class Matrix { /** * Converts this matrix using the given { @ code factory } .
* @ param factory the factory that creates an output matrix
* @ param < T > type of the result matrix
* @ return converted matrix */
public < T extends Matrix > T to ( MatrixFactory < T > factory ) { } } | T result = factory . apply ( rows , columns ) ; apply ( LinearAlgebra . IN_PLACE_COPY_MATRIX_TO_MATRIX , result ) ; return result ; |
public class HttpRequestMessageImpl { /** * Set the value of the scheme in the Request by using the
* int identifiers .
* @ param scheme */
@ Override public void setScheme ( SchemeValues scheme ) { } } | this . myScheme = scheme ; super . setFirstLineChanged ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setScheme(v): " + ( null != scheme ? scheme . getName ( ) : null ) ) ; } |
public class SquareRegularClustersIntoGrids { /** * Add all the nodes into the list which lie along the line defined by a and b . a is assumed to be
* an end point . Care is taken to not cycle . */
int addLineToGrid ( SquareNode a , SquareNode b , List < SquareNode > list ) { } } | int total = 2 ; // double maxAngle = UtilAngle . radian ( 45 ) ;
while ( true ) { // double slopeX0 = b . center . x - a . center . x ;
// double slopeY0 = b . center . y - a . center . y ;
// double angleAB = Math . atan2 ( slopeY0 , slopeX0 ) ;
// see which side the edge belongs to on b
boolean matched = false ; int ... |
public class InsertSpan { /** * TLDR : we are guarding against setting null , as doing so implies tombstones . We are dodging setX
* to keep code simpler than other alternatives described below .
* < p > If there ' s consistently 8 tombstones ( nulls ) per row , then we ' ll only need 125 spans in a
* trace ( row... | BoundStatement bound = factory . preparedStatement . bind ( ) . setUUID ( "ts_uuid" , input . ts_uuid ( ) ) . setString ( "trace_id" , input . trace_id ( ) ) . setString ( "id" , input . id ( ) ) ; // now set the nullable fields
if ( null != input . trace_id_high ( ) ) bound . setString ( "trace_id_high" , input . trac... |
public class DistRaid { /** * Checks if the map - reduce job has completed .
* @ return true if the job completed , false otherwise .
* @ throws IOException */
public boolean checkComplete ( ) throws IOException { } } | JobID jobID = runningJob . getID ( ) ; if ( runningJob . isComplete ( ) ) { // delete job directory
final String jobdir = jobconf . get ( JOB_DIR_LABEL ) ; if ( jobdir != null ) { final Path jobpath = new Path ( jobdir ) ; jobpath . getFileSystem ( jobconf ) . delete ( jobpath , true ) ; } if ( runningJob . isSuccessfu... |
public class PackageBasedActionConfigBuilder { /** * Checks if class package match provided list of package locators
* @ param classPackageName
* name of class package
* @ return true if class package is on the { @ link # packageLocators } list */
protected boolean checkPackageLocators ( String classPackageName )... | if ( packageLocators != null && ! disablePackageLocatorsScanning && classPackageName . length ( ) > 0 && ( packageLocatorsBasePackage == null || classPackageName . startsWith ( packageLocatorsBasePackage ) ) ) { for ( String packageLocator : packageLocators ) { String [ ] splitted = classPackageName . split ( "\\." ) ;... |
public class ServletRESTRequestWithParams { /** * ( non - Javadoc )
* @ see com . ibm . wsspi . rest . handler . RESTRequest # getParameterMap ( ) */
@ Override public Map < String , String [ ] > getParameterMap ( ) { } } | ServletRESTRequestImpl ret = castRequest ( ) ; if ( ret != null ) return ret . getParameterMap ( ) ; return null ; |
public class AssetServiceLocator { /** * For the given interface , get the stub implementation .
* If this service has no port for the given interface ,
* then ServiceException is thrown . */
public java . rmi . Remote getPort ( Class serviceEndpointInterface ) throws javax . xml . rpc . ServiceException { } } | try { if ( com . google . api . ads . adwords . axis . v201809 . cm . AssetServiceInterface . class . isAssignableFrom ( serviceEndpointInterface ) ) { com . google . api . ads . adwords . axis . v201809 . cm . AssetServiceSoapBindingStub _stub = new com . google . api . ads . adwords . axis . v201809 . cm . AssetServi... |
public class PrimaveraPMFileWriter { /** * Writes a list of UDF types .
* @ author lsong
* @ param type parent entity type
* @ param mpxj parent entity
* @ return list of UDFAssignmentType instances */
private List < UDFAssignmentType > writeUDFType ( FieldTypeClass type , FieldContainer mpxj ) { } } | List < UDFAssignmentType > out = new ArrayList < UDFAssignmentType > ( ) ; for ( CustomField cf : m_sortedCustomFieldsList ) { FieldType fieldType = cf . getFieldType ( ) ; if ( fieldType != null && type == fieldType . getFieldTypeClass ( ) ) { Object value = mpxj . getCachedValue ( fieldType ) ; if ( FieldTypeHelper .... |
public class ExcelFunctions { /** * Returns the sum of all arguments */
public static BigDecimal sum ( EvaluationContext ctx , Object ... args ) { } } | if ( args . length == 0 ) { throw new RuntimeException ( "Wrong number of arguments" ) ; } BigDecimal result = BigDecimal . ZERO ; for ( Object arg : args ) { result = result . add ( Conversions . toDecimal ( arg , ctx ) ) ; } return result ; |
public class SampledStat { /** * Timeout any windows that have expired in the absence of any events */
protected void purgeObsoleteSamples ( MetricConfig config , long now ) { } } | long expireAge = config . samples ( ) * config . timeWindowMs ( ) ; for ( int i = 0 ; i < samples . size ( ) ; i ++ ) { Sample sample = this . samples . get ( i ) ; if ( now - sample . lastWindowMs >= expireAge ) { // The samples array is used as a circular list . The rank represents how many spots behind the current
/... |
public class CmsResourceWrapperModules { /** * Gets the virtual resources for the import folder . < p >
* @ param cms the CMS context
* @ return the virtual resources for the import folder */
private List < CmsResource > getVirtualResourcesForImport ( CmsObject cms ) { } } | List < CmsResource > result = Lists . newArrayList ( ) ; return result ; |
public class SyslogMessage { /** * Generates an < a href = " http : / / tools . ietf . org / html / rfc5424 " > RFC - 5424 < / a > message . */
public String toRfc5424SyslogMessage ( ) { } } | StringWriter sw = new StringWriter ( msg == null ? 32 : msg . size ( ) + 32 ) ; try { toRfc5424SyslogMessage ( sw ) ; } catch ( IOException e ) { throw new IllegalStateException ( e ) ; } return sw . toString ( ) ; |
public class BeanO { /** * Chanced EnterpriseBean to Object . d366807.1 */
public boolean isCallerInRole ( String roleName , Object bean ) { } } | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "isCallerInRole, role = " + roleName + " EJB = " + bean ) ; // 182011
} // Check whether security is enabled or not . Note , the subclasses
// do override this method to do additional pro... |
public class AsynchronousBean { /** * Assigns the given activity to the asynchronous EJB for background execution .
* @ param callable
* the { @ code Activity } to be executed asynchronously .
* @ return
* the activity ' s { @ code Future } object , for result retrieval .
* @ see
* org . dihedron . patterns... | logger . info ( "submitting activity to asynchronous EJB..." ) ; return new AsyncResult < ActivityData > ( callable . call ( ) ) ; |
public class AsyncInputStream { /** * Resumes the reading .
* @ return the current { @ code AsyncInputStream } */
@ Override public AsyncInputStream resume ( ) { } } | switch ( state ) { case STATUS_CLOSED : throw new IllegalStateException ( "Cannot resume, already closed" ) ; case STATUS_PAUSED : state = STATUS_ACTIVE ; doRead ( ) ; } return this ; |
public class DateUtils { /** * # func 获取月份差 < br >
* @ author dongguoshuang */
public static int getMonthSpan ( Date begin , Date end ) { } } | Calendar beginCal = new GregorianCalendar ( ) ; beginCal . setTime ( begin ) ; Calendar endCal = new GregorianCalendar ( ) ; endCal . setTime ( end ) ; int m = ( endCal . get ( Calendar . MONTH ) ) - ( beginCal . get ( Calendar . MONTH ) ) ; int y = ( endCal . get ( Calendar . YEAR ) ) - ( beginCal . get ( Calendar . Y... |
public class RiakNode { /** * Sets the maximum number of connections allowed .
* @ param maxConnections the maxConnections to set .
* @ return a reference to this RiakNode .
* @ see Builder # withMaxConnections ( int ) */
public RiakNode setMaxConnections ( int maxConnections ) { } } | stateCheck ( State . CREATED , State . RUNNING , State . HEALTH_CHECKING ) ; if ( maxConnections >= getMinConnections ( ) ) { permits . setMaxPermits ( maxConnections ) ; } else { throw new IllegalArgumentException ( "Max connections less than min connections" ) ; } // TODO : reap delta ?
return this ; |
public class QueuePlugin { /** * Adds new functions , to be executed , onto the end of the named
* queue of all matched elements . */
@ SuppressWarnings ( "unchecked" ) public T queue ( final String name , Function ... funcs ) { } } | for ( final Function f : funcs ) { for ( Element e : elements ( ) ) { queue ( e , name , f ) ; } } return ( T ) this ; |
public class FieldType { /** * Return the value from the field in the object that is defined by this FieldType . If the field is a foreign object
* then the ID of the field is returned instead . */
public Object extractJavaFieldValue ( Object object ) throws SQLException { } } | Object val = extractRawJavaFieldValue ( object ) ; // if this is a foreign object then we want its reference field
if ( foreignRefField != null && val != null ) { val = foreignRefField . extractRawJavaFieldValue ( val ) ; } return val ; |
public class DefaultGroovyMethods { /** * todo : remove after putAt ( Splice ) gets deleted */
@ Deprecated protected static List getSubList ( List self , List splice ) { } } | int left ; int right = 0 ; boolean emptyRange = false ; if ( splice . size ( ) == 2 ) { left = DefaultTypeTransformation . intUnbox ( splice . get ( 0 ) ) ; right = DefaultTypeTransformation . intUnbox ( splice . get ( 1 ) ) ; } else if ( splice instanceof IntRange ) { IntRange range = ( IntRange ) splice ; left = rang... |
public class TextHandler { /** * 执行text标签SQL文本内容和有序参数的拼接 .
* @ param source 构建所需的资源对象
* @ param valueText xml中value的文本内容
* @ return 返回SqlInfo对象 */
private SqlInfo doBuildSqlInfo ( BuildSource source , String valueText ) { } } | SqlInfo sqlInfo = source . getSqlInfo ( ) ; Node node = source . getNode ( ) ; this . concatSqlText ( node , sqlInfo ) ; return XmlSqlInfoBuilder . newInstace ( source ) . buildTextSqlParams ( valueText ) ; |
public class BoxApiFolder { /** * Gets a request that moves a folder to another folder
* @ param id id of folder to move
* @ param parentId id of parent folder to move folder into
* @ return request to move a folder */
public BoxRequestsFolder . UpdateFolder getMoveRequest ( String id , String parentId ) { } } | BoxRequestsFolder . UpdateFolder request = new BoxRequestsFolder . UpdateFolder ( id , getFolderInfoUrl ( id ) , mSession ) . setParentId ( parentId ) ; return request ; |
public class Configuration { /** * Return true if the given qualifier should be excluded and false otherwise .
* @ param qualifier the qualifier to check . */
public boolean shouldExcludeQualifier ( String qualifier ) { } } | if ( excludedQualifiers . contains ( "all" ) || excludedQualifiers . contains ( qualifier ) || excludedQualifiers . contains ( qualifier + ".*" ) ) { return true ; } else { int index = - 1 ; while ( ( index = qualifier . indexOf ( "." , index + 1 ) ) != - 1 ) { if ( excludedQualifiers . contains ( qualifier . substring... |
public class CqlQuery { /** * Trims the first column from the row if it ' s name is equal to " KEY " */
private List < Column > filterKeyColumn ( CqlRow row ) { } } | if ( suppressKeyInColumns && row . isSetColumns ( ) && row . columns . size ( ) > 0 ) { Iterator < Column > columnsIterator = row . getColumnsIterator ( ) ; Column column = columnsIterator . next ( ) ; if ( column . name . duplicate ( ) . equals ( KEY_BB ) ) { columnsIterator . remove ( ) ; } } return row . getColumns ... |
public class BinTools { /** * Convert hex digit to numerical value .
* @ param c
* 0-9 , a - f , A - F allowd .
* @ return 0-15
* @ throws IllegalArgumentException
* on non - hex character */
public static int hex2bin ( char c ) { } } | if ( c >= '0' && c <= '9' ) { return ( c - '0' ) ; } if ( c >= 'A' && c <= 'F' ) { return ( c - 'A' + 10 ) ; } if ( c >= 'a' && c <= 'f' ) { return ( c - 'a' + 10 ) ; } throw new IllegalArgumentException ( "Input string may only contain hex digits, but found '" + c + "'" ) ; |
public class TwitterImpl { /** * / * Tweets Resources */
@ Override public ResponseList < Status > getRetweets ( long statusId ) throws TwitterException { } } | return factory . createStatusList ( get ( conf . getRestBaseURL ( ) + "statuses/retweets/" + statusId + ".json?count=100" ) ) ; |
public class EFMImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . EFM__FM_NAME : return FM_NAME_EDEFAULT == null ? fmName != null : ! FM_NAME_EDEFAULT . equals ( fmName ) ; } return super . eIsSet ( featureID ) ; |
public class StringUtil { /** * Center the contents of the string . If the supplied string is longer than the desired width , it is truncated to the
* specified length . If the supplied string is shorter than the desired width , padding characters are added to the beginning
* and end of the string such that the len... | // Trim the leading and trailing whitespace . . .
str = str != null ? str . trim ( ) : "" ; int addChars = width - str . length ( ) ; if ( addChars < 0 ) { // truncate
return str . subSequence ( 0 , width ) . toString ( ) ; } // Write the content . . .
int prependNumber = addChars / 2 ; int appendNumber = prependNumber... |
public class PortableNavigatorContext { /** * Resets the state to the initial state for future reuse . */
void reset ( ) { } } | cd = initCd ; serializer = initSerializer ; in . position ( initPosition ) ; finalPosition = initFinalPosition ; offset = initOffset ; |
public class ScopeService { /** * Returns either all scopes or scopes for a specific client _ id passed as query parameter .
* @ param req request
* @ return string If query param client _ id is passed , then the scopes for that client _ id will be returned .
* Otherwise , all available scopes will be returned in... | QueryStringDecoder dec = new QueryStringDecoder ( req . uri ( ) ) ; Map < String , List < String > > queryParams = dec . parameters ( ) ; if ( queryParams . containsKey ( "client_id" ) ) { return getScopes ( queryParams . get ( "client_id" ) . get ( 0 ) ) ; } List < Scope > scopes = DBManagerFactory . getInstance ( ) .... |
public class MimeMessageHelper { /** * Determines the right resource name and optionally attaches the correct extension to the name . */
static String determineResourceName ( final AttachmentResource attachmentResource , final boolean includeExtension ) { } } | final String datasourceName = attachmentResource . getDataSource ( ) . getName ( ) ; String resourceName ; if ( ! valueNullOrEmpty ( attachmentResource . getName ( ) ) ) { resourceName = attachmentResource . getName ( ) ; } else if ( ! valueNullOrEmpty ( datasourceName ) ) { resourceName = datasourceName ; } else { res... |
public class SpoilerElement { /** * Return a map of all spoilers contained in a message .
* The map uses the language of a spoiler as key .
* If a spoiler has no language attribute , its key will be an empty String .
* @ param message message
* @ return map of spoilers */
public static Map < String , String > g... | if ( ! containsSpoiler ( message ) ) { return Collections . emptyMap ( ) ; } List < ExtensionElement > spoilers = message . getExtensions ( SpoilerElement . ELEMENT , NAMESPACE ) ; Map < String , String > map = new HashMap < > ( ) ; for ( ExtensionElement e : spoilers ) { SpoilerElement s = ( SpoilerElement ) e ; if ( ... |
public class ImmediateExpressions { /** * Report whether a sample of the variable satisfies the criteria . */
public static < V > boolean the ( Sampler < V > variable , Matcher < ? super V > criteria ) { } } | variable . takeSample ( ) ; return criteria . matches ( variable . sampledValue ( ) ) ; |
public class JsonSerializer { /** * Writes the object out as json .
* @ param out
* output writer
* @ param json
* a { @ link JsonElement }
* @ param pretty
* if true , a properly indented version of the json is written
* @ throws IOException
* if there is a problem writing to the writer */
public stati... | BufferedWriter bw = new BufferedWriter ( out ) ; serialize ( bw , json , pretty , 0 ) ; if ( pretty ) { bw . write ( '\n' ) ; } bw . flush ( ) ; |
public class GitLabApi { /** * Sets up all future calls to the GitLab API to be done as another user specified by provided user ID .
* To revert back to normal non - sudo operation you must call unsudo ( ) , or pass null as the sudoAsId .
* @ param sudoAsId the ID of the user to sudo as , null will turn off sudo
... | if ( sudoAsId == null ) { apiClient . setSudoAsId ( null ) ; return ; } // Get the User specified by the sudoAsId , if you are not an admin or the username is not found , this will fail
User user = getUserApi ( ) . getUser ( sudoAsId ) ; if ( user == null || ! user . getId ( ) . equals ( sudoAsId ) ) { throw new GitLab... |
public class FileUtils { /** * Loads the properties from a file specified as a parameter .
* @ param propertiesFile
* Path to the properties file .
* @ throws IOException
* is something goes wrong while reading the file */
public void loadPropertiesFromFile ( final String propertiesFile ) throws IOException { }... | LOG . info ( "Loading properties from file: " + propertiesFile ) ; File file = new File ( propertiesFile ) ; String bundleName = file . getPath ( ) . substring ( 0 , file . getPath ( ) . indexOf ( "properties" ) - 1 ) ; FileInputStream inputStream = null ; try { inputStream = new FileInputStream ( file ) ; ResourceBund... |
public class PolygonMarkers { /** * { @ inheritDoc } */
@ Override public void setVisibleMarkers ( boolean visible ) { } } | for ( Marker marker : markers ) { marker . setVisible ( visible ) ; } for ( PolygonHoleMarkers hole : holes ) { hole . setVisibleMarkers ( visible ) ; } |
public class JobsImpl { /** * Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run .
* This API returns the Job Preparation and Job Release task status on all compute nodes that have run the Job Preparation or Job Release task . Th... | return listPreparationAndReleaseTaskStatusWithServiceResponseAsync ( jobId , jobListPreparationAndReleaseTaskStatusOptions ) . map ( new Func1 < ServiceResponseWithHeaders < Page < JobPreparationAndReleaseTaskExecutionInformation > , JobListPreparationAndReleaseTaskStatusHeaders > , Page < JobPreparationAndReleaseTaskE... |
public class RouteProcessor { /** * { @ inheritDoc }
* @ param annotations
* @ param roundEnv */
@ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } } | if ( CollectionUtils . isNotEmpty ( annotations ) ) { Set < ? extends Element > routeElements = roundEnv . getElementsAnnotatedWith ( Route . class ) ; try { logger . info ( ">>> Found routes, start... <<<" ) ; this . parseRoutes ( routeElements ) ; } catch ( Exception e ) { logger . error ( e ) ; } return true ; } ret... |
public class DiSH { /** * Extracts the clusters from the cluster order .
* @ param relation the database storing the objects
* @ param clusterOrder the cluster order to extract the clusters from
* @ return the extracted clusters */
private Object2ObjectOpenCustomHashMap < long [ ] , List < ArrayModifiableDBIDs > ... | FiniteProgress progress = LOG . isVerbose ( ) ? new FiniteProgress ( "Extract Clusters" , relation . size ( ) , LOG ) : null ; Object2ObjectOpenCustomHashMap < long [ ] , List < ArrayModifiableDBIDs > > clustersMap = new Object2ObjectOpenCustomHashMap < > ( BitsUtil . FASTUTIL_HASH_STRATEGY ) ; // Note clusterOrder cur... |
public class LambdaToMethod { /** * Create new synthetic method with given flags , name , type , owner */
private MethodSymbol makePrivateSyntheticMethod ( long flags , Name name , Type type , Symbol owner ) { } } | return new MethodSymbol ( flags | SYNTHETIC | PRIVATE , name , type , owner ) ; |
public class Money { /** * ( non - Javadoc )
* @ see
* MonetaryAmount # divideAndRemainder ( MonetaryAmount ) */
@ Override public Money [ ] divideAndRemainder ( double divisor ) { } } | if ( NumberVerifier . isInfinityAndNotNaN ( divisor ) ) { Money zero = Money . of ( 0 , getCurrency ( ) ) ; return new Money [ ] { zero , zero } ; } return divideAndRemainder ( new BigDecimal ( String . valueOf ( divisor ) ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.