signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class QueryControllerTreeModel { /** * Remove all the nodes from the Tree */ public void reset ( ) { } }
Enumeration < TreeNode > children = root . children ( ) ; while ( children . hasMoreElements ( ) ) { removeNodeFromParent ( ( MutableTreeNode ) children . nextElement ( ) ) ; children = root . children ( ) ; }
public class ReportGenerator { /** * Encode entity for HTML or XML output . */ public static String entityEncode ( String text ) { } }
String result = text ; if ( result == null ) { return result ; } // The escapeXml function doesn ' t cope with some ' special ' chrs return StringEscapeUtils . escapeXml10 ( XMLStringUtil . escapeControlChrs ( result ) ) ;
public class PeerGroup { /** * Remove a registered data event listener against a single peer ( i . e . for * blockchain download ) . Handling registration / deregistration on peer death / add is * outside the scope of these methods . */ private static void removeDataEventListenerFromPeer ( Peer peer , PeerDataEvent...
peer . removeBlocksDownloadedEventListener ( listener ) ; peer . removeChainDownloadStartedEventListener ( listener ) ; peer . removeGetDataEventListener ( listener ) ; peer . removePreMessageReceivedEventListener ( listener ) ;
public class BaseSIXAResourceProxy { /** * Called when the transaction manager would like us to * prepare to complete the transaction . * Across the wire we will flow : * BIT32 Transaction Id * The XID Structure * @ param xid * @ return Returns the result of the resource manager ' s vote on whether * we c...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "internalPrepare" , xid ) ; int rc = 0 ; try { CommsByteBuffer request = getCommsByteBuffer ( ) ; request . putInt ( getTransactionId ( ) ) ; request . putXid ( xid ) ; if ( fapLevel >= JFapChannelConstants . FAP_VERS...
public class DateUtils { /** * < p > 字符串时间转为 { @ link Date } 类型 , 未找到匹配类型则返NULL < / p > * < p > 支持匹配类型列表 : < / p > * < p > yyyy - MM - dd < / p > * < p > yyyy / MM / dd < / p > * < p > HH : mm : ss < / p > * < p > yyyy - MM - dd HH : mm : ss < / p > * < p > yyyy - MM - dTHH : mm : ss . SSS < / p > * autho...
Date date ; try { date = str2Date ( strDate ) ; } catch ( Exception e ) { throw new TimeMatchFormatException ( "[" + strDate + "] date auto parse exception" , e ) ; } return date ;
public class AbstractCLA { /** * All default values must be in the values list and they must be in the * same order for them to be considered equal . */ boolean valuesAreTheSameAsDefault ( ) { } }
if ( getDefaultValues ( ) == null || getDefaultValues ( ) . size ( ) == 0 ) return false ; if ( getValues ( ) == null || getValues ( ) . size ( ) == 0 ) return false ; if ( getDefaultValues ( ) . size ( ) != getValues ( ) . size ( ) ) return false ; for ( int v = 0 ; v < getDefaultValues ( ) . size ( ) ; v ++ ) if ( ! ...
public class AWSGlobalAcceleratorClient { /** * Delete an endpoint group from a listener . * @ param deleteEndpointGroupRequest * @ return Result of the DeleteEndpointGroup operation returned by the service . * @ throws EndpointGroupNotFoundException * The endpoint group that you specified doesn ' t exist . *...
request = beforeClientExecution ( request ) ; return executeDeleteEndpointGroup ( request ) ;
public class Messenger { /** * Send Markdown Message with mentions * @ param peer destination peer * @ param text message text * @ param markDownText message markdown text * @ param mentions user ' s mentions */ @ ObjectiveCName ( "sendMessageWithPeer:withText:withMarkdownText:withMentions:autoDetect:" ) public...
modules . getMessagesModule ( ) . sendMessage ( peer , text , markDownText , mentions , autoDetect ) ;
public class AmazonRoute53Client { /** * Gets information about a specified configuration for DNS query logging . * For more information about DNS query logs , see < a * href = " https : / / docs . aws . amazon . com / Route53 / latest / APIReference / API _ CreateQueryLoggingConfig . html " * > CreateQueryLoggin...
request = beforeClientExecution ( request ) ; return executeGetQueryLoggingConfig ( request ) ;
public class Choice2 { /** * { @ inheritDoc } */ @ Override public < C > Choice2 < A , C > pure ( C c ) { } }
return b ( c ) ;
public class FormattedTime { /** * Converts a Date into a formatted string . * @ param date The Date to convert . * @ return The formatted string . */ public static String format ( Date date ) { } }
Calendar c = new GregorianCalendar ( TimeZone . getTimeZone ( "UTC" ) ) ; StringBuffer sb = new StringBuffer ( ) ; c . setTime ( date ) ; sb . append ( w4 . format ( c . get ( Calendar . YEAR ) ) ) ; sb . append ( w2 . format ( c . get ( Calendar . MONTH ) + 1 ) ) ; sb . append ( w2 . format ( c . get ( Calendar . DAY_...
public class JdtRecorder { /** * { @ inheritDoc } * @ see org . modeshape . sequencer . javafile . SourceFileRecorder # record ( org . modeshape . jcr . api . sequencer . Sequencer . Context , * java . io . InputStream , long , java . lang . String , javax . jcr . Node ) */ @ Override public void record ( final Con...
final char [ ] sourceCode = JavaMetadataUtil . getJavaSourceFromTheInputStream ( inputStream , length , encoding ) ; record ( context , sourceCode , outputNode ) ;
public class CustomResourceTermSuiteAEFactory { /** * Spots fixed expressions in the CAS an creates { @ link FixedExpression } * annotation whenever one is found . * @ return */ public static AnalysisEngineDescription createFixedExpressionSpotterAEDesc ( ResourceConfig resourceConfig , Lang lang ) { } }
try { AnalysisEngineDescription ae = AnalysisEngineFactory . createEngineDescription ( FixedExpressionSpotter . class , FixedExpressionSpotter . FIXED_EXPRESSION_MAX_SIZE , 5 , FixedExpressionSpotter . REMOVE_WORD_ANNOTATIONS_FROM_CAS , false , FixedExpressionSpotter . REMOVE_TERM_OCC_ANNOTATIONS_FROM_CAS , true ) ; Ex...
public class ManualDescriptor { /** * getter for keywordList - gets A collection of objects of type uima . julielab . uima . Keyword , O * @ generated * @ return value of the feature */ public FSArray getKeywordList ( ) { } }
if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_keywordList == null ) jcasType . jcas . throwFeatMissing ( "keywordList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr ...
public class JSONUtil { /** * 将字符串转换成JSON字符串 * @ param jsonString json字符串 * @ return 转换成的json对象 */ public static JSONObject getJSONFromString ( final String jsonString ) { } }
if ( isBlank ( jsonString ) ) { return new JSONObject ( ) ; } return JSON . parseObject ( jsonString ) ;
public class ContainerBase { /** * ( non - Javadoc ) * @ see org . jboss . declarchive . api . container . ClassContainer # addPackages ( boolean , java . lang . Package [ ] ) */ @ Override public T addPackages ( boolean recursive , Package ... packages ) throws IllegalArgumentException { } }
Validate . notNull ( packages , "Packages must be specified" ) ; return addPackages ( recursive , Filters . includeAll ( ) , packages ) ;
public class CryptoContext { /** * Generates a digest based on the given algorithm . * @ param algorithm The algorithm to use ( MD5 , SHA , etc ) * @ param bytes The bytes to digest * @ return The associated digest * @ see MessageDigest */ public byte [ ] digest ( String algorithm , byte [ ] bytes ) { } }
try { MessageDigest md = MessageDigest . getInstance ( algorithm ) ; return md . digest ( bytes ) ; } catch ( NoSuchAlgorithmException exception ) { throw new IllegalStateException ( "unable to access MD5 algorithm" , exception ) ; }
public class CPAttachmentFileEntryUtil { /** * Returns a range of all the cp attachment file entries where displayDate & lt ; & # 63 ; and status = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are n...
return getPersistence ( ) . findByLtD_S ( displayDate , status , start , end ) ;
public class FirmataMessageFactory { /** * Creates SysEx message that configures I2C setup . * @ param delayInMicroseconds delay between the moment a register is written * to and the moment when the data can be read from that register ( optional , * when I2C device requires a delay ) * @ return message that con...
if ( delayInMicroseconds < 0 ) { throw new IllegalArgumentException ( "Delay cannot be less than 0 microseconds." ) ; } if ( delayInMicroseconds > 255 ) { throw new IllegalArgumentException ( "Delay cannot be greater than 255 microseconds." ) ; } byte delayLsb = ( byte ) ( delayInMicroseconds & 0x7F ) ; byte delayMsb =...
public class AbstractVertxDAO { /** * Defaults fields that have a default value and are nullable . * @ param record the record * @ return the record */ private Record setDefault ( Record record ) { } }
int size = record . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) if ( record . get ( i ) == null ) { @ SuppressWarnings ( "unchecked" ) Field < Object > field = ( Field < Object > ) record . field ( i ) ; if ( ! field . getDataType ( ) . nullable ( ) && ! field . getDataType ( ) . identity ( ) ) record . set ( field ...
public class HomekitServer { /** * Creates a bridge accessory , capable of holding multiple child accessories . This has the * advantage over multiple standalone accessories of only requiring a single pairing from iOS for * the bridge . * @ param authInfo authentication information for this accessory . These valu...
HomekitRoot root = new HomekitRoot ( label , http , localAddress , authInfo ) ; root . addAccessory ( new HomekitBridge ( label , serialNumber , model , manufacturer ) ) ; return root ;
public class TypeQualifierDataflowAnalysis { /** * ( non - Javadoc ) * @ see * edu . umd . cs . findbugs . ba . BasicAbstractDataflowAnalysis # edgeTransfer ( edu * . umd . cs . findbugs . ba . Edge , java . lang . Object ) */ @ Override public void edgeTransfer ( Edge edge , TypeQualifierValueSet fact ) throws D...
if ( ! fact . isValid ( ) ) { return ; } // Propagate flow values and source information across phi nodes . ValueNumberFrame targetVnaFrame = vnaDataflow . getStartFact ( edge . getTarget ( ) ) ; ValueNumberFrame sourceVnaFrame = vnaDataflow . getResultFact ( edge . getSource ( ) ) ; if ( ! targetVnaFrame . isValid ( )...
public class CustomUtils { /** * Returns the list of the absolute path of the product root and extension directories . * The directory may or may not exist . * the list of directories which this method returns is : * 1 . wlp / * 2 . wlp / usr / extension / * 3 . all locations returned from ProductExtension . ...
List < File > dirs = listExtensionDirectories ( ) ; dirs . add ( 0 , new File ( CustomUtils . getInstallRoot ( ) ) ) ; // place wlp first . return dirs ;
public class SimpleConfiguration { /** * These custom serialization methods were added because commons config does not support * serialization . */ private void writeObject ( ObjectOutputStream out ) throws IOException { } }
out . defaultWriteObject ( ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; save ( baos ) ; byte [ ] data = baos . toByteArray ( ) ; out . writeInt ( data . length ) ; out . write ( data ) ;
public class SpectrogramRender { /** * Render a spectrogram of a wave file * @ param spectrogram spectrogram object * @ param filename output file * @ throws IOException * @ see RGB graphic rendered */ public void saveSpectrogram ( Spectrogram spectrogram , String filename ) throws IOException { } }
BufferedImage bufferedImage = renderSpectrogram ( spectrogram ) ; saveSpectrogram ( bufferedImage , filename ) ;
public class DefaultRaftServer { /** * Starts the server . */ private CompletableFuture < RaftServer > start ( Supplier < CompletableFuture < Void > > joiner ) { } }
if ( started ) { return CompletableFuture . completedFuture ( this ) ; } if ( openFuture == null ) { synchronized ( this ) { if ( openFuture == null ) { CompletableFuture < RaftServer > future = new AtomixFuture < > ( ) ; openFuture = future ; joiner . get ( ) . whenComplete ( ( result , error ) -> { if ( error == null...
public class VJournal { /** * Sets the date - time that the journal entry was last changed . * @ param lastModified the last modified date or null to remove * @ return the property that was created * @ see < a href = " http : / / tools . ietf . org / html / rfc5545 # page - 138 " > RFC 5545 * p . 138 < / a > ...
LastModified prop = ( lastModified == null ) ? null : new LastModified ( lastModified ) ; setLastModified ( prop ) ; return prop ;
public class FeaturesImpl { /** * Gets all the extraction features for the specified application version . * @ param appId The application ID . * @ param versionId The version ID . * @ param listOptionalParameter the object representing the optional parameters to be set before calling this API * @ param service...
return ServiceFuture . fromResponse ( listWithServiceResponseAsync ( appId , versionId , listOptionalParameter ) , serviceCallback ) ;
public class UnboundMethodTemplateParameter { /** * builds a template signature object based on the signature attribute of the method * @ param signatureAttribute * the signature attribute * @ return a template signature if there are templates defined , otherwise null */ @ Nullable private static TemplateSignatur...
Matcher m = TEMPLATED_SIGNATURE . matcher ( signatureAttribute . getSignature ( ) ) ; if ( ! m . matches ( ) ) { return null ; } TemplateSignature ts = new TemplateSignature ( ) ; ts . signature = m . group ( 2 ) ; m = TEMPLATE . matcher ( m . group ( 1 ) ) ; List < TemplateItem > templates = new ArrayList < > ( 4 ) ; ...
public class MockFactory { /** * Creates a mock object and populates its fields . * @ param type Type of mock object * @ param < T > Type of mock object * @ return Mock Object of type T */ @ SuppressWarnings ( "unchecked" ) // types must agree public static < T > T createMockObject ( Type type ) { } }
Class < T > rawType ; if ( type instanceof ParameterizedType ) { rawType = ( Class < T > ) ( ( ParameterizedType ) type ) . getRawType ( ) ; } else if ( type instanceof Class ) { rawType = ( Class < T > ) type ; } else { throw new UnsupportedOperationException ( "Unsupported type: " + type . getClass ( ) . getSimpleNam...
public class SoapServerFaultResponseActionBuilder { /** * Sets the attachment with string content . * @ param contentId * @ param contentType * @ param content * @ return */ public SoapServerFaultResponseActionBuilder attachment ( String contentId , String contentType , String content ) { } }
SoapAttachment attachment = new SoapAttachment ( ) ; attachment . setContentId ( contentId ) ; attachment . setContentType ( contentType ) ; attachment . setContent ( content ) ; getAction ( ) . getAttachments ( ) . add ( attachment ) ; return this ;
public class JsJmsObjectMessageImpl { /** * Provide an estimate of encoded length of the payload * If we have a real object and no serialized one then we have no idea how big it is , * so leave the guess at 0 */ @ Override int guessPayloadLength ( ) { } }
int length = 0 ; byte [ ] payload = getDataFromPayload ( ) ; if ( payload != null ) { length = payload . length + 24 ; } return length ;
public class MediaSource { /** * Get property name containing the media request path * @ param mediaRequest Media request * @ return Property name * @ deprecated Use { @ link # getMediaRefProperty ( MediaRequest , MediaHandlerConfig ) } */ @ Deprecated protected final @ Nullable String getMediaRefProperty ( @ Not...
return getMediaRefProperty ( mediaRequest , null ) ;
public class BusItinerary { /** * Remove all the road segments from the current itinerary . * < p > All the bus halts will also be removed . */ public void removeAllRoadSegments ( ) { } }
for ( final BusItineraryHalt halt : this . invalidHalts ) { halt . setRoadSegmentIndex ( - 1 ) ; halt . setPositionOnSegment ( Float . NaN ) ; halt . checkPrimitiveValidity ( ) ; } final BusItineraryHalt [ ] halts = new BusItineraryHalt [ this . validHalts . size ( ) ] ; this . validHalts . toArray ( halts ) ; for ( fi...
public class PatientXmlWriter { /** * We don ' t want to expose the conversion exceptions , so let ' s translate them into our own exceptions . . . */ protected NaaccrIOException convertSyntaxException ( ConversionException ex ) { } }
String msg = ex . get ( "message" ) ; if ( msg == null ) msg = ex . getMessage ( ) ; NaaccrIOException e = new NaaccrIOException ( msg , ex ) ; if ( ex . get ( "line number" ) != null ) e . setLineNumber ( Integer . valueOf ( ex . get ( "line number" ) ) ) ; e . setPath ( ex . get ( "path" ) ) ; return e ;
public class DatabaseUtils { /** * Prints the contents of a Cursor to a String . The position is restored * after printing . * @ param cursor the cursor to print * @ return a String that contains the dumped cursor */ public static String dumpCursorToString ( Cursor cursor ) { } }
StringBuilder sb = new StringBuilder ( ) ; dumpCursor ( cursor , sb ) ; return sb . toString ( ) ;
public class SslCertificateClient { /** * Returns the specified SslCertificate resource . Gets a list of available SSL certificates by * making a list ( ) request . * < p > Sample code : * < pre > < code > * try ( SslCertificateClient sslCertificateClient = SslCertificateClient . create ( ) ) { * ProjectGloba...
GetSslCertificateHttpRequest request = GetSslCertificateHttpRequest . newBuilder ( ) . setSslCertificate ( sslCertificate ) . build ( ) ; return getSslCertificate ( request ) ;
public class SyslogAppender { /** * Do the logging . * @ param level * the level to use for the logging . * @ param message * the message to log . * @ param t * the exception to log . */ public void doLog ( String clientID , String name , long time , Level level , Object message , Throwable t ) { } }
if ( logOpen && formatter != null ) { sendMessage ( syslogMessage . createMessageData ( formatter . format ( clientID , name , time , level , message , t ) ) ) ; }
public class InternalNodeModelUtils { /** * < p > Computes the line breaks in the given text and returns an array of offsets . * A line break is either < code > \ r \ n < / code > , < code > \ n < / code > , or a single < code > \ r < / code > . < / p > * This implementation was heavily adapted from < code > org . ...
// initially we assume an avg of 20 chars per line List < Integer > list = Lists . newArrayListWithExpectedSize ( text . length ( ) / 20 + 1 ) ; char ch ; int length = text . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { ch = text . charAt ( i ) ; if ( ch == '\r' ) { list . add ( i ) ; if ( i + 1 < length ) { if...
public class PortalWebFlowUtilsImpl { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . spring . web . flow . IPortalWebFlowUtils # getCurrentPrincipal ( org . springframework . webflow . context . ExternalContext ) */ @ Override public IAuthorizationPrincipal getCurrentPrincipal ( final ExternalContext ext...
final IPerson person = getCurrentPerson ( externalContext ) ; final EntityIdentifier ei = person . getEntityIdentifier ( ) ; return AuthorizationServiceFacade . instance ( ) . newPrincipal ( ei . getKey ( ) , ei . getType ( ) ) ;
public class CPTaxCategoryWrapper { /** * Returns the localized description of this cp tax category in the language , optionally using the default language if no localization exists for the requested language . * @ param languageId the ID of the language * @ param useDefault whether to use the default language if n...
return _cpTaxCategory . getDescription ( languageId , useDefault ) ;
public class ContextManager { /** * Release the given directory context . * @ param ctx The context to release . * @ throws WIMSystemException If there were any { @ link NamingException } s while releasing the context . */ @ FFDCIgnore ( NamingException . class ) public void releaseDirContext ( TimedDirContext ctx ...
final String METHODNAME = "releaseDirContext" ; if ( iContextPoolEnabled ) { // Get the lock for the current domain synchronized ( iLock ) { // If the DirContextTTL is 0 , no need to put it back to pool // If the size of the pool is larger than minimum size or total dirContexts larger than max size // If context URL no...
public class AWSMediaConvertClient { /** * Retrieve the JSON for a specific queue . * @ param getQueueRequest * @ return Result of the GetQueue operation returned by the service . * @ throws BadRequestException * The service can ' t process your request because of a problem in the request . Please check your re...
request = beforeClientExecution ( request ) ; return executeGetQueue ( request ) ;
public class ListMultimap { /** * Gets all the values in the multimap . * @ return the values ( this list is immutable ) */ public List < V > values ( ) { } }
List < V > list = new ArrayList < V > ( ) ; for ( List < V > value : map . values ( ) ) { list . addAll ( value ) ; } return Collections . unmodifiableList ( list ) ;
public class UpdatePropertiesHandler { /** * Implement the persistence handler for storing the user properties . */ void persist ( final String key , final String value , final boolean enableDisableMode , final boolean disable , final File file , final String realm ) throws IOException , StartException { } }
final PropertiesFileLoader propertiesHandler = realm == null ? new PropertiesFileLoader ( file . getAbsolutePath ( ) , null ) : new UserPropertiesFileLoader ( file . getAbsolutePath ( ) , null ) ; try { propertiesHandler . start ( null ) ; if ( realm != null ) { ( ( UserPropertiesFileLoader ) propertiesHandler ) . setR...
public class InverseMapper { /** * The inverse function . Input keys and values are swapped . */ @ Override public void map ( K key , V value , Context context ) throws IOException , InterruptedException { } }
context . write ( value , key ) ;
public class QLess { /** * { @ inheritDoc } */ @ Override public QLess appendSQL ( final SQLSelect _sql ) throws EFapsException { } }
getAttribute ( ) . appendSQL ( _sql ) ; _sql . addPart ( SQLPart . LESS ) ; getValue ( ) . appendSQL ( _sql ) ; return this ;
public class HtmlCleaner { /** * Removes result of wiki formatting ( for e . g . email addresses ) if needed . * @ param rawValue value as received from Fitnesse . * @ return rawValue if it was just text , cleaned version if it was not . */ public String cleanupValue ( String rawValue ) { } }
String result = null ; if ( rawValue != null ) { Matcher matcher = LINKPATTERN . matcher ( rawValue ) ; if ( matcher . matches ( ) ) { result = matcher . group ( 3 ) + matcher . group ( 4 ) ; } else { result = cleanupPreFormatted ( rawValue ) ; } } return result ;
public class QualityOfServiceBlockingQueue { /** * Combination peek / poll method that uses a boolean parameter to switch between the two * behaviors * @ param peek If true this method returns the peeked element , if false it returns the polled * element */ private T pollInternal ( boolean peek ) { } }
this . writeLock . lock ( ) ; try { // Re - check size within the write lock if ( this . size == 0 ) { return null ; } final K key ; if ( this . peekedKey != null ) { // If there is a peeked key use it key = this . peekedKey ; if ( ! peek ) { // If not a peek consume the peekedKey this . peekedKey = null ; } } else { /...
public class TableSorter { /** * when a column heading is clicked in the JTable . */ public void addMouseListenerToHeaderInTable ( JTable table ) { } }
final TableSorter sorter = this ; final JTable tableView = table ; tableView . setColumnSelectionAllowed ( false ) ; MouseAdapter listMouseListener = new MouseAdapter ( ) { public void mouseClicked ( MouseEvent e ) { TableColumnModel columnModel = tableView . getColumnModel ( ) ; int viewColumn = columnModel . getColum...
public class BeanDefinitionParser { /** * Build a typed String value Object for the given raw value . * @ see org . springframework . beans . factory . config . TypedStringValue * @ param value a { @ link java . lang . String } object . * @ param targetTypeName a { @ link java . lang . String } object . * @ ret...
TypedStringValue typedValue ; if ( ! StringUtils . hasText ( targetTypeName ) ) typedValue = new TypedStringValue ( value ) ; else typedValue = new TypedStringValue ( value , targetTypeName ) ; return typedValue ;
public class SpannerClient { /** * Commits a transaction . The request includes the mutations to be applied to rows in the * database . * < p > ` Commit ` might return an ` ABORTED ` error . This can occur at any time ; commonly , the cause is * conflicts with concurrent transactions . However , it can also happe...
CommitRequest request = CommitRequest . newBuilder ( ) . setSession ( session ) . setTransactionId ( transactionId ) . addAllMutations ( mutations ) . build ( ) ; return commit ( request ) ;
public class AnnotationRpc { /** * Parses a query string for a bulk delet request * @ param query The query to parse * @ return A bulk delete query */ private AnnotationBulkDelete parseBulkDeleteQS ( final HttpQuery query ) { } }
final AnnotationBulkDelete settings = new AnnotationBulkDelete ( ) ; settings . start_time = query . getRequiredQueryStringParam ( "start_time" ) ; settings . end_time = query . getQueryStringParam ( "end_time" ) ; if ( query . hasQueryStringParam ( "tsuids" ) ) { String [ ] tsuids = query . getQueryStringParam ( "tsui...
public class CmsDriverManager { /** * Creates an historical entry of the current project . < p > * @ param dbc the current database context * @ param publishTag the version * @ param publishDate the date of publishing * @ throws CmsDataAccessException if operation was not successful */ public void writeHistoryP...
getHistoryDriver ( dbc ) . writeProject ( dbc , publishTag , publishDate ) ;
public class LeaderAppender { /** * Registers a commit handler for the given commit index . * @ param index The index for which to register the handler . * @ return A completable future to be completed once the given log index has been committed . */ public CompletableFuture < Long > appendEntries ( long index ) { ...
raft . checkThread ( ) ; if ( index == 0 ) { return appendEntries ( ) ; } if ( index <= raft . getCommitIndex ( ) ) { return CompletableFuture . completedFuture ( index ) ; } // If there are no other stateful servers in the cluster , immediately commit the index . if ( raft . getCluster ( ) . getActiveMemberStates ( ) ...
public class KamImpl { /** * { @ inheritDoc } */ @ Override public KamNode findNode ( Integer kamNodeId , NodeFilter filter ) { } }
final KamNode kamNode = idNodeMap . get ( kamNodeId ) ; if ( kamNode == null ) { return null ; } if ( filter != null ) { if ( ! filter . accept ( kamNode ) ) { return null ; } } return kamNode ;
public class SimpleStyleUtilities { /** * Creates a simple { @ link Rule } for a line . * @ param color * the color . * @ param width * the line width . * @ return the rule . */ public static Rule createSimpleLineRule ( Color color , float width ) { } }
LineSymbolizer lineSymbolizer = StyleUtilities . sf . createLineSymbolizer ( ) ; lineSymbolizer . setStroke ( StyleUtilities . sf . createStroke ( StyleUtilities . ff . literal ( "#" + Integer . toHexString ( color . getRGB ( ) & 0xffffff ) ) , StyleUtilities . ff . literal ( width ) ) ) ; Rule rule = StyleUtilities . ...
public class CoreOptions { /** * Creates a composite option of all { @ link EquinoxFrameworkOption } versions ( up to the date of Pax Exam release ) . * @ return all equinox framework versions composite option */ public static Option allEquinoxVersions ( ) { } }
return composite ( equinox ( ) . version ( "3.2.1" ) , equinox ( ) . version ( "3.3.0" ) , equinox ( ) . version ( "3.3.1" ) , equinox ( ) . version ( "3.3.2" ) , equinox ( ) . version ( "3.4.0" ) , equinox ( ) . version ( "3.4.1" ) , equinox ( ) . version ( "3.4.2" ) , equinox ( ) . version ( "3.5.0" ) , equinox ( ) ....
public class AWSKMSClient { /** * Attaches a key policy to the specified customer master key ( CMK ) . You cannot perform this operation on a CMK in a * different AWS account . * For more information about key policies , see < a * href = " http : / / docs . aws . amazon . com / kms / latest / developerguide / key...
request = beforeClientExecution ( request ) ; return executePutKeyPolicy ( request ) ;
public class ReceiveMessageActionParser { /** * Extracts xpath validation expressions and fills map with them * @ param validateElement * @ param validateXpathExpressions */ private void extractXPathValidateExpressions ( Element validateElement , Map < String , Object > validateXpathExpressions ) { } }
// check for xpath validation - old style with direct attribute String pathExpression = validateElement . getAttribute ( "path" ) ; if ( StringUtils . hasText ( pathExpression ) && ! JsonPathMessageValidationContext . isJsonPathExpression ( pathExpression ) ) { // construct pathExpression with explicit result - type , ...
public class MPCoreUtils { /** * Retrieves all fields from a class except the ones from MPBase abstract class and Object class * @ param type Java Class type * @ return */ static Field [ ] getAllFields ( Class < ? > type ) { } }
List < Field > fields = new ArrayList < Field > ( ) ; for ( Class < ? > clazz = type ; clazz != null ; clazz = clazz . getSuperclass ( ) ) { if ( clazz == MPBase . class || clazz == Object . class ) { break ; } fields . addAll ( Arrays . asList ( clazz . getDeclaredFields ( ) ) ) ; } Field [ ] fieldsArray = new Field [...
public class MediaServicesInner { /** * Updates a Media Service . * @ param resourceGroupName Name of the resource group within the Azure subscription . * @ param mediaServiceName Name of the Media Service . * @ param parameters Media Service properties needed for update . * @ throws IllegalArgumentException th...
return updateWithServiceResponseAsync ( resourceGroupName , mediaServiceName , parameters ) . map ( new Func1 < ServiceResponse < MediaServiceInner > , MediaServiceInner > ( ) { @ Override public MediaServiceInner call ( ServiceResponse < MediaServiceInner > response ) { return response . body ( ) ; } } ) ;
public class DepictionGenerator { /** * Low - level option method to set a rendering model parameter . * @ param key option key * @ param value option value * @ param < T > option key type * @ param < U > option value type * @ return new generator for method chaining */ public < T extends IGeneratorParameter ...
DepictionGenerator copy = new DepictionGenerator ( this ) ; copy . setParam ( key , value ) ; return copy ;
public class AAFAuthorizer { /** * Returns every permission on the resource granted to the user . */ public Set < Permission > authorize ( AuthenticatedUser user , IResource resource ) { } }
String uname , rname ; access . log ( Level . DEBUG , "Authorizing" , uname = user . getName ( ) , "for" , rname = resource . getName ( ) ) ; Set < Permission > permissions ; if ( user instanceof AAFAuthenticatedUser ) { AAFAuthenticatedUser aafUser = ( AAFAuthenticatedUser ) user ; aafUser . setAnonymous ( false ) ; i...
public class ExpandableGridView { /** * Notifies the listener , which has been registered to be notified , when any item has been * long - clicked , about an item being long - clicked . * @ param view * The view within the expandable grid view , which has been long - clicked , as an instance * of the class { @ ...
return itemLongClickListener != null && itemLongClickListener . onItemLongClick ( this , view , position , id ) ;
public class DataColumnConstraintsDao { /** * Query by the constraint name * @ param constraintName * constraint name * @ return data column constraints * @ throws SQLException * upon failure */ public List < DataColumnConstraints > queryByConstraintName ( String constraintName ) throws SQLException { } }
return queryForEq ( DataColumnConstraints . COLUMN_CONSTRAINT_NAME , constraintName ) ;
public class DataModelWrapper { /** * { @ inheritDoc } */ @ Override public Float getPreferenceValue ( final long l , final long l1 ) throws TasteException { } }
return wrapper . getPreferenceValue ( l , l1 ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcRadioActivityMeasure ( ) { } }
if ( ifcRadioActivityMeasureEClass == null ) { ifcRadioActivityMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 727 ) ; } return ifcRadioActivityMeasureEClass ;
public class StringUtils { /** * Transform a collection of objects to a delimited String . * @ param collection the collection to transform . * @ param delimiter the delimiter used to delimit the Strings . * @ return a StringBuilder with all the elements of the collection . */ public static StringBuilder toString...
StringBuilder sb = new StringBuilder ( collection . size ( ) * 20 ) ; for ( Iterator < ? extends Object > it = collection . iterator ( ) ; it . hasNext ( ) ; ) { Object cs = it . next ( ) ; sb . append ( cs ) ; if ( it . hasNext ( ) ) { sb . append ( delimiter ) ; } } return sb ;
public class SupertaggingCcgParser { /** * CCG parses { @ code sentence } . Any supertags in { @ code sentence } * are ignored ; instead , this method uses the supertags from * the parser ' s internal supertagger . { @ code inputFilter } is an * additional cost to use during parsing . { @ code inputFilter } may b...
AnnotatedSentence annotatedSentence = null ; if ( supertagger != null ) { for ( int i = 0 ; i < multitagThresholds . length ; i ++ ) { // Try parsing at each multitag threshold . If parsing succeeds , // immediately return the parse . Otherwise , continue to further // thresholds . List < WordAndPos > supertaggerInput ...
public class ExpressRouteCircuitAuthorizationsInner { /** * Gets all authorizations in an express route circuit . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the ...
return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ExpressRouteCircuitAuthorizationInner > > , Page < ExpressRouteCircuitAuthorizationInner > > ( ) { @ Override public Page < ExpressRouteCircuitAuthorizationInner > call ( ServiceResponse < Page < ExpressRouteCircuitAut...
public class IterableExtensions { /** * Applies the combinator { @ code function } to all elements of the iterable in turn . * One of the function parameters is an element of the iterable , and the other is the result of previous application * of the function . The seed of the operation is the first element in the ...
return IteratorExtensions . reduce ( iterable . iterator ( ) , function ) ;
public class LoadedKey { /** * Get the error text * @ param aContentLocale * The locale to use . May not be < code > null < / code > . * @ return < code > null < / code > if no error occurred , the error text otherwise . */ @ Nullable public String getErrorText ( @ Nonnull final Locale aContentLocale ) { } }
return m_eError == null ? null : m_eError . getDisplayTextWithArgs ( aContentLocale , ( Object [ ] ) m_aErrorParams ) ;
public class StringTools { /** * Return < code > str < / code > modified so that its first character is now an * lowercase or uppercase character , depending on < code > toUpperCase < / code > . * If < code > str < / code > starts with non - alphabetic * characters , such as quotes or parentheses , the first char...
if ( isEmpty ( str ) ) { return str ; } if ( str . length ( ) == 1 ) { return toUpperCase ? str . toUpperCase ( Locale . ENGLISH ) : str . toLowerCase ( ) ; } int pos = 0 ; int len = str . length ( ) - 1 ; while ( ! Character . isLetterOrDigit ( str . charAt ( pos ) ) && len > pos ) { pos ++ ; } char firstChar = str . ...
public class GOUnificationXREFtoRelationshipXREFConverter { /** * Main conversion method . Demonstrates how to read and write a BioPAX * model and accessing its objects . * @ param arg file name to be processed */ private static void processXrefs ( String arg ) throws FileNotFoundException , IllegalAccessException ...
// Read in the model FileInputStream in = new FileInputStream ( new File ( arg ) ) ; Model level2 = reader . convertFromOWL ( in ) ; // Get all unification xrefs . Set < unificationXref > unis = level2 . getObjects ( unificationXref . class ) ; // Create another set for avoiding concurrent modifications Set < unificati...
public class CCEncoder { /** * Converts a literal array to a variable array * ATTENTION : this only works if because the { @ code isCC } method checks , that there are only positive literals . * @ param lits the literals * @ return the variables */ private static Variable [ ] litsAsVars ( final Literal [ ] lits )...
final Variable [ ] vars = new Variable [ lits . length ] ; for ( int i = 0 ; i < vars . length ; i ++ ) vars [ i ] = lits [ i ] . variable ( ) ; return vars ;
public class Transliterator { /** * Transliterates the portion of the text buffer that can be * transliterated unambiguosly after a new character has been * inserted , typically as a result of a keyboard event . This is a * convenience method ; see { @ link # transliterate ( Replaceable , * Transliterator . Pos...
transliterate ( text , index , UTF16 . valueOf ( insertion ) ) ;
public class LToIntTriFunctionBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */ @ Nonnull public static < T1 , T2 , T3 > LToIntTriFunctionBuilder < T1 , T2 , T3 > toIntTriFunction ( Cons...
return new LToIntTriFunctionBuilder ( consumer ) ;
public class CmsJspContentAccessValueWrapper { /** * Returns < code > true < / code > in case the value is empty or whitespace only , * that is either < code > null < / code > or String that contains only whitespace chars . < p > * In case the XML content value does not exist , < code > true < / code > is returned ...
if ( m_contentValue == null ) { // this is the case for non existing values return true ; } if ( m_contentValue . isSimpleType ( ) ) { // return values for simple type return CmsStringUtil . isEmptyOrWhitespaceOnly ( m_contentValue . getStringValue ( m_cms ) ) ; } else { // nested types are not empty if they have any c...
public class clusternode_stats { /** * Use this API to fetch statistics of clusternode _ stats resource of given name . */ public static clusternode_stats get ( nitro_service service , Long nodeid ) throws Exception { } }
clusternode_stats obj = new clusternode_stats ( ) ; obj . set_nodeid ( nodeid ) ; clusternode_stats response = ( clusternode_stats ) obj . stat_resource ( service ) ; return response ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link OperationParameterGroupRefType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link OperationParamete...
return new JAXBElement < OperationParameterGroupRefType > ( _ValuesOfGroup_QNAME , OperationParameterGroupRefType . class , null , value ) ;
public class CPMeasurementUnitPersistenceImpl { /** * Removes all the cp measurement units where groupId = & # 63 ; from the database . * @ param groupId the group ID */ @ Override public void removeByGroupId ( long groupId ) { } }
for ( CPMeasurementUnit cpMeasurementUnit : findByGroupId ( groupId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpMeasurementUnit ) ; }
public class AccountsInner { /** * Lists the Data Lake Store accounts within the subscription . The response includes a link to the next page of results , if any . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; DataLakeStoreAccountBasic...
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < DataLakeStoreAccountBasicInner > > , Page < DataLakeStoreAccountBasicInner > > ( ) { @ Override public Page < DataLakeStoreAccountBasicInner > call ( ServiceResponse < Page < DataLakeStoreAccountBasicInner > > response ) { return respo...
public class StackTraceExtractor { /** * TODO : refactor this method */ public static List < StackTraceElement > getTraceTillPackage ( String packageName ) { } }
StackTraceElement [ ] stackTraceElements = Thread . currentThread ( ) . getStackTrace ( ) ; // skip all elements until proxied call int startIndex = 0 ; for ( int i = 1 ; i < stackTraceElements . length ; i ++ ) { StackTraceElement traceElement = stackTraceElements [ i ] ; String traceElementClassName = traceElement . ...
public class AbstractResult { /** * Computes the confidence 95 interval - factor . This value has to be combined with the mean to get the * confidence - interval . * @ param meter the meter for the 95 - confidence interval factor * @ return the 95 % confidence */ public final double getConf95 ( final AbstractMete...
checkIfMeterExists ( meter ) ; final AbstractUnivariateStatistic conf95 = new Percentile ( 95.0 ) ; final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection ( this . meterResults . get ( meter ) ) ; return conf95 . evaluate ( doubleColl . toArray ( ) , 0 , doubleColl . toArray ( ) . length ) ;
public class MapJsonSerializer { /** * < p > newInstance < / p > * @ param keySerializer { @ link KeySerializer } used to serialize the keys . * @ param valueSerializer { @ link JsonSerializer } used to serialize the values . * @ return a new instance of { @ link MapJsonSerializer } * @ param < M > a M object ....
return new MapJsonSerializer ( keySerializer , valueSerializer ) ;
public class AWSOpsWorksClient { /** * Disassociates an Elastic IP address from its instance . The address remains registered with the stack . For more * information , see < a href = " http : / / docs . aws . amazon . com / opsworks / latest / userguide / resources . html " > Resource * Management < / a > . * < b...
request = beforeClientExecution ( request ) ; return executeDisassociateElasticIp ( request ) ;
public class PatchRESTService { /** * Returns a list of all available HTML patches , in the order they should * be applied . Each patch is raw HTML containing additional meta tags * describing how and where the patch should be applied . * @ return * A list of all HTML patches defined in the system , in the orde...
try { // Allocate a list of equal size to the total number of patches List < Resource > resources = patchResourceService . getPatchResources ( ) ; List < String > patches = new ArrayList < String > ( resources . size ( ) ) ; // Convert each patch resource to a string for ( Resource resource : resources ) { patches . ad...
public class AsymmMultiPos { /** * The result with the given left position and right position * which left and right tag is asymmetric will be involved in the operation * @ param leftPos * @ param rightPos * @ return */ public AsymmMultiPos < E , L , R > asymm ( Integer leftPos , Integer rightPos ) { } }
this . asymmLR = new StringBuilder ( ) . append ( checkNotNull ( leftPos ) ) . append ( Strs . WHITE_SPACE ) . append ( checkNotNull ( rightPos ) ) . toString ( ) ; return this ;
public class DeleteResourcePolicyRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteResourcePolicyRequest deleteResourcePolicyRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteResourcePolicyRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteResourcePolicyRequest . getPolicyName ( ) , POLICYNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request...
public class XMLMergePlugin { /** * 从DefaultShellCallback中借用的解析文件夹的函数 * @ param targetProject target project * @ param targetPackage target package * @ return file instance * @ throws ShellException Cannot get infos form environment */ public File getDirectory ( String targetProject , String targetPackage ) thr...
// targetProject is interpreted as a directory that must exist // targetPackage is interpreted as a sub directory , but in package // format ( with dots instead of slashes ) . The sub directory will be // created // if it does not already exist File project = new File ( targetProject ) ; if ( ! project . isDirectory ( ...
public class BoxRequestMultipart { /** * Adds or updates a multipart field in this request . * @ param key the field ' s key . * @ param value the field ' s value . */ public void putField ( String key , Date value ) { } }
this . fields . put ( key , BoxDateFormat . format ( value ) ) ;
public class AbstractMailFaxClientSpi { /** * This function will cancel an existing fax job . * @ param faxJob * The fax job object containing the needed information */ @ Override protected void cancelFaxJobImpl ( FaxJob faxJob ) { } }
// get connection Connection < MailResourcesHolder > mailConnection = this . getMailConnection ( ) ; // get holder MailResourcesHolder mailResourcesHolder = mailConnection . getResource ( ) ; // create message Message message = this . createCancelFaxJobMessage ( faxJob , mailResourcesHolder ) ; // send message this . s...
public class UCharacter { /** * < strong > [ icu ] < / strong > Returns the " age " of the code point . * < p > The " age " is the Unicode version when the code point was first * designated ( as a non - character or for Private Use ) or assigned a * character . * < p > This can be useful to avoid emitting code ...
if ( ch < MIN_VALUE || ch > MAX_VALUE ) { throw new IllegalArgumentException ( "Codepoint out of bounds" ) ; } return UCharacterProperty . INSTANCE . getAge ( ch ) ;
public class StateColorDrawable { /** * Update tint color * @ param state tint stats * @ return is changed */ @ Override protected boolean onStateChange ( int [ ] state ) { } }
final int color = mColorStateList . getColorForState ( state , mColor ) ; return changeColor ( color ) ;
public class ArrayMap { /** * Returns the data index of the given key or { @ code - 2 } if there is no such key . */ private int getDataIndexOfKey ( Object key ) { } }
int dataSize = this . size << 1 ; Object [ ] data = this . data ; for ( int i = 0 ; i < dataSize ; i += 2 ) { Object k = data [ i ] ; if ( key == null ? k == null : key . equals ( k ) ) { return i ; } } return - 2 ;
public class DefaultGlobalInterlockService { /** * ~ Methods * * * * * */ @ Override public String obtainLock ( long expiration , LockType type , String note ) { } }
requireNotDisposed ( ) ; requireArgument ( expiration >= 0 , "Expiration must be positive." ) ; requireArgument ( type != null , "Lock type cannot be null." ) ; requireArgument ( note != null && ! note . isEmpty ( ) , "Note cannot be null or empty." ) ; try { _logger . debug ( "Attempting to obtain lock of type {}." , ...
public class ExpressionParser { /** * Read the next item from the reader * @ param reader a reader to be used as the char source , must not be null * @ param context a preprocessor context * @ return a read expression item , it can be null if the end is reached * @ throws IOException it will be thrown if there ...
assertNotNull ( "Reader is null" , reader ) ; ParserState state = ParserState . WAIT ; final StringBuilder builder = new StringBuilder ( 12 ) ; boolean found = false ; char unicodeChar = 0 ; while ( ! found ) { final int data = reader . read ( ) ; if ( data < 0 ) { if ( state != ParserState . WAIT ) { found = true ; } ...
public class ProgressLayout { /** * create progressbar * @ return */ @ Override protected View createProgressBar ( ) { } }
mProgressBar = new ProgressBar ( getContext ( ) , null , android . R . attr . progressBarStyleHorizontal ) ; if ( mProgress >= 0 ) { mProgressBar . setProgress ( mProgress ) ; } if ( mMax >= 0 ) { mProgressBar . setMax ( mMax ) ; } return mProgressBar ;
public class WCCustomProperties { /** * propertyKey is lowerCase value */ private static String getStringKey ( String propertyKey ) { } }
if ( WCCustomProperties . FullyQualifiedPropertiesMap . containsKey ( propertyKey ) ) { return WCCustomProperties . FullyQualifiedPropertiesMap . get ( propertyKey ) . toLowerCase ( ) ; } else { return propertyKey ; }