signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class CommerceTaxFixedRateAddressRelLocalServiceWrapper { /** * Creates a new commerce tax fixed rate address rel with the primary key . Does not add the commerce tax fixed rate address rel to the database .
* @ param commerceTaxFixedRateAddressRelId the primary key for the new commerce tax fixed rate address ... | return _commerceTaxFixedRateAddressRelLocalService . createCommerceTaxFixedRateAddressRel ( commerceTaxFixedRateAddressRelId ) ; |
public class ImageLoader { /** * Tries to load image from specified file .
* @ param file the image file
* @ return loaded Image .
* @ throws ImageLoaderException if no image could be loaded from the file .
* @ since 1.0 */
public static BufferedImage loadImage ( File file ) { } } | try { BufferedImage bimg = ImageIO . read ( file ) ; if ( bimg == null ) { throw new ImageLoaderException ( "Could not load Image! ImageIO.read() returned null." ) ; } return bimg ; } catch ( IOException e ) { throw new ImageLoaderException ( e ) ; } |
public class NodePropertiesSummaryMarshaller { /** * Marshall the given parameter object . */
public void marshall ( NodePropertiesSummary nodePropertiesSummary , ProtocolMarshaller protocolMarshaller ) { } } | if ( nodePropertiesSummary == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( nodePropertiesSummary . getIsMainNode ( ) , ISMAINNODE_BINDING ) ; protocolMarshaller . marshall ( nodePropertiesSummary . getNumNodes ( ) , NUMNODES_BINDING ) ; p... |
public class DescribeWorkspacesConnectionStatusResult { /** * Information about the connection status of the WorkSpace .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setWorkspacesConnectionStatus ( java . util . Collection ) } or
* { @ link # withWorkspa... | if ( this . workspacesConnectionStatus == null ) { setWorkspacesConnectionStatus ( new com . amazonaws . internal . SdkInternalList < WorkspaceConnectionStatus > ( workspacesConnectionStatus . length ) ) ; } for ( WorkspaceConnectionStatus ele : workspacesConnectionStatus ) { this . workspacesConnectionStatus . add ( e... |
public class FetcherFactory { /** * 获取抓取器实例 , 记得释放资源 , 它依赖Conf模块 */
public static FetcherMgr getFetcherMgr ( ) throws Exception { } } | if ( ! ConfigMgr . isInit ( ) ) { throw new Exception ( "ConfigMgr should be init before FetcherFactory.getFetcherMgr" ) ; } // 获取一个默认的抓取器
RestfulMgr restfulMgr = RestfulFactory . getRestfulMgrNomal ( ) ; FetcherMgr fetcherMgr = new FetcherMgrImpl ( restfulMgr , DisClientConfig . getInstance ( ) . CONF_SERVER_URL_RETRY... |
public class OmsVectorWriter { /** * Fast write access mode .
* @ param path the vector file path .
* @ param featureCollection the { @ link FeatureCollection } to write .
* @ throws IOException */
public static void writeVector ( String path , SimpleFeatureCollection featureCollection ) throws IOException { } } | OmsVectorWriter writer = new OmsVectorWriter ( ) ; writer . file = path ; writer . inVector = featureCollection ; writer . process ( ) ; |
public class TopicProducerSpringProvider { /** * 发送kafka消息 ( 可选择是否异步发送 )
* @ param topicName
* @ param message
* @ param asynSend 是否异步发送
* @ return */
public boolean publish ( String topicName , DefaultMessage message , boolean asynSend ) { } } | if ( routeEnv != null ) topicName = routeEnv + "." + topicName ; return producer . publish ( topicName , message , asynSend ) ; |
public class RuleSessionImpl { /** * / * ( non - Javadoc )
* @ see nz . co . senanque . rules . RuleSession # exclude ( nz . co . senanque . validationengine . ProxyField , java . lang . String , nz . co . senanque . rules . RuleContext ) */
public void exclude ( RuleProxyField ruleProxyField , String key , RuleConte... | if ( key . equals ( ruleProxyField . getValue ( ) ) ) // this does not match when it should
{ String message = m_messageSourceAccessor . getMessage ( "nz.co.senanque.rules.invalid.exclude" , new Object [ ] { ruleProxyField . getPropertyMetadata ( ) . getLabelName ( ) , key } ) ; throw new InferenceException ( message )... |
public class ESResponseWrapper { /** * Gets the aggregated result .
* @ param internalAggs
* the internal aggs
* @ param identifier
* the identifier
* @ param exp
* the exp
* @ return the aggregated result */
private Object getAggregatedResult ( InternalAggregations internalAggs , String identifier , Expr... | switch ( identifier ) { case Expression . MIN : return ( ( ( InternalMin ) internalAggs . get ( exp . toParsedText ( ) ) ) . getValue ( ) ) ; case Expression . MAX : return ( ( ( InternalMax ) internalAggs . get ( exp . toParsedText ( ) ) ) . getValue ( ) ) ; case Expression . AVG : return ( ( ( InternalAvg ) internalA... |
public class JsApiMessageImpl { /** * Set the transportVersion field in the message header to the given value .
* This method is package visibility as it is also used by JsJmsMessageImpl
* @ param value The value for the field , which must be a String . */
final void setTransportVersion ( Object value ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setTransportVersion" , value ) ; getHdr2 ( ) . setField ( JsHdr2Access . TRANSPORTVERSION_DATA , value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setTra... |
public class IceAgent { /** * Fires an event when all candidate pairs are selected .
* @ param candidatePair
* The selected candidate pair */
private void fireCandidatePairSelectedEvent ( ) { } } | // Stop the ICE Agent
this . stop ( ) ; // Fire the event to all listener
List < IceEventListener > listeners ; synchronized ( this . iceListeners ) { listeners = new ArrayList < IceEventListener > ( this . iceListeners ) ; } SelectedCandidatesEvent event = new SelectedCandidatesEvent ( this ) ; for ( IceEventListener ... |
public class PureXbasePackageImpl { /** * Complete the initialization of the package and its meta - model . This
* method is guarded to have no affect on any invocation but its first .
* < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void initializePackageContents ( ) ... | if ( isInitialized ) return ; isInitialized = true ; // Initialize package
setName ( eNAME ) ; setNsPrefix ( eNS_PREFIX ) ; setNsURI ( eNS_URI ) ; // Obtain other dependent packages
XtypePackage theXtypePackage = ( XtypePackage ) EPackage . Registry . INSTANCE . getEPackage ( XtypePackage . eNS_URI ) ; XbasePackage the... |
public class XsdDataItem { /** * Called when some child ( or child of a child ) has a REDEFINES clause . We
* look up our children for an item matching the COBOL name of the REDEFINES
* object . If found , we update its isRedefined member , otherwise we
* propagate the request to our own parent .
* @ param cobo... | boolean found = false ; for ( XsdDataItem child : getChildren ( ) ) { if ( child . getCobolName ( ) . equals ( cobolName ) ) { child . setIsRedefined ( true ) ; found = true ; break ; } } if ( ! found && getParent ( ) != null ) { getParent ( ) . updateRedefinition ( cobolName ) ; } |
public class AbstractExpressionBasedDAOValidatorRule { /** * Methode de construction de la requete
* @ param target Objet cible
* @ returnRequete */
protected Query buildQuery ( Object target ) { } } | // Si le modele est null
if ( expressionModel == null ) return null ; // Instanciation de la requete
Query query = this . entityManager . createQuery ( expressionModel . getComputedExpression ( ) ) ; // MAP des parametres
Map < String , String > parameters = expressionModel . getParameters ( ) ; // Si la MAP n ' est pa... |
public class LongTuples { /** * Returns a comparator that compares tuples based on the specified
* { @ link Order } . If the given order is < code > null < / code > , then
* < code > null < / code > will be returned .
* @ param order The { @ link Order }
* @ return The comparator . */
public static Comparator <... | if ( order == Order . LEXICOGRAPHICAL ) { return ( t0 , t1 ) -> compareLexicographically ( t0 , t1 ) ; } if ( order == Order . COLEXICOGRAPHICAL ) { return ( t0 , t1 ) -> compareColexicographically ( t0 , t1 ) ; } return null ; |
public class Streams { /** * Read the data from the input stream and write to the outputstream , filtering with an Ant FilterSet .
* @ param in inputstream
* @ param out outputstream
* @ param set FilterSet to use
* @ throws java . io . IOException if thrown by underlying io operations */
public static void cop... | final BufferedReader reader = new BufferedReader ( new InputStreamReader ( in ) ) ; final BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( out ) ) ; String lSep = System . getProperty ( "line.separator" ) ; String line = reader . readLine ( ) ; while ( null != line ) { writer . write ( set . replac... |
public class Utils { /** * Resolves the setter name for the property whose name is ' propertyName ' whose type is ' valueType '
* in the entity bean whose class is ' entityClass ' .
* If we don ' t find a setter following Java ' s naming conventions , before throwing an exception we try to
* resolve the setter fo... | Method setter ; String setterName = "set" + propertyName . substring ( 0 , 1 ) . toUpperCase ( ) + propertyName . substring ( 1 ) ; try { setter = entityClass . getMethod ( setterName , valueType ) ; } catch ( NoSuchMethodException e ) { // let ' s try with scala setter name
try { setter = entityClass . getMethod ( pro... |
public class ClassDiscoveryUtil { /** * Returns an array of concrete classes in the given package that implement
* all of the specified interfaces .
* @ param basePackage the name of the package containing the classes to discover
* @ param requiredInterfaces the intefaces that the returned classes must implement ... | List classes = new ArrayList ( ) ; ClassCriteria criteria = new ClassCriteria ( requiredInterfaces ) ; String basePath = basePackage . replace ( '.' , File . separatorChar ) ; String [ ] resourcesNames = classpathResources . getResources ( basePath , criteria ) ; for ( int i = 0 ; i < resourcesNames . length ; i ++ ) {... |
public class JobTracker { /** * Update the last recorded status for the given task tracker .
* It assumes that the taskTrackers are locked on entry .
* @ param trackerName The name of the tracker
* @ param status The new status for the task tracker
* @ return Was an old status found ? */
boolean updateTaskTrack... | TaskTracker tt = getTaskTracker ( trackerName ) ; TaskTrackerStatus oldStatus = ( tt == null ) ? null : tt . getStatus ( ) ; // update the total cluster capacity first
if ( status != null ) { // we have a fresh tasktracker status
if ( ! faultyTrackers . isBlacklisted ( status . getHost ( ) ) ) { // if the task tracker ... |
public class EscapedFunctions2 { /** * curtime to current _ time translation
* @ param buf The buffer to append into
* @ param parsedArgs arguments
* @ throws SQLException if something wrong happens */
public static void sqlcurtime ( StringBuilder buf , List < ? extends CharSequence > parsedArgs ) throws SQLExcep... | zeroArgumentFunctionCall ( buf , "current_time" , "curtime" , parsedArgs ) ; |
public class MessageBox { public void setMessageStyleType ( MessageStyleType messageStyleType ) { } } | if ( messageStyleType == null ) { icon . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; } else { icon . getElement ( ) . getStyle ( ) . setDisplay ( Display . BLOCK ) ; icon . setStyleName ( resource . css ( ) . messageBoxIcon ( ) ) ; switch ( messageStyleType ) { case HELP : icon . addStyleName ( reso... |
public class GeoServiceItemComparator { /** * { @ inheritDoc } */
@ Override public int compare ( final GeoServiceItem o1 , final GeoServiceItem o2 ) { } } | return o1 . getModernPlaceName ( ) . compareTo ( o2 . getModernPlaceName ( ) ) ; |
public class ResourceLocalIdentifierImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setResLID ( Integer newResLID ) { } } | Integer oldResLID = resLID ; resLID = newResLID ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . RESOURCE_LOCAL_IDENTIFIER__RES_LID , oldResLID , resLID ) ) ; |
public class GVRPicker { /** * Propagate onTouchStart events to listeners
* @ param hit collision object */
protected void propagateOnTouch ( GVRPickedObject hit ) { } } | if ( mEventOptions . contains ( EventOptions . SEND_TOUCH_EVENTS ) ) { GVREventManager eventManager = getGVRContext ( ) . getEventManager ( ) ; GVRSceneObject hitObject = hit . getHitObject ( ) ; if ( mEventOptions . contains ( EventOptions . SEND_TO_LISTENERS ) ) { eventManager . sendEvent ( this , ITouchEvents . clas... |
public class SegmentServiceImpl { /** * Frees a segment to be reused . Called by the segment - gc service . */
public void freeSegment ( SegmentKelp segment ) throws IOException { } } | // System . out . println ( " FREE : " + segment ) ;
SegmentMeta segmentMeta = findSegmentMeta ( segment . length ( ) ) ; segmentMeta . remove ( segment ) ; segment . close ( ) ; segmentMeta . addFree ( segment . extent ( ) ) ; // System . out . println ( " FREE : " + segmentMeta . getFreeCount ( ) + " " + segment . ge... |
public class InjectInjectionBinding { /** * Returns the object to be injected .
* This is a different ( new ) instance every time the method is called .
* @ throws Exception
* if a problem occurs while creating the instance to be
* injected . */
@ SuppressWarnings ( "unchecked" ) @ Override public Object getInj... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getInjectionObjectInstance" , new Object [ ] { Util . identity ( targetObject ) , Util . identity ( targetContext ) } ) ; } WeldCreationalContext < Object > cc = null ; if ( targetContext == null ) { if ( ! ( targetObject in... |
public class TrivialSwap { /** * Swap two elements of array at the specified positions
* @ param < E > the type of elements in this list .
* @ param array array that will have two of its values swapped .
* @ param index1 one of the indexes of the array .
* @ param index2 other index of the array . */
public sta... | TrivialSwap . swap ( array , index1 , array , index2 ) ; |
public class DefaultGroovyMethods { /** * Sorts the Iterable using the given Comparator . If the Iterable is a List and mutate
* is true , it is sorted in place and returned . Otherwise , the elements are first placed
* into a new list which is then sorted and returned - leaving the original Iterable unchanged .
... | List < T > list = mutate ? asList ( self ) : toList ( self ) ; Collections . sort ( list , comparator ) ; return list ; |
public class ChatController { /** * Checks services for missing events in stored conversations .
* @ param client Foundation client .
* @ param conversationComparison Describes differences in local and remote conversation list .
* @ return Observable returning unchanged argument to further processing . */
private... | if ( ! conversationComparison . isSuccessful || conversationComparison . conversationsToUpdate . isEmpty ( ) ) { return Observable . fromCallable ( ( ) -> conversationComparison ) ; } return synchroniseEvents ( client , conversationComparison . conversationsToUpdate , new ArrayList < > ( ) ) . map ( result -> { if ( co... |
public class IndexSerializer { public boolean supports ( final MixedIndexType index , final ParameterIndexField field ) { } } | IndexInformation indexinfo = mixedIndexes . get ( index . getBackingIndexName ( ) ) ; Preconditions . checkArgument ( indexinfo != null , "Index is unknown or not configured: %s" , index . getBackingIndexName ( ) ) ; return indexinfo . supports ( getKeyInformation ( field ) ) ; |
public class ComponentNameSpaceConfiguration { /** * F46994.3 */
private String getNameSpaceID ( Context javaColonContext ) { } } | String nsID = null ; String context = javaColonContext != null ? javaColonContext . toString ( ) : null ; if ( context != null ) { nsID = "UNKNOWN" ; int idx = context . indexOf ( "_nameSpaceID=" ) ; if ( idx != - 1 ) { nsID = context . substring ( idx + 13 ) ; idx = nsID . indexOf ( ',' ) ; if ( idx != - 1 ) { nsID = ... |
public class VisOdomMonoPlaneInfinity { /** * Estimates only rotation using points at infinity . A robust estimation algorithm is used which finds an angle
* which maximizes the inlier set , like RANSAC does . Unlike RANSAC this will produce an optimal result . */
private void estimateFar ( ) { } } | // do nothing if there are objects at infinity
farInlierCount = 0 ; if ( farAngles . size == 0 ) return ; farAnglesCopy . reset ( ) ; farAnglesCopy . addAll ( farAngles ) ; // find angle which maximizes inlier set
farAngle = maximizeCountInSpread ( farAnglesCopy . data , farAngles . size , 2 * thresholdFarAngleError ) ... |
public class CalendarCLA { /** * { @ inheritDoc } */
@ Override public Calendar [ ] getValueAsCalendarArray ( ) throws ParseException { } } | final Calendar [ ] result = new Calendar [ size ( ) ] ; for ( int r = 0 ; r < size ( ) ; r ++ ) result [ r ] = getValue ( r ) ; return result ; |
public class FileSystemResourceReader { /** * ( non - Javadoc )
* @ see
* net . jawr . web . resource . handler . reader . ResourceBrowser # isDirectory ( java .
* lang . String ) */
@ Override public boolean isDirectory ( String dirPath ) { } } | String path = dirPath . replace ( '/' , File . separatorChar ) ; return new File ( baseDir , path ) . isDirectory ( ) ; |
public class BitmapLruPool { /** * Removes buffers from the pool until it is under its size limit . */
private synchronized void trim ( ) { } } | while ( currentSize > sizeLimit ) { Bitmap bitmap = bitmapsByLastUse . remove ( 0 ) ; bitmapsBySize . remove ( bitmap ) ; currentSize -= getBitmapSize ( bitmap ) ; } |
public class ButtonFactory { /** * Creates a web view button .
* @ param title
* the button label .
* @ param url
* the URL to whom redirect when clicked .
* @ param ratioType
* the web view ratio type .
* @ return the button */
public static Button createUrlButton ( String title , String url , WebViewHei... | return new WebUrlButton ( title , url , ratioType ) ; |
public class AFPChainXMLParser { /** * Takes an XML representation of the alignment and flips the positions of name1 and name2
* @ param xml String representing the alignment
* @ return XML representation of the flipped alignment */
public static String flipAlignment ( String xml ) throws IOException , StructureExc... | AFPChain [ ] afps = parseMultiXML ( xml ) ; if ( afps . length < 1 ) return null ; if ( afps . length == 1 ) { AFPChain newChain = AFPChainFlipper . flipChain ( afps [ 0 ] ) ; if ( newChain . getAlgorithmName ( ) == null ) { newChain . setAlgorithmName ( DEFAULT_ALGORITHM_NAME ) ; } return AFPChainXMLConverter . toXML ... |
public class User { /** * parse the user to an Actor ( Object ) JSON map
* @ return Actor ( Object ) JSON map representing this user < br >
* ( Activitystrea . ms ) */
public Map < String , Object > toActorJSON ( ) { } } | final HashMap < String , Object > actor = new LinkedHashMap < String , Object > ( ) ; actor . put ( "objectType" , "person" ) ; actor . put ( "id" , this . id ) ; actor . put ( "displayName" , this . displayName ) ; return actor ; |
public class RegularPactTask { /** * Initialization method . Runs in the execution graph setup phase in the JobManager
* and as a setup method on the TaskManager . */
@ Override public void registerInputOutput ( ) { } } | if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( formatLogString ( "Start registering input and output." ) ) ; } // get the classloader first . the classloader might have been set before by mock environments during testing
if ( this . userCodeClassLoader == null ) { try { this . userCodeClassLoader = LibraryCacheManager... |
public class NettyServerHandler { /** * Handler for commands sent from the stream . */
@ Override public void write ( ChannelHandlerContext ctx , Object msg , ChannelPromise promise ) throws Exception { } } | if ( msg instanceof SendGrpcFrameCommand ) { sendGrpcFrame ( ctx , ( SendGrpcFrameCommand ) msg , promise ) ; } else if ( msg instanceof SendResponseHeadersCommand ) { sendResponseHeaders ( ctx , ( SendResponseHeadersCommand ) msg , promise ) ; } else if ( msg instanceof CancelServerStreamCommand ) { cancelStream ( ctx... |
public class UserProfileManager { /** * Get UserProfile for the subject on the thread .
* @ return the user profile for the social media authenticated user . */
public static UserProfile getUserProfile ( ) { } } | UserProfile userProfile = null ; Subject subject = getSubject ( ) ; Iterator < UserProfile > userProfilesIterator = subject . getPrivateCredentials ( UserProfile . class ) . iterator ( ) ; if ( userProfilesIterator . hasNext ( ) ) { userProfile = userProfilesIterator . next ( ) ; } return userProfile ; |
public class PortletContextLoader { /** * Return the { @ link org . springframework . context . ApplicationContextInitializer } implementation classes to use
* if any have been specified by { @ link # CONTEXT _ INITIALIZER _ CLASSES _ PARAM } .
* @ param portletContext current portlet context
* @ see # CONTEXT _ ... | String classNames = portletContext . getInitParameter ( CONTEXT_INITIALIZER_CLASSES_PARAM ) ; List < Class < ApplicationContextInitializer < ConfigurableApplicationContext > > > classes = new ArrayList < Class < ApplicationContextInitializer < ConfigurableApplicationContext > > > ( ) ; if ( classNames != null ) { for (... |
public class GraphIterator { /** * Replies the next segments .
* @ param avoid _ visited _ segments is < code > true < / code > to avoid to reply already visited segments , otherwise < code > false < / code >
* @ param element is the element from which the next segments must be replied .
* @ return the list of th... | assert this . allowManyReplies || this . visited != null ; if ( element != null ) { final ST segment = element . getSegment ( ) ; final PT point = element . getPoint ( ) ; if ( ( segment != null ) && ( point != null ) ) { final PT pts = segment . getOtherSidePoint ( point ) ; if ( pts != null ) { final double distanceT... |
public class AmazonRoute53Client { /** * Updates the comment for a specified hosted zone .
* @ param updateHostedZoneCommentRequest
* A request to update the comment for a hosted zone .
* @ return Result of the UpdateHostedZoneComment operation returned by the service .
* @ throws NoSuchHostedZoneException
* ... | request = beforeClientExecution ( request ) ; return executeUpdateHostedZoneComment ( request ) ; |
public class Edge { /** * Return a string representation of the edge . */
public String formatAsString ( boolean reverse ) { } } | BasicBlock source = getSource ( ) ; BasicBlock target = getTarget ( ) ; StringBuilder buf = new StringBuilder ( ) ; buf . append ( reverse ? "REVERSE_EDGE(" : "EDGE(" ) ; buf . append ( getLabel ( ) ) ; buf . append ( ") type " ) ; buf . append ( edgeTypeToString ( type ) ) ; buf . append ( " from block " ) ; buf . app... |
public class CircuitBreakerRetry { /** * Resets the circuit state to { @ link CircuitState # CLOSED } .
* @ return The current state */
private CircuitState halfOpenCircuit ( ) { } } | if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Half Opening Circuit Breaker [{}]" , method ) ; } lastError = null ; this . childState = ( MutableRetryState ) retryStateBuilder . build ( ) ; return state . getAndSet ( CircuitState . HALF_OPEN ) ; |
public class IfcRelCoversSpacesImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcCovering > getRelatedCoverings ( ) { } } | return ( EList < IfcCovering > ) eGet ( Ifc4Package . Literals . IFC_REL_COVERS_SPACES__RELATED_COVERINGS , true ) ; |
public class DynamicReportBuilder { /** * For variable registration only ( can bee later referenced in custom
* expression )
* @ param name
* @ param col
* @ param op
* @ return */
public DynamicReportBuilder addGlobalVariable ( String name , AbstractColumn col , DJCalculation op ) { } } | globalVariablesGroup . addVariable ( new DJGroupVariableDef ( name , col , op ) ) ; return this ; |
public class EMFGeneratorFragment { /** * Adopted from GenModel # findGenPackageHelper */
private GenPackage findGenPackageByNsURI ( GenModel genModel , String nsURI ) { } } | List < GenPackage > allGenPackages = genModel . getAllGenUsedAndStaticGenPackagesWithClassifiers ( ) ; for ( GenPackage genPackage : allGenPackages ) { EPackage ecorePackage = genPackage . getEcorePackage ( ) ; if ( ecorePackage == null || ecorePackage . eIsProxy ( ) ) { throw new RuntimeException ( "Unresolved proxy: ... |
public class EntityListenersIntrospector { /** * Introspects the given listener class and finds all methods that should receive callback event
* notifications .
* @ param listenerClass
* the listener class */
private void processExternalListener ( Class < ? > listenerClass ) { } } | ExternalListenerMetadata listenerMetadata = ExternalListenerIntrospector . introspect ( listenerClass ) ; Map < CallbackType , Method > callbacks = listenerMetadata . getCallbacks ( ) ; if ( callbacks != null ) { for ( Map . Entry < CallbackType , Method > entry : callbacks . entrySet ( ) ) { validateExternalCallback (... |
public class Account { /** * Implements the Comparable & lt ; Account & gt ; interface , this is based first on if the
* account is a folder or not . This is so that during sorting , all folders are
* first in the list . Finally , it is based on the name .
* @ param o The other account to compare to .
* @ retur... | if ( this . isFolder ( ) && ! o . isFolder ( ) ) return - 1 ; else if ( ! this . isFolder ( ) && o . isFolder ( ) ) return 1 ; // First ignore case , if they equate , use case .
int result = name . compareToIgnoreCase ( o . name ) ; if ( result == 0 ) return name . compareTo ( o . name ) ; else return result ; |
public class HostSocketListener { /** * @ see org . browsermob . proxy . jetty . http . SocketListener # customizeRequest ( java . net . Socket , org . browsermob . proxy . jetty . http . HttpRequest ) */
protected void customizeRequest ( Socket socket , HttpRequest request ) { } } | request . setState ( HttpMessage . __MSG_EDITABLE ) ; if ( _host == null ) request . removeField ( HttpFields . __Host ) ; else request . setField ( HttpFields . __Host , _host ) ; request . setState ( HttpMessage . __MSG_RECEIVED ) ; super . customizeRequest ( socket , request ) ; |
public class GBSTree { /** * Add to current or successor .
* < ol >
* < li > There is no right child
* < li > There may or may not be a left child .
* < li > INSERT _ KEY > MEDIAN of current node .
* < li > INSERT _ KEY < MEDIAN of successor ( if there is one )
* < / ol >
* < p > In the example below , if... | if ( l == null ) /* There is no upper successor */
rightAddNoSuccessor ( p , new1 , ip , point ) ; else /* There is an upper successor */
rightAddWithSuccessor ( p , l , new1 , ip , point ) ; |
public class QrCodeDecoderImage { /** * Detects QR Codes inside image using position pattern graph
* @ param pps position pattern graph
* @ param gray Gray input image */
public void process ( FastQueue < PositionPatternNode > pps , T gray ) { } } | gridReader . setImage ( gray ) ; storageQR . reset ( ) ; successes . clear ( ) ; failures . clear ( ) ; for ( int i = 0 ; i < pps . size ; i ++ ) { PositionPatternNode ppn = pps . get ( i ) ; for ( int j = 3 , k = 0 ; k < 4 ; j = k , k ++ ) { if ( ppn . edges [ j ] != null && ppn . edges [ k ] != null ) { QrCode qr = s... |
public class LocationAttributes { /** * Returns the location of an element that has been processed by this pipe
* ( DOM flavor ) . If the location is to be kept into an object built from
* this element , consider using { @ link # getLocation ( Element ) } and the
* { @ link Locatable } interface .
* @ param ele... | Attr srcAttr = elem . getAttributeNodeNS ( URI , SRC_ATTR ) ; if ( srcAttr == null ) { return LocationUtils . UNKNOWN_STRING ; } return srcAttr . getValue ( ) + ":" + elem . getAttributeNS ( URI , LINE_ATTR ) + ":" + elem . getAttributeNS ( URI , COL_ATTR ) ; |
public class VariantUtils { /** * Returns all variant keys from the map of variant set
* @ param variants
* the map of variant set
* @ param fixedVariants
* the fixed variant map
* @ return all variant keys */
public static List < String > getAllVariantKeysFromFixedVariants ( Map < String , VariantSet > varia... | Map < String , VariantSet > tempVariants = new HashMap < > ( variants ) ; if ( fixedVariants != null ) { for ( Entry < String , String > entry : fixedVariants . entrySet ( ) ) { VariantSet variantSet = tempVariants . get ( entry . getKey ( ) ) ; if ( variantSet != null ) { String variantValue = variantSet . getDefaultV... |
public class ServiceClient { /** * Not exposed directly - the Query object passed as parameter actually contains results . . . */
@ Override public List < JobInstance > getJobs ( Query query ) { } } | return JqmClientFactory . getClient ( ) . getJobs ( query ) ; |
public class ARFFParser { /** * Try to parse the bytes as ARFF format */
static ParseSetup guessSetup ( ByteVec bv , byte [ ] bits , byte sep , boolean singleQuotes , String [ ] columnNames , String [ ] [ ] naStrings , byte [ ] nonDataLineMarkers ) { } } | if ( columnNames != null ) throw new UnsupportedOperationException ( "ARFFParser doesn't accept columnNames." ) ; if ( nonDataLineMarkers == null ) nonDataLineMarkers = NON_DATA_LINE_MARKERS_DEFAULT ; // Parse all lines starting with @ until EOF or @ DATA
boolean haveData = false ; String [ ] [ ] data = new String [ 0 ... |
public class CorneredButton { /** * disable之后延时自动enable */
private void delayEnableMyself ( ) { } } | if ( ! autoDisable ) { return ; } setEnabled ( false ) ; postDelayed ( new Runnable ( ) { @ Override public void run ( ) { setEnabled ( true ) ; } } , disableDuration ) ; |
public class LineGridStrategy { /** * CSOFF : ParameterNumber */
private SimpleFeature createFeature ( final SimpleFeatureBuilder featureBuilder , final GeometryFactory geometryFactory , final GridParam layerData , final AxisDirection direction , final int numDimensions , final double spacing , final double x , final d... | // CSON : ParameterNumber
featureBuilder . reset ( ) ; final int numPoints = layerData . pointsInLine + 1 ; // add 1 for the last point
final LinearCoordinateSequence coordinateSequence = new LinearCoordinateSequence ( ) . setDimension ( numDimensions ) . setOrigin ( x , y ) . setVariableAxis ( ordinate ) . setNumPoint... |
public class SplashScreen { /** * Close this window . */
public void close ( ) { } } | JWindow w ; synchronized ( this ) { if ( ! synch . isUnblocked ( ) ) synch . unblock ( ) ; if ( win == null ) return ; w = win ; win = null ; } if ( event != null ) event . fire ( ) ; w . setVisible ( false ) ; w . removeAll ( ) ; w . dispose ( ) ; RepaintManager . setCurrentManager ( null ) ; logoContainer = null ; ti... |
public class SwaggerBuilder { /** * Returns the description of a parameter .
* @ param parameter
* @ return the parameter description */
protected String getDescription ( Parameter parameter ) { } } | if ( parameter . isAnnotationPresent ( Desc . class ) ) { Desc annotation = parameter . getAnnotation ( Desc . class ) ; return translate ( annotation . key ( ) , annotation . value ( ) ) ; } return null ; |
public class SQLTypeAdapterUtils { /** * Gets the adapter .
* @ param < E > the element type
* @ param clazz the clazz
* @ return the adapter */
public static < E extends SqlTypeAdapter < ? , ? > > E getAdapter ( Class < E > clazz ) { } } | @ SuppressWarnings ( "unchecked" ) E adapter = ( E ) cache . get ( clazz ) ; if ( adapter == null ) { try { lock . lock ( ) ; adapter = clazz . newInstance ( ) ; cache . put ( clazz , adapter ) ; } catch ( Throwable e ) { throw ( new KriptonRuntimeException ( e ) ) ; } finally { lock . unlock ( ) ; } } return adapter ; |
public class TemplateParserContext { /** * Add a local variable coming from a Variable destructuring to the current context .
* @ param propertyType The type of the property on the destructured variable
* @ param propertyName The name of the property on the destructured variable
* @ param destructuredVariable The... | return contextLayers . getFirst ( ) . addDestructuredProperty ( propertyType , propertyName , destructuredVariable ) ; |
public class Context { /** * Determines the strategy to escape Soy msg tags .
* < p > Importantly , this determines the context that the message should be considered in , how the
* print nodes will be escaped , and how the entire message will be escaped . We need different
* strategies in different contexts becau... | switch ( state ) { case HTML_PCDATA : // In normal HTML PCDATA context , it makes sense to escape all of the print nodes , but not
// escape the entire message . This allows Soy to support putting anchors and other small
// bits of HTML in messages .
return Optional . of ( new MsgEscapingStrategy ( this , ImmutableList... |
public class AWSCognitoIdentityProviderClient { /** * Creates the user pool client .
* @ param createUserPoolClientRequest
* Represents the request to create a user pool client .
* @ return Result of the CreateUserPoolClient operation returned by the service .
* @ throws InvalidParameterException
* This excep... | request = beforeClientExecution ( request ) ; return executeCreateUserPoolClient ( request ) ; |
public class CommerceShippingFixedOptionPersistenceImpl { /** * Returns a range of all the commerce shipping fixed options where commerceShippingMethodId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code... | return findByCommerceShippingMethodId ( commerceShippingMethodId , start , end , null ) ; |
public class CommerceTaxFixedRateAddressRelPersistenceImpl { /** * Removes all the commerce tax fixed rate address rels where commerceTaxMethodId = & # 63 ; from the database .
* @ param commerceTaxMethodId the commerce tax method ID */
@ Override public void removeByCommerceTaxMethodId ( long commerceTaxMethodId ) {... | for ( CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel : findByCommerceTaxMethodId ( commerceTaxMethodId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceTaxFixedRateAddressRel ) ; } |
public class OutputUtil { /** * Appends the formatted list of function arguments to a string builder . The individual
* arguments are separated by spaces with the exception of commas .
* @ param sb the string builder to be modified
* @ param list the list of function arguments
* @ return Modified < code > sb < ... | Term < ? > prev = null , pprev = null ; for ( Term < ? > elem : list ) { boolean sep = true ; if ( elem instanceof TermOperator && ( ( TermOperator ) elem ) . getValue ( ) == ',' ) sep = false ; // no spaces before commas
if ( ( prev != null && prev instanceof TermOperator && ( ( TermOperator ) prev ) . getValue ( ) ==... |
public class CharsTrieBuilder { /** * { @ inheritDoc }
* @ deprecated This API is ICU internal only .
* @ hide draft / provisional / internal are hidden on Android */
@ Deprecated @ Override protected int writeValueAndType ( boolean hasValue , int value , int node ) { } } | if ( ! hasValue ) { return write ( node ) ; } int length ; if ( value < 0 || value > CharsTrie . kMaxTwoUnitNodeValue ) { intUnits [ 0 ] = ( char ) ( CharsTrie . kThreeUnitNodeValueLead ) ; intUnits [ 1 ] = ( char ) ( value >> 16 ) ; intUnits [ 2 ] = ( char ) value ; length = 3 ; } else if ( value <= CharsTrie . kMaxOn... |
public class Globs { /** * TBD */
private static char next ( String glob , int i ) { } } | if ( i < glob . length ( ) ) { return glob . charAt ( i ) ; } return EOL ; |
public class Project { /** * An array of < code > ProjectArtifacts < / code > objects .
* @ param secondaryArtifacts
* An array of < code > ProjectArtifacts < / code > objects . */
public void setSecondaryArtifacts ( java . util . Collection < ProjectArtifacts > secondaryArtifacts ) { } } | if ( secondaryArtifacts == null ) { this . secondaryArtifacts = null ; return ; } this . secondaryArtifacts = new java . util . ArrayList < ProjectArtifacts > ( secondaryArtifacts ) ; |
public class TreeNode { /** * Deletes a node from the tree . The caller of this method needs to check , if the
* node is actually empty , because this method only performs the deletion .
* @ param root The node that needs to be deleted .
* @ param < T > The type of the start and end points of the intervals .
* ... | if ( root . left == null && root . right == null ) return null ; if ( root . left == null ) { // If the left child is empty , then the right subtree can consist of at most
// one node , otherwise it would have been unbalanced . So , just return
// the right child .
return root . right ; } else { TreeNode < T > node = r... |
public class ShutdownManager { /** * Adds a constraint that a certain shutdowner must be run before another . */
public void addConstraint ( Shutdowner lhs , Constraint constraint , Shutdowner rhs ) { } } | switch ( constraint ) { case RUNS_BEFORE : _cycle . addShutdownConstraint ( lhs , Lifecycle . Constraint . RUNS_BEFORE , rhs ) ; break ; case RUNS_AFTER : _cycle . addShutdownConstraint ( lhs , Lifecycle . Constraint . RUNS_AFTER , rhs ) ; break ; } |
public class TemplateEngine { /** * Retrieves the lines of code where an exception occurred
* @ param errorLine The line number of the exception
* @ param sourcePath The path to the source code file
* @ return A list of source code with the exception and surrounding lines
* @ throws IOException If an IO excepti... | Objects . requireNonNull ( sourcePath , Required . SOURCE_PATH . toString ( ) ) ; StringBuilder buffer = new StringBuilder ( ) ; buffer . append ( System . getProperty ( "user.dir" ) ) . append ( File . separator ) . append ( "src" ) . append ( File . separator ) . append ( "main" ) . append ( File . separator ) . appe... |
public class Tesseract1 { /** * Performs OCR operation .
* @ param inputFile an image file
* @ param rect the bounding rectangle defines the region of the image to be
* recognized . A rectangle of zero dimension or < code > null < / code > indicates
* the whole image .
* @ return the recognized text
* @ thr... | try { File imageFile = ImageIOHelper . getImageFile ( inputFile ) ; String imageFileFormat = ImageIOHelper . getImageFileFormat ( imageFile ) ; Iterator < ImageReader > readers = ImageIO . getImageReadersByFormatName ( imageFileFormat ) ; if ( ! readers . hasNext ( ) ) { throw new RuntimeException ( ImageIOHelper . JAI... |
public class DebugCommand { /** * コマンド実行結果のテストステップインデックスを取得します 。
* @ param idx
* テストステップインデックス
* @ param testScript
* テストスクリプト
* @ return コマンド実行結果のテストステップインデックス */
int execute ( final int idx , TestScript testScript , ApplicationContext appCtx ) { } } | int ret = idx ; switch ( key ) { case START : ret = idx + 1 ; break ; case BACK : ret = idx - 1 ; break ; case CURRENT : ret = idx ; break ; case FORWARD : ret = idx + 1 ; break ; case EXEC_STEP_NO : ret = testScript . getIndexByScriptNo ( body ) ; break ; case SET_STEP_NO : ret = testScript . getIndexByScriptNo ( body... |
public class ZooKeeperUtils { /** * Creates an instance of { @ link ZooKeeperStateHandleStore } .
* @ param client ZK client
* @ param path Path to use for the client namespace
* @ param stateStorage RetrievableStateStorageHelper that persist the actual state and whose
* returned state handle is then written to... | return new ZooKeeperStateHandleStore < > ( useNamespaceAndEnsurePath ( client , path ) , stateStorage ) ; |
public class ReflectUtils { /** * 得到类所在地址 , 可以是文件 , 也可以是jar包
* @ param cls the cls
* @ return the code base */
public static String getCodeBase ( Class < ? > cls ) { } } | if ( cls == null ) { return null ; } ProtectionDomain domain = cls . getProtectionDomain ( ) ; if ( domain == null ) { return null ; } CodeSource source = domain . getCodeSource ( ) ; if ( source == null ) { return null ; } URL location = source . getLocation ( ) ; if ( location == null ) { return null ; } return locat... |
public class ArrayUtil { /** * 获取子数组
* @ param array 数组
* @ param start 开始位置 ( 包括 )
* @ param end 结束位置 ( 不包括 )
* @ return 新的数组
* @ since 4.0.6 */
public static Object [ ] sub ( Object array , int start , int end ) { } } | return sub ( array , start , end , 1 ) ; |
public class WorkbenchEntrySet { /** * Shifts left entries with the specified hash code , starting at the specified position , and
* empties the resulting free entry .
* @ param pos a starting position .
* @ return the position cleared by the shifting process . */
protected final int shiftKeys ( int pos ) { } } | // Shift entries with the same hash .
int last , slot ; for ( ; ; ) { pos = ( ( last = pos ) + 1 ) & mask ; while ( workbenchEntry [ pos ] != null ) { slot = hashCode ( workbenchEntry [ pos ] . ipAddress ) & mask ; if ( last <= pos ? last >= slot || slot > pos : last >= slot && slot > pos ) break ; pos = ( pos + 1 ) & ... |
public class FormValidator { /** * Validates if relative path entered in text field points to an existing directory . */
public FormInputValidator directory ( VisValidatableTextField field , String errorMsg ) { } } | DirectoryValidator validator = new DirectoryValidator ( errorMsg ) ; field . addValidator ( validator ) ; add ( field ) ; return validator ; |
public class LineIterator { /** * { @ link java . util . Iterator # next ( ) } implementation .
* @ return Next line of the source stream .
* @ throws NoSuchElementException in the case of a end of file or a { @ link java . io . IOException }
* by the underlying { @ link java . io . InputStream InputStream } . In... | String ret ; if ( previousException != null ) throw new NoSuchElementException ( "Previous IOException reading from stream" ) ; if ( line == null ) { try { if ( ( line = in . readLine ( ) ) == null ) throw new NoSuchElementException ( "No more lines available" ) ; } catch ( IOException e ) { previousException = e ; thr... |
public class SystemUtil { /** * Creates a temporary directory in the given path .
* You can specify certain files to get a random unique name .
* @ param _ path where to place the temp folder
* @ param _ prefix prefix of the folder
* @ param _ length length of random chars
* @ param _ timestamp add timestamp ... | SimpleDateFormat formatter = new SimpleDateFormat ( "yyyyMMdd_HHmmss-SSS" ) ; String randomStr = StringUtil . randomString ( _length ) ; StringBuilder fileName = new StringBuilder ( ) ; if ( _prefix != null ) { fileName . append ( _prefix ) ; } fileName . append ( randomStr ) ; if ( _timestamp ) { fileName . append ( "... |
public class WapitiCRFModel { /** * 加载特征模板
* @ param br
* @ return
* @ throws IOException */
private Map < String , Integer > loadConfig ( BufferedReader br ) throws IOException { } } | Map < String , Integer > featureIndex = new HashMap < String , Integer > ( ) ; String temp = br . readLine ( ) ; // # rdr # 8/0/0
int featureNum = ObjConver . getIntValue ( StringUtil . matcherFirst ( "\\d+" , temp ) ) ; // 找到特征个数
List < int [ ] > list = new ArrayList < int [ ] > ( ) ; for ( int i = 0 ; i < featureNum ... |
public class CPOptionValuePersistenceImpl { /** * Returns the cp option values before and after the current cp option value in the ordered set where groupId = & # 63 ; .
* @ param CPOptionValueId the primary key of the current cp option value
* @ param groupId the group ID
* @ param orderByComparator the comparat... | CPOptionValue cpOptionValue = findByPrimaryKey ( CPOptionValueId ) ; Session session = null ; try { session = openSession ( ) ; CPOptionValue [ ] array = new CPOptionValueImpl [ 3 ] ; array [ 0 ] = getByGroupId_PrevAndNext ( session , cpOptionValue , groupId , orderByComparator , true ) ; array [ 1 ] = cpOptionValue ; ... |
public class Wavelet { /** * Applies the wavelet filter to a data vector a [ 0 , n - 1 ] . */
void forward ( double [ ] a , int n ) { } } | if ( n < ncof ) { return ; } if ( n > workspace . length ) { workspace = new double [ n ] ; } else { Arrays . fill ( workspace , 0 , n , 0.0 ) ; } int nmod = ncof * n ; int n1 = n - 1 ; int nh = n >> 1 ; for ( int ii = 0 , i = 0 ; i < n ; i += 2 , ii ++ ) { int ni = i + 1 + nmod + ioff ; int nj = i + 1 + nmod + joff ; ... |
public class ProjectsBase { /** * Removes the specified list of users from following the project , this will not affect project membership status .
* Returns the updated project record .
* @ param project The project to remove followers from .
* @ return Request object */
public ItemRequest < Project > removeFoll... | String path = String . format ( "/projects/%s/removeFollowers" , project ) ; return new ItemRequest < Project > ( this , Project . class , path , "POST" ) ; |
public class VicinitySampler { /** * Choose any possible quadruple of the set of atoms
* in ac and establish all of the possible bonding schemes according to
* Faulon ' s equations . */
public static List < IAtomContainer > sample ( IAtomContainer ac ) { } } | LOGGER . debug ( "RandomGenerator->mutate() Start" ) ; List < IAtomContainer > structures = new ArrayList < IAtomContainer > ( ) ; int nrOfAtoms = ac . getAtomCount ( ) ; double a11 = 0 , a12 = 0 , a22 = 0 , a21 = 0 ; double b11 = 0 , lowerborder = 0 , upperborder = 0 ; double b12 = 0 ; double b21 = 0 ; double b22 = 0 ... |
public class TagsBenchmarksUtil { /** * Gets the { @ link TagContextBinarySerializer } for the specified ' implementation ' . */
@ VisibleForTesting public static TagContextBinarySerializer getTagContextBinarySerializer ( String implementation ) { } } | if ( implementation . equals ( "impl" ) ) { // We can return the global tracer here because if impl is linked the global tracer will be
// the impl one .
// TODO ( bdrutu ) : Make everything not be a singleton ( disruptor , etc . ) and use a new
// TraceComponentImpl similar to TraceComponentImplLite .
return tagsCompo... |
public class ValueMatcherBuilder { /** * 处理间隔形式的表达式 < br >
* 处理的形式包括 :
* < ul >
* < li > < strong > a < / strong > 或 < strong > * < / strong > < / li >
* < li > < strong > a & # 47 ; b < / strong > 或 < strong > * & # 47 ; b < / strong > < / li >
* < li > < strong > a - b / 2 < / strong > < / li >
* < / ul >... | final List < String > parts = StrUtil . split ( value , StrUtil . C_SLASH ) ; int size = parts . size ( ) ; List < Integer > results ; if ( size == 1 ) { // 普通形式
results = parseRange ( value , - 1 , parser ) ; } else if ( size == 2 ) { // 间隔形式
final int step = parser . parse ( parts . get ( 1 ) ) ; if ( step < 1 ) { th... |
public class JobManagerRunner { /** * Marks this runner ' s job as not running . Other JobManager will not recover the job
* after this call .
* < p > This method never throws an exception . */
private void unregisterJobFromHighAvailability ( ) { } } | try { runningJobsRegistry . setJobFinished ( jobGraph . getJobID ( ) ) ; } catch ( Throwable t ) { log . error ( "Could not un-register from high-availability services job {} ({})." + "Other JobManager's may attempt to recover it and re-execute it." , jobGraph . getName ( ) , jobGraph . getJobID ( ) , t ) ; } |
public class GroupService { /** * Pause groups of servers
* @ param groupFilter search servers criteria by group filter
* @ return OperationFuture wrapper for Server list */
public OperationFuture < List < Server > > pause ( GroupFilter groupFilter ) { } } | return serverService ( ) . pause ( getServerSearchCriteria ( groupFilter ) ) ; |
public class CPFriendlyURLEntryUtil { /** * Returns the last cp friendly url entry in the ordered set where classNameId = & # 63 ; and classPK = & # 63 ; .
* @ param classNameId the class name ID
* @ param classPK the class pk
* @ param orderByComparator the comparator to order the set by ( optionally < code > nu... | return getPersistence ( ) . fetchByC_C_Last ( classNameId , classPK , orderByComparator ) ; |
public class MediaServicesInner { /** * Regenerates a primary or secondary key for a Media Service .
* @ param resourceGroupName Name of the resource group within the Azure subscription .
* @ param mediaServiceName Name of the Media Service .
* @ param keyType The keyType indicating which key you want to regenera... | return regenerateKeyWithServiceResponseAsync ( resourceGroupName , mediaServiceName , keyType ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class ObjectWrapper { /** * Sets the value of the specified indexed property in the wrapped object .
* @ param propertyName the name of the indexed property whose value is to be updated , cannot be { @ code null }
* @ param index the index position of the property value to be set
* @ param value the indexe... | setIndexedValue ( object , getPropertyOrThrow ( bean , propertyName ) , index , value , this ) ; |
public class Context { /** * Get the indexes of a bitset .
* @ param bits parameter
* @ return list of set bits */
public static List < Long > indexes ( final MutableBitSet bits ) { } } | List < Long > indexes = new ArrayList < > ( ( int ) bits . cardinality ( ) ) ; for ( long i = bits . nextSetBit ( 0 ) ; i >= 0 ; i = bits . nextSetBit ( i + 1 ) ) { indexes . add ( i ) ; } return indexes ; |
public class Engine { /** * Get template .
* @ param name - template name
* @ return template instance
* @ throws IOException - If an I / O error occurs
* @ throws ParseException - If the template cannot be parsed
* @ see # getEngine ( ) */
public Template getTemplate ( String name , Object args ) throws IOEx... | if ( args instanceof String ) return getTemplate ( name , ( String ) args ) ; if ( args instanceof Locale ) return getTemplate ( name , ( Locale ) args ) ; return getTemplate ( name , null , null , args ) ; |
public class Parser { /** * Match a bracketed token given the start bracket and the end bracket
* The result includes the brackets .
* @ param start
* @ param end
* @ param textProvider
* @ return true if match */
public boolean getBracketedToken ( char start , char end , TextProvider textProvider ) { } } | clearLastToken ( textProvider ) ; clearLeadingSpaces ( textProvider ) ; mark ( textProvider ) ; if ( m_debug ) debug ( "testing " + start + " " + end , textProvider ) ; StringBuilder sb = new StringBuilder ( ) ; char c = getNextChar ( textProvider ) ; if ( c != start ) { reset ( textProvider ) ; return false ; } int br... |
public class AbstractConditionalEventDefinitionBuilder { /** * Sets the condition of the conditional event definition .
* @ param conditionText the condition which should be evaluate to true or false
* @ return the builder object */
public B condition ( String conditionText ) { } } | Condition condition = createInstance ( Condition . class ) ; condition . setTextContent ( conditionText ) ; element . setCondition ( condition ) ; return myself ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.