signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class JndiTreeParser { /** * create actual children
* @ param sibling
* @ return */
private boolean createChild ( Property sibling , String parentURI ) { } } | boolean skipped = sibling . getName ( ) . equals ( "children" ) ; if ( ! skipped ) { // dump ( sibling ) ;
String dataType = null ; String uri = "" ; if ( sibling . getValue ( ) . hasDefined ( "class-name" ) ) { dataType = sibling . getValue ( ) . get ( "class-name" ) . asString ( ) ; uri = parentURI + "/" + sibling . ... |
public class Results { /** * Generates a new result with the status set to { @ literal 500 - INTERNAL SERVER ERROR } and a JSON - form of the
* given exception as content . The { @ literal Content - Type } header is set to { @ literal application / json } .
* @ param e the exception
* @ return the new result */
p... | return status ( Result . INTERNAL_SERVER_ERROR ) . render ( e ) . as ( MimeTypes . JSON ) ; |
public class NodeReadTrx { /** * { @ inheritDoc } */
@ Override public final boolean moveToAttribute ( final int mIndex ) throws TTIOException { } } | checkState ( ! mPageReadTrx . isClosed ( ) , "Transaction is already closed." ) ; if ( mCurrentNode . getKind ( ) == IConstants . ELEMENT ) { return moveTo ( ( ( ElementNode ) mCurrentNode ) . getAttributeKey ( mIndex ) ) ; } else { return false ; } |
public class DefaultSentryClientFactory { /** * Tags to extract from the MDC system and set on { @ link io . sentry . event . Event } s , where applicable .
* @ param dsn Sentry server DSN which may contain options .
* @ return Tags to extract from the MDC system and set on { @ link io . sentry . event . Event } s ... | String val = Lookup . lookup ( MDCTAGS_OPTION , dsn ) ; if ( Util . isNullOrEmpty ( val ) ) { val = Lookup . lookup ( EXTRATAGS_OPTION , dsn ) ; if ( ! Util . isNullOrEmpty ( val ) ) { logger . warn ( "The '" + EXTRATAGS_OPTION + "' option is deprecated, please use" + " the '" + MDCTAGS_OPTION + "' option instead." ) ;... |
public class IntArrayList { /** * Returns an array containing all of the values in this list in
* proper sequence ( from first to last value ) . If the list fits
* in the specified array , it is returned therein . Otherwise , a new
* array is allocated with the size of this list .
* @ param dest the array into ... | if ( dest == null || dest . length < size ( ) ) { dest = new int [ size ] ; } System . arraycopy ( data , 0 , dest , 0 , size ) ; return dest ; |
public class BaseRegistrationScreen { /** * A record with this datasource handle changed , notify any behaviors that are checking .
* NOTE : Be very careful as this code is running in an independent thread
* ( synchronize to the task before calling record calls ) .
* NOTE : For now , you are only notified of the ... | if ( message != null ) if ( message . getMessageHeader ( ) . getRegistryIDMatch ( ) != null ) // My private message
{ strMessage = ( String ) message . get ( StandardMessageResponseData . MESSAGE ) ; synchronized ( this ) { waiting = false ; this . notify ( ) ; } } return super . handleMessage ( message ) ; |
public class Iterators { /** * Combines multiple iterators into a single iterator . The returned iterator
* iterates across the elements of each iterator in { @ code inputs } . The input
* iterators are not polled until necessary .
* < p > The returned iterator supports { @ code remove ( ) } when the correspondin... | checkNotNull ( inputs ) ; return new Iterator < T > ( ) { Iterator < ? extends T > current = emptyIterator ( ) ; Iterator < ? extends T > removeFrom ; @ Override public boolean hasNext ( ) { // http : / / code . google . com / p / google - collections / issues / detail ? id = 151
// current . hasNext ( ) might be relat... |
public class ReUtil { /** * 从字符串中获得第一个整数
* @ param StringWithNumber 带数字的字符串
* @ return 整数 */
public static Integer getFirstNumber ( CharSequence StringWithNumber ) { } } | return Convert . toInt ( get ( PatternPool . NUMBERS , StringWithNumber , 0 ) , null ) ; |
public class Dist { /** * Activates pipe that have previously reached high watermark . */
public void activated ( Pipe pipe ) { } } | // Move the pipe from passive to eligible state .
Collections . swap ( pipes , pipes . indexOf ( pipe ) , eligible ) ; eligible ++ ; // If there ' s no message being sent at the moment , move it to
// the active state .
if ( ! more ) { Collections . swap ( pipes , eligible - 1 , active ) ; active ++ ; } |
public class CanonicalKieModule { /** * Delegate methods */
@ Override public void cacheKnowledgeBuilderForKieBase ( String kieBaseName , KnowledgeBuilder kbuilder ) { } } | internalKieModule . cacheKnowledgeBuilderForKieBase ( kieBaseName , kbuilder ) ; |
public class Concept { /** * indexed getter for mentions - gets an indexed value -
* @ generated
* @ param i index in the array to get
* @ return value of the element at index i */
public Annotation getMentions ( int i ) { } } | if ( Concept_Type . featOkTst && ( ( Concept_Type ) jcasType ) . casFeat_mentions == null ) jcasType . jcas . throwFeatMissing ( "mentions" , "de.julielab.jules.types.Concept" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Concept_Type ) jcasType ) . casFeatCode_mentions ) , i ... |
public class DVWordsiMain { /** * { @ inheritDoc } */
protected ContextExtractor getExtractor ( ) { } } | DependencyContextGenerator generator = getContextGenerator ( ) ; // Set to read only if in evaluation mode .
if ( argOptions . hasOption ( 'e' ) ) generator . setReadOnly ( true ) ; // If the evaluation type is for semEval , use a
// SemEvalDependencyContextExtractor .
if ( argOptions . hasOption ( 'E' ) ) return new S... |
public class TransactionException { /** * Thrown when there exists and instance of { @ code type } HAS { @ code attributeType } upon unlinking the AttributeType from the Type */
public static TransactionException illegalUnhasInherited ( String type , String attributeType , boolean isKey ) { } } | return create ( ErrorMessage . ILLEGAL_TYPE_UNHAS_ATTRIBUTE_INHERITED . getMessage ( type , isKey ? "key" : "has" , attributeType ) ) ; |
public class CompletableFuture { /** * Returns raw result after waiting , or null if interruptible and
* interrupted . */
private Object waitingGet ( boolean interruptible ) { } } | Signaller q = null ; boolean queued = false ; int spins = SPINS ; Object r ; while ( ( r = result ) == null ) { if ( spins > 0 ) { if ( ThreadLocalRandom . nextSecondarySeed ( ) >= 0 ) -- spins ; } else if ( q == null ) q = new Signaller ( interruptible , 0L , 0L ) ; else if ( ! queued ) queued = tryPushStack ( q ) ; e... |
public class FileOutStream { /** * Schedules the async persistence of the current file . */
protected void scheduleAsyncPersist ( ) throws IOException { } } | try ( CloseableResource < FileSystemMasterClient > masterClient = mContext . acquireMasterClientResource ( ) ) { ScheduleAsyncPersistencePOptions persistOptions = FileSystemOptions . scheduleAsyncPersistDefaults ( mContext . getPathConf ( mUri ) ) . toBuilder ( ) . setCommonOptions ( mOptions . getCommonOptions ( ) ) .... |
public class Messenger { /** * Sending activation code
* @ param code activation code
* @ return Command for execution */
@ NotNull @ ObjectiveCName ( "validateCodeCommand:" ) public Command < AuthState > validateCode ( final String code ) { } } | return modules . getAuthModule ( ) . requestValidateCode ( code ) ; |
public class GeometryIndexService { /** * Given a certain index , find the next vertex in line .
* @ param index
* The index to start out from . Must point to either a vertex or and edge .
* @ return Returns the next vertex index . Note that no geometry is given , and so no actual checking is done . It just
* r... | if ( index . hasChild ( ) ) { return new GeometryIndex ( index . getType ( ) , index . getValue ( ) , getNextVertex ( index . getChild ( ) ) ) ; } else { return new GeometryIndex ( GeometryIndexType . TYPE_VERTEX , index . getValue ( ) + 1 , null ) ; } |
public class ComponentFinder { /** * Finds the current { @ link AjaxRequestTarget } or creates a new ajax request target from the
* given application and page if the current { @ link AjaxRequestTarget } is null .
* @ param application
* the web application
* @ param page
* page on which ajax response is made ... | final AjaxRequestTarget target = findAjaxRequestTarget ( ) ; if ( target != null ) { return target ; } return newAjaxRequestTarget ( application , page ) ; |
public class ReflectionServer { /** * Start the server on the port set in the constructor , this method behaves as
* follows :
* < ul >
* < li > Start server socket on the assigned port number < / li >
* < li > starts accepting clients connection < / li >
* < li > for every client connection received , handle... | this . logger . info ( "starting reflection server on port : " + this . port ) ; try { this . server = new ServerSocket ( this . port ) ; while ( ! this . stopped ) { this . logger . info ( "Reflection server waiting client connection..." ) ; this . waitingClient = true ; final Socket client = this . server . accept ( ... |
public class AmazonGlacierClient { /** * This operation initiates a job of the specified type , which can be a select , an archival retrieval , or a vault
* retrieval . For more information about using this operation , see the documentation for the underlying REST API < a
* href = " http : / / docs . aws . amazon .... | request = beforeClientExecution ( request ) ; return executeInitiateJob ( request ) ; |
public class HtmlStreamRenderer { /** * Factory .
* @ param output the buffer to which HTML is streamed .
* @ param badHtmlHandler receives alerts when HTML cannot be rendered because
* there is not valid HTML tree that results from that series of calls .
* E . g . it is not possible to create an HTML { @ code ... | // Propagate since StringBuilder should not throw IOExceptions .
return create ( output , Handler . PROPAGATE , badHtmlHandler ) ; |
public class StandardSiteSwitcherHandlerFactory { /** * Creates a site switcher that redirects to a custom domain for normal site requests that either
* originate from a mobile device or indicate a mobile site preference .
* Uses a { @ link CookieSitePreferenceRepository } that saves a cookie that is shared between... | return new StandardSiteSwitcherHandler ( new StandardSiteUrlFactory ( normalServerName ) , new StandardSiteUrlFactory ( mobileServerName ) , new StandardSiteUrlFactory ( tabletServerName ) , new StandardSitePreferenceHandler ( new CookieSitePreferenceRepository ( cookieDomain ) ) , null ) ; |
public class LeaseManager { /** * Remove the lease for the specified holder and src */
synchronized void removeLease ( String holder , String src ) { } } | Lease lease = getLease ( holder ) ; if ( lease != null ) { removeLease ( lease , src ) ; } |
public class Route { /** * contentRelatedTo ( For reporting ) list routes that will end up at a specific Code
* @ return */
public String contentRelatedTo ( HttpCode < TRANS , ? > code ) { } } | StringBuilder sb = new StringBuilder ( path ) ; sb . append ( ' ' ) ; content . relatedTo ( code , sb ) ; return sb . toString ( ) ; |
public class LambdaResource { /** * The array of ARNs for < a > S3Resource < / a > objects to trigger the < a > LambdaResource < / a > objects associated with this
* job .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setEventTriggers ( java . util . Coll... | if ( this . eventTriggers == null ) { setEventTriggers ( new java . util . ArrayList < EventTriggerDefinition > ( eventTriggers . length ) ) ; } for ( EventTriggerDefinition ele : eventTriggers ) { this . eventTriggers . add ( ele ) ; } return this ; |
public class UUID { /** * 返回指定长度随机数字 + 字母 ( 大小写敏感 ) 组成的字符串
* @ param length 指定长度
* @ param caseSensitivity 是否区分大小写
* @ return 随机字符串 */
public static String captchaChar ( int length , boolean caseSensitivity ) { } } | StringBuilder sb = new StringBuilder ( ) ; Random rand = new Random ( ) ; // 随机用以下三个随机生成器
Random randdata = new Random ( ) ; int data = 0 ; for ( int i = 0 ; i < length ; i ++ ) { int index = rand . nextInt ( caseSensitivity ? 3 : 2 ) ; // 目的是随机选择生成数字 , 大小写字母
switch ( index ) { case 0 : data = randdata . nextInt ( 10 )... |
public class Tailer { /** * 预读取行
* @ throws IOException */
private void readTail ( ) throws IOException { } } | final long len = this . randomAccessFile . length ( ) ; if ( initReadLine > 0 ) { long start = this . randomAccessFile . getFilePointer ( ) ; long nextEnd = len - 1 ; this . randomAccessFile . seek ( nextEnd ) ; int c ; int currentLine = 0 ; while ( nextEnd > start ) { if ( currentLine > initReadLine ) { break ; } c = ... |
public class RuleFlowMigrator { /** * Converts the contents of the given Reader into a string .
* WARNING : the given string is not reset ( as not all
* readers support reset ) . Consequently , anny further
* attempt to read from the given reader will return nothing ,
* unless you reset the reader .
* @ param... | final StringBuilder text = new StringBuilder ( ) ; final char [ ] buf = new char [ 1024 ] ; int len = 0 ; while ( ( len = reader . read ( buf ) ) >= 0 ) { text . append ( buf , 0 , len ) ; } return text . toString ( ) ; |
public class Ldap { /** * Indicates the attribute or attributes by which to sort query results . Use a comma [ , ] to separate
* attributes .
* @ param sort The sort to set .
* @ throws PageException */
public void setSort ( String sort ) throws PageException { } } | this . sort = ArrayUtil . trim ( ListUtil . toStringArray ( ListUtil . listToArrayRemoveEmpty ( sort , ',' ) ) ) ; |
public class LBiFltConsumerBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static LBiFltConsumer biFltConsumerFrom ( Consumer < LBiFltConsumerBuilder > buildingFunction ) { } } | LBiFltConsumerBuilder builder = new LBiFltConsumerBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class Blob { /** * Serialisiert das Objekt in den übergebenen OutputStream . Zunächst wird der Header ( Type , Kompressions und Länge )
* in den Stream geschrieben . Anschließen der Content des Blobs , ggf . komprimiert . < br / >
* < br / >
* Der OutputStream wird am Ende der Operation geschlossen . Di... | if ( exhausted ) { throw new UnsupportedOperationException ( "Der Content-InputStream des Blobs wurde bereits einmal gelesen" ) ; } MessageDigest digest = getDigest ( ) ; DigestOutputStream digestOutputStream = new DigestOutputStream ( outputStream , digest ) ; // Headerdaten und Inhalt schreiben
DataOutputStream dataO... |
public class MkGrouper { /** * get which task should tuple be sent to */
public List < Integer > grouper ( List < Object > values ) { } } | if ( GrouperType . global . equals ( groupType ) ) { // send to task which taskId is 0
return JStormUtils . mk_list ( outTasks . get ( 0 ) ) ; } else if ( GrouperType . fields . equals ( groupType ) ) { // field grouping
return fieldsGrouper . grouper ( values ) ; } else if ( GrouperType . all . equals ( groupType ) ) ... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MsqrtType } { @ code > } } */
@ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "msqrt" ) public JAXBElement < MsqrtType > createMsqrt ( MsqrtType value ) { } } | return new JAXBElement < MsqrtType > ( _Msqrt_QNAME , MsqrtType . class , null , value ) ; |
public class IDCard { /** * 检查身份证号是否符合格式
* @ param idCard 身份证号
* @ return 如果身份证号符合身份证格式则返回 < code > true < / code > */
public static boolean check ( String idCard ) { } } | // 验证身份证格式
Matcher matcher = ID_CARD_PATTERN . matcher ( idCard ) ; if ( ! matcher . matches ( ) ) { // 格式不对
logger . error ( "身份证格式不对{}" , idCard ) ; return false ; } // 验证最后一位加权码
byte [ ] idCardByte = idCard . getBytes ( ) ; int sum = 0 ; for ( int i = 0 ; i < 17 ; i ++ ) { sum += ( ( ( int ) idCardByte [ i ] ) - 48 ... |
public class ExamplesUtil { /** * Generates a Map of response examples
* @ param generateMissingExamples specifies the missing examples should be generated
* @ param operation the Swagger Operation
* @ param definitions the map of definitions
* @ param markupDocBuilder the markup builder
* @ return map contai... | Map < String , Object > examples = new LinkedHashMap < > ( ) ; Map < String , Response > responses = operation . getOperation ( ) . getResponses ( ) ; if ( responses != null ) for ( Map . Entry < String , Response > responseEntry : responses . entrySet ( ) ) { Response response = responseEntry . getValue ( ) ; Object e... |
public class ResourceAssignment { /** * Returns the finish date for this resource assignment .
* @ return finish date */
public Date getFinish ( ) { } } | Date result = ( Date ) getCachedValue ( AssignmentField . FINISH ) ; if ( result == null ) { result = getTask ( ) . getFinish ( ) ; } return result ; |
public class DefaultSerializableProxy { /** * Get the associated proxy class .
* @ return the proxy class
* @ throws ClassNotFoundException if the proxy class is not found */
protected Class < ? > getProxyClass ( ) throws ClassNotFoundException { } } | ClassLoader classLoader = getProxyClassLoader ( ) ; return Class . forName ( proxyClassName , false , classLoader ) ; |
public class InviteAction { /** * Sets the max age for the invite . Set this to { @ code 0 } if the invite should never expire . Default is { @ code 86400 } ( 24 hours ) .
* { @ code null } will reset this to the default value .
* @ param maxAge
* The max age for this invite or { @ code null } to use the default ... | if ( maxAge == null ) return this . setMaxAge ( null ) ; Checks . notNegative ( maxAge , "maxAge" ) ; Checks . notNull ( timeUnit , "timeUnit" ) ; return this . setMaxAge ( Math . toIntExact ( timeUnit . toSeconds ( maxAge ) ) ) ; |
public class BeanMapping { /** * 指定したカラム名を持つカラムのマッピング情報を取得する 。
* @ param columnName カラム名 ( フィールド名 ) を指定します 。
* @ return 引数で指定したカラム名の値と一致するカラム情報 。 */
public Optional < ColumnMapping > getColumnMapping ( final String columnName ) { } } | return columns . stream ( ) . filter ( c -> c . getName ( ) != null && c . getName ( ) . equals ( columnName ) ) . findFirst ( ) ; |
public class Standby { /** * Check the correct ingest state for instantiating new ingest
* ( synchronized on ingestStateLock )
* @ return true if the ingest for the requested txid is running
* @ throws IOException when the state is incorrect */
private boolean checkIngestState ( ) throws IOException { } } | if ( currentIngestState == StandbyIngestState . INGESTING_EDITS ) { String msg = "" ; if ( ingest == null ) { msg = "Standby: Ingest instantiation failed, the state is " + currentIngestState + ", but the ingest is null" ; } if ( currentSegmentTxId != ingest . getStartTxId ( ) ) { msg = "Standby: Ingest instantiation fa... |
public class SwiftAPIClient { /** * Direct HTTP PUT request without JOSS package
* @ param objName name of the object
* @ param contentType content type
* @ return HttpURLConnection */
@ Override public FSDataOutputStream createObject ( String objName , String contentType , Map < String , String > metadata , Stat... | final URL url = new URL ( mJossAccount . getAccessURL ( ) + "/" + getURLEncodedObjName ( objName ) ) ; LOG . debug ( "PUT {}. Content-Type : {}" , url . toString ( ) , contentType ) ; // When overwriting an object , cached metadata will be outdated
String cachedName = getObjName ( container + "/" , objName ) ; objectCa... |
public class GroupApi { /** * Deletes an LDAP group link .
* < pre > < code > GitLab Endpoint : DELETE / groups / : id / ldap _ group _ links / : cn < / code > < / pre >
* @ param groupIdOrPath the group ID , path of the group , or a Group instance holding the group ID or path
* @ param cn the CN of the LDAP grou... | if ( cn == null || cn . trim ( ) . isEmpty ( ) ) { throw new RuntimeException ( "cn cannot be null or empty" ) ; } delete ( Response . Status . OK , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "ldap_group_links" , cn ) ; |
public class XMLRPCClient { /** * Asynchronously call a remote procedure on the server . The method must be
* described by a method name . If the method requires parameters , this must
* be set . When the server returns a response the onResponse method is called
* on the listener . If the server returns an error ... | long id = System . currentTimeMillis ( ) ; new Caller ( listener , id , methodName , params ) . start ( ) ; return id ; |
public class JCudnn { /** * Set all values of a tensor to a given value : y [ i ] = value [ 0] */
public static int cudnnSetTensor ( cudnnHandle handle , cudnnTensorDescriptor yDesc , Pointer y , Pointer valuePtr ) { } } | return checkResult ( cudnnSetTensorNative ( handle , yDesc , y , valuePtr ) ) ; |
public class RuntimeEnvironmentBuilder { /** * Provides default configuration of < code > RuntimeEnvironmentBuilder < / code > that is based on :
* < ul >
* < li > DefaultRuntimeEnvironment < / li >
* < / ul >
* It relies on KieClasspathContainer that requires to have kmodule . xml present in META - INF folder ... | return setupClasspathKmoduleBuilder ( KieServices . Factory . get ( ) . getKieClasspathContainer ( ) , kbaseName , ksessionName ) ; |
public class Clock { /** * Defines the color that will be used to colorize the date of the clock
* @ param COLOR */
public void setDateColor ( final Color COLOR ) { } } | if ( null == dateColor ) { _dateColor = COLOR ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { dateColor . set ( COLOR ) ; } |
public class HtmlSelectManyCheckbox { /** * < p > Set the value of the < code > selectedClass < / code > property . < / p > */
public void setSelectedClass ( java . lang . String selectedClass ) { } } | getStateHelper ( ) . put ( PropertyKeys . selectedClass , selectedClass ) ; |
public class BaseClassFinderService { /** * Make sure this service reference is the correct interface / class
* @ param serviceReference
* @ param interfaceClassName
* @ param serviceClassName
* @ return */
private ServiceReference checkService ( ServiceReference serviceReference , String interfaceClassName ) {... | if ( serviceReference != null ) { Object service = bundleContext . getService ( serviceReference ) ; if ( service != null ) { try { if ( interfaceClassName != null ) if ( ! service . getClass ( ) . isAssignableFrom ( Class . forName ( interfaceClassName ) ) ) serviceReference = null ; } catch ( ClassNotFoundException e... |
public class ParamTagImpl { /** * For the parameter comment with embedded @ link tags return the array of
* TagImpls consisting of SeeTagImpl ( s ) and text containing TagImpl ( s ) .
* @ return TagImpl [ ] Array of tags with inline SeeTagImpls .
* @ see TagImpl # inlineTags ( )
* @ see ThrowsTagImpl # inlineTa... | if ( inlineTags == null ) { inlineTags = Comment . getInlineTags ( holder , parameterComment ) ; } return inlineTags ; |
public class AuditNotificationTargetMarshaller { /** * Marshall the given parameter object . */
public void marshall ( AuditNotificationTarget auditNotificationTarget , ProtocolMarshaller protocolMarshaller ) { } } | if ( auditNotificationTarget == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( auditNotificationTarget . getTargetArn ( ) , TARGETARN_BINDING ) ; protocolMarshaller . marshall ( auditNotificationTarget . getRoleArn ( ) , ROLEARN_BINDING ) ;... |
public class Request { /** * sets the if modified since header for the request ( use with GET only )
* @ param dateSince : header field value to add
* @ return : Request Object with if _ modified _ since header value set */
public Request ifModifiedSince ( String dateSince ) { } } | final String ifmodsin = RequestHeaderFields . IF_MODIFIED_SINCE . getName ( ) ; return this . setHeader ( ifmodsin , dateSince ) ; |
public class CommerceCurrencyPersistenceImpl { /** * Returns an ordered range of all the commerce currencies where groupId = & # 63 ; and primary = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are n... | return findByG_P ( groupId , primary , start , end , orderByComparator , true ) ; |
public class KontonummerValidator { /** * Returns an object that represents a Kontonummer .
* @ param kontonummer A String containing a Kontonummer
* @ return A Kontonummer instance
* @ throws IllegalArgumentException thrown if String contains an invalid Kontonummer */
public static Kontonummer getKontonummer ( S... | validateSyntax ( kontonummer ) ; validateChecksum ( kontonummer ) ; return new Kontonummer ( kontonummer ) ; |
public class MqttTopicPermission { /** * Checks the MqttTopicPermission implies a given topic , qos and activity combination
* @ param topic the topic to check
* @ param qoS the QoS to check
* @ param activity the activity to check
* @ return < code > true < / code > if the given topic , qos and activity combin... | if ( qoS == null ) { return false ; } return implies ( topic , splitTopic , QOS . from ( qoS ) , activity ) ; |
public class ZaurusConnectionDialog { /** * Method declaration */
void create ( Insets defInsets ) { } } | setLayout ( new BorderLayout ( ) ) ; addKeyListener ( this ) ; Panel p = new Panel ( new GridLayout ( 6 , 2 , 10 , 10 ) ) ; p . addKeyListener ( this ) ; p . setBackground ( SystemColor . control ) ; p . add ( createLabel ( "Type:" ) ) ; Choice types = new Choice ( ) ; types . addItemListener ( this ) ; types . addKeyL... |
public class MatchingStrategy { /** * Common iteration to get the best constraint match response from the security constraints .
* < pre >
* To get the aggregated match response ,
* 1 . For each security constraint ,
* 1a . Ask security constraint for its match response for the resource access .
* 1b . Option... | MatchResponse currentResponse = null ; ResponseAggregate responseAggregate = createResponseAggregate ( ) ; for ( SecurityConstraint securityConstraint : securityConstraintCollection . getSecurityConstraints ( ) ) { currentResponse = getMatchResponse ( securityConstraint , resourceName , method ) ; optionallySetAggregat... |
public class WCOutputStream { /** * @ see javax . servlet . ServletOutputStream # print ( boolean ) */
public void print ( boolean b ) throws IOException { } } | String value = Boolean . toString ( b ) ; this . output . write ( value . getBytes ( ) , 0 , value . length ( ) ) ; |
public class PlannerWriter { /** * Convert a Java date into a Planner date - time string .
* 20070222T080000Z
* @ param value Java date
* @ return Planner date - time string */
private String getDateTimeString ( Date value ) { } } | String result = null ; if ( value != null ) { Calendar cal = DateHelper . popCalendar ( value ) ; StringBuilder sb = new StringBuilder ( 16 ) ; sb . append ( m_fourDigitFormat . format ( cal . get ( Calendar . YEAR ) ) ) ; sb . append ( m_twoDigitFormat . format ( cal . get ( Calendar . MONTH ) + 1 ) ) ; sb . append ( ... |
public class IconAwesome { /** * Use the free font of FontAwesome 5 . As a side effect , every FontAwesome icon on the same page is switched to FontAwesome 5.2.0 . By default , the icon set is the older version 4.7.0 . < P >
* Usually this method is called internally by the JSF engine . */
public void setSolid ( bool... | if ( _solid ) { AddResourcesListener . setFontAwesomeVersion ( 5 , this ) ; } getStateHelper ( ) . put ( PropertyKeys . solid , _solid ) ; |
public class RunbookDraftsInner { /** * Undo draft edit to last known published state identified by runbook name .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param runbookName The runbook name .
* @ throws IllegalArgumen... | return undoEditWithServiceResponseAsync ( resourceGroupName , automationAccountName , runbookName ) . map ( new Func1 < ServiceResponse < RunbookDraftUndoEditResultInner > , RunbookDraftUndoEditResultInner > ( ) { @ Override public RunbookDraftUndoEditResultInner call ( ServiceResponse < RunbookDraftUndoEditResultInner... |
public class DumpProcessingController { /** * Wraps the given processor into a { @ link EntityDocumentProcessorFilter } if
* global filters are configured ; otherwise just returns the processor
* unchanged .
* @ param processor
* the processor to wrap */
private EntityDocumentProcessor filterEntityDocumentProce... | if ( this . filter . getPropertyFilter ( ) == null && this . filter . getSiteLinkFilter ( ) == null && this . filter . getLanguageFilter ( ) == null ) { return processor ; } else { return new EntityDocumentProcessorFilter ( processor , this . filter ) ; } |
public class Stream { /** * Zip together the " a " and " b " iterators until all of them runs out of values .
* Each pair of values is combined into a single value using the supplied zipFunction function .
* @ param a
* @ param b
* @ param valueForNoneA value to fill if " a " runs out of values first .
* @ pa... | return zip ( a . iteratorEx ( ) , b . iteratorEx ( ) , valueForNoneA , valueForNoneB , zipFunction ) . onClose ( newCloseHandler ( N . asList ( a , b ) ) ) ; |
public class Card { /** * Don ' t change card ' s mCells in binding process ! */
public void onBindCell ( int offset , int position , boolean showFromEnd ) { } } | if ( ! mIsExposed && serviceManager != null ) { ExposureSupport exposureSupport = serviceManager . getService ( ExposureSupport . class ) ; if ( exposureSupport != null ) { mIsExposed = true ; exposureSupport . onExposure ( this , offset , position ) ; } } |
public class GlobalUsersInner { /** * List Environments for the user .
* @ param userName The name of the user .
* @ param labId The resource Id of the lab
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ListEnvironmentsResponseInner object */
public... | if ( userName == null ) { throw new IllegalArgumentException ( "Parameter userName is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } ListEnvironmentsPayload listEnvironmen... |
public class Segment3dfx { /** * Replies the property that is the z coordinate of the first segment point .
* @ return the z1 property . */
@ Pure public DoubleProperty z1Property ( ) { } } | if ( this . p1 . z == null ) { this . p1 . z = new SimpleDoubleProperty ( this , MathFXAttributeNames . Z1 ) ; } return this . p1 . z ; |
public class QuerysImpl { /** * Execute an Analytics query .
* Executes an Analytics query for data . [ Here ] ( https : / / dev . applicationinsights . io / documentation / Using - the - API / Query ) is an example for using POST with an Analytics query .
* @ param appId ID of the application . This is Application... | return ServiceFuture . fromResponse ( executeWithServiceResponseAsync ( appId , body ) , serviceCallback ) ; |
public class CleanUpScheduler { /** * Get scheduled delay for proactive gc task , cross - day setting is supported . < br / >
* 01:30-02:40 , some time between 01:30-02:40 ; < br / >
* 180000,180 seconds later . */
public static long getDelayMillis ( String time ) { } } | String pattern = "HH:mm" ; Date now = new Date ( ) ; if ( StringUtils . contains ( time , "-" ) ) { String start = time . split ( "-" ) [ 0 ] ; String end = time . split ( "-" ) [ 1 ] ; if ( StringUtils . contains ( start , ":" ) && StringUtils . contains ( end , ":" ) ) { Date d1 = getCurrentDateByPlan ( start , patte... |
public class JtaTransactionManagerFactory { /** * Creates a { @ link JtaTransactionManager } instance using any of the { @ link javax . transaction . UserTransaction } ,
* { @ link javax . transaction . TransactionSynchronizationRegistry } , and { @ link javax . transaction . TransactionManager }
* present in { @ c... | return new JtaTransactionManager ( env . get ( EnvironmentName . TRANSACTION ) , env . get ( EnvironmentName . TRANSACTION_SYNCHRONIZATION_REGISTRY ) , env . get ( EnvironmentName . TRANSACTION_MANAGER ) ) ; |
public class CookieUtil { /** * Get the value of the cookie for the cookie of the specified name , or null if not found . */
public static String getCookieValue ( HttpServletRequest req , String name ) { } } | Cookie c = getCookie ( req , name ) ; return ( c == null ) ? null : c . getValue ( ) ; |
public class DefaultFeaturizerSequenceValidator { private boolean hasNoSubjOpt ( List < String > tags ) { } } | if ( tags . size ( ) > 1 ) { for ( String tag : tags ) { if ( ! tag . endsWith ( "=SUBJ" ) ) { return true ; } } } return false ; |
public class AbstractAmazonSQSAsync { /** * Simplified method form for invoking the SetQueueAttributes operation with an AsyncHandler .
* @ see # setQueueAttributesAsync ( SetQueueAttributesRequest , com . amazonaws . handlers . AsyncHandler ) */
@ Override public java . util . concurrent . Future < SetQueueAttribute... | return setQueueAttributesAsync ( new SetQueueAttributesRequest ( ) . withQueueUrl ( queueUrl ) . withAttributes ( attributes ) , asyncHandler ) ; |
public class MailMessageConverter { /** * Reads Citrus internal mail message model object from message payload . Either payload is actually a mail message object or
* XML payload String is unmarshalled to mail message object .
* @ param message
* @ param endpointConfiguration
* @ return */
private MailRequest g... | Object payload = message . getPayload ( ) ; MailRequest mailRequest = null ; if ( payload != null ) { if ( payload instanceof MailRequest ) { mailRequest = ( MailRequest ) payload ; } else { mailRequest = ( MailRequest ) endpointConfiguration . getMarshaller ( ) . unmarshal ( message . getPayload ( Source . class ) ) ;... |
public class AnyChromosome { /** * Create a new chromosome of type { @ code A } with the given parameters . The
* { @ code validator } predicate of the generated gene will always return
* { @ code true } .
* @ param < A > the allele type
* @ param supplier the allele - supplier which is used for creating new , ... | return of ( supplier , Predicates . TRUE , length ) ; |
public class GeoCircle { /** * { @ inheritDoc } */
@ Override public Shape toSpatial4j ( SpatialContext spatialContext ) { } } | double kms = distance . getValue ( GeoDistanceUnit . KILOMETRES ) ; double d = DistanceUtils . dist2Degrees ( kms , DistanceUtils . EARTH_MEAN_RADIUS_KM ) ; return spatialContext . makeCircle ( longitude , latitude , d ) ; |
public class BalancerUrlRewriteFilter { /** * The main method called for each request that this filter is mapped for .
* @ param request the request to filter
* @ throws IOException
* @ throws ServletException */
public void doFilter ( final HttpRequest httpRequest , MessageEvent e ) throws IOException , ServletE... | HttpServletRequest servletRequest = new NettyHttpServletRequestAdaptor ( httpRequest , e . getChannel ( ) ) ; final HttpServletRequest hsRequest = ( HttpServletRequest ) servletRequest ; if ( urlRewriter != null ) { String newUrl = urlRewriter . processRequest ( hsRequest ) ; if ( ! newUrl . equals ( httpRequest . getU... |
public class Context { /** * Associates the specified value with the specified key in the request
* attributes . If the request attributes previously contained a mapping for
* this key , the old value is replaced by the specified value .
* @ param _ key key name of the attribute to set
* @ param _ value _ value... | return this . requestAttributes . put ( _key , _value ) ; |
public class AmazonGuardDutyClient { /** * Lists the ThreatIntelSets of the GuardDuty service specified by the detector ID .
* @ param listThreatIntelSetsRequest
* @ return Result of the ListThreatIntelSets operation returned by the service .
* @ throws BadRequestException
* 400 response
* @ throws InternalSe... | request = beforeClientExecution ( request ) ; return executeListThreatIntelSets ( request ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcTendonType ( ) { } } | if ( ifcTendonTypeEClass == null ) { ifcTendonTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 708 ) ; } return ifcTendonTypeEClass ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link IntTunnelInstallationType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link IntTunnelInstallationT... | return new JAXBElement < IntTunnelInstallationType > ( _IntTunnelInstallation_QNAME , IntTunnelInstallationType . class , null , value ) ; |
public class UrlContentTilePainter { /** * Painter the tile , by building a URL where the image can be found .
* @ param tile
* Must be an instance of { @ link InternalTile } , and must have a non - null { @ link RasterUrlBuilder } .
* @ return Returns a { @ link InternalTile } . */
public InternalTile paint ( In... | if ( tile . getContentType ( ) . equals ( VectorTileContentType . URL_CONTENT ) ) { if ( urlBuilder != null ) { if ( paintGeometries ) { urlBuilder . paintGeometries ( paintGeometries ) ; urlBuilder . paintLabels ( false ) ; tile . setFeatureContent ( urlBuilder . getImageUrl ( ) ) ; } if ( paintLabels ) { urlBuilder .... |
public class KAFDocument { /** * Creates a new property . It assigns an appropriate ID to it . The property is added to the document .
* @ param lemma the lemma of the property .
* @ param references different mentions ( list of targets ) to the same property .
* @ return a new coreference . */
public Feature new... | String newId = idManager . getNextId ( AnnotationType . PROPERTY ) ; Feature newProperty = new Feature ( newId , lemma , references ) ; annotationContainer . add ( newProperty , Layer . PROPERTIES , AnnotationType . PROPERTY ) ; return newProperty ; |
public class CPDefinitionVirtualSettingUtil { /** * Returns the last cp definition virtual setting in the ordered set where uuid = & # 63 ; .
* @ param uuid the uuid
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the last matching cp definition vi... | return getPersistence ( ) . fetchByUuid_Last ( uuid , orderByComparator ) ; |
public class Buffer { public void digest ( InputStream src , MessageDigest digest ) throws IOException { } } | int numRead ; while ( true ) { numRead = src . read ( buffer ) ; if ( numRead < 0 ) { break ; } digest . update ( buffer , 0 , numRead ) ; } |
public class Commands { /** * Returns true if this command can be invoked */
public static boolean isEnabled ( UICommand command , UIContext context ) { } } | return ( command . isEnabled ( context ) && ! ( command instanceof UIWizardStep ) ) ; |
public class AmqpUtils { /** * Close a connection .
* @ param connection */
public static void closeQuietly ( final Connection connection ) { } } | if ( connection != null && connection . isOpen ( ) ) { try { connection . close ( ) ; } catch ( IOException ioe ) { LOG . warnDebug ( ioe , "While closing connection" ) ; } } |
public class ShapeGenerator { /** * Return a path for a scroll bar decrease button . This is used when the
* buttons are placed together at one end of the scroll bar .
* @ param x the X coordinate of the upper - left corner of the button
* @ param y the Y coordinate of the upper - left corner of the button
* @ ... | path . reset ( ) ; path . moveTo ( x + w , y ) ; path . lineTo ( x + w , y + h ) ; path . lineTo ( x , y + h ) ; addScrollGapPath ( x , y , w , h , false ) ; path . closePath ( ) ; return path ; |
public class A_CmsJspValueWrapper { /** * Converts the wrapped value to a boolean . < p >
* @ return the boolean value */
public boolean getToBoolean ( ) { } } | if ( m_boolean == null ) { m_boolean = Boolean . valueOf ( Boolean . parseBoolean ( getToString ( ) ) ) ; } return m_boolean . booleanValue ( ) ; |
public class AccessPoint { /** * Build a self - referencing URL that will perform a query for all copies
* of URL { @ code url } .
* @ param url URL to search for copies of
* @ param startdate start of date range in DT14 format ( may be { @ code null }
* for no date range .
* @ param enddate end of date range... | // XXX assumes particular style of query URL , which may not be compatible
// with RequestParsers in use . TODO : refactor .
if ( startdate != null ) { if ( enddate != null ) { return getQueryPrefix ( ) + startdate + "-" + enddate + "*/" + url ; } else { return getQueryPrefix ( ) + startdate + "*/" + url ; } } else { r... |
public class Dom { public static String getAttribute ( Element element , String name ) { } } | String attr ; attr = getAttributeOpt ( element , name ) ; if ( attr == null ) { throw new DomException ( "missing attribute '" + name + "' in element '" + element . getTagName ( ) + "'" ) ; } return attr ; |
public class HadoopLogParser { /** * Attempt to determine the hostname of the node that created the
* log file . This information can be found in the STARTUP _ MSG lines
* of the Hadoop log , which are emitted when the node starts . */
private void findHostname ( ) { } } | String startupInfo = Environment . runCommand ( "grep --max-count=1 STARTUP_MSG:\\s*host " + file . getName ( ) ) . toString ( ) ; Pattern pattern = Pattern . compile ( "\\s+(\\w+/.+)\\s+" ) ; Matcher matcher = pattern . matcher ( startupInfo ) ; if ( matcher . find ( 0 ) ) { hostname = matcher . group ( 1 ) . split ( ... |
public class FileInfo { /** * Add a key and value representing the current time , as determined by the passed clock , to the
* passed attributes dictionary .
* @ param attributes The file attributes map to update
* @ param clock The clock to retrieve the current time from */
public static void addModificationTime... | attributes . put ( FILE_MODIFICATION_TIMESTAMP_KEY , Longs . toByteArray ( clock . currentTimeMillis ( ) ) ) ; |
public class OutputCommitter { /** * This method implements the new interface by calling the old method . Note
* that the input types are different between the new and old apis and this
* is a bridge between the two . */
@ Override public final void abortJob ( org . apache . hadoop . mapreduce . JobContext context ... | int state = JobStatus . getOldNewJobRunState ( runState ) ; if ( state != JobStatus . FAILED && state != JobStatus . KILLED ) { throw new IOException ( "Invalid job run state : " + runState . name ( ) ) ; } abortJob ( ( JobContext ) context , state ) ; |
public class DomainObject { /** * Set a field ( attribute ) value
* @ param fieldName
* @ param value */
public void setFieldValue ( String fieldName , Object value ) { } } | DOField field = this . domainObjectType . getFieldByName ( fieldName ) ; if ( field == null ) throw new RuntimeException ( "field: " + fieldName + " not found in: " + this . domainObjectType . getName ( ) ) ; if ( field . getComponentTypeName ( ) != null ) throw new RuntimeException ( "field: " + fieldName + " is a lis... |
public class XAssignmentImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case XbasePackage . XASSIGNMENT__ASSIGNABLE : setAssignable ( ( XExpression ) null ) ; return ; case XbasePackage . XASSIGNMENT__VALUE : setValue ( ( XExpression ) null ) ; return ; case XbasePackage . XASSIGNMENT__EXPLICIT_STATIC : setExplicitStatic ( EXPLICIT_STATIC_EDEFAULT ) ; return ; case X... |
public class HiveColumnHandle { /** * The column indicating the bucket id .
* When table bucketing differs from partition bucketing , this column indicates
* what bucket the row will fall in under the table bucketing scheme . */
public static HiveColumnHandle bucketColumnHandle ( ) { } } | return new HiveColumnHandle ( BUCKET_COLUMN_NAME , BUCKET_HIVE_TYPE , BUCKET_TYPE_SIGNATURE , BUCKET_COLUMN_INDEX , SYNTHESIZED , Optional . empty ( ) ) ; |
public class EQL { /** * Parses the stmt .
* @ param _ stmt the stmt
* @ return the abstract stmt */
public static AbstractStmt getStatement ( final CharSequence _stmt ) { } } | AbstractStmt ret = null ; final IStatement < ? > stmt = parse ( _stmt ) ; if ( stmt instanceof IPrintStatement ) { ret = PrintStmt . get ( ( IPrintStatement < ? > ) stmt ) ; } else if ( stmt instanceof IDeleteStatement ) { ret = DeleteStmt . get ( ( IDeleteStatement < ? > ) stmt ) ; } else if ( stmt instanceof IInsertS... |
public class IfcPersonImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) public EList < String > getSuffixTitles ( ) { } } | return ( EList < String > ) eGet ( Ifc2x3tc1Package . Literals . IFC_PERSON__SUFFIX_TITLES , true ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link IdReferenceType } { @ code > } } */
@ XmlElementDecl ( namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os" , name = "PolicyIdReference" , scope = PolicySetType . class ) public JAXBElement < IdReferenceType > c... | return new JAXBElement < IdReferenceType > ( _PolicyIdReference_QNAME , IdReferenceType . class , PolicySetType . class , value ) ; |
public class AbstractBlockResettableIterator { protected boolean writeNextRecord ( T record ) throws IOException { } } | try { this . serializer . serialize ( record , this . collectingView ) ; this . numRecordsInBuffer ++ ; return true ; } catch ( EOFException eofex ) { return false ; } |
public class JmsAdapter { /** * The method overrides the one in the super class to perform
* JMS specific functions . */
@ Override public Object invoke ( Object conn , Object requestData ) throws AdapterException , ConnectionException { } } | try { Object result ; if ( jmsSenderReceiver != null ) { final String responseQueueName = this . getAttributeValueSmart ( RESPONSE_QUEUE_NAME ) ; final String requestDataForMessage = ( String ) requestData ; final Queue replyQueue ; final String correlationId = getCorrelationId ( ) ; boolean replyIsTemporaryQueue = fal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.