signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TreeSHAP { /** * undo a previous extension of the decision path */ private void unwindPath ( PathPointer unique_path , int unique_depth , int path_index ) { } }
final float one_fraction = unique_path . get ( path_index ) . one_fraction ; final float zero_fraction = unique_path . get ( path_index ) . zero_fraction ; float next_one_portion = unique_path . get ( unique_depth ) . pweight ; for ( int i = unique_depth - 1 ; i >= 0 ; -- i ) { if ( one_fraction != 0 ) { final float tm...
public class GeneratedDContactDaoImpl { /** * query - by method for field webPage * @ param webPage the specified attribute * @ return an Iterable of DContacts for the specified webPage */ public Iterable < DContact > queryByWebPage ( Object parent , java . lang . String webPage ) { } }
return queryByField ( parent , DContactMapper . Field . WEBPAGE . getFieldName ( ) , webPage ) ;
public class HttpDateFormatImpl { /** * Parse the input value against the formatter but do not throw an exception * if it fails to match , instead just return null . * < br > * @ param format * @ param input * @ return Date */ private Date attemptParse ( SimpleDateFormat format , String input ) { } }
ParsePosition pos = new ParsePosition ( 0 ) ; Date d = format . parse ( input , pos ) ; if ( 0 == pos . getIndex ( ) || pos . getIndex ( ) != input . length ( ) ) { // invalid format matching return null ; } return d ;
public class AbstractParamDialog { /** * Adds the given panel , with its { @ link Component # getName ( ) own name } , positioned under the given parents ( or root * node if none given ) . * If not sorted the panel is appended to existing panels . * @ param parentParams the name of the parent nodes of the panel ,...
addParamPanel ( parentParams , panel . getName ( ) , panel , sort ) ;
public class AbstractSlideModel { /** * { @ inheritDoc } */ @ Override public Animation getShowAnimation ( ) { } }
if ( this . showAnimation == null ) { this . showAnimation = buildAnimation ( getSlide ( ) . getShowAnimation ( ) ) ; } return this . showAnimation ;
public class StoredPaymentChannelClientStates { /** * Finds an inactive channel with the given id and returns it , or returns null . */ @ Nullable StoredClientChannel getUsableChannelForServerID ( Sha256Hash id ) { } }
lock . lock ( ) ; try { Set < StoredClientChannel > setChannels = mapChannels . get ( id ) ; for ( StoredClientChannel channel : setChannels ) { synchronized ( channel ) { // Check if the channel is usable ( has money , inactive ) and if so , activate it . log . info ( "Considering channel {} contract {}" , channel . h...
public class Value { /** * Set persistence to HDFS from ICE */ public void setHdfs ( ) { } }
assert onICE ( ) ; byte [ ] mem = memOrLoad ( ) ; // Get into stable memory _persist = Value . HDFS | Value . NOTdsk ; Persist . I [ Value . HDFS ] . store ( this ) ; removeIce ( ) ; // Remove from ICE disk assert onHDFS ( ) ; // Flip to HDFS _mem = mem ; // Close a race with the H2O cleaner zapping _ mem while removin...
public class AppsInner { /** * Get the metadata of an IoT Central application . * @ param resourceGroupName The name of the resource group that contains the IoT Central application . * @ param resourceName The ARM resource name of the IoT Central application . * @ throws IllegalArgumentException thrown if paramet...
return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < AppInner > , AppInner > ( ) { @ Override public AppInner call ( ServiceResponse < AppInner > response ) { return response . body ( ) ; } } ) ;
public class TerminZooKeeperArbitrateEvent { /** * < pre > * 算法 : * 1 . 客户端处理完成对应的termin事件后 , 反馈给仲裁器处理完成 。 仲裁器根据对应S . E . T . L的反馈情况 , 判断是否删除对应的termin信号 * < / pre > */ public void ack ( TerminEventData data ) { } }
Assert . notNull ( data ) ; // 目前只有select模块需要发送ack信号 , 这里一旦收到一个信号后就删除对应的termin节点 , 后续可扩展 // 删除termin节点 String path = StagePathUtils . getTermin ( data . getPipelineId ( ) , data . getProcessId ( ) ) ; try { zookeeper . delete ( path ) ; } catch ( ZkNoNodeException e ) { // ignore , 说明节点已经被删除 } catch ( ZkException e ) {...
public class Dim { /** * Returns an array of all functions in the given script . */ private static DebuggableScript [ ] getAllFunctions ( DebuggableScript function ) { } }
ObjArray functions = new ObjArray ( ) ; collectFunctions_r ( function , functions ) ; DebuggableScript [ ] result = new DebuggableScript [ functions . size ( ) ] ; functions . toArray ( result ) ; return result ;
public class JClassWrapper { /** * Returns the public methods . */ public JMethod [ ] getMethods ( ) { } }
Method [ ] methods = _class . getMethods ( ) ; JMethod [ ] jMethods = new JMethod [ methods . length ] ; for ( int i = 0 ; i < methods . length ; i ++ ) { jMethods [ i ] = new JMethodWrapper ( methods [ i ] , getClassLoader ( ) ) ; } return jMethods ;
public class ModelBuilder { /** * Convert a string like " abcs " to " abc " . */ private static String depluralize ( String s ) { } }
if ( s . endsWith ( "ies" ) ) { return s . substring ( 0 , s . length ( ) - 3 ) + 'y' ; } if ( s . endsWith ( "s" ) ) { return s . substring ( 0 , s . length ( ) - 1 ) ; } return s ;
public class CsvItemReader { /** * readTitle . * @ return an array of { @ link java . lang . String } objects . */ public String [ ] readTitle ( ) { } }
try { reader . readLine ( ) ; return Strings . split ( reader . readLine ( ) , "," ) ; } catch ( Exception e ) { throw new RuntimeException ( e . getMessage ( ) ) ; }
public class WebAppHttpContext { /** * Searches for the resource in the bundle that published the service . * @ see org . osgi . service . http . HttpContext # getResource ( String ) */ public URL getResource ( final String name ) { } }
final String normalizedName = Path . normalizeResourcePath ( rootPath + ( name . startsWith ( "/" ) ? "" : "/" ) + name ) . trim ( ) ; log . debug ( "Searching bundle " + bundle + " for resource [{}], normalized to [{}]" , name , normalizedName ) ; URL url = resourceCache . get ( normalizedName ) ; if ( url == null && ...
public class Parser { /** * Pattern : : = . . . | " [ " Element ? ( " , " Element ? ) * " ] " */ private ParseTree parseArrayPattern ( PatternKind kind ) { } }
SourcePosition start = getTreeStartLocation ( ) ; ImmutableList . Builder < ParseTree > elements = ImmutableList . builder ( ) ; eat ( TokenType . OPEN_SQUARE ) ; while ( peek ( TokenType . COMMA ) || peekArrayPatternElement ( ) ) { if ( peek ( TokenType . COMMA ) ) { SourcePosition nullStart = getTreeStartLocation ( )...
public class ElementFactory { /** * Used by RelationEdge when it needs to reify a relation . * Used by this factory when need to build an explicit relation * @ return ReifiedRelation */ RelationReified buildRelationReified ( VertexElement vertex , RelationType type ) { } }
return RelationReified . create ( vertex , type ) ;
public class CanalServiceImpl { /** * 添加 */ public void create ( final Canal canal ) { } }
Assert . assertNotNull ( canal ) ; transactionTemplate . execute ( new TransactionCallbackWithoutResult ( ) { protected void doInTransactionWithoutResult ( TransactionStatus status ) { try { CanalDO canalDO = modelToDo ( canal ) ; canalDO . setId ( 0L ) ; if ( ! canalDao . checkUnique ( canalDO ) ) { String exceptionCa...
public class ApiOvhTelephony { /** * Alter this object properties * REST : PUT / telephony / { billingAccount } / line / { serviceName } / options * @ param body [ required ] New object properties * @ param billingAccount [ required ] The name of your billingAccount * @ param serviceName [ required ] */ public ...
String qPath = "/telephony/{billingAccount}/line/{serviceName}/options" ; StringBuilder sb = path ( qPath , billingAccount , serviceName ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class OctTreeNode { /** * Replies the zone of the specified child . * @ param child the child . * @ return the zone or < code > null < / code > . */ @ Pure public final OctTreeZone zoneOf ( N child ) { } }
final int idx = indexOf ( child ) ; final OctTreeZone [ ] zones = OctTreeZone . values ( ) ; if ( idx < 0 || idx >= zones . length ) { return zones [ idx ] ; } return null ;
public class GroupBy { /** * Create a new aggregating sum expression * @ param expression expression a for which the accumulated sum will be used in the group by projection * @ return wrapper expression */ public static < E extends Number > AbstractGroupExpression < E , E > sum ( Expression < E > expression ) { } }
return new GSum < E > ( expression ) ;
public class GetCompatibleElasticsearchVersionsResult { /** * A map of compatible Elasticsearch versions returned as part of the * < code > < a > GetCompatibleElasticsearchVersions < / a > < / code > operation . * @ param compatibleElasticsearchVersions * A map of compatible Elasticsearch versions returned as par...
if ( compatibleElasticsearchVersions == null ) { this . compatibleElasticsearchVersions = null ; return ; } this . compatibleElasticsearchVersions = new java . util . ArrayList < CompatibleVersionsMap > ( compatibleElasticsearchVersions ) ;
public class GenericGenerators { /** * Generates instruction to push a null on to the stack . * @ return instructions to push a null */ public static InsnList loadNull ( ) { } }
InsnList ret = new InsnList ( ) ; ret . add ( new InsnNode ( Opcodes . ACONST_NULL ) ) ; return ret ;
public class scpolicy { /** * Use this API to update scpolicy . */ public static base_response update ( nitro_service client , scpolicy resource ) throws Exception { } }
scpolicy updateresource = new scpolicy ( ) ; updateresource . name = resource . name ; updateresource . url = resource . url ; updateresource . rule = resource . rule ; updateresource . delay = resource . delay ; updateresource . maxconn = resource . maxconn ; updateresource . action = resource . action ; updateresourc...
public class MMDCfgPanel { /** * GEN - LAST : event _ colorChooser1stTextActionPerformed */ private void colorChooser2ndBackgroundActionPerformed ( java . awt . event . ActionEvent evt ) { } }
// GEN - FIRST : event _ colorChooser2ndBackgroundActionPerformed if ( this . colorChooser2ndBackground . isLastOkPressed ( ) && changeNotificationAllowed ) { this . controller . changed ( ) ; }
public class PkEnumeration { /** * Returns the next element of this enumeration if this enumeration * object has at least one more element to provide . * @ return the next element of this enumeration . * @ exception NoSuchElementException if no more elements exist . */ public Object nextElement ( ) { } }
try { if ( ! hasCalledCheck ) { hasMoreElements ( ) ; } hasCalledCheck = false ; if ( hasNext ) { Identity oid = getIdentityFromResultSet ( ) ; Identity [ ] args = { oid } ; return this . constructor . newInstance ( args ) ; } else throw new NoSuchElementException ( ) ; } catch ( Exception ex ) { LoggerFactory . getDef...
public class FastPair { /** * Remove a point and update neighbors of points for which it had been nearest */ public void remove ( int p ) { } }
npoints -- ; int q = index [ p ] ; index [ points [ q ] = points [ npoints ] ] = q ; for ( int i = 0 ; i < npoints ; i ++ ) { if ( neighbor [ points [ i ] ] == p ) { findNeighbor ( points [ i ] ) ; } }
public class VectorPackingPropagator { /** * recompute the sum of the min / max loads only if at least one variable bound has been updated outside of the constraint */ private void recomputeLoadSums ( ) { } }
loadsHaveChanged . set ( false ) ; for ( int d = 0 ; d < nbDims ; d ++ ) { int sli = 0 ; int sls = 0 ; for ( int b = 0 ; b < nbBins ; b ++ ) { sli += loads [ d ] [ b ] . getLB ( ) ; sls += loads [ d ] [ b ] . getUB ( ) ; } this . sumLoadInf [ d ] . set ( sli ) ; this . sumLoadSup [ d ] . set ( sls ) ; }
public class FsJobArchivist { /** * Writes the given { @ link AccessExecutionGraph } to the { @ link FileSystem } pointed to by * { @ link JobManagerOptions # ARCHIVE _ DIR } . * @ param rootPath directory to which the archive should be written to * @ param jobId job id * @ param jsonToArchive collection of jso...
try { FileSystem fs = rootPath . getFileSystem ( ) ; Path path = new Path ( rootPath , jobId . toString ( ) ) ; OutputStream out = fs . create ( path , FileSystem . WriteMode . NO_OVERWRITE ) ; try ( JsonGenerator gen = jacksonFactory . createGenerator ( out , JsonEncoding . UTF8 ) ) { gen . writeStartObject ( ) ; gen ...
public class Webcam { /** * Will discover and return first webcam available in the system . * @ return Default webcam ( first from the list ) * @ throws WebcamException if something is really wrong * @ see Webcam # getWebcams ( ) */ public static Webcam getDefault ( ) throws WebcamException { } }
try { return getDefault ( Long . MAX_VALUE ) ; } catch ( TimeoutException e ) { // this should never happen since user would have to wait 300000 // years for it to occur throw new RuntimeException ( e ) ; }
public class CmsVfsDriver { /** * Appends the appropriate selection criteria related with the resource type . < p > * @ param projectId the id of the project of the resources * @ param type the resource type * @ param mode the selection mode * @ param conditions buffer to append the selection criteria * @ par...
if ( type != CmsDriverManager . READ_IGNORE_TYPE ) { if ( ( mode & CmsDriverManager . READMODE_EXCLUDE_TYPE ) > 0 ) { // C _ READ _ FILE _ TYPES : add condition to match against any type , but not given type conditions . append ( BEGIN_EXCLUDE_CONDITION ) ; conditions . append ( m_sqlManager . readQuery ( projectId , "...
public class Elements { /** * Registers a callback when an element is removed from the document body . Note that the callback will be called * only once , if the element is removed and re - appended a new callback should be registered . * @ param element the HTML element which is going to be removed from the body ...
if ( element != null ) { BodyObserver . addDetachObserver ( element , callback ) ; }
public class AsyncPeriodicWork { /** * Schedules this periodic work now in a new thread , if one isn ' t already running . */ @ SuppressWarnings ( "deprecation" ) // in this case we really want to use PeriodicWork . logger since it reports the impl class public final void doRun ( ) { } }
try { if ( thread != null && thread . isAlive ( ) ) { logger . log ( this . getSlowLoggingLevel ( ) , "{0} thread is still running. Execution aborted." , name ) ; return ; } thread = new Thread ( new Runnable ( ) { public void run ( ) { logger . log ( getNormalLoggingLevel ( ) , "Started {0}" , name ) ; long startTime ...
public class DynamoDBTableMapper { /** * Creates the table with the specified throughput ; also populates the same * throughput for all global secondary indexes . * @ param throughput The provisioned throughput . * @ return The table decription . * @ see com . amazonaws . services . dynamodbv2 . AmazonDynamoDB ...
final CreateTableRequest request = mapper . generateCreateTableRequest ( model . targetType ( ) ) ; request . setProvisionedThroughput ( throughput ) ; if ( request . getGlobalSecondaryIndexes ( ) != null ) { for ( final GlobalSecondaryIndex gsi : request . getGlobalSecondaryIndexes ( ) ) { gsi . setProvisionedThroughp...
public class TriggerDto { /** * Converts trigger entity to triggerDto object . * @ param trigger trigger entity . Cannot be null . * @ return triggerDto . */ public static TriggerDto transformToDto ( Trigger trigger ) { } }
TriggerDto result = createDtoObject ( TriggerDto . class , trigger ) ; // Now copy ID fields result . setAlertId ( trigger . getAlert ( ) . getId ( ) ) ; for ( Notification notification : trigger . getNotifications ( ) ) { result . addNotificationIds ( notification ) ; } return result ;
public class Company { /** * Returns for given parameter < i > _ uuid < / i > the instance of class * { @ link Company } . * @ param _ uuid UUI to search for * @ return instance of class { @ link Company } * @ throws CacheReloadException on error */ public static Company get ( final UUID _uuid ) throws CacheRel...
final Cache < UUID , Company > cache = InfinispanCache . get ( ) . < UUID , Company > getCache ( Company . UUIDCACHE ) ; if ( ! cache . containsKey ( _uuid ) ) { Company . getCompanyFromDB ( Company . SQL_UUID , String . valueOf ( _uuid ) ) ; } return cache . get ( _uuid ) ;
public class GuiceInjectorBootstrap { /** * Creates an Injector by taking a preloaded service . properties and a pre - constructed GuiceSetup * @ param properties * @ param setup * @ return */ public static Injector createInjector ( final PropertyFile configuration , final GuiceSetup setup ) { } }
return new GuiceBuilder ( ) . withConfig ( configuration ) . withSetup ( setup ) . build ( ) ;
public class Conformance { /** * syntactic sugar */ public ConformanceRestComponent addRest ( ) { } }
ConformanceRestComponent t = new ConformanceRestComponent ( ) ; if ( this . rest == null ) this . rest = new ArrayList < ConformanceRestComponent > ( ) ; this . rest . add ( t ) ; return t ;
public class StringUtils { /** * Test whether the given string matches the given substring at the given index . * @ param str the original string ( or StringBuilder ) * @ param index the index in the original string to start matching against * @ param substring the substring to match at the given index */ public ...
if ( index + substring . length ( ) > str . length ( ) ) { return false ; } for ( int i = 0 ; i < substring . length ( ) ; i ++ ) { if ( str . charAt ( index + i ) != substring . charAt ( i ) ) { return false ; } } return true ;
public class JournalNodeHttpServer { /** * Get journal stats for webui . */ public static Map < String , Map < String , String > > getJournalStats ( Collection < Journal > journals ) { } }
Map < String , Map < String , String > > stats = new HashMap < String , Map < String , String > > ( ) ; for ( Journal j : journals ) { try { Map < String , String > stat = new HashMap < String , String > ( ) ; stats . put ( j . getJournalId ( ) , stat ) ; stat . put ( "Txid committed" , Long . toString ( j . getCommitt...
public class DefaultRewriteContentHandler { /** * Builds image element for given media metadata . * @ param media Media metadata * @ param element Original element * @ return Image element or null if media reference is invalid */ private Element buildImageElement ( Media media , Element element ) { } }
if ( media . isValid ( ) ) { element . setAttribute ( "src" , media . getUrl ( ) ) ; } return element ;
public class ConnectSupport { /** * internal helpers */ private String buildOAuth1Url ( OAuth1ConnectionFactory < ? > connectionFactory , NativeWebRequest request , MultiValueMap < String , String > additionalParameters ) { } }
OAuth1Operations oauthOperations = connectionFactory . getOAuthOperations ( ) ; MultiValueMap < String , String > requestParameters = getRequestParameters ( request ) ; OAuth1Parameters parameters = getOAuth1Parameters ( request , additionalParameters ) ; parameters . putAll ( requestParameters ) ; if ( oauthOperations...
public class DefaultGroovyMethods { /** * A convenience method for creating an immutable sorted set . * @ param self a SortedSet * @ return an immutable SortedSet * @ see java . util . Collections # unmodifiableSortedSet ( java . util . SortedSet ) * @ since 1.0 */ public static < T > SortedSet < T > asImmutabl...
return Collections . unmodifiableSortedSet ( self ) ;
public class DelegatingPersistenceBroker { /** * If my underlying { @ link org . apache . ojb . broker . PersistenceBroker } * is not a { @ link DelegatingPersistenceBroker } , returns it , * otherwise recursively invokes this method on my delegate . * Hence this method will return the first * delegate that is ...
PersistenceBroker broker = this . m_broker ; while ( broker != null && broker instanceof DelegatingPersistenceBroker ) { broker = ( ( DelegatingPersistenceBroker ) broker ) . getDelegate ( ) ; if ( this == broker ) { return null ; } } return broker ;
public class Query { /** * @ see org . eclipse . datatools . connectivity . oda . IQuery # executeQuery ( ) */ public IResultSet executeQuery ( ) throws OdaException { } }
String currentQueryText = queryText ; if ( getMaxRows ( ) != 0 ) { currentQueryText = currentQueryText + " LIMIT " + getMaxRows ( ) ; } try { OSQLSynchQuery < ODocument > query = new OSQLSynchQuery < ODocument > ( currentQueryText ) ; List < ODocument > dbResult = getOrMakeDBResult ( db . command ( query ) . execute ( ...
public class DocumentSubscriptions { /** * Delete a subscription . * @ param name Subscription name * @ param database Database to use */ public void delete ( String name , String database ) { } }
RequestExecutor requestExecutor = _store . getRequestExecutor ( ObjectUtils . firstNonNull ( database , _store . getDatabase ( ) ) ) ; DeleteSubscriptionCommand command = new DeleteSubscriptionCommand ( name ) ; requestExecutor . execute ( command ) ;
public class NetworkInterfacesInner { /** * Gets all route tables applied to a network interface . * @ param resourceGroupName The name of the resource group . * @ param networkInterfaceName The name of the network interface . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ retu...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( networkInterfaceName == null ) { throw new IllegalArgumentException ( "Parameter networkInterfaceName is required and cannot be null." ) ; } if ( this . client . subscriptionI...
public class CipherOutputStream { /** * Writes the specified byte to this output stream . * @ param b the < code > byte < / code > . * @ exception IOException if an I / O error occurs . * @ since JCE1.2 */ public void write ( int b ) throws IOException { } }
ibuffer [ 0 ] = ( byte ) b ; obuffer = cipher . update ( ibuffer , 0 , 1 ) ; if ( obuffer != null ) { output . write ( obuffer ) ; obuffer = null ; }
public class FileUploadHelper { /** * Checks , whether the given file name is valid in the sense , that it doesn ' t * contain any NUL characters . If the file name is valid , it will be returned * without any modifications . Otherwise , an { @ link InvalidFileNameException } * is raised . * @ param sFilename ...
if ( sFilename != null && sFilename . indexOf ( '\u0000' ) != - 1 ) { throw new InvalidFileNameException ( sFilename , "Invalid filename: " + StringHelper . replaceAll ( sFilename , "\u0000" , "\\0" ) ) ; } return sFilename ;
public class SimpleFormatter { /** * 每行为特征 预测值 真实值 * @ param inst * @ param labels * @ param gold * @ return */ public static String format ( Instance inst , String [ ] labels , String [ ] gold ) { } }
StringBuilder sb = new StringBuilder ( ) ; String [ ] [ ] data = ( String [ ] [ ] ) inst . getSource ( ) ; int feaNum = data . length ; int seqNum = data [ 0 ] . length ; for ( int i = 0 ; i < seqNum ; i ++ ) { for ( int j = 0 ; j < feaNum ; j ++ ) { sb . append ( data [ j ] [ i ] ) ; sb . append ( "\t" ) ; } sb . appe...
public class ChatLinearLayoutManager { /** * < p > Scroll the RecyclerView to make the position visible . < / p > * < p > RecyclerView will scroll the minimum amount that is necessary to make the * target position visible . If you are looking for a similar behavior to * { @ link android . widget . ListView # setS...
mPendingScrollPosition = position ; mPendingScrollPositionOffset = INVALID_OFFSET ; if ( mPendingSavedState != null ) { mPendingSavedState . invalidateAnchor ( ) ; } requestLayout ( ) ;
public class EUI48XmlAdapter { /** * Converts the EUI - 48 string representation in { @ code str } to an { @ link EUI48 } . Returns * { @ code null } if { @ code str } is { @ code null } . * @ param str The EUI - 48 string representation . * @ return The { @ link EUI48 } represented by { @ code str } . * @ thro...
return str == null ? null : EUI48 . fromString ( str ) ;
public class FileUtil { /** * 创建File对象 < br > * 此方法会检查slip漏洞 , 漏洞说明见http : / / blog . nsfocus . net / zip - slip - 2/ * @ param parent 父目录 * @ param path 文件路径 * @ return File */ public static File file ( String parent , String path ) { } }
return file ( new File ( parent ) , path ) ;
public class SplitIndexWriter { /** * Get link to the previous unicode character . * @ return a content tree for the link */ public Content getNavLinkPrevious ( ) { } }
Content prevletterLabel = getResource ( "doclet.Prev_Letter" ) ; if ( prev == - 1 ) { return HtmlTree . LI ( prevletterLabel ) ; } else { Content prevLink = getHyperLink ( DocPaths . indexN ( prev ) , prevletterLabel ) ; return HtmlTree . LI ( prevLink ) ; }
public class Cargo { /** * � � � ٻ � � � λ � � */ public Location lastKnownLocation ( ) { } }
final HandlingEvent lastEvent = this . lnkDeliveryHistory . lastEvent ( ) ; if ( lastEvent != null ) { return lastEvent . getLocation ( ) ; } else { return null ; }
public class QueryRunner { /** * Runs a query on a chunk of a single partition . The chunk is defined by the offset { @ code tableIndex } * and the soft limit { @ code fetchSize } . * @ param query the query * @ param partitionId the partition which is queried * @ param tableIndex the index at which to start qu...
MapContainer mapContainer = mapServiceContext . getMapContainer ( query . getMapName ( ) ) ; Predicate predicate = queryOptimizer . optimize ( query . getPredicate ( ) , mapContainer . getIndexes ( partitionId ) ) ; QueryableEntriesSegment entries = partitionScanExecutor . execute ( query . getMapName ( ) , predicate ,...
public class BaseJpaDao { /** * Factory method for creating a { @ link CriteriaQuery } employing standards and best practices in * general use within the portal . Query objects returned from this method should normally be * passed to { @ link createCachedQuery } ; this step is important for the sake of scalability ...
final EntityManager entityManager = this . getEntityManager ( ) ; final EntityManagerFactory entityManagerFactory = entityManager . getEntityManagerFactory ( ) ; final CriteriaBuilder criteriaBuilder = entityManagerFactory . getCriteriaBuilder ( ) ; final CriteriaQuery < T > criteriaQuery = builder . apply ( criteriaBu...
public class Late { /** * Sets / initializes the object . * @ param object the object to set . * @ return the set object . */ public synchronized @ NonNull T set ( T object ) { } }
if ( this . object != null ) { throw new IllegalStateException ( "Already initialized" ) ; } this . object = object ; return object ;
public class DateConverter { /** * Initialize this converter . * @ param converter The next converter in the converter chain . * @ param dateFormat The date format . */ public void init ( Converter converter , int dateFormat ) { } }
Converter . initGlobals ( ) ; super . init ( converter ) ; m_sDateFormat = dateFormat ;
public class ParametricStatement { /** * Executes an INSERT statement . * @ return an array whose length indicates the number of rows inserted . If generatedKeys is true , the array * contains the keys ; otherwise the content of the array is not defined . */ public long [ ] executeInsert ( Connection conn , DataObj...
PreparedStatement statement = conn . prepareStatement ( _sql , generatedKeys ? Statement . RETURN_GENERATED_KEYS : Statement . NO_GENERATED_KEYS ) ; try { load ( statement , object ) ; long [ ] keys = new long [ statement . executeUpdate ( ) ] ; if ( generatedKeys ) { ResultSet rs = statement . getGeneratedKeys ( ) ; f...
public class AbstractTrafficShapingHandler { /** * Calculate the size of the given { @ link Object } . * This implementation supports { @ link ByteBuf } and { @ link ByteBufHolder } . Sub - classes may override this . * @ param msg the msg for which the size should be calculated . * @ return size the size of the ...
if ( msg instanceof ByteBuf ) { return ( ( ByteBuf ) msg ) . readableBytes ( ) ; } if ( msg instanceof ByteBufHolder ) { return ( ( ByteBufHolder ) msg ) . content ( ) . readableBytes ( ) ; } return - 1 ;
public class PPVItemsType { /** * Gets the value of the ppvItem property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE > met...
if ( ppvItem == null ) { ppvItem = new ArrayList < PPVItemsType . PPVItem > ( ) ; } return this . ppvItem ;
public class EfficientViewHolder { /** * Equivalent to calling View . setTag * @ param viewId The id of the view whose tag should change * @ param key The key identifying the tag * @ param tag An Object to tag the view with */ public void setTag ( int viewId , int key , Object tag ) { } }
ViewHelper . setTag ( mCacheView , viewId , key , tag ) ;
public class LogisticsCenter { /** * register by class name * Sacrificing a bit of efficiency to solve * the problem that the main dex file size is too large * @ author billy . qi < a href = " mailto : qiyilike @ 163 . com " > Contact me . < / a > * @ param className class name */ private static void register (...
if ( ! TextUtils . isEmpty ( className ) ) { try { Class < ? > clazz = Class . forName ( className ) ; Object obj = clazz . getConstructor ( ) . newInstance ( ) ; if ( obj instanceof IRouteRoot ) { registerRouteRoot ( ( IRouteRoot ) obj ) ; } else if ( obj instanceof IProviderGroup ) { registerProvider ( ( IProviderGro...
public class ChunkMapReader { /** * Create new map and refer to it with navref . */ private void processNavitation ( final Element topicref ) { } }
// create new map ' s root element final Element root = ( Element ) topicref . getOwnerDocument ( ) . getDocumentElement ( ) . cloneNode ( false ) ; // create navref element final Element navref = topicref . getOwnerDocument ( ) . createElement ( MAP_NAVREF . localName ) ; final String newMapFile = chunkFilenameGenerat...
public class DatabasesInner { /** * Pauses a database . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param databaseName The name of the databas...
return pauseWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < DatabaseInner > , DatabaseInner > ( ) { @ Override public DatabaseInner call ( ServiceResponse < DatabaseInner > response ) { return response . body ( ) ; } } ) ;
public class DCacheBase { /** * This is a helper method to remove pre - invalidation listener for all entries . */ public synchronized boolean removePreInvalidationListener ( PreInvalidationListener listener ) { } }
if ( bEnableListener && listener != null ) { eventSource . removeListener ( listener ) ; return true ; } return false ;
public class Perfidix { /** * Main method for invoking benchs with classes as strings . * @ param args the classes * @ throws ClassNotFoundException if class cannot be found * @ throws IllegalAccessException if conf cannot be instantiated * @ throws InstantiationException if conf cannot be instantiated */ publi...
final BenchmarkResult res = runBenchs ( args ) ; new TabularSummaryOutput ( ) . visitBenchmark ( res ) ;
public class GDLHandler { /** * Returns a cache that contains a mapping from variables to graph instances . * @ param includeUserDefined true , iff user - defined variables shall be included in the cache * @ param includeAutoGenerated true , iff auto - generated variables shall be included in the cache * @ return...
return loader . getGraphCache ( includeUserDefined , includeAutoGenerated ) ;
public class SourceParams { /** * Set custom metadata on the parameters . * @ param metaData * @ return { @ code this } , for chaining purposes */ @ NonNull public SourceParams setMetaData ( @ NonNull Map < String , String > metaData ) { } }
mMetaData = metaData ; return this ;
public class ReUtil { /** * 取得内容中匹配的所有结果 , 获得匹配的所有结果中正则对应分组0的内容 * @ param pattern 编译后的正则模式 * @ param content 被查找的内容 * @ return 结果列表 * @ since 3.1.2 */ public static List < String > findAllGroup0 ( Pattern pattern , CharSequence content ) { } }
return findAll ( pattern , content , 0 ) ;
public class DocCommentParser { /** * Read an HTML entity . * { @ literal & identifier ; } or { @ literal & # digits ; } or { @ literal & # xhex - digits ; } */ protected DCTree entity ( ) { } }
int p = bp ; nextChar ( ) ; Name name = null ; boolean checkSemi = false ; if ( ch == '#' ) { int namep = bp ; nextChar ( ) ; if ( isDecimalDigit ( ch ) ) { nextChar ( ) ; while ( isDecimalDigit ( ch ) ) nextChar ( ) ; name = names . fromChars ( buf , namep , bp - namep ) ; } else if ( ch == 'x' || ch == 'X' ) { nextCh...
public class CassandraDataHandlerBase { /** * On counter column . * @ param column * the column * @ param m * the m * @ param entity * the entity * @ param entityType * the entity type * @ param relationNames * the relation names * @ param isWrapReq * the is wrap req * @ param relations * th...
String thriftColumnName = PropertyAccessorFactory . STRING . fromBytes ( String . class , column . getName ( ) ) ; String thriftColumnValue = new Long ( column . getValue ( ) ) . toString ( ) ; populateViaThrift ( m , entity , entityType , relationNames , relations , thriftColumnName , thriftColumnValue , isCql3Enabled...
public class StdScheduler { /** * Calls the equivalent method on the ' proxied ' < code > QuartzScheduler < / code > . */ public void addCalendar ( final String calName , final ICalendar calendar , final boolean replace , final boolean updateTriggers ) throws SchedulerException { } }
m_aSched . addCalendar ( calName , calendar , replace , updateTriggers ) ;
public class XMLEditorSupport { /** * Returns the property as a String . */ @ Override public String getAsText ( ) { } }
if ( getValue ( ) == null ) { return null ; } return DOMWriter . printNode ( ( Node ) getValue ( ) , false ) ;
public class QuartzScheduler { /** * Resume a job . * @ param jobName * @ param groupName * @ return true the job has been resumed , no if the job doesn ' t exist . * @ throws SchedulerException */ public synchronized boolean resumeJobIfPresent ( final String jobName , final String groupName ) throws SchedulerE...
if ( ifJobExist ( jobName , groupName ) ) { this . scheduler . resumeJob ( new JobKey ( jobName , groupName ) ) ; return true ; } else { return false ; }
public class VdmContentOutlinePage { /** * @ see org . eclipse . jface . text . IPostSelectionProvider # removePostSelectionChangedListener * ( org . eclipse . jface . viewers . ISelectionChangedListener ) */ public void removePostSelectionChangedListener ( ISelectionChangedListener listener ) { } }
if ( fOutlineViewer != null ) { fOutlineViewer . removePostSelectionChangedListener ( listener ) ; } else { fPostSelectionChangedListeners . remove ( listener ) ; }
public class SortV1 { /** * Returns a new { @ link SortV1 } consisting of the { @ link OrderV1 } s of the current { @ link SortV1} * combined with the given ones . * @ param sort can be { @ literal null } . */ public SortV1 and ( SortV1 sort ) { } }
if ( sort == null ) { return this ; } ArrayList < OrderV1 > these = new ArrayList < > ( this . orders ) ; for ( OrderV1 order : sort ) { these . add ( order ) ; } return new SortV1 ( these ) ;
public class ProvFactory { /** * ( non - Javadoc ) * @ see org . openprovenance . prov . model . LiteralConstructor # newGYear ( int ) */ public XMLGregorianCalendar newGYear ( int year ) { } }
XMLGregorianCalendar cal = dataFactory . newXMLGregorianCalendar ( ) ; cal . setYear ( year ) ; return cal ;
public class CPTaxCategoryServiceBaseImpl { /** * Sets the cp instance local service . * @ param cpInstanceLocalService the cp instance local service */ public void setCPInstanceLocalService ( com . liferay . commerce . product . service . CPInstanceLocalService cpInstanceLocalService ) { } }
this . cpInstanceLocalService = cpInstanceLocalService ;
public class TokenBucketImpl { /** * Attempt to consume a specified number of tokens from the bucket . If the tokens were consumed then { @ code true } * is returned , otherwise { @ code false } is returned . * @ param numTokens The number of tokens to consume from the bucket , must be a positive number . * @ ret...
checkArgument ( numTokens > 0 , "Number of tokens to consume must be positive" ) ; checkArgument ( numTokens <= capacity , "Number of tokens to consume must be less than the capacity of the bucket." ) ; refill ( refillStrategy . refill ( ) ) ; // Now try to consume some tokens if ( numTokens <= size ) { size -= numToke...
public class CglibLazyInitializer { /** * Gets the proxy . * @ param entityName * the entity name * @ param persistentClass * the persistent class * @ param interfaces * the interfaces * @ param getIdentifierMethod * the get identifier method * @ param setIdentifierMethod * the set identifier method...
final CglibLazyInitializer instance = new CglibLazyInitializer ( entityName , persistentClass , interfaces , id , getIdentifierMethod , setIdentifierMethod , pd ) ; final KunderaProxy proxy ; Class factory = getProxyFactory ( persistentClass , interfaces ) ; proxy = getProxyInstance ( factory , instance ) ; instance . ...
public class WebUtils { /** * 执行HTTP POST请求 。 * @ param url 请求地址 * @ param params 请求参数 * @ return 响应字符串 */ public static String doPost ( String url , Map < String , String > params , int connectTimeout , int readTimeout ) throws IOException { } }
return doPost ( url , params , DEFAULT_CHARSET , connectTimeout , readTimeout ) ;
public class PHPDriver { /** * < p > execGet . < / p > * @ param command a { @ link java . lang . String } object . * @ return a { @ link java . lang . String } object . * @ throws java . io . IOException if any . * @ throws com . greenpepper . phpsud . exceptions . PHPException if any . */ public String execGe...
writeCommand ( "G" + command ) ; phpConsoleLogger . write ( command ) ; String res = readLine ( ) ; phpConsoleLogger . read ( res ) ; return res ;
public class RolesEntity { /** * Delete an existing Role . * A token with scope delete : roles is needed . * See https : / / auth0 . com / docs / api / management / v2 # ! / Roles / delete _ roles _ by _ id * @ param roleId The id of the role to delete . * @ return a Request to execute . */ public Request delet...
Asserts . assertNotNull ( roleId , "role id" ) ; final String url = baseUrl . newBuilder ( ) . addEncodedPathSegments ( "api/v2/roles" ) . addEncodedPathSegments ( roleId ) . build ( ) . toString ( ) ; VoidRequest request = new VoidRequest ( this . client , url , "DELETE" ) ; request . addHeader ( "Authorization" , "Be...
public class Scanners { /** * Matches the input against the specified string . * @ param str the string to match * @ return the scanner . */ public static Parser < Void > string ( String str ) { } }
return Patterns . string ( str ) . toScanner ( str ) ;
public class GlobusGSSManagerImpl { /** * Imports a credential . * @ param lifetime Only lifetime set to * { @ link GSSCredential # DEFAULT _ LIFETIME * GSSCredential . DEFAULT _ LIFETIME } is allowed . */ public GSSCredential createCredential ( byte [ ] buff , int option , int lifetime , Oid mech , int usage ) t...
checkMechanism ( mech ) ; if ( buff == null || buff . length < 1 ) { throw new GlobusGSSException ( GSSException . FAILURE , GlobusGSSException . BAD_ARGUMENT , "invalidBuf" ) ; } if ( lifetime == GSSCredential . INDEFINITE_LIFETIME || lifetime > 0 ) { // lifetime not supported throw new GlobusGSSException ( GSSExcepti...
public class Utils { /** * Split the given string using the given separate , returning the components as a * set . This method does the opposite as { @ link # concatenate ( Collection , String ) } . * If a null or empty string is passed , an empty set is returned . * @ param str String to be split . * @ param s...
// Split but watch out for empty substrings . Set < String > result = new HashSet < String > ( ) ; if ( str != null ) { for ( String value : str . split ( sepStr ) ) { if ( value . length ( ) > 0 ) { result . add ( value ) ; } } } return result ;
public class StringUtils { /** * Method to validate whether the given string is null / empty or has value * @ param text * @ return boolean */ public static boolean hasText ( final String text ) { } }
if ( text != null && ! "" . equals ( text . trim ( ) ) ) { return true ; } return false ;
public class SignedMutableBigInteger { /** * Signed addition built upon unsigned add and subtract . */ void signedAdd ( SignedMutableBigInteger addend ) { } }
if ( sign == addend . sign ) add ( addend ) ; else sign = sign * subtract ( addend ) ;
public class Configuration { /** * Get the comma delimited values of the < code > name < / code > property as * an array of < code > String < / code > s . * If no such property is specified then < code > null < / code > is returned . * @ param name property name . * @ return property value as an array of < code...
String valueString = get ( name ) ; return StringUtils . split ( valueString , "," ) ;
public class JBossConnectorDiscover { /** * A list of connectors . Not bound connectors will be discarded . * @ return * @ throws MalformedObjectNameException * @ throws NullPointerException * @ throws UnknownHostException * @ throws AttributeNotFoundException * @ throws InstanceNotFoundException * @ thro...
LOG . info ( "Searching JBoss HTTP connectors." ) ; HttpConnectorList httpConnectorList = null ; MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; Set < ObjectName > jbossObjs = mbs . queryNames ( new ObjectName ( "jboss.as:socket-binding-group=standard-sockets,socket-binding=http*" ) , null ) ; LOG . ...
public class Widgets { /** * Creates an image that responds to clicking . */ public static Image newActionImage ( String path , String tip , ClickHandler onClick ) { } }
return makeActionImage ( new Image ( path ) , tip , onClick ) ;
public class CmsGalleryControllerHandler { /** * Updates the gallery tree . < p > * @ param galleryTreeEntries the gallery tree entries * @ param selectedGalleries the selected galleries */ public void onUpdateGalleryTree ( List < CmsGalleryTreeEntry > galleryTreeEntries , List < String > selectedGalleries ) { } }
m_galleryDialog . getGalleriesTab ( ) . updateTreeContent ( galleryTreeEntries , selectedGalleries ) ;
public class Duration { /** * Subtract the supplied duration from this duration , and return the result . * @ param duration the duration to subtract from this object * @ param unit the unit of the duration being subtracted ; may not be null * @ return the total duration */ public Duration subtract ( long duratio...
long durationInNanos = TimeUnit . NANOSECONDS . convert ( duration , unit ) ; return new Duration ( this . durationInNanos - durationInNanos ) ;
public class AbstractGeneratedSQLTransform { /** * / * ( non - Javadoc ) * @ see com . abubusoft . kripton . processor . sqlite . transform . SQLTransform # generateReadPropertyFromCursor ( com . squareup . javapoet . MethodSpec . Builder , com . squareup . javapoet . TypeName , java . lang . String , com . abubusoft...
methodBuilder . addCode ( setter ( beanClass , beanName , property , "$T.parse$L($L.getBlob($L))" ) , TypeUtility . mergeTypeNameWithSuffix ( beanClass , "Table" ) , formatter . convert ( property . getName ( ) ) , cursorName , indexName ) ;
public class StringArrayJsonDeserializer { /** * { @ inheritDoc } */ @ Override public String [ ] doDeserializeArray ( JsonReader reader , JsonDeserializationContext ctx , JsonDeserializerParameters params ) { } }
FastArrayString jsArray = new FastArrayString ( ) ; reader . beginArray ( ) ; while ( JsonToken . END_ARRAY != reader . peek ( ) ) { if ( JsonToken . NULL == reader . peek ( ) ) { reader . skipValue ( ) ; jsArray . push ( null ) ; } else { jsArray . push ( reader . nextString ( ) ) ; } } reader . endArray ( ) ; return ...
public class WebApp40 { /** * Throw NPE if name is null * @ see com . ibm . ws . webcontainer . webapp . WebApp # setInitParameter ( java . lang . String , java . lang . String ) */ @ Override public boolean setInitParameter ( String name , String value ) throws IllegalStateException , IllegalArgumentException { } }
if ( name == null ) { logger . logp ( Level . SEVERE , CLASS_NAME , "setInitParameter" , servlet40NLS . getString ( "name.is.null" ) ) ; throw new java . lang . NullPointerException ( servlet40NLS . getString ( "name.is.null" ) ) ; } return super . setInitParameter ( name , value ) ;
public class Roster { /** * Returns the presence info for a particular user ' s resource , or unavailable presence * if the user is offline or if no presence information is available , such as * when you are not subscribed to the user ' s presence updates . * @ param userWithResource a fully qualified XMPP ID inc...
BareJid key = userWithResource . asBareJid ( ) ; Resourcepart resource = userWithResource . getResourcepart ( ) ; Map < Resourcepart , Presence > userPresences = getPresencesInternal ( key ) ; if ( userPresences == null ) { Presence presence = new Presence ( Presence . Type . unavailable ) ; presence . setFrom ( userWi...
public class AbstractJSPExtensionProcessor { /** * PM07560 - Start */ public List getPatternList ( ) { } }
List mappings = jspConfigurationManager . getJspExtensionList ( ) ; if ( mappings . isEmpty ( ) ) return mappings ; if ( WCCustomProperties . ENABLE_JSP_MAPPING_OVERRIDE ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER ,...
public class MultimapWithProtoValuesSubject { private MultimapSubject . UsingCorrespondence < M , M > usingCorrespondence ( Iterable < ? extends M > expectedValues ) { } }
return comparingValuesUsing ( config . withExpectedMessages ( expectedValues ) . < M > toCorrespondence ( FieldScopeUtil . getSingleDescriptor ( actual ( ) . values ( ) ) ) ) ;