signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class string { /** * fill the string like * < code > My name is $ { name } , I ' m $ { age } years old < / code > with fields in * the given object . * @ param obj from object * @ return formated string */ public String from ( Object obj ) { } }
StringBuilder sb = new StringBuilder ( str ) ; Method [ ] methods = obj . getClass ( ) . getMethods ( ) ; Field [ ] fields = obj . getClass ( ) . getDeclaredFields ( ) ; int lastIndex = - 1 ; out : while ( true ) { int start = sb . indexOf ( "${" , lastIndex ) + 2 ; if ( start == 1 ) { break ; } int end = sb . indexOf ...
public class Scope { /** * Pop - scope ( same as exit - scope ) but return all keys that are tracked ( and * would have been deleted ) . */ static public Key [ ] pop ( ) { } }
Stack < HashSet < Key > > keys = _scope . get ( ) . _keys ; return keys . size ( ) > 0 ? keys . pop ( ) . toArray ( new Key [ 0 ] ) : null ;
public class HttpClient { /** * Perform a put against the WSAPI * @ param url the request url * @ param body the body of the put * @ return the JSON encoded string response * @ throws IOException if a non - 200 response code is returned or if some other * problem occurs while executing the request */ public S...
HttpPut httpPut = new HttpPut ( getWsapiUrl ( ) + url ) ; httpPut . setEntity ( new StringEntity ( body , "utf-8" ) ) ; return doRequest ( httpPut ) ;
public class PyExpressionGenerator { /** * Generate the given object . * @ param call the feature call . * @ param it the target for the generated content . * @ param context the context . * @ return the feature call . */ protected XExpression _generate ( XFeatureCall call , IAppendable it , IExtraLanguageGener...
appendReturnIfExpectedReturnedExpression ( it , context ) ; newFeatureCallGenerator ( context , it ) . generate ( call ) ; return call ;
public class ListAccountsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListAccountsRequest listAccountsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listAccountsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listAccountsRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( listAccountsRequest . getUserEmail ( ) , USEREMAIL_BINDING ) ; protocolMarshalle...
public class CategoryUpdatePermissionsEvent { /** * Filtered list of affected { @ link net . dv8tion . jda . core . entities . Member Members } * @ return Immutable list of affected members */ public List < Member > getChangedMembers ( ) { } }
return changed . stream ( ) . filter ( it -> it instanceof Member ) . map ( Member . class :: cast ) . collect ( Collectors . toList ( ) ) ;
public class Block { /** * Calculates the block hash by serializing the block and hashing the * resulting bytes . */ private Sha256Hash calculateHash ( ) { } }
try { ByteArrayOutputStream bos = new UnsafeByteArrayOutputStream ( HEADER_SIZE ) ; writeHeader ( bos ) ; return Sha256Hash . wrapReversed ( Sha256Hash . hashTwice ( bos . toByteArray ( ) ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; // Cannot happen . }
public class A_CmsUploadDialog { /** * Inserts a hidden form into . < p > * @ param form the form to insert */ protected void insertUploadForm ( FormPanel form ) { } }
form . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; m_contentWrapper . add ( form ) ;
public class BaseClassFinderService { /** * Find , resolve , and return this class definition . * @ param className * @ return The class definition or null if not found . */ public Class < ? > findClass ( String className , String versionRange ) { } }
// if ( ClassServiceBootstrap . repositoryAdmin = = null ) // return null ; Class < ? > c = this . getClassFromBundle ( null , className , versionRange ) ; if ( c == null ) { Object resource = this . deployThisResource ( ClassFinderActivator . getPackageName ( className , false ) , versionRange , false ) ; if ( resourc...
public class GVRAnimator { /** * Starts all of the animations in this animator . * @ see GVRAnimator # reset ( ) * @ see GVRAnimationEngine # start ( GVRAnimation ) */ public void start ( GVROnFinish finishCallback ) { } }
if ( mAnimations . size ( ) == 0 ) { return ; } mIsRunning = true ; for ( int i = 0 ; i < mAnimations . size ( ) ; ++ i ) { GVRAnimation anim = mAnimations . get ( i ) ; anim . reset ( ) ; if ( i == 0 ) { anim . setOnFinish ( finishCallback ) ; } else { anim . setOnFinish ( null ) ; } anim . start ( getGVRContext ( ) ....
public class UrlMappingUtils { /** * Resolves a view for the given view and UrlMappingInfo instance * @ param request The request * @ param info The info * @ param viewName The view name * @ param viewResolver The view resolver * @ return The view or null * @ throws Exception */ public static View resolveVi...
String controllerName = info . getControllerName ( ) ; return WebUtils . resolveView ( request , viewName , controllerName , viewResolver ) ;
public class AbstractProcessInstanceMarshaller { /** * Input methods */ public ProcessInstance readProcessInstance ( MarshallerReaderContext context ) throws IOException { } }
ObjectInputStream stream = context . stream ; InternalKnowledgeBase kBase = context . kBase ; InternalWorkingMemory wm = context . wm ; WorkflowProcessInstanceImpl processInstance = createProcessInstance ( ) ; processInstance . setId ( stream . readLong ( ) ) ; String processId = stream . readUTF ( ) ; processInstance ...
public class DeployerModule { /** * Called to do all bindings for this module . * @ see < a href = " http : / / code . google . com / p / google - guice / " > Google Guice < / a > */ @ Override protected void configure ( ) { } }
try { InternalLoggerFactory . setDefaultFactory ( new Slf4JLoggerFactory ( ) ) ; File appRoot = new File ( System . getProperty ( CadmiumListener . BASE_PATH_ENV ) , "maven" ) ; FileUtils . forceMkdir ( appRoot ) ; String remoteMavenRepo = System . getProperty ( MAVEN_REPOSITORY ) ; ArtifactResolver resolver = new Arti...
public class SQLiteAssetHelper { /** * Create and / or open a database that will be used for reading and writing . * The first time this is called , the database will be extracted and copied * from the application ' s assets folder . * < p > Once opened successfully , the database is cached , so you can * call ...
if ( mDatabase != null && mDatabase . isOpen ( ) && ! mDatabase . isReadOnly ( ) ) { return mDatabase ; // The database is already open for business } if ( mIsInitializing ) { throw new IllegalStateException ( "getWritableDatabase called recursively" ) ; } // If we have a read - only database open , someone could be us...
public class GBSTree { /** * Find an InsertStack for use by the current thread . * < p > Allocation of an InsertStack is more expensive than serial * reuse . This is a very cheap form of pooling done by attaching an * InsertStack to each thread that calls insert . < / p > */ private InsertStack getInsertStack ( )...
Object x = _insertStack . get ( ) ; InsertStack g = null ; if ( x != null ) { g = ( InsertStack ) x ; g . reset ( ) ; } else { g = new InsertStack ( this ) ; x = ( Object ) g ; _insertStack . set ( x ) ; } return g ;
public class ProposalLineItem { /** * Gets the frequencyCaps value for this ProposalLineItem . * @ return frequencyCaps * The set of frequency capping units for this { @ code ProposalLineItem } . * This * attribute is optional during creation and defaults * to the * { @ link Product # frequencyCaps product ' ...
return frequencyCaps ;
public class TransactionImpl { /** * { @ inheritDoc } */ public void registerSynchronization ( Synchronization sync ) throws RollbackException , IllegalStateException , SystemException { } }
if ( status == Status . STATUS_UNKNOWN ) throw new IllegalStateException ( "Status unknown" ) ; syncs . add ( sync ) ;
public class LocalDate { /** * Gets the property object for the specified type , which contains many * useful methods . * @ param fieldType the field type to get the chronology for * @ return the property object * @ throws IllegalArgumentException if the field is null or unsupported */ public Property property ...
if ( fieldType == null ) { throw new IllegalArgumentException ( "The DateTimeFieldType must not be null" ) ; } if ( isSupported ( fieldType ) == false ) { throw new IllegalArgumentException ( "Field '" + fieldType + "' is not supported" ) ; } return new Property ( this , fieldType . getField ( getChronology ( ) ) ) ;
public class RequestCollapserFactory { /** * Lookup ( or create and store ) the RequestVariable for a given HystrixCollapserKey . * @ param commandCollapser collapser to retrieve { @ link HystrixRequestVariableHolder } for * @ return HystrixRequestVariableHolder */ @ SuppressWarnings ( "unchecked" ) private Hystrix...
HystrixRequestVariableHolder < RequestCollapser < ? , ? , ? > > requestVariable = requestScopedCollapsers . get ( commandCollapser . getCollapserKey ( ) . name ( ) ) ; if ( requestVariable == null ) { // create new collapser using ' this ' first instance as the one that will get cached for future executions ( ' this ' ...
public class DescriptionStrategy { /** * Provide a human readable description for Every instance . * @ param every - Every * @ return human readable description - String */ protected String describe ( final Every every , final boolean and ) { } }
String description ; if ( every . getPeriod ( ) . getValue ( ) > 1 ) { description = String . format ( "%s %s " , bundle . getString ( EVERY ) , nominalValue ( every . getPeriod ( ) ) ) + " %p " ; } else { description = bundle . getString ( EVERY ) + " %s " ; } if ( every . getExpression ( ) instanceof Between ) { fina...
public class AdminCommandScheduled { /** * Parses command - line and directs to sub - commands . * @ param args Command - line input * @ throws Exception */ public static void executeCommand ( String [ ] args ) throws Exception { } }
String subCmd = ( args . length > 0 ) ? args [ 0 ] : "" ; args = AdminToolUtils . copyArrayCutFirst ( args ) ; if ( subCmd . equals ( "list" ) ) { SubCommandScheduledList . executeCommand ( args ) ; } else if ( subCmd . equals ( "stop" ) ) { SubCommandScheduledStop . executeCommand ( args ) ; } else if ( subCmd . equal...
public class ResourceReaderImpl { /** * / * ( non - Javadoc ) * @ see net . crowmagnumb . util . ResourceReader # getInteger ( java . lang . String ) */ @ Override public Integer getInteger ( final String key ) throws UtilException { } }
return formatInteger ( key , getRequiredPropValue ( key ) ) ;
public class AppEngineCorePluginConfiguration { /** * Configure core tasks for appengine app . yaml and appengine - web . xml based project plugins . */ public void configureCoreProperties ( Project project , AppEngineCoreExtensionProperties appEngineCoreExtensionProperties , String taskGroup , boolean requiresAppEngin...
project . getLogger ( ) . warn ( "WARNING: You are a using release candidate " + getClass ( ) . getPackage ( ) . getImplementationVersion ( ) + ". Behavior of this plugin has changed since 1.3.5. Please see release notes at: " + "https://github.com/GoogleCloudPlatform/app-gradle-plugin." ) ; project . getLogger ( ) . w...
public class VirtualNodeSpecMarshaller { /** * Marshall the given parameter object . */ public void marshall ( VirtualNodeSpec virtualNodeSpec , ProtocolMarshaller protocolMarshaller ) { } }
if ( virtualNodeSpec == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( virtualNodeSpec . getBackends ( ) , BACKENDS_BINDING ) ; protocolMarshaller . marshall ( virtualNodeSpec . getListeners ( ) , LISTENERS_BINDING ) ; protocolMarshaller . ...
public class tmtrafficpolicy_stats { /** * Use this API to fetch statistics of tmtrafficpolicy _ stats resource of given name . */ public static tmtrafficpolicy_stats get ( nitro_service service , String name ) throws Exception { } }
tmtrafficpolicy_stats obj = new tmtrafficpolicy_stats ( ) ; obj . set_name ( name ) ; tmtrafficpolicy_stats response = ( tmtrafficpolicy_stats ) obj . stat_resource ( service ) ; return response ;
public class CmsPropertyAdvanced { /** * Creates the HTML String for the edit properties form . < p > * The values of the form are set delayed , have a look at the * JavaDoc of buildSetFormValues ( ) for a detailed description . < p > * @ return the HTML output String for the edit properties form */ public String...
StringBuffer result = new StringBuffer ( 4096 ) ; // get currently active tab String activeTab = getActiveTabName ( ) ; // initialize " disabled " attribute for the input fields String disabled = "" ; if ( ! isEditable ( ) ) { disabled = " disabled=\"disabled\"" ; } // get all properties for the resource List < String ...
public class CharacterReader { /** * Check if the value of the provided range equals the string . */ static boolean rangeEquals ( final char [ ] charBuf , final int start , int count , final String cached ) { } }
if ( count == cached . length ( ) ) { int i = start ; int j = 0 ; while ( count -- != 0 ) { if ( charBuf [ i ++ ] != cached . charAt ( j ++ ) ) return false ; } return true ; } return false ;
public class CliFrontend { /** * Builds command line options for the cancel action . * @ return Command line options for the cancel action . */ static Options getCancelOptions ( Options options ) { } }
options . addOption ( ID_OPTION ) ; options = getJobManagerAddressOption ( options ) ; return options ;
public class BatchWriteRequest { /** * A list of operations that are part of the batch . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setOperations ( java . util . Collection ) } or { @ link # withOperations ( java . util . Collection ) } if you want to ...
if ( this . operations == null ) { setOperations ( new java . util . ArrayList < BatchWriteOperation > ( operations . length ) ) ; } for ( BatchWriteOperation ele : operations ) { this . operations . add ( ele ) ; } return this ;
public class CommerceOrderPersistenceImpl { /** * Returns the last commerce order in the ordered set where groupId = & # 63 ; and commerceAccountId = & # 63 ; and orderStatus = & # 63 ; . * @ param groupId the group ID * @ param commerceAccountId the commerce account ID * @ param orderStatus the order status * ...
CommerceOrder commerceOrder = fetchByG_C_O_Last ( groupId , commerceAccountId , orderStatus , orderByComparator ) ; if ( commerceOrder != null ) { return commerceOrder ; } StringBundler msg = new StringBundler ( 8 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( groupId ) ; m...
public class CPMeasurementUnitUtil { /** * Returns the last cp measurement unit in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * ...
return getPersistence ( ) . fetchByUuid_C_Last ( uuid , companyId , orderByComparator ) ;
public class NfsCreateRequest { /** * ( non - Javadoc ) * @ see com . emc . ecs . nfsclient . nfs . NfsRequestBase # marshalling ( com . emc . ecs . * nfsclient . rpc . Xdr ) */ public void marshalling ( Xdr xdr ) { } }
super . marshalling ( xdr ) ; xdr . putString ( _name ) ; xdr . putInt ( _createMode . getValue ( ) ) ; if ( _createMode != NfsCreateMode . EXCLUSIVE ) { _attributes . marshalling ( xdr ) ; } else { xdr . putByteArray ( _verifier ) ; }
public class QuickStartSecurityRegistry { /** * { @ inheritDoc } */ @ Override public SearchResult getGroups ( String pattern , int limit ) throws RegistryException { } }
if ( pattern == null ) { throw new IllegalArgumentException ( "pattern is null" ) ; } if ( pattern . isEmpty ( ) ) { throw new IllegalArgumentException ( "pattern is an empty String" ) ; } return new SearchResult ( ) ;
public class HbaseSyncService { /** * 插入操作 * @ param config 配置项 * @ param dml DML数据 */ private void insert ( MappingConfig config , Dml dml ) { } }
List < Map < String , Object > > data = dml . getData ( ) ; if ( data == null || data . isEmpty ( ) ) { return ; } MappingConfig . HbaseMapping hbaseMapping = config . getHbaseMapping ( ) ; // if ( ! validHTable ( config ) ) { // logger . error ( " HBase table ' { } ' not exists " , // hbaseMapping . getHbaseTable ( ) ...
public class ChannelSuppliers { /** * Collects data provided by the { @ code supplier } asynchronously and returns a * promise of accumulated result . This process will be getting values from the * { @ code supplier } , until a promise of { @ code null } is returned , which represents * end of stream . * If { @...
return Promise . ofCallback ( cb -> toCollectorImpl ( supplier , initialValue , accumulator , finisher , cb ) ) ;
public class FailoverRegion { /** * Notice the region to failover , */ private void failover ( long globalModVersionOfFailover ) { } }
if ( ! executionGraph . getRestartStrategy ( ) . canRestart ( ) ) { executionGraph . failGlobal ( new FlinkException ( "RestartStrategy validate fail" ) ) ; } else { JobStatus curStatus = this . state ; if ( curStatus . equals ( JobStatus . RUNNING ) ) { cancel ( globalModVersionOfFailover ) ; } else if ( curStatus . e...
public class SynchroData { /** * Read the file header data . * @ param is input stream */ private void readHeader ( InputStream is ) throws IOException { } }
byte [ ] header = new byte [ 20 ] ; is . read ( header ) ; m_offset += 20 ; SynchroLogger . log ( "HEADER" , header ) ;
public class NetTimeConnector { /** * < p > Liefert die aktuelle Differenz zwischen Netz - Zeit und lokaler Zeit in Mikrosekunden . < / p > * @ param micros aktuelle lokale Zeit in Mikrosekunden * @ return Mikrosekunden - Offset ( { @ code 0 } , wenn noch keine Verbindung hergestellt wurde ) */ long getLastOffset (...
final ConnectionResult cr = this . result ; return ( ( cr == null ) ? 0 : cr . getActualOffset ( micros ) ) ;
public class LdapAdapter { /** * Method to get the list of descendants . * @ param entity * @ param ldapEntry * @ param descCtrl * @ throws WIMException */ private void getDescendants ( Entity entity , LdapEntry ldapEntry , DescendantControl descCtrl ) throws WIMException { } }
if ( descCtrl == null ) { return ; } List < String > propNames = descCtrl . getProperties ( ) ; int level = descCtrl . getLevel ( ) ; List < String > descTypes = getEntityTypes ( descCtrl ) ; String [ ] bases = getBases ( descCtrl , descTypes ) ; boolean treeView = descCtrl . isSetTreeView ( ) ; int scope = SearchContr...
public class WebAppSecurityCollaboratorImpl { /** * This preInvoke is called during init & during destroy of a Servlet class object . * It will call the other preInvoke to ensure delegation occurs . { @ inheritDoc } */ @ Override public Object preInvoke ( String servletName ) throws SecurityViolationException , IOExc...
// preInvoke will ensure delegation is done when run - as is specified return preInvoke ( null , null , servletName , true ) ;
public class CommerceAccountOrganizationRelPersistenceImpl { /** * Returns the first commerce account organization rel in the ordered set where organizationId = & # 63 ; . * @ param organizationId the organization ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code ...
CommerceAccountOrganizationRel commerceAccountOrganizationRel = fetchByOrganizationId_First ( organizationId , orderByComparator ) ; if ( commerceAccountOrganizationRel != null ) { return commerceAccountOrganizationRel ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . a...
public class CmsDeleteMultiplePrincipalDialog { /** * Initialized the dialog . < p > * @ param cms CmsObject * @ param window window * @ param app */ private void init ( CmsObject cms , final Window window , final CmsAccountsApp app ) { } }
CmsVaadinUtils . readAndLocalizeDesign ( this , CmsVaadinUtils . getWpMessagesForCurrentLocale ( ) , null ) ; m_icon . setContentMode ( ContentMode . HTML ) ; m_icon . setValue ( FontOpenCms . WARNING . getHtml ( ) ) ; m_icon2 . setContentMode ( ContentMode . HTML ) ; m_icon2 . setValue ( FontOpenCms . WARNING . getHtm...
public class SSLConnectionContextImpl { /** * @ see com . ibm . wsspi . tcpchannel . SSLConnectionContext # renegotiate ( ) */ public void renegotiate ( ) { } }
try { this . sslConnLink . getSSLEngine ( ) . beginHandshake ( ) ; } catch ( SSLException se ) { FFDCFilter . processException ( se , getClass ( ) . getName ( ) + ".renegotiate" , "1" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Error while attempting handshake ren...
public class Attributes { /** * adds without checking if this key exists */ private void add ( String key , String value ) { } }
checkCapacity ( size + 1 ) ; keys [ size ] = key ; vals [ size ] = value ; size ++ ;
public class RedisClusterStorage { /** * Store a { @ link Calendar } * @ param name the name of the calendar * @ param calendar the calendar object to be stored * @ param replaceExisting if true , any existing calendar with the same name will be overwritten * @ param updateTriggers if true , any existing trigge...
final String calendarHashKey = redisSchema . calendarHashKey ( name ) ; if ( ! replaceExisting && jedis . exists ( calendarHashKey ) ) { throw new ObjectAlreadyExistsException ( String . format ( "Calendar with key %s already exists." , calendarHashKey ) ) ; } Map < String , String > calendarMap = new HashMap < > ( ) ;...
public class DRL5Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 230:1 : conditionalAndExpression returns [ BaseDescr result ] : left = inclusiveOrExpression ( DOUBLE _ AMPER ( args = fullAnnotation [ null ] ) ? right = inclusiveOrExpression ) * ; */ public final Base...
BaseDescr result = null ; BaseDescr left = null ; AnnotationDescr args = null ; BaseDescr right = null ; try { // src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 231:3 : ( left = inclusiveOrExpression ( DOUBLE _ AMPER ( args = fullAnnotation [ null ] ) ? right = inclusiveOrExpression ) *...
public class TimedMap { /** * This method is NOT supported and always throws UnsupportedOperationException * @ see Map # keySet ( ) */ public Set < K > keySet ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && _tc . isEntryEnabled ( ) ) SibTr . entry ( this , _tc , "keySet" ) ; UnsupportedOperationException uoe = new UnsupportedOperationException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && _tc . isEntryEnabled ( ) ) SibTr . exit ( this , _tc , "keySet" , uoe ) ; thr...
public class FilteredNormalizer2 { /** * { @ inheritDoc } */ @ Override public Appendable normalize ( CharSequence src , Appendable dest ) { } }
if ( dest == src ) { throw new IllegalArgumentException ( ) ; } return normalize ( src , dest , UnicodeSet . SpanCondition . SIMPLE ) ;
public class ApproximateHistogram { /** * @ param h histogram to be merged into the current histogram * @ param mergedPositions temporary buffer of size greater or equal to { @ link # size } * @ param mergedBins temporary buffer of size greater or equal to { @ link # size } * @ return returns this histogram with ...
if ( size == 0 ) { return copy ( h ) ; } else { return foldRule ( h , mergedPositions , mergedBins ) ; }
public class SMB1SigningDigest { /** * { @ inheritDoc } * @ see jcifs . internal . SMBSigningDigest # sign ( byte [ ] , int , int , jcifs . internal . CommonServerMessageBlock , * jcifs . internal . CommonServerMessageBlock ) */ @ Override public void sign ( byte [ ] data , int offset , int length , CommonServerMes...
if ( log . isTraceEnabled ( ) ) { log . trace ( "Signing with seq " + this . signSequence ) ; } ( ( ServerMessageBlock ) request ) . setSignSeq ( this . signSequence ) ; if ( response != null ) { ( ( ServerMessageBlock ) response ) . setSignSeq ( this . signSequence + 1 ) ; } try { update ( this . macSigningKey , 0 , t...
public class appfwxmlcontenttype { /** * Use this API to delete appfwxmlcontenttype resources of given names . */ public static base_responses delete ( nitro_service client , String xmlcontenttypevalue [ ] ) throws Exception { } }
base_responses result = null ; if ( xmlcontenttypevalue != null && xmlcontenttypevalue . length > 0 ) { appfwxmlcontenttype deleteresources [ ] = new appfwxmlcontenttype [ xmlcontenttypevalue . length ] ; for ( int i = 0 ; i < xmlcontenttypevalue . length ; i ++ ) { deleteresources [ i ] = new appfwxmlcontenttype ( ) ;...
public class RangeSeekBar { /** * Sets normalized max value to value so that 0 < = normalized min value < = value < = 1 . The View will get invalidated when calling this method . * @ param value The new normalized max value to set . */ private void setNormalizedMaxValue ( double value ) { } }
normalizedMaxValue = Math . max ( 0d , Math . min ( 1d , Math . max ( value , normalizedMinValue ) ) ) ; invalidate ( ) ;
public class SimpleDocumentDbRepository { /** * delete list of entities without partitions * @ param entities */ @ Override public void deleteAll ( Iterable < ? extends T > entities ) { } }
Assert . notNull ( entities , "Iterable entities should not be null" ) ; StreamSupport . stream ( entities . spliterator ( ) , true ) . forEach ( this :: delete ) ;
public class MechanizeAgent { /** * / * ( non - Javadoc ) * @ see com . gistlabs . mechanize . Mechanize # get ( java . lang . String ) */ @ Override public < T extends Resource > T get ( final String uri ) { } }
return doRequest ( uri ) . get ( ) ;
public class FSDirectory { /** * See { @ link ClientProtocol # setQuota ( String , long , long ) } for the contract . * Sets quota for for a directory . * @ returns INodeDirectory if any of the quotas have changed . null other wise . * @ throws FileNotFoundException if the path does not exist or is a file * @ t...
// sanity check if ( ( nsQuota < 0 && nsQuota != FSConstants . QUOTA_DONT_SET && nsQuota < FSConstants . QUOTA_RESET ) || ( dsQuota < 0 && dsQuota != FSConstants . QUOTA_DONT_SET && dsQuota < FSConstants . QUOTA_RESET ) ) { throw new IllegalArgumentException ( "Illegal value for nsQuota or " + "dsQuota : " + nsQuota + ...
public class TSIG { /** * Generates a TSIG record for a message and adds it to the message * @ param m The message * @ param old If this message is a response , the TSIG from the request */ public void apply ( Message m , TSIGRecord old ) { } }
apply ( m , Rcode . NOERROR , old ) ;
public class NamedResolverMap { /** * The string set of keys held by the resolver map . * @ return the string set of keys held by the resolver map . */ public Set < String > stringKeySet ( ) { } }
return data . keySet ( ) . stream ( ) . map ( Any2 :: getRight ) . flatMap ( opt -> opt . map ( Stream :: of ) . orElseGet ( Stream :: empty ) ) . collect ( Collectors . toSet ( ) ) ;
public class XMLSerializer { /** * Translate the ServiceWrapper into the wireline string . See * { @ link ServiceWrapper } * @ param service the instance of the ServiceWrapper * @ return the wireline string */ public String marshalService ( ServiceWrapper service ) { } }
Service xmlService = composeServiceFromServiceWrapper ( service ) ; StringWriter sw = new StringWriter ( ) ; try { JAXBContext jaxbContext = JAXBContext . newInstance ( Service . class ) ; Marshaller jaxbMarshaller = jaxbContext . createMarshaller ( ) ; // output pretty printed jaxbMarshaller . setProperty ( Marshaller...
public class IOUtil { /** * Reads the entries of a Header and returns a map containing the * { @ link HeaderKey } as key and { @ link StandardField } as value . * The map is initialized with all possible HeaderKeys of the subtype and * empty fields . * The passed instances must not be null and the specName must...
assert specName != null && specName . trim ( ) . length ( ) > 0 ; // get the specification List < String [ ] > specification = readArray ( specName ) ; // call readHeaderEntries for specification return readHeaderEntries ( clazz , specFormat , specification , headerbytes , headerOffset ) ;
public class Alerts { /** * 弹窗 , alertType默认为 { @ link AlertType # INFORMATION } , modality默认为 { @ link Modality # NONE } , window默认为null , style默认为 { @ link * StageStyle # DECORATED } * @ param title 标题 * @ param header 信息头 * @ param content 内容 * @ return { @ link ButtonType } */ public static Optional < But...
return alert ( title , header , content , AlertType . INFORMATION ) ;
public class CreateClientVpnEndpointRequest { /** * Information about the authentication method to be used to authenticate clients . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAuthenticationOptions ( java . util . Collection ) } or * { @ link # with...
if ( this . authenticationOptions == null ) { setAuthenticationOptions ( new com . amazonaws . internal . SdkInternalList < ClientVpnAuthenticationRequest > ( authenticationOptions . length ) ) ; } for ( ClientVpnAuthenticationRequest ele : authenticationOptions ) { this . authenticationOptions . add ( ele ) ; } return...
public class HMM { /** * Scaled backward procedure without underflow . * @ param o an observation sequence . * @ param beta on output , beta ( i , j ) holds the scaled total probability of * starting up in state i at time j . * @ param scaling on input , it should hold scaling factors computed by * forward pr...
int n = o . length - 1 ; for ( int i = 0 ; i < numStates ; i ++ ) { beta [ n ] [ i ] = 1.0 / scaling [ n ] ; } for ( int t = n ; t -- > 0 ; ) { for ( int i = 0 ; i < numStates ; i ++ ) { double sum = 0. ; for ( int j = 0 ; j < numStates ( ) ; j ++ ) { sum += beta [ t + 1 ] [ j ] * a [ i ] [ j ] * b [ j ] [ o [ t + 1 ] ...
public class HttpDateFormatImpl { /** * @ see com . ibm . websphere . http . HttpDateFormat # parseTime ( java . lang . String ) */ @ Override public Date parseTime ( String input ) throws ParseException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "parseTime parsing [" + input + "]" ) ; } String data = input ; int i = data . indexOf ( ';' , 0 ) ; // PK20062 - check for excess data following the date value if ( - 1 != i ) { if ( TraceComponent . isAnyTracingEnabled ( ) ...
public class ERiC { /** * Returns true , if the specified parent cluster is a parent of one child of * the children clusters . * @ param npred Neighborhood predicate * @ param parent the parent to be tested * @ param iter the list of children to be tested * @ return true , if the specified parent cluster is a...
StringBuilder msg = LOG . isDebugging ( ) ? new StringBuilder ( ) : null ; for ( ; iter . valid ( ) ; iter . advance ( ) ) { Cluster < CorrelationModel > child = iter . get ( ) ; if ( parent . getModel ( ) . getPCAResult ( ) . getCorrelationDimension ( ) == child . getModel ( ) . getPCAResult ( ) . getCorrelationDimens...
public class BpmnParse { /** * Parse async continuation of an activity and create async jobs for the activity . * < br / > < br / > * When the activity is marked as multi instance , then async jobs create instead for the multi instance body . * When the wrapped activity has async characteristics in ' multiInstanc...
// can ' t use # getMultiInstanceScope here to determine whether the task is multi - instance , // since the property hasn ' t been set yet ( cf parseActivity ) ActivityImpl parentFlowScopeActivity = activity . getParentFlowScopeActivity ( ) ; if ( parentFlowScopeActivity != null && parentFlowScopeActivity . getActivit...
public class Choice3 { /** * Static factory method for wrapping a value of type < code > A < / code > in a { @ link Choice3 } . * @ param c the value * @ param < A > the first possible type * @ param < B > the second possible type * @ param < C > the third possible type * @ return the wrapped value as a { @ l...
return new _C < > ( c ) ;
public class Pql { /** * Gets a list of the maximum size for each column . * @ param resultSet the result set to process * @ return a list of the maximum size for each column */ private static List < Integer > getMaxColumnSizes ( List < String [ ] > resultSet ) { } }
List < Integer > maxColumnSizes = Lists . newArrayList ( ) ; for ( int i = 0 ; i < resultSet . get ( 0 ) . length ; i ++ ) { int maxColumnSize = - 1 ; for ( int j = 0 ; j < resultSet . size ( ) ; j ++ ) { if ( resultSet . get ( j ) [ i ] . length ( ) > maxColumnSize ) { maxColumnSize = resultSet . get ( j ) [ i ] . len...
public class MonitorableRegistry { /** * Informs this MonitorableRegistry of a new { @ link Monitorable } ; that * Monitorable will be added to the registry , assuming no Monitorable with * the same name has previously been registered . * @ throws UnsupportedOperationException * if the name of the provided moni...
if ( monitorables . containsKey ( monitorable . getName ( ) ) ) { throw new UnsupportedOperationException ( "There is already an instance of the Monitorable [" + monitorable . getName ( ) + "] registered." ) ; } monitorables . put ( monitorable . getName ( ) , monitorable ) ; notifyListenersOfNewMonitorable ( monitorab...
public class FinderPatternFinder { /** * Get square of distance between a and b . */ private static double squaredDistance ( FinderPattern a , FinderPattern b ) { } }
double x = a . getX ( ) - b . getX ( ) ; double y = a . getY ( ) - b . getY ( ) ; return x * x + y * y ;
public class RobotControlProxy { /** * / * ( non - Javadoc ) * @ see com . github . thehilikus . jrobocom . RobotControl # changeBank ( int ) */ @ Override public void changeBank ( int newBank ) { } }
int penalty = Timing . getInstance ( ) . BANK_CHANGE ; log . trace ( "[changeBank] Waiting {} cycles to change to bank {}" , penalty , newBank ) ; turnsControl . waitTurns ( penalty , "Change bank" ) ; robot . changeBank ( newBank ) ;
public class ConstantPool { /** * Returns a constant from the pool by index , or throws an exception if not * found . If this constant pool has not yet been written or was not created * by the read method , indexes are not assigned . * @ throws ArrayIndexOutOfBoundsException if index is out of range . */ public C...
if ( mIndexedConstants == null ) { throw new ArrayIndexOutOfBoundsException ( "Constant pool indexes have not been assigned" ) ; } return ( ConstantInfo ) mIndexedConstants . get ( index ) ;
public class ParallelCombiner { /** * Find a minimum size of the buffer slice and corresponding leafCombineDegree and number of slices . Note that each * node in the combining tree is executed by different threads . This method assumes that combining the leaf nodes * requires threads as many as possible , while com...
for ( int leafCombineDegree = MINIMUM_LEAF_COMBINE_DEGREE ; leafCombineDegree <= numLeafNodes ; leafCombineDegree ++ ) { final int requiredBufferNum = computeRequiredBufferNum ( numLeafNodes , leafCombineDegree ) ; if ( requiredBufferNum <= numAvailableThreads ) { final int expectedSliceSize = combineBuffer . capacity ...
public class HelpFormatter { /** * Appends the usage clause for an Option to a StringBuffer . * @ param buff the StringBuffer to append to * @ param option the Option to append * @ param required whether the Option is required or not */ private void appendOption ( StringBuffer buff , Option option , boolean requi...
if ( ! required ) { buff . append ( "[" ) ; } if ( option . getOpt ( ) != null ) { buff . append ( "-" ) . append ( option . getOpt ( ) ) ; } else { buff . append ( "--" ) . append ( option . getLongOpt ( ) ) ; } // if the Option has a value and a non blank argname if ( option . hasArg ( ) && ( option . getArgName ( ) ...
public class SourceWaterMarks { /** * Gets the low water mark of a source . * @ param source - the source */ public long getLWMScn ( String source ) { } }
WaterMarkEntry e = sourceWaterMarkMap . get ( source ) ; return ( e == null ) ? 0 : e . getLWMScn ( ) ;
public class ListVocabulariesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListVocabulariesRequest listVocabulariesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listVocabulariesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listVocabulariesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listVocabulariesRequest . getMaxResults ( ) , MAXRESULTS_BINDI...
public class UniversalDateAndTimeStampImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setYearAD ( Integer newYearAD ) { } }
Integer oldYearAD = yearAD ; yearAD = newYearAD ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . UNIVERSAL_DATE_AND_TIME_STAMP__YEAR_AD , oldYearAD , yearAD ) ) ;
public class PartitionTable { /** * Convert values to immutable sets . */ private static < K , V > void makeSetsImmutable ( Map < K , Set < V > > map ) { } }
Set < K > keys = map . keySet ( ) ; for ( K key : keys ) { Set < V > value = map . get ( key ) ; map . put ( key , Collections . unmodifiableSet ( value ) ) ; }
public class ProjectListType { /** * Gets the value of the project property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE > ...
if ( project == null ) { project = new ArrayList < ProjectListType . Project > ( ) ; } return this . project ;
public class CoreRepositorySetupService { /** * groups */ protected Authorizable makeGroupAvailable ( @ Nonnull final Session session , @ Nonnull final String id , @ Nonnull final String intermediatePath ) throws RepositoryException { } }
UserManager userManager = ( ( JackrabbitSession ) session ) . getUserManager ( ) ; Authorizable authorizable = userManager . getAuthorizable ( id ) ; if ( authorizable != null ) { if ( authorizable . isGroup ( ) ) { return authorizable ; } throw new RepositoryException ( "'" + id + "' exists but is not a group" ) ; } L...
public class PumpStreamHandler { /** * Stop pumping the streams . */ public void stop ( ) { } }
if ( inputThread != null ) { if ( inputStreamPumper != null ) { inputStreamPumper . stopProcessing ( ) ; } // #33 Interrupt reading from a PipedInputStream to unblock the pumping thread inputThread . interrupt ( ) ; log . trace ( "Joining input thread {}..." , inputThread ) ; try { inputThread . join ( ) ; inputThread ...
public class SeleniumSpec { /** * Browse to { @ code url } using the current browser . * @ param path path of running app * @ throws Exception exception */ @ Given ( "^I( securely)? browse to '(.+?)'$" ) public void seleniumBrowse ( String isSecured , String path ) throws Exception { } }
assertThat ( path ) . isNotEmpty ( ) ; if ( commonspec . getWebHost ( ) == null ) { throw new Exception ( "Web host has not been set" ) ; } if ( commonspec . getWebPort ( ) == null ) { throw new Exception ( "Web port has not been set" ) ; } String protocol = "http://" ; if ( isSecured != null ) { protocol = "https://" ...
public class RTFEmbeddedObject { /** * Reads a data block and adds it to the list of blocks . * @ param text RTF data * @ param offset current offset * @ param length next block length * @ param blocks list of blocks * @ return next offset */ private static int readDataBlock ( String text , int offset , int l...
int bytes = length / 2 ; byte [ ] data = new byte [ bytes ] ; for ( int index = 0 ; index < bytes ; index ++ ) { data [ index ] = ( byte ) Integer . parseInt ( text . substring ( offset , offset + 2 ) , 16 ) ; offset += 2 ; } blocks . add ( data ) ; return ( offset ) ;
public class Merger { /** * Merges argument iterators . Iterators should return values in natural order . * @ param < T > * @ param iterators * @ return */ public static < T > Iterator < T > merge ( Iterator < T > ... iterators ) { } }
return merge ( null , iterators ) ;
public class RelaxNGDefaultsComponent { /** * On start element * @ param name The element name * @ param atts The attributes */ private void onStartElement ( QName name , XMLAttributes atts ) { } }
if ( detecting ) { detecting = false ; loadDefaults ( ) ; } if ( defaults != null ) { checkAndAddDefaults ( name , atts ) ; }
public class Nodes { /** * Adds the given input map to the end of the node ' s list of input maps , so that an event will be pattern - matched * against all other input maps currently " installed " in the node before being pattern - matched against the given * input map . */ public static void addFallbackInputMap (...
// getInputMap calls init , so can use unsafe setter setInputMapUnsafe ( node , InputMap . sequence ( getInputMap ( node ) , im ) ) ;
public class CmsWorkplaceManager { /** * Returns the gallery default scope . < p > * @ return the gallery default scope */ public CmsGallerySearchScope getGalleryDefaultScope ( ) { } }
CmsGallerySearchScope result = CmsGallerySearchScope . siteShared ; if ( m_galleryDefaultScope != null ) { try { result = CmsGallerySearchScope . valueOf ( m_galleryDefaultScope ) ; } catch ( Throwable t ) { // ignore } } return result ;
public class SslPolicyClient { /** * Returns the specified SSL policy resource . Gets a list of available SSL policies by making a * list ( ) request . * < p > Sample code : * < pre > < code > * try ( SslPolicyClient sslPolicyClient = SslPolicyClient . create ( ) ) { * ProjectName project = ProjectName . of (...
InsertSslPolicyHttpRequest request = InsertSslPolicyHttpRequest . newBuilder ( ) . setProject ( project == null ? null : project . toString ( ) ) . setSslPolicyResource ( sslPolicyResource ) . build ( ) ; return insertSslPolicy ( request ) ;
public class AbstractBeanJsonCreator { /** * Build the method that returns the class of the mapped type . * @ return the method built */ private MethodSpec buildClassGetterMethod ( ) { } }
return MethodSpec . methodBuilder ( isSerializer ( ) ? "getSerializedType" : "getDeserializedType" ) . addModifiers ( Modifier . PUBLIC ) . addAnnotation ( Override . class ) . returns ( Class . class ) . addStatement ( "return $T.class" , rawName ( beanInfo . getType ( ) ) ) . build ( ) ;
public class XMLSerializer { /** * Ensure namespaces capacity . */ protected void ensureNamespacesCapacity ( ) { } }
// int size ) { // int namespaceSize = namespacePrefix ! = null ? namespacePrefix . length // assert ( namespaceEnd > = namespacePrefix . length ) ; // if ( size > = namespaceSize ) { // int newSize = size > 7 ? 2 * size : 8 ; / / = lucky 7 + 1 / / 25 final int newSize = namespaceEnd > 7 ? 2 * namespaceEnd : 8 ; if ( T...
public class FileSystemConnector { /** * Utility method for determining the node identifier for the supplied file . Subclasses may override this method to change the * format of the identifiers , but in that case should also override the { @ link # fileFor ( String ) } , * { @ link # isContentNode ( String ) } , an...
String path = file . getAbsolutePath ( ) ; if ( ! path . startsWith ( directoryAbsolutePath ) ) { if ( directory . getAbsolutePath ( ) . equals ( path ) ) { // This is the root return DELIMITER ; } String msg = JcrI18n . fileConnectorNodeIdentifierIsNotWithinScopeOfConnector . text ( getSourceName ( ) , directoryPath ,...
public class DataNode { /** * Sends a ' Blocks Being Written ' report to the given node . * @ param node the node to send the report to * @ throws IOException */ public void sendBlocksBeingWrittenReport ( DatanodeProtocol node , int namespaceId , DatanodeRegistration nsRegistration ) throws IOException { } }
Block [ ] blocks = data . getBlocksBeingWrittenReport ( namespaceId ) ; if ( blocks != null && blocks . length != 0 ) { long [ ] blocksAsLong = BlockListAsLongs . convertToArrayLongs ( blocks ) ; BlockReport bbwReport = new BlockReport ( blocksAsLong ) ; node . blocksBeingWrittenReport ( nsRegistration , bbwReport ) ; ...
public class Row { /** * Returns the type - id of the element in a Row . * @ param column the column of which you ' d like to know the type * @ return the type - id of the element in the row */ int getElementID ( int column ) { } }
if ( cells [ column ] == null ) return NULL ; else if ( Cell . class . isInstance ( cells [ column ] ) ) return CELL ; else if ( Table . class . isInstance ( cells [ column ] ) ) return TABLE ; return - 1 ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertOVSBYPSIDENToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class Base64 { /** * Similar to { @ link # encodeBytes ( byte [ ] , int , int , int ) } but returns * a byte array instead of instantiating a String . This is more efficient * if you ' re working with I / O streams and have large data sets to encode . * @ param source The data to convert * @ param off Of...
if ( source == null ) { throw new NullPointerException ( "Cannot serialize a null array." ) ; } // end if : null if ( off < 0 ) { throw new IllegalArgumentException ( "Cannot have negative offset: " + off ) ; } // end if : off < 0 if ( len < 0 ) { throw new IllegalArgumentException ( "Cannot have length offset: " + len...
public class AjaxSlider { /** * Sets the call - back for the AJAX Change Event . * @ param ajaxChangeEvent */ public void setAjaxChangeEvent ( ISliderAjaxEvent ajaxChangeEvent ) { } }
this . ajaxEvents . put ( SliderAjaxEvent . ajaxChangeEvent , ajaxChangeEvent ) ; setChangeEvent ( new SliderAjaxJsScopeUiEvent ( this , SliderAjaxEvent . ajaxChangeEvent ) ) ;
public class AmazonRedshiftClient { /** * Returns information about Amazon Redshift security groups . If the name of a security group is specified , the * response will contain only information about only that security group . * For information about managing security groups , go to < a * href = " https : / / doc...
request = beforeClientExecution ( request ) ; return executeDescribeClusterSecurityGroups ( request ) ;
public class DataService { /** * Method to construct and return the CDCQueryResult object from CDCResponse * @ param cdcResponse * the CDC Response object * @ return the CDCQueryResult object */ protected CDCQueryResult getCDCQueryResult ( CDCResponse cdcResponse ) { } }
CDCQueryResult cdcQueryResult = new CDCQueryResult ( ) ; List < QueryResponse > queryResponses = cdcResponse . getQueryResponse ( ) ; if ( queryResponses != null ) { Map < String , QueryResult > queryResults = new HashMap < String , QueryResult > ( ) ; Iterator < QueryResponse > queryResponseItr = queryResponses . iter...
public class AbstractGenericTreeNode { /** * Traverse . * @ param node * the node * @ param list * the list */ @ Override public void traverse ( final ITreeNode < T > node , final List < ITreeNode < T > > list ) { } }
list . add ( node ) ; for ( final ITreeNode < T > data : node . getChildren ( ) ) { traverse ( data , list ) ; }
public class ListBuffer { /** * Copy list and sets last . */ private void copy ( ) { } }
if ( elems . nonEmpty ( ) ) { List < A > orig = elems ; elems = last = List . of ( orig . head ) ; while ( ( orig = orig . tail ) . nonEmpty ( ) ) { last . tail = List . of ( orig . head ) ; last = last . tail ; } }
public class ExceptionTranslationFilter { /** * ~ Methods = = = = = */ public void afterPropertiesSet ( ) throws Exception { } }
Assert . notNull ( authenticationEntryPoint , "authenticationEntryPoint must be specified" ) ; Assert . notNull ( portResolver , "portResolver must be specified" ) ; Assert . notNull ( authenticationTrustResolver , "authenticationTrustResolver must be specified" ) ;