signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class StructuralNodeModifiersTableModel { /** * Adds a new structural node modifiers to this model * @ param snm the structural node modifier */ public void addStructuralNodeModifier ( StructuralNodeModifier snm ) { } }
this . snms . add ( snm ) ; this . fireTableRowsInserted ( this . snms . size ( ) - 1 , this . snms . size ( ) - 1 ) ;
public class ProxyCertificateUtil { /** * Determines if a specified certificate type indicates a GSI - 2 or GSI - 3 or * GSI - 4 impersonation proxy certificate . * @ param certType the certificate type to check . * @ return true if certType is a GSI - 2 or GSI - 3 or GSI - 4 impersonation * proxy , false other...
return certType == GSIConstants . CertificateType . GSI_3_IMPERSONATION_PROXY || certType == GSIConstants . CertificateType . GSI_3_LIMITED_PROXY || certType == GSIConstants . CertificateType . GSI_4_IMPERSONATION_PROXY || certType == GSIConstants . CertificateType . GSI_4_LIMITED_PROXY || certType == GSIConstants . Ce...
public class OverallVolume { /** * An object that contains inbox and junk mail placement metrics for individual email providers . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDomainIspPlacements ( java . util . Collection ) } or { @ link # withDomainIsp...
if ( this . domainIspPlacements == null ) { setDomainIspPlacements ( new java . util . ArrayList < DomainIspPlacement > ( domainIspPlacements . length ) ) ; } for ( DomainIspPlacement ele : domainIspPlacements ) { this . domainIspPlacements . add ( ele ) ; } return this ;
public class Storage { /** * Factory method to create a new storage backed by a hashmap . * @ param name * @ param < K > * @ param < V > * @ return */ public static < K , V > Storage < K , V > createHashMapStorage ( String name ) { } }
return new Storage < K , V > ( name , new MapStorageWrapper < K , V > ( new HashMap < K , V > ( ) ) ) ;
public class GCLINEImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EList < GCLINERG > getRg ( ) { } }
if ( rg == null ) { rg = new EObjectContainmentEList . Resolving < GCLINERG > ( GCLINERG . class , this , AfplibPackage . GCLINE__RG ) ; } return rg ;
public class PropertyGen { List < String > generateConstructorAssign ( String fromBean ) { } }
return data . getCopyGen ( ) . generateCopyToImmutable ( "\t\t" , fromBean , data ) ;
public class ServerConfigurationChecker { /** * Checks the server - side configurations and records the check results . */ public synchronized void regenerateReport ( ) { } }
// Generate the configuration map from master and worker configuration records Map < PropertyKey , Map < Optional < String > , List < String > > > confMap = generateConfMap ( ) ; // Update the errors and warnings configuration Map < Scope , List < InconsistentProperty > > confErrors = new HashMap < > ( ) ; Map < Scope ...
public class AndroidPaint { /** * Shifts the bitmap pattern so that it will always start at a multiple of * itself for any tile the pattern is used . This ensures that regardless of * size of the pattern it tiles correctly . * @ param origin the reference point */ @ Override public void setBitmapShaderShift ( Poi...
Shader shader = this . paint . getShader ( ) ; if ( shader != null ) { int relativeDx = ( ( int ) - origin . x ) % this . shaderWidth ; int relativeDy = ( ( int ) - origin . y ) % this . shaderHeight ; Matrix localMatrix = new Matrix ( ) ; localMatrix . setTranslate ( relativeDx , relativeDy ) ; shader . setLocalMatrix...
public class ApikeyManager { /** * / * create now */ public Apikey createNowFromMap ( @ Nullable String user , long duration , @ Nullable Arr roles , Map < String , Object > nameAndValMap ) { } }
return createFromMap ( user , nowStartMs ( ) , duration , roles , nameAndValMap ) ;
public class SDKUtil { /** * 写文件方法 * @ param filePath * 文件路径 * @ param fileContent * 文件内容 * @ param encoding * 编码 * @ return */ public static boolean writeFile ( String filePath , String fileContent , String encoding ) { } }
FileOutputStream fout = null ; FileChannel fcout = null ; File file = new File ( filePath ) ; if ( file . exists ( ) ) { file . delete ( ) ; } try { fout = new FileOutputStream ( filePath ) ; // 获取输出通道 fcout = fout . getChannel ( ) ; // 创建缓冲区 // ByteBuffer buffer = ByteBuffer . allocate ( 1024 ) ; ByteBuffer buffer = B...
public class VirtualMachineErrorTerminator { /** * Terminates the JVM . It will cause System . exit ( ) with exit code set in * { @ link # setExitCode ( int ) } to be invoked on a separate thread . * @ param e the virtual machine error that is the cause for terminating the * JVM * @ throws IllegalArgumentExcept...
if ( e == null ) { throw new IllegalArgumentException ( "e == null" ) ; } if ( terminating ) { return ; } // Ordering is important - these fields are volatile ; we must first // set terminationCause and only after that terminating so that // checkTerminating ( ) never observes ( terminating = = true & & // terminationC...
public class ProtoLexer { /** * $ ANTLR start " COMMENT " */ public final void mCOMMENT ( ) throws RecognitionException { } }
try { int _type = COMMENT ; int _channel = DEFAULT_TOKEN_CHANNEL ; // com / dyuproject / protostuff / parser / ProtoLexer . g : 260:5 : ( ' / / ' ( ~ ( ' \ \ n ' | ' \ \ r ' ) ) * ( ' \ \ r ' ) ? ' \ \ n ' | ' / * ' ( options { greedy = false ; } : . ) * ' * / ' ) int alt16 = 2 ; switch ( input . LA ( 1 ) ) { case '/' ...
public class A_CmsImportExportUserDialog { /** * Initializes the download button . < p > */ protected void initDownloadButton ( ) { } }
if ( m_fileDownloader != null ) { m_fileDownloader . remove ( ) ; } m_fileDownloader = new FileDownloader ( getDownloadResource ( ) ) ; m_fileDownloader . extend ( getDownloadButton ( ) ) ;
public class ScriptProtect { /** * translate string to script - protected form * @ param str * @ return translated String */ public static String translate ( String str ) { } }
if ( str == null ) return "" ; // TODO do - while machen int index , last = 0 , endIndex ; StringBuilder sb = null ; String tagName ; while ( ( index = str . indexOf ( '<' , last ) ) != - 1 ) { // read tagname int len = str . length ( ) ; char c ; for ( endIndex = index + 1 ; endIndex < len ; endIndex ++ ) { c = str . ...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcCableCarrierFittingType ( ) { } }
if ( ifcCableCarrierFittingTypeEClass == null ) { ifcCableCarrierFittingTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 70 ) ; } return ifcCableCarrierFittingTypeEClass ;
public class TokenUtil { /** * Obtain an authentication token for the given user and add it to the * user ' s credentials . * @ param client The Elasticsearch client * @ param user The user for obtaining and storing the token * @ throws IOException If making a remote call to the authentication service fails */ ...
EsToken token = obtainEsToken ( client , user ) ; if ( token == null ) { throw new IOException ( "No token returned for user " + user . getKerberosPrincipal ( ) . getName ( ) ) ; } if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Obtained token " + EsTokenIdentifier . KIND_NAME + " for user " + user . getKerberosPrinci...
public class CharsetConversion { /** * Loads character set information . */ @ Deprecated static void putEntry ( final int charsetId , String mysqlCharset , String mysqlCollation ) { } }
entries [ charsetId ] = new Entry ( charsetId , mysqlCharset , // NL mysqlCollation , /* Unknown java charset */ null ) ;
public class RuntimeMojoSupport { /** * Ensure Groovy compatibility . Requires Groovy 2 + */ private void ensureGroovyComparability ( final ClassLoader classLoader ) throws MojoExecutionException { } }
Version groovyVersion = groovyVersionHelper . detectVersion ( classLoader ) ; if ( groovyVersion == null ) { // complain and continue log . error ( "Unable to determine Groovy version" ) ; } else { log . debug ( "Detected Groovy version: {}" , groovyVersion ) ; if ( versionHelper . before ( 2 ) . containsVersion ( groo...
public class APITraceFileSystem { /** * start auto ( wrap : FileSystem ) */ public String getName ( ) { } }
APITrace . CallEvent ce ; String rv ; ce = new APITrace . CallEvent ( ) ; rv = super . getName ( ) ; ce . logCall ( APITrace . CALL_getName , rv , null ) ; return rv ;
public class GlacierMethod { /** * Invokes the method and returns the response headers * @ return map of response headers ; duplicate header keys are ignored * @ throws InternalException * @ throws CloudException * @ throws GlacierException */ public Map < String , String > invokeHeaders ( ) throws InternalExce...
ClientAndResponse clientAndResponse = invokeInternal ( ) ; try { Map < String , String > headers = new HashMap < String , String > ( ) ; // doesn ' t support duplicate header keys , but they are unused by glacier for ( Header header : clientAndResponse . response . getAllHeaders ( ) ) { headers . put ( header . getName...
public class ScriptUtil { /** * Returns the configured script factory in the context or a new one . */ public static ScriptFactory getScriptFactory ( ) { } }
ProcessEngineConfigurationImpl processEngineConfiguration = Context . getProcessEngineConfiguration ( ) ; if ( processEngineConfiguration != null ) { return processEngineConfiguration . getScriptFactory ( ) ; } else { return new ScriptFactory ( ) ; }
public class ClientWorldModelInterface { /** * Sets - up the connector for this MINA session . * @ return { @ code true } if the setup succeeds , else { @ code false } . */ protected boolean setConnector ( ) { } }
if ( this . host == null ) { log . error ( "No host value set, cannot set up socket connector." ) ; return false ; } if ( this . port < 0 || this . port > 65535 ) { log . error ( "Port value is invalid {}." , Integer . valueOf ( this . port ) ) ; return false ; } if ( this . executors == null ) { this . executors = new...
public class GVRCursorController { /** * Update the state of the picker . If it has an owner , the picker * will use that object to derive its position and orientation . * The " active " state of this controller is used to indicate touch . * The cursor position is updated after picking . */ protected void updateP...
final MotionEvent newEvent = ( event != null ) ? event : null ; final ControllerPick controllerPick = new ControllerPick ( mPicker , newEvent , isActive ) ; context . runOnGlThread ( controllerPick ) ;
public class InternalXtextParser { /** * InternalXtext . g : 795:1 : entryRuleRuleID : ruleRuleID EOF ; */ public final void entryRuleRuleID ( ) throws RecognitionException { } }
try { // InternalXtext . g : 796:1 : ( ruleRuleID EOF ) // InternalXtext . g : 797:1 : ruleRuleID EOF { before ( grammarAccess . getRuleIDRule ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_1 ) ; ruleRuleID ( ) ; state . _fsp -- ; after ( grammarAccess . getRuleIDRule ( ) ) ; match ( input , EOF , FollowSets000 . FOLLOW_2...
public class CoinbaseAccountServiceRaw { /** * Authenticated resource that returns the user ’ s current Bitcoin receive address . * @ return The user ’ s current { @ code CoinbaseAddress } . * @ throws IOException * @ see < a * href = " https : / / coinbase . com / api / doc / 1.0 / accounts / receive _ address...
final CoinbaseAddress receiveResult = coinbase . getReceiveAddress ( exchange . getExchangeSpecification ( ) . getApiKey ( ) , signatureCreator , exchange . getNonceFactory ( ) ) ; return receiveResult ;
public class MtasTokenizer { /** * ( non - Javadoc ) * @ see org . apache . lucene . analysis . TokenStream # incrementToken ( ) */ @ Override public boolean incrementToken ( ) throws IOException { } }
clearAttributes ( ) ; MtasToken token ; Integer positionIncrement ; MtasPayloadEncoder payloadEncoder ; if ( tokenCollectionIterator == null ) { return false ; } else if ( tokenCollectionIterator . hasNext ( ) ) { token = tokenCollectionIterator . next ( ) ; // compute info positionIncrement = token . getPositionStart ...
public class WebhookOperations { /** * < p > Método que permite optener la información de un webhook < / p > * @ param webhookId Identificador único del webhook * @ return Regresa un objeto Webhook */ public Webhook get ( final String webhookId ) throws OpenpayServiceException , ServiceUnavailableException { } }
String path = String . format ( GET_PATH , this . getMerchantId ( ) , webhookId ) ; return this . getJsonClient ( ) . get ( path , Webhook . class ) ;
public class ZoomableGraphicsContext { /** * Transform a JavaFX angle to its document equivalent . * @ param angle the JavaFX angle . * @ return the document angle . */ @ Pure public double fx2docAngle ( double angle ) { } }
final ZoomableCanvas < ? > canvas = getCanvas ( ) ; if ( canvas . isInvertedAxisX ( ) != canvas . isInvertedAxisY ( ) ) { return - angle ; } return angle ;
public class JAXBSerialiser { /** * Deserialise a DOM Node to an Object ( or JAXBElement ) * @ param node * @ return */ public Object deserialise ( final Node node ) { } }
if ( node == null ) throw new IllegalArgumentException ( "Null argument passed to deserialise!" ) ; final Unmarshaller unmarshaller = getUnmarshaller ( ) ; try { final Object obj = unmarshaller . unmarshal ( node ) ; if ( obj == null ) throw new RuntimeException ( "Error deserialising from " + node ) ; else return obj ...
public class SCMController { /** * Updating a change log file filter */ @ RequestMapping ( value = "changeLog/fileFilter/{projectId}/{name}/update" , method = RequestMethod . PUT ) public Resource < SCMFileChangeFilter > saveChangeLogFileFilter ( @ PathVariable ID projectId , @ PathVariable String name , @ RequestBody ...
if ( ! StringUtils . equals ( name , filter . getName ( ) ) ) { throw new IllegalStateException ( "The name of the filter in the request body must match the one in the URL" ) ; } return createChangeLogFileFilter ( projectId , filter ) ;
public class ParserDQL { /** * < with clause > : : = WITH [ RECURSIVE ] < with list > */ private WithList XreadWithClause ( ) { } }
boolean recursive = false ; if ( withStatementDepth > 0 ) { throw Error . error ( "With statements may not be nested." ) ; } int oldStatementDepth = withStatementDepth ; try { session . clearLocalTables ( ) ; withStatementDepth += 1 ; readThis ( Tokens . WITH ) ; if ( token . tokenType == Tokens . RECURSIVE ) { recursi...
public class Yank { /** * Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file * loaded via Yank . addSQLStatements ( . . . ) . Returns the auto - increment id of the inserted row . * @ param poolName The name of the connection pool to query against * @ param sqlKey The S...
String sql = YANK_POOL_MANAGER . getMergedSqlProperties ( ) . getProperty ( sqlKey ) ; if ( sql == null || sql . equalsIgnoreCase ( "" ) ) { throw new SQLStatementNotFoundException ( ) ; } else { return insert ( poolName , sql , params ) ; }
public class TermIndex { /** * Looks up the term for the given offset . * @ param offset The offset for which to look up the term . * @ return The term for the entry at the given offset . */ public synchronized long lookup ( long offset ) { } }
Map . Entry < Long , Long > entry = terms . floorEntry ( offset ) ; return entry != null ? entry . getValue ( ) : 0 ;
public class CmsSecurityManager { /** * Returns a user object based on the id of a user . < p > * @ param context the current request context * @ param id the id of the user to read * @ return the user read * @ throws CmsException if something goes wrong */ public CmsUser readUser ( CmsRequestContext context , ...
CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; CmsUser result = null ; try { result = m_driverManager . readUser ( dbc , id ) ; } catch ( Exception e ) { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_READ_USER_FOR_ID_1 , id . toString ( ) ) , e ) ; } finally { dbc . clear ( )...
public class CmsPathIncludeExcludeSet { /** * Adds an included path . < p > * @ param include the path to add */ public void addInclude ( String include ) { } }
include = normalizePath ( include ) ; m_includes . add ( include ) ; m_allPaths . add ( include ) ;
public class MethodDesc { /** * Returns this in Java method signature syntax . * @ param name method name */ public String toMethodSignature ( String name ) { } }
StringBuffer buf = new StringBuffer ( ) ; buf . append ( mRetType . getFullName ( ) ) ; buf . append ( ' ' ) ; buf . append ( name ) ; buf . append ( '(' ) ; TypeDesc [ ] params = mParams ; for ( int i = 0 ; i < params . length ; i ++ ) { if ( i > 0 ) { buf . append ( ", " ) ; } buf . append ( params [ i ] . getFullNam...
public class PermissionTemplateService { /** * Apply a permission template to a set of projects . Authorization to administrate these projects * is not verified . The projects must exist , so the " project creator " permissions defined in the * template are ignored . */ public void applyAndCommit ( DbSession dbSess...
if ( projects . isEmpty ( ) ) { return ; } for ( ComponentDto project : projects ) { copyPermissions ( dbSession , template , project , null ) ; } projectIndexers . commitAndIndex ( dbSession , projects , ProjectIndexer . Cause . PERMISSION_CHANGE ) ;
public class SessionDataManager { /** * Merge a list of nodes and properties of root data . NOTE . Properties in the list will have empty * value data . I . e . for operations not changes properties content . USED FOR DELETE . * @ param rootData * @ param dataManager * @ param deep * @ param action * @ retu...
// 1 get all transient descendants List < ItemState > transientDescendants = new ArrayList < ItemState > ( ) ; traverseTransientDescendants ( rootData , action , transientDescendants ) ; if ( deep || ! transientDescendants . isEmpty ( ) ) { // 2 get ALL persisted descendants Map < String , ItemData > descendants = new ...
public class MethodCallClassTransformer { /** * { @ link Properties } entries like : * < ul > * < li > name : full qualified class name and method name separated by ' { @ link # METHOD _ TOKEN # } ' * < li > value : Javassist statement - starts with ' { @ link # JAVASSIST _ STATEMENT _ START _ TOKEN & # 123 ; } '...
this . properties = ( null == properties ) ? new Properties ( ) : ( Properties ) properties . clone ( ) ;
public class Watchers { /** * Un - registers a watcher . * @ param session the Maven session * @ param watcher the watcher to remove * @ return { @ literal true } if the watcher was removed , { @ literal false } otherwise . */ public static synchronized boolean remove ( MavenSession session , Watcher watcher ) { ...
return ! ( session == null || watcher == null ) && get ( session ) . remove ( watcher ) ;
public class AbstractListJsonDeserializer { /** * < p > newInstance < / p > * @ param deserializer { @ link JsonDeserializer } used to deserialize the objects inside the { @ link AbstractList } . * @ param < T > Type of the elements inside the { @ link AbstractList } * @ return a new instance of { @ link Abstract...
return new AbstractListJsonDeserializer < T > ( deserializer ) ;
public class TermTable { /** * { @ inheritDoc } */ @ Override protected void _from ( ObjectInput in ) throws IOException , ClassNotFoundException { } }
// 1 : read number of terms final int size = in . readInt ( ) ; indexedTerms = sizedHashMap ( size ) ; for ( int i = 0 ; i < size ; ++ i ) { // 1 : read each term final Term term = ( Term ) in . readObject ( ) ; addTerm ( term ) ; } // 2 : read number of global terms int gtisize = in . readInt ( ) ; globalTermIndex = s...
public class CmsMessageBundleEditorOptions { /** * Sets the currently edited locale . * @ param locale the locale to set . */ void setLanguage ( final Locale locale ) { } }
if ( ! m_languageSelect . getValue ( ) . equals ( locale ) ) { m_languageSelect . setValue ( locale ) ; }
public class ContextItems { /** * Returns a date item associated with the specified item name . * @ param itemName Item name * @ return Date value */ public Date getDate ( String itemName ) { } }
try { return DateUtil . parseDate ( getItem ( itemName ) ) ; } catch ( Exception e ) { return null ; }
public class BaseDestinationHandler { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # deletePubSubOutputHandler ( com . ibm . ws . sib . utils . SIBUuid8) */ @ Override public synchronized void deletePubSubOutputHandler ( SIBUuid8 neighbourUUID ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deletePubSubOutputHandler" , neighbourUUID ) ; _pubSubRealization . deletePubSubOutputHandler ( neighbourUUID ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deletePubSubO...
public class AcraToChiliprojectSyncer { /** * Invoked when detecting a duplicate issue ( two issues with the same * { @ link ConfigurationManager # CHILIPROJECT _ STACKTRACE _ MD5 _ CF _ ID } customfield value . * The oldest issue is kept , the others are closed . * @ param pDuplicateIssues * the list of duplic...
Collections . sort ( pDuplicateIssues , new CreationDateIssueComparator ( ) ) ; final Issue originalIssue = pDuplicateIssues . get ( 0 ) ; final List < Issue > issuesToClose = pDuplicateIssues . subList ( 1 , pDuplicateIssues . size ( ) ) ; if ( LOGGER . isInfoEnabled ( ) ) { LOGGER . info ( "Closing issues {} duplicat...
public class SorensonVideo { /** * { @ inheritDoc } */ @ Override public IoBuffer getKeyframe ( ) { } }
if ( dataCount > 0 ) { IoBuffer result = IoBuffer . allocate ( dataCount ) ; result . put ( blockData , 0 , dataCount ) ; result . rewind ( ) ; return result ; } return null ;
public class CollisionConfig { /** * Create the collision data from node . * @ param configurer The configurer reference ( must not be < code > null < / code > ) . * @ return The collisions data . * @ throws LionEngineException If unable to read node . */ public static CollisionConfig imports ( Configurer configu...
Check . notNull ( configurer ) ; final Map < String , Collision > collisions = new HashMap < > ( 0 ) ; for ( final Xml node : configurer . getRoot ( ) . getChildren ( NODE_COLLISION ) ) { final String coll = node . readString ( ATT_NAME ) ; final Collision collision = createCollision ( node ) ; collisions . put ( coll ...
public class VersionsImpl { /** * Deleted an unlabelled utterance . * @ param appId The application ID . * @ param versionId The version ID . * @ param utterance The utterance text to delete . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the Operati...
return deleteUnlabelledUtteranceWithServiceResponseAsync ( appId , versionId , utterance ) . map ( new Func1 < ServiceResponse < OperationStatus > , OperationStatus > ( ) { @ Override public OperationStatus call ( ServiceResponse < OperationStatus > response ) { return response . body ( ) ; } } ) ;
public class Logger { /** * Issue a log message with a level of INFO . * @ param message the message */ public void info ( Object message ) { } }
doLog ( Level . INFO , FQCN , message , null , null ) ;
public class JaxbFactory { /** * get a fitting Unmarshaller * @ return - the Unmarshaller for the classOfT set * @ throws JAXBException */ public Unmarshaller getUnmarshaller ( ) throws JAXBException { } }
JAXBContext context = JAXBContext . newInstance ( classOfT ) ; Unmarshaller u = context . createUnmarshaller ( ) ; u . setEventHandler ( new ValidationEventHandler ( ) { @ Override public boolean handleEvent ( ValidationEvent event ) { return true ; } } ) ; return u ;
public class HtmlPageUtil { /** * Creates a { @ link HtmlPage } from a given { @ link String } that contains the HTML code for that page . * @ param string { @ link String } that contains the HTML code * @ return { @ link HtmlPage } for this { @ link String } */ public static HtmlPage toHtmlPage ( String string ) {...
try { URL url = new URL ( "http://bitvunit.codescape.de/some_page.html" ) ; return HTMLParser . parseHtml ( new StringWebResponse ( string , url ) , new WebClient ( ) . getCurrentWindow ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "Error creating HtmlPage from String." , e ) ; }
public class ListWidget { /** * Get view displays the data at the specified position in the { @ link Adapter } * @ param index - item index in { @ link Adapter } * @ param host - view using as a host for the adapter view * @ return view displays the data at the specified position */ protected Widget getViewFromAd...
return mAdapter == null ? null : mAdapter . getView ( index , host . getGuest ( ) , host ) ;
public class SerializingTranscoder { /** * ( non - Javadoc ) * @ see net . spy . memcached . Transcoder # decode ( net . spy . memcached . CachedData ) */ public final Object decode ( CachedData d ) { } }
Object obj = d . decodedObject ; if ( obj != null ) { return obj ; } byte [ ] data = d . data ; int flags = d . flag ; if ( ( flags & COMPRESSED ) != 0 ) { data = decompress ( data ) ; } flags = flags & SPECIAL_MASK ; obj = decode0 ( d , data , flags ) ; d . decodedObject = obj ; return obj ;
public class RaftSessionSequencer { /** * Sequences a response . * When an operation is sequenced , it ' s first sequenced in the order in which it was submitted to the cluster . * Once placed in sequential request order , if a response ' s { @ code eventIndex } is greater than the last completed * { @ code event...
// If the request sequence number is equal to the next response sequence number , attempt to complete the response . if ( sequence == responseSequence + 1 ) { if ( completeResponse ( response , callback ) ) { ++ responseSequence ; completeResponses ( ) ; } else { responseCallbacks . put ( sequence , new ResponseCallbac...
public class MutableBigInteger { /** * This method implements algorithm 1 from pg . 4 of the Burnikel - Ziegler paper . * It divides a 2n - digit number by a n - digit number . < br / > * The parameter beta is 2 < sup > 32 < / sup > so all shifts are multiples of 32 bits . * < br / > * { @ code this } must be a...
int n = b . intLen ; // step 1 : base case if ( n % 2 != 0 || n < BigInteger . BURNIKEL_ZIEGLER_THRESHOLD ) { return divideKnuth ( b , quotient ) ; } // step 2 : view this as [ a1 , a2 , a3 , a4 ] where each ai is n / 2 ints or less MutableBigInteger aUpper = new MutableBigInteger ( this ) ; aUpper . safeRightShift ( 3...
public class CommerceAccountUserRelPersistenceImpl { /** * Returns the last commerce account user rel in the ordered set where commerceAccountId = & # 63 ; . * @ param commerceAccountId the commerce account ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) *...
int count = countByCommerceAccountId ( commerceAccountId ) ; if ( count == 0 ) { return null ; } List < CommerceAccountUserRel > list = findByCommerceAccountId ( commerceAccountId , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class SceneStructureProjective { /** * Call this function first . Specifies number of each type of data which is available . * @ param totalViews Number of views * @ param totalPoints Number of points */ public void initialize ( int totalViews , int totalPoints ) { } }
views = new View [ totalViews ] ; points = new Point [ totalPoints ] ; for ( int i = 0 ; i < views . length ; i ++ ) { views [ i ] = new View ( ) ; } for ( int i = 0 ; i < points . length ; i ++ ) { points [ i ] = new Point ( pointSize ) ; }
public class ApplicationExceptionResolver { protected ActionResponse handleMessagingApplicationException ( ActionRuntime runtime , MessagingApplicationException appEx ) { } }
// no save here because of saved as embedded message later // saveErrors ( appEx . getErrors ( ) ) ; if ( appEx instanceof MessageResponseApplicationException ) { return ( ( MessageResponseApplicationException ) appEx ) . getResponseHook ( ) . map ( hook -> { return hook . hook ( ) ; } ) . orElseGet ( ( ) -> prepareSho...
public class CommercePriceListLocalServiceUtil { /** * Returns the commerce price list matching the UUID and group . * @ param uuid the commerce price list ' s UUID * @ param groupId the primary key of the group * @ return the matching commerce price list , or < code > null < / code > if a matching commerce price...
return getService ( ) . fetchCommercePriceListByUuidAndGroupId ( uuid , groupId ) ;
public class SoundLoader { /** * Loads the sounds for key from the config in * < code > & lt ; packagePath & gt ; / sound . properties < / code > */ public byte [ ] [ ] load ( String packagePath , String key ) throws IOException { } }
String [ ] paths = getPaths ( packagePath , key ) ; if ( paths == null ) { log . warning ( "No such sound" , "key" , key ) ; return null ; } byte [ ] [ ] data = new byte [ paths . length ] [ ] ; String bundle = getBundle ( packagePath ) ; for ( int ii = 0 ; ii < paths . length ; ii ++ ) { data [ ii ] = loadClipData ( b...
public class StopEntitiesDetectionJobRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StopEntitiesDetectionJobRequest stopEntitiesDetectionJobRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( stopEntitiesDetectionJobRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stopEntitiesDetectionJobRequest . getJobId ( ) , JOBID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request t...
public class AstNode { /** * Set the parent for this node . If this node already has a parent , this method will remove this node from the current parent . * If the supplied parent is not null , then this node will be added to the supplied parent ' s children . * @ param parent the new parent , or null if this node...
removeFromParent ( ) ; if ( parent != null ) { this . parent = parent ; this . parent . children . add ( this ) ; }
public class RequestConfigurationItemsJsonCommandHandler { /** * { @ inheritDoc } */ @ Override public void handle ( String chargingStationId , JsonObject commandObject , IdentityContext identityContext ) throws UserIdentityUnauthorizedException { } }
ChargingStationId csId = new ChargingStationId ( chargingStationId ) ; if ( ! commandAuthorizationService . isAuthorized ( csId , identityContext . getUserIdentity ( ) , RequestConfigurationItemsCommand . class ) ) { throw new UserIdentityUnauthorizedException ( chargingStationId , identityContext . getUserIdentity ( )...
public class BatchDetectKeyPhrasesResult { /** * A list of objects containing the results of the operation . The results are sorted in ascending order by the * < code > Index < / code > field and match the order of the documents in the input list . If all of the documents contain * an error , the < code > ResultLis...
if ( resultList == null ) { this . resultList = null ; return ; } this . resultList = new java . util . ArrayList < BatchDetectKeyPhrasesItemResult > ( resultList ) ;
public class Http { /** * Handles reading an uploaded file . * @ param request The http request . * @ return A temp file containing the file data . * @ throws IOException If an error occurs in processing the file . */ public static Path getFile ( HttpServletRequest request ) throws IOException { } }
Path result = null ; // Set up the objects that do all the heavy lifting DiskFileItemFactory factory = new DiskFileItemFactory ( ) ; ServletFileUpload upload = new ServletFileUpload ( factory ) ; try { // Read the items - this will save the values to temp files for ( FileItem item : upload . parseRequest ( request ) ) ...
public class StackdriverStatsExporter { /** * Creates a StackdriverStatsExporter for an explicit project ID and using explicit credentials , * with default Monitored Resource . * < p > Only one Stackdriver exporter can be created . * @ param credentials a credentials used to authenticate API calls . * @ param p...
checkNotNull ( credentials , "credentials" ) ; checkNotNull ( projectId , "projectId" ) ; checkNotNull ( exportInterval , "exportInterval" ) ; createInternal ( credentials , projectId , exportInterval , DEFAULT_RESOURCE , null , DEFAULT_CONSTANT_LABELS ) ;
public class TraceSummary { /** * A collection of FaultRootCause structures corresponding to the the trace segments . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setFaultRootCauses ( java . util . Collection ) } or { @ link # withFaultRootCauses ( java . ...
if ( this . faultRootCauses == null ) { setFaultRootCauses ( new java . util . ArrayList < FaultRootCause > ( faultRootCauses . length ) ) ; } for ( FaultRootCause ele : faultRootCauses ) { this . faultRootCauses . add ( ele ) ; } return this ;
public class TangoHostManager { /** * Returns the TANGO _ HOST with full qualified name . * @ param tangoHost default Tango _ host * @ return the TANGO _ HOST with full qualified name . * @ throws DevFailed if TANGO _ HOST value has a bad syntax . */ public static String getFirstFullTangoHost ( ) throws DevFailed...
// TODO final String TANGO_HOST_ERROR = "API_GetTangoHostFailed" ; // Get the tango _ host String host = getFirstHost ( ) ; try { // Get FQDN for host final InetAddress iadd = InetAddress . getByName ( host ) ; host = iadd . getCanonicalHostName ( ) ; } catch ( final UnknownHostException e ) { throw DevFailedUtils . ne...
public class MethodsMonomerUtils { /** * method to get all MonomerNotations for all given polymers * @ param polymers List of PolymerNotation * @ return List of MonomerNotation */ public static List < MonomerNotation > getListOfMonomerNotation ( List < PolymerNotation > polymers ) { } }
List < MonomerNotation > items = new ArrayList < MonomerNotation > ( ) ; for ( PolymerNotation polymer : polymers ) { items . addAll ( polymer . getListMonomers ( ) ) ; } return items ;
public class TouchEffectDrawable { /** * Called from the drawable ' s draw ( ) method after the canvas has been set to * draw the shape at ( 0,0 ) . Subclasses can override for special effects such * as multiple layers , stroking , etc . */ protected void onDraw ( Effect shape , Canvas canvas , Paint paint ) { } }
shape . draw ( canvas , paint ) ;
public class DoubleField { /** * Set this field to the maximum or minimum value . * @ param iAreaDesc END _ SELECT _ KEY means set to largest value , others mean smallest . */ public void setToLimit ( int iAreaDesc ) // Set this field to the largest or smallest value { } }
// By default compare as ASCII strings Double tempdouble = MIN ; // Lowest value if ( iAreaDesc == DBConstants . END_SELECT_KEY ) tempdouble = MAX ; this . doSetData ( tempdouble , DBConstants . DONT_DISPLAY , DBConstants . SCREEN_MOVE ) ;
public class CaseFoldMapEncoding { /** * onigenc _ get _ case _ fold _ codes _ by _ str _ with _ map */ protected final CaseFoldCodeItem [ ] getCaseFoldCodesByStringWithMap ( int mapSize , int [ ] [ ] map , boolean essTsettFlag , int flag , byte [ ] bytes , int p , int end ) { } }
int b = bytes [ p ] & 0xff ; if ( 0x41 <= b && b <= 0x5a ) { CaseFoldCodeItem item0 = CaseFoldCodeItem . create ( 1 , b + 0x20 ) ; if ( b == 0x53 && essTsettFlag && end > p + 1 && ( bytes [ p + 1 ] == ( byte ) 0x53 || bytes [ p + 1 ] == ( byte ) 0x73 ) ) { /* SS */ CaseFoldCodeItem item1 = CaseFoldCodeItem . create ( 2...
public class Canvas { protected synchronized void resetObjects ( Graphics g ) { } }
for ( Element e : elementList ) { if ( e instanceof Resettable ) { ( ( Resettable ) e ) . reset ( g . getGL ( ) ) ; } }
public class ComplexDouble2DFFT { /** * Compute the Fast Fourier Transform of data leaving the result in data . * The array data must be dimensioned ( at least ) 2 * nrows * ncols , consisting of * alternating real and imaginary parts . */ public void transform ( double data [ ] , int rowspan ) { } }
checkData ( data , rowspan ) ; for ( int i = 0 ; i < nrows ; i ++ ) { rowFFT . transform ( data , i * rowspan , 2 ) ; } for ( int j = 0 ; j < ncols ; j ++ ) { colFFT . transform ( data , 2 * j , rowspan ) ; }
public class ImageUtil { /** * Creates an { @ link Image } with full opacity ( new PictureStyle ( 1 ) ) . * horMargin , verMargin and diameter are used to create the { @ link Bbox } * @ param id is used to create the actual { @ link Image } ( new Image ( id ) ) . * @ param url * @ param horMargin * @ param ve...
return createRectangleImage ( id , location , horMargin , verMargin , d , d ) ;
public class DependencyResolver { /** * Creates a new DependencyResolver from a list of key - value pairs called tuples * where key is dependency name and value the depedency locator ( descriptor ) . * @ param tuples a list of values where odd elements are dependency name and the * following even elements are dep...
DependencyResolver result = new DependencyResolver ( ) ; if ( tuples == null || tuples . length == 0 ) return result ; for ( int index = 0 ; index < tuples . length ; index += 2 ) { if ( index + 1 >= tuples . length ) break ; String name = StringConverter . toString ( tuples [ index ] ) ; Object locator = tuples [ inde...
public class StringUtils { /** * Returns the string left - padded with the string pad to a length of len characters . * If str is longer than len , the return value is shortened to len characters . * Lpad and rpad functions are migrated from flink ' s scala function with minor refactor * https : / / github . com ...
if ( len < 0 ) { return null ; } else if ( len == 0 ) { return "" ; } char [ ] data = new char [ len ] ; // The length of the padding needed int pos = Math . max ( len - base . length ( ) , 0 ) ; // Copy the padding for ( int i = 0 ; i < pos ; i += pad . length ( ) ) { for ( int j = 0 ; j < pad . length ( ) && j < pos ...
public class ModelAdapter { /** * set a new list of model items and apply it to the existing list ( clear - add ) for this adapter * NOTE may consider using setNewList if the items list is a reference to the list which is used inside the adapter * @ param list the items to set * @ param resetFilter ` true ` if th...
List < Item > items = intercept ( list ) ; return setInternal ( items , resetFilter , adapterNotifier ) ;
public class QueryStats { /** * Marks the query as complete and logs it to the proper logs . This is called * after the data has been sent to the client . */ public void markSent ( ) { } }
sent_to_client = true ; overall_stats . put ( QueryStat . TOTAL_TIME , DateTime . nanoTime ( ) - query_start_ns ) ; LOG . info ( "Completing query=" + JSON . serializeToString ( this ) ) ; QUERY_LOG . info ( this . toString ( ) ) ;
public class PrimaveraPMFileReader { /** * Read details of any activity codes assigned to this task . * @ param task parent task * @ param codes activity code assignments */ private void readActivityCodes ( Task task , List < CodeAssignmentType > codes ) { } }
for ( CodeAssignmentType assignment : codes ) { ActivityCodeValue code = m_activityCodeMap . get ( Integer . valueOf ( assignment . getValueObjectId ( ) ) ) ; if ( code != null ) { task . addActivityCode ( code ) ; } }
public class OjbTagsHandler { /** * Processes the template for all extents of the current class . * @ param template The template * @ param attributes The attributes of the tag * @ exception XDocletException if an error occurs * @ doc . tag type = " block " */ public void forAllExtents ( String template , Prope...
for ( Iterator it = _curClassDef . getExtentClasses ( ) ; it . hasNext ( ) ; ) { _curExtent = ( ClassDescriptorDef ) it . next ( ) ; generate ( template ) ; } _curExtent = null ;
public class UserProfileHandlerImpl { /** * { @ inheritDoc } */ public UserProfile removeUserProfile ( String userName , boolean broadcast ) throws Exception { } }
Session session = service . getStorageSession ( ) ; try { return removeUserProfile ( session , userName , broadcast ) ; } finally { session . logout ( ) ; }
public class Check { /** * Ensures that an object reference passed as a parameter to the calling method is not { @ code null } . * @ param reference * an object reference * @ param name * name of object reference ( in source code ) * @ return the non - null reference that was validated * @ throws IllegalNul...
if ( reference == null ) { throw new IllegalNullArgumentException ( name ) ; } return reference ;
public class PresentationControlImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setPRSFlg ( Integer newPRSFlg ) { } }
Integer oldPRSFlg = prsFlg ; prsFlg = newPRSFlg ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . PRESENTATION_CONTROL__PRS_FLG , oldPRSFlg , prsFlg ) ) ;
public class CodeBuilderUtil { /** * Generates code to compare two values on the stack , and branch to the * provided Label if they are not equal . Both values must be of the same * type . If they are floating point values , NaN is considered equal to NaN , * which is inconsistent with the usual treatment for NaN...
if ( valueType . getTypeCode ( ) != TypeDesc . OBJECT_CODE ) { if ( valueType . getTypeCode ( ) == TypeDesc . FLOAT_CODE ) { // Special treatment to handle NaN . b . invokeStatic ( TypeDesc . FLOAT . toObjectType ( ) , "compare" , TypeDesc . INT , new TypeDesc [ ] { TypeDesc . FLOAT , TypeDesc . FLOAT } ) ; b . ifZeroC...
public class SeleniumAssert { /** * Checks a selenium list of WebElements . * @ param commong common object that contains relevant execution info * @ param actual webElement used in assert * @ return SeleniumAssert */ public static SeleniumAssert assertThat ( CommonG commong , List < WebElement > actual ) { } }
return new SeleniumAssert ( commong , actual ) ;
public class SearchResult { /** * Sets the result objects . * The objects are appended in the order that they are returned * by the collection ' s iterator . * @ param elements * the result objects . */ public void setElements ( final Collection < ? extends T > elements ) { } }
clear ( ) ; if ( elements == null || elements . size ( ) == 0 ) { return ; } for ( T obj : elements ) { addElement ( obj ) ; }
public class CFMLEngineFactory { /** * method to initialize a update of the CFML Engine . checks if there is a new Version and update it * when a new version is available * @ param password * @ return has updated * @ throws IOException * @ throws ServletException */ public boolean update ( final Password pass...
if ( ! singelton . can ( CFMLEngine . CAN_UPDATE , password ) ) throw new IOException ( "access denied to update CFMLEngine" ) ; // new RunUpdate ( this ) . start ( ) ; return _update ( id ) ;
public class StringUtility { /** * Splits a string into multiple words on either whitespace or commas * @ return java . lang . String [ ] * @ param line java . lang . String */ public static List < String > splitStringCommaSpace ( String line ) { } }
List < String > words = new ArrayList < > ( ) ; int len = line . length ( ) ; int pos = 0 ; while ( pos < len ) { // Skip past blank space char ch ; while ( pos < len && ( ( ch = line . charAt ( pos ) ) <= ' ' || ch == ',' ) ) pos ++ ; int start = pos ; // Skip to the next blank space while ( pos < len && ( ch = line ....
public class SecurityActions { /** * Get the declared classes * @ param c The class * @ return The classes */ static Class < ? > [ ] getDeclaredClasses ( final Class < ? > c ) { } }
if ( System . getSecurityManager ( ) == null ) return c . getDeclaredClasses ( ) ; return AccessController . doPrivileged ( new PrivilegedAction < Class < ? > [ ] > ( ) { public Class < ? > [ ] run ( ) { return c . getDeclaredClasses ( ) ; } } ) ;
public class CampaignSmsMessageMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CampaignSmsMessage campaignSmsMessage , ProtocolMarshaller protocolMarshaller ) { } }
if ( campaignSmsMessage == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( campaignSmsMessage . getBody ( ) , BODY_BINDING ) ; protocolMarshaller . marshall ( campaignSmsMessage . getMessageType ( ) , MESSAGETYPE_BINDING ) ; protocolMarshall...
public class BackgroundLruEvictionStrategy { /** * Called by the cache when it needs to discard an object from the cache . < p > * The cache will be holding the lock on the bucket when this method is * invoked . Enables the eviction strategy to change the " decision " on * evicting an object with the bucket lock ...
if ( element . pinned != 0 || element . ivEvictionIneligible ) { // d465813 return false ; } if ( ContainerProperties . StrictMaxCacheSize ) { return true ; } // Very simple algorithm , if the element has been around for // more than the discard threshold number of sweep intervals , // we evict it . long sweepCount = 0...
public class ColumnMetadata { /** * Returns this path ' s column metadata if present . Otherwise returns default * metadata where the column name is equal to the path ' s name . */ public static ColumnMetadata getColumnMetadata ( Path < ? > path ) { } }
Path < ? > parent = path . getMetadata ( ) . getParent ( ) ; if ( parent instanceof EntityPath ) { Object columnMetadata = ( ( EntityPath < ? > ) parent ) . getMetadata ( path ) ; if ( columnMetadata instanceof ColumnMetadata ) { return ( ColumnMetadata ) columnMetadata ; } } return ColumnMetadata . named ( path . getM...
public class InternalAuthentication { /** * Set default configuration * @ param config JSON configuration * @ throws IOException if fails to initialise */ private void setConfig ( JsonSimpleConfig config ) throws IOException { } }
// Get the basics user_object = new InternalUser ( ) ; file_path = config . getString ( null , "authentication" , "internal" , "path" ) ; loadUsers ( ) ;
public class CharsTrie { /** * Finds each char which continues the string from the current state . * That is , each char c for which it would be next ( c ) ! = Result . NO _ MATCH now . * @ param out Each next char is appended to this object . * ( Only uses the out . append ( c ) method . ) * @ return The numbe...
int pos = pos_ ; if ( pos < 0 ) { return 0 ; } if ( remainingMatchLength_ >= 0 ) { append ( out , chars_ . charAt ( pos ) ) ; // Next unit of a pending linear - match node . return 1 ; } int node = chars_ . charAt ( pos ++ ) ; if ( node >= kMinValueLead ) { if ( ( node & kValueIsFinal ) != 0 ) { return 0 ; } else { pos...
public class GrowingSparseMatrix { /** * { @ inheritDoc } * The size of the matrix will be expanded if either row or * col is larger than the largest previously seen row or column value . * When the matrix is expanded by either dimension , the values for the new * row / column will all be assumed to be zero . *...
checkIndices ( row , data . length ( ) - 1 ) ; if ( cols <= data . length ( ) ) cols = data . length ( ) ; Vectors . copy ( updateRow ( row ) , data ) ;
public class MercatorUtils { /** * Get lat - long bounds from tile index . * @ param tx tile x . * @ param ty tile y . * @ param zoom zoomlevel . * @ param tileSize tile size . * @ return [ minx , miny , maxx , maxy ] */ public static double [ ] tileLatLonBounds ( int tx , int ty , int zoom , int tileSize ) {...
double [ ] bounds = tileBounds3857 ( tx , ty , zoom , tileSize ) ; double [ ] mins = metersToLatLon ( bounds [ 0 ] , bounds [ 1 ] ) ; double [ ] maxs = metersToLatLon ( bounds [ 2 ] , bounds [ 3 ] ) ; return new double [ ] { mins [ 1 ] , maxs [ 0 ] , maxs [ 1 ] , mins [ 0 ] } ;
public class JsonBuilder { /** * A collection and closure passed to a JSON builder will create a root JSON array applying * the closure to each object in the collection * Example : * < pre > < code class = " groovyTestCase " > * class Author { * String name * def authors = [ new Author ( name : " Guillaume ...
List < Object > listContent = new ArrayList < Object > ( ) ; if ( coll != null ) { for ( Object it : coll ) { listContent . add ( JsonDelegate . curryDelegateAndGetContent ( c , it ) ) ; } } content = listContent ; return content ;
public class LastModifiedDateFileComparator { /** * ( non - Javadoc ) * @ see java . util . Comparator # compare ( java . lang . Object , java . lang . Object ) */ @ Override public int compare ( File o1 , File o2 ) { } }
return - 1 * new Long ( o1 . lastModified ( ) ) . compareTo ( new Long ( o2 . lastModified ( ) ) ) ;