signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class druidGParser { /** * druidG . g : 145:1 : queryStmnt returns [ QueryMeta qMeta ] : SELECT ( ( WS selectItems [ qMeta ] ( ( WS ) ? ' , ' ( WS ) ? selectItems [ qMeta ] ) * ) | ( WS ' * ' ) ) ? WS FROM ( ( WS id = ID ) | ( WS LPARAN ( fromQuery = queryStmnt ) RPARAN ) ) ( WS WHERE WS whereClause [ qMeta ] ( ...
QueryMeta qMeta = null ; Token id = null ; Token dir = null ; Token l = null ; Token s1 = null ; Token s2 = null ; Token s = null ; QueryMeta fromQuery = null ; Pair < Granularity , List < Pair < Integer , Integer > > > gran = null ; Having h = null ; PostAggItem p = null ; qMeta = GroupByQueryMeta . promote ( new Quer...
public class DeviceAttribute_3DAODefaultImpl { public void init ( final String name , final int dim_x , final int dim_y ) { } }
buildAttributeValueObject ( name ) ; attrval . r_dim . dim_x = dim_x ; attrval . r_dim . dim_y = dim_y ;
public class BinaryType { /** * Readable string value for a type ID . * @ param id The type ID . * @ return The type string . */ public static String asString ( byte id ) { } }
switch ( id ) { case STOP : return "stop(0)" ; case VOID : return "void(1)" ; case BOOL : return "bool(2)" ; case BYTE : return "byte(3)" ; case DOUBLE : return "double(4)" ; // case 5: case I16 : return "i16(6)" ; // case 7: case I32 : // ENUM is same as I32. return "i32(8)" ; // case 9: case I64 : return "i64(10)" ; ...
public class Registry { /** * Returns all of the policy variations that have been configured . */ public static Set < Policy > policy ( BasicSettings settings , String name ) { } }
Function < Config , Set < Policy > > factory = FACTORIES . get ( name . toLowerCase ( US ) ) ; checkNotNull ( factory , "%s not found" , name ) ; return factory . apply ( settings . config ( ) ) ;
public class AbstractStandardTransformationOperation { /** * Get a parameter from the parameter map . If abortOnError is true , then a TransformationOperationException is * thrown in case that the asked parameter does not exists . If this value is false , the default value will be taken * instead of throwing an exc...
String value = parameters . get ( paramName ) ; if ( value != null ) { return value ; } if ( abortOnError ) { String error = String . format ( "There is no parameter with the name %s present. The step will be ignored." , paramName ) ; throw new TransformationOperationException ( error ) ; } logger . debug ( "There is n...
public class IOUtil { /** * Reads data from < code > reader < / code > and writes it into an instanceof { @ link CharArrayWriter2 } . < br > * @ param reader reader from which data is read * @ param closeReader close reader or not * @ return the instance of { @ link CharArrayWriter2 } into which data is written ...
return pump ( reader , new CharArrayWriter2 ( ) , closeReader , true ) ;
public class ObjectGraphDump { /** * Implementation of the tree walk . * @ param currentNode the node being visited . */ private void visit ( final ObjectGraphNode currentNode ) { } }
Object currentValue = currentNode . getValue ( ) ; if ( currentValue == null || ( currentValue instanceof java . lang . ref . SoftReference ) || currentNode . isPrimitive ( ) || currentNode . isSimpleType ( ) ) { return ; } if ( isObjectVisited ( currentNode ) ) { ObjectGraphNode ref = visitedNodes . get ( currentValue...
public class RemoteFieldTable { /** * Add this record to this table . * Add this record to the table and set the current edit mode to NONE . * @ param record The record to add . * @ throws Exception */ public void doAdd ( Rec record ) throws DBException { } }
try { m_objLastModBookmark = m_tableRemote . add ( this . getDataSource ( ) , record . getOpenMode ( ) ) ; } catch ( RemoteException ex ) { throw new DBException ( ex . getMessage ( ) ) ; }
public class HtmlSerialFieldWriter { /** * Check to see if overview details should be printed . If * nocomment option set or if there is no text to be printed * for deprecation info , comment or tags , do not print overview details . * @ param field the field to check overview details for . * @ return true if o...
if ( ! configuration . nocomment ) { if ( ! utils . getFullBody ( field ) . isEmpty ( ) || writer . hasSerializationOverviewTags ( field ) ) return true ; } if ( utils . isDeprecated ( field ) ) return true ; return false ;
public class HttpSession2 { /** * get session attributes ' snapshot * @ return session attributes ' map object */ public Map < String , Object > snapshot ( ) { } }
Map < String , Object > snap = Maps . newHashMap ( ) ; snap . putAll ( sessionStore ) ; snap . putAll ( newAttributes ) ; for ( String name : deleteAttribute ) { snap . remove ( name ) ; } return snap ;
public class AbstractMapBasedWALDAO { /** * Mark an item as " deleted " without actually deleting it from the map . This * method only triggers the update action but does not alter the item . Must * only be invoked inside a write - lock . * @ param aItem * The item that was marked as " deleted " * @ param bIn...
// Trigger save changes super . markAsChanged ( aItem , EDAOActionType . UPDATE ) ; if ( bInvokeCallbacks ) { // Invoke callbacks m_aCallbacks . forEach ( aCB -> aCB . onMarkItemDeleted ( aItem ) ) ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcTrimmingPreference ( ) { } }
if ( ifcTrimmingPreferenceEEnum == null ) { ifcTrimmingPreferenceEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 921 ) ; } return ifcTrimmingPreferenceEEnum ;
public class CmsWorkplace { /** * Generates the header for the extended report view . < p > * @ param cms the current users context * @ param encoding the encoding string * @ return html code */ public static String generatePageStartExtended ( CmsObject cms , String encoding ) { } }
StringBuffer result = new StringBuffer ( 128 ) ; result . append ( "<html>\n<head>\n" ) ; result . append ( "<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=" ) ; result . append ( encoding ) ; result . append ( "'>\n" ) ; result . append ( generateCssStyle ( cms ) ) ; result . append ( "</head>\n" ) ; resu...
public class TrackBox { /** * Gets the SampleTableBox at mdia / minf / stbl if existing . * @ return the SampleTableBox or < code > null < / code > */ public SampleTableBox getSampleTableBox ( ) { } }
if ( sampleTableBox != null ) { return sampleTableBox ; } MediaBox mdia = getMediaBox ( ) ; if ( mdia != null ) { MediaInformationBox minf = mdia . getMediaInformationBox ( ) ; if ( minf != null ) { sampleTableBox = minf . getSampleTableBox ( ) ; return sampleTableBox ; } } return null ;
public class ICPImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setYCOset ( Integer newYCOset ) { } }
Integer oldYCOset = ycOset ; ycOset = newYCOset ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . ICP__YC_OSET , oldYCOset , ycOset ) ) ;
public class OutHttpApp { /** * Writes a byte to the output . */ @ Override public void write ( int ch ) throws IOException { } }
if ( isClosed ( ) || isHead ( ) ) { return ; } int offset = _offset ; if ( SIZE <= offset ) { flushByteBuffer ( ) ; offset = _offset ; } _buffer [ offset ++ ] = ( byte ) ch ; _offset = offset ;
public class NGAExtensions { /** * Delete the Tile Scaling extensions for the table * @ param geoPackage * GeoPackage * @ param table * table name * @ since 2.0.2 */ public static void deleteTileScaling ( GeoPackageCore geoPackage , String table ) { } }
TileScalingDao tileScalingDao = geoPackage . getTileScalingDao ( ) ; ExtensionsDao extensionsDao = geoPackage . getExtensionsDao ( ) ; try { if ( tileScalingDao . isTableExists ( ) ) { tileScalingDao . deleteById ( table ) ; } if ( extensionsDao . isTableExists ( ) ) { extensionsDao . deleteByExtension ( TileTableScali...
public class ServerConfiguration { /** * Deserialize , then output the given configuration . If two parameters are * given , the first one is the filename and the second is the properties * file to apply before re - serializing . */ public static void main ( String [ ] args ) throws Exception { } }
if ( args . length < 1 || args . length > 2 ) { throw new IOException ( "One or two arguments expected." ) ; } ServerConfiguration config = new ServerConfigurationParser ( new FileInputStream ( new File ( args [ 0 ] ) ) ) . parse ( ) ; if ( args . length == 2 ) { Properties props = new Properties ( ) ; props . load ( n...
public class JSONResource { /** * Transforming the JSON on the fly */ protected Object unmarshal ( ) throws IOException , JSONException { } }
json = new JSONTokener ( new InputStreamReader ( inputStream , "UTF-8" ) ) . nextValue ( ) ; inputStream . close ( ) ; return json ;
public class SpekeKeyProvider { /** * Relates to SPEKE implementation . DRM system identifiers . DASH output groups support a max of two system ids . * Other group types support one system id . * @ param systemIds * Relates to SPEKE implementation . DRM system identifiers . DASH output groups support a max of two...
if ( systemIds == null ) { this . systemIds = null ; return ; } this . systemIds = new java . util . ArrayList < String > ( systemIds ) ;
public class AbstrCFMLExprTransformer { /** * Liest die Argumente eines Funktonsaufruf ein und prueft ob die Funktion innerhalb der FLD * ( Function Library Descriptor ) definiert ist . Falls sie existiert wird die Funktion gegen diese * geprueft und ein build - in - function CFXD Element generiert , ansonsten ein ...
// get Function Library checkLibrary = checkLibrary && data . flibs != null ; FunctionLibFunction flf = null ; if ( checkLibrary ) { if ( ! ( name instanceof Literal ) ) throw new TemplateException ( data . srcCode , "syntax error" ) ; // should never happen ! for ( int i = 0 ; i < data . flibs . length ; i ++ ) { flf ...
public class PredictionsImpl { /** * Predict an image url and saves the result . * @ param projectId The project id * @ param predictImageUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws IllegalArgumentException thrown if parameters fail the validat...
if ( projectId == null ) { throw new IllegalArgumentException ( "Parameter projectId is required and cannot be null." ) ; } if ( this . client . apiKey ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiKey() is required and cannot be null." ) ; } final UUID iterationId = predictImageUrlOpti...
public class ListApiKeysRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListApiKeysRequest listApiKeysRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listApiKeysRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listApiKeysRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( listApiKeysRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller...
public class W3CDom { /** * Convert a jsoup Document to a W3C Document . * @ param in jsoup doc * @ return w3c doc */ public Document fromJsoup ( org . jsoup . nodes . Document in ) { } }
Validate . notNull ( in ) ; DocumentBuilder builder ; try { // set the factory to be namespace - aware factory . setNamespaceAware ( true ) ; builder = factory . newDocumentBuilder ( ) ; Document out = builder . newDocument ( ) ; convert ( in , out ) ; return out ; } catch ( ParserConfigurationException e ) { throw new...
public class FrameworkSerializer { /** * Can be overridden to avoid boxing an int where appropriate */ public void serializePrimitive ( S rec , String fieldName , boolean value ) { } }
serializePrimitive ( rec , fieldName , Boolean . valueOf ( value ) ) ;
public class Clock { /** * Defines if the title of the clock will be drawn . * @ param VISIBLE */ public void setTitleVisible ( final boolean VISIBLE ) { } }
if ( null == titleVisible ) { _titleVisible = VISIBLE ; fireUpdateEvent ( VISIBILITY_EVENT ) ; } else { titleVisible . set ( VISIBLE ) ; }
public class Resources { /** * Retrieve a boolean from bundle . * @ param key the key of resource * @ return the resource boolean * @ throws MissingResourceException if the requested key is unknown */ public boolean getBoolean ( String key ) throws MissingResourceException { } }
ResourceBundle bundle = getBundle ( ) ; String value = bundle . getString ( key ) ; return "true" . equalsIgnoreCase ( value ) ;
public class Get { /** * Validates that the value from { @ code map } for the given { @ code key } is a * valid , populated string URL . Returns the value when valid ; otherwise , * throws an { @ code IllegalArgumentException } . * @ param map a map * @ param key a key * @ param < T > the type of value * @ ...
String url = populatedStringOfType ( map , key , "URL" ) ; UrlValidator . http ( url ) . orThrow ( String . format ( "Invalid URL value \"%s\" for key \"%s\"" , url , key ) ) ; return url ;
public class Selector { /** * CollidableListener */ @ Override public void notifyCollided ( Collidable collidable , Collision collision ) { } }
if ( collidable . hasFeature ( Selectable . class ) ) { final Selectable selectable = collidable . getFeature ( Selectable . class ) ; selectable . onSelection ( true ) ; selected . add ( selectable ) ; }
public class JSettingsPanel { /** * GEN - LAST : event _ jRadioButtonGraphAggregatedActionPerformed */ private void jRadioButtonGraphDetailedActionPerformed ( java . awt . event . ActionEvent evt ) // GEN - FIRST : event _ jRadioButtonGraphDetailedActionPerformed { } }
// GEN - HEADEREND : event _ jRadioButtonGraphDetailedActionPerformed parent . switchModel ( false ) ; refreshGraphPreview ( ) ;
public class ManagementLocksInner { /** * Gets all the management locks for a resource or any level below resource . * @ param resourceGroupName The name of the resource group containing the locked resource . The name is case insensitive . * @ param resourceProviderNamespace The namespace of the resource provider ....
return listAtResourceLevelSinglePageAsync ( resourceGroupName , resourceProviderNamespace , parentResourcePath , resourceType , resourceName , filter ) . concatMap ( new Func1 < ServiceResponse < Page < ManagementLockObjectInner > > , Observable < ServiceResponse < Page < ManagementLockObjectInner > > > > ( ) { @ Overr...
public class TerminalParser { /** * A { @ link Parser } that succeeds only if the { @ link Token } objects in the { @ link List } are * adjacent . */ public static Parser < Token > adjacent ( Parser < List < Token > > parser , final Parser < ? > otherwise ) { } }
return parser . next ( tokens -> { if ( tokens . isEmpty ( ) ) return Parsers . always ( ) ; int offset = tokens . get ( 0 ) . index ( ) ; for ( Token token : tokens ) { if ( token . index ( ) != offset ) { return otherwise ; } offset += token . length ( ) ; } return Parsers . always ( ) ; } ) . atomic ( ) . source ( )...
public class IOUtils { /** * Deserializes the given byte array back into an { @ link Object } of the desired { @ link Class } type . * @ param < T > class type of the object deserialized from the given bytes . * @ param serializedObjectBytes an array containing the bytes of a serialized object . * @ return a { @ ...
ObjectInputStream in = null ; try { in = new ObjectInputStream ( new ByteArrayInputStream ( serializedObjectBytes ) ) ; return ( T ) in . readObject ( ) ; } finally { close ( in ) ; }
public class CommonMessagePrintTopology { /** * { @ inheritDoc } */ @ Override public void buildTopology ( ) throws Exception { } }
// Get setting from StormConfig Object List < String > kestrelHosts = StormConfigUtil . getStringListValue ( getConfig ( ) , KestrelJsonSpout . KESTREL_SERVERS ) ; String kestrelQueueName = StormConfigUtil . getStringValue ( getConfig ( ) , KestrelJsonSpout . KESTREL_QUEUE , "MessageQueue" ) ; int kestrelSpoutPara = St...
public class CodecUtils { /** * Deserialize a given Base64 encoded data string into an object * @ param data The base64 encoded data string * @ param < T > Just for JavaDoc can be ignored * @ return The required object */ public static < T > T deserializeFromBase64 ( String data ) { } }
Objects . requireNonNull ( data , Required . DATA . toString ( ) ) ; byte [ ] bytes = base64Decoder . decode ( data ) ; return SerializationUtils . deserialize ( bytes ) ;
public class Circle { /** * Check if circle contains the line * @ param line Line to check against * @ return True if line inside circle */ private boolean contains ( Line line ) { } }
return contains ( line . getX1 ( ) , line . getY1 ( ) ) && contains ( line . getX2 ( ) , line . getY2 ( ) ) ;
public class CoinsuperMarketDataServiceRaw { /** * getCoinsuperTicker * @ return Object * @ throws IOException */ public Object getKlines ( CurrencyPair currencyPair ) throws IOException { } }
Map < String , String > data = new HashMap < String , String > ( ) ; data . put ( "symbol" , currencyPair . toString ( ) ) ; RestRequestParam parameters = RestApiRequestHandler . generateRequestParam ( data , this . apiKey , this . secretKey ) ; return coinsuper . getKlines ( parameters ) ;
public class EJSDeployedSupport { /** * d395666 - rewrote entire method . */ public final void setUncheckedLocalException ( Throwable ex ) throws EJBException { } }
ExceptionMappingStrategy exceptionStrategy = getExceptionMappingStrategy ( ) ; Throwable mappedException = exceptionStrategy . setUncheckedException ( this , ex ) ; if ( mappedException != null ) { if ( mappedException instanceof EJBException ) { throw ( EJBException ) mappedException ; } else if ( mappedException inst...
public class ST_MakeLine { /** * Returns true as soon as we know the collection contains at least two * points . Start counting from the initial number of points . * @ param points Collection of points * @ param initialNumberOfPoints The initial number of points * @ return True as soon as we know the collection...
int numberOfPoints = initialNumberOfPoints ; for ( int i = 0 ; i < points . getNumGeometries ( ) ; i ++ ) { Geometry p = points . getGeometryN ( i ) ; if ( numberOfPoints >= REQUIRED_NUMBER_OF_POINTS ) { return true ; } numberOfPoints = numberOfPoints + countPoints ( p ) ; } return numberOfPoints >= REQUIRED_NUMBER_OF_...
public class FtpUtil { /** * List files in a directory . Do not return sub - directories , just plain files * @ param muleContext * @ param endpointName * @ return a list of the names of the files in the directory * @ throws IOException */ static public List < String > listFilesInDirectory ( MuleContext muleCon...
logger . info ( "List endpoint: {}" , endpointName ) ; FTPClient ftpClient = null ; List < String > fileNames = new ArrayList < String > ( ) ; try { ftpClient = getFtpClient ( muleContext , endpointName ) ; EndpointURI endpointURI = getImmutableEndpoint ( muleContext , endpointName ) . getEndpointURI ( ) ; String path ...
public class MapMatching { /** * Returns the path length plus a penalty if the starting / ending edge is unfavored . */ private double penalizedPathDistance ( Path path , Set < EdgeIteratorState > penalizedVirtualEdges ) { } }
double totalPenalty = 0 ; // Unfavored edges in the middle of the path should not be penalized because we are // only concerned about the direction at the start / end . final List < EdgeIteratorState > edges = path . calcEdges ( ) ; if ( ! edges . isEmpty ( ) ) { if ( penalizedVirtualEdges . contains ( edges . get ( 0 ...
public class URLTemplateDescriptor { /** * Returns URL template name of the given type ( by key ) . * @ param refGroupName name of a group of templates from the config file . * @ param key type of the template * @ return template name */ public String getURLTemplateRef ( String refGroupName , String key ) { } }
String ref = null ; if ( _servletContext != null ) { URLTemplatesFactory urlTemplatesFactory = URLTemplatesFactory . getURLTemplatesFactory ( _servletContext ) ; if ( urlTemplatesFactory != null ) { ref = urlTemplatesFactory . getTemplateNameByRef ( refGroupName , key ) ; } } return ref ;
public class NagiosWriter { /** * Define if a value is in a critical , warning or ok state . */ protected String nagiosCheckValue ( String value , String composeRange ) { } }
List < String > simpleRange = Arrays . asList ( composeRange . split ( "," ) ) ; double doubleValue = Double . parseDouble ( value ) ; if ( composeRange . isEmpty ( ) ) { return "0" ; } if ( simpleRange . size ( ) == 1 ) { if ( composeRange . endsWith ( "," ) ) { if ( valueCheck ( doubleValue , simpleRange . get ( 0 ) ...
public class WebGroup { /** * PK37449 synchronizing */ public synchronized void destroy ( ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "destroy" , "entry" ) ; /* destroying = true ; if ( nServicing > 0 ) { try { this . wait ( ) ; } catch ( InterruptedException e ) { / / TODO Auto - genera...
public class ServerMessageBlock2Request { /** * { @ inheritDoc } * @ see jcifs . internal . smb2 . ServerMessageBlock2 # encode ( byte [ ] , int ) */ @ Override public int encode ( byte [ ] dst , int dstIndex ) { } }
int len = super . encode ( dst , dstIndex ) ; int exp = size ( ) ; int actual = getLength ( ) ; if ( exp != actual ) { throw new IllegalStateException ( String . format ( "Wrong size calculation have %d expect %d" , exp , actual ) ) ; } return len ;
public class TermOfUsePanel { /** * Factory method for creating the new { @ link Component } for the cancellation . This method is * invoked in the constructor from the derived classes and can be overridden so users can * provide their own version of a new { @ link Component } for the cancellation . * @ param id ...
return new CancellationPanel ( id , Model . of ( model . getObject ( ) ) ) ;
public class BaseMessagingEngineImpl { /** * Gets the instance of the MP associated with this ME * @ deprecated * @ param name * @ return JsEngineComponent */ @ Deprecated public JsEngineComponent getMessageProcessor ( String name ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMessageProcessor" , this ) ; SibTr . exit ( tc , "getMessageProcessor" , _messageProcessor ) ; } return _messageProcessor ;
public class DeleteAliasRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteAliasRequest deleteAliasRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteAliasRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteAliasRequest . getOrganizationId ( ) , ORGANIZATIONID_BINDING ) ; protocolMarshaller . marshall ( deleteAliasRequest . getEntityId ( ) , ENTITYID_BINDING ) ; pr...
public class ValidatingStreamReader { /** * Method called by < code > finishDTD < / code > , to locate the specified * external DTD subset . Subset may be obtained from a cache , if cached * copy exists and is compatible ; if not , it will be read from the * source identified by the public and / or system identif...
boolean cache = hasConfigFlags ( CFG_CACHE_DTDS ) ; DTDId dtdId ; try { dtdId = constructDtdId ( pubId , sysId ) ; } catch ( IOException ioe ) { throw constructFromIOE ( ioe ) ; } if ( cache ) { DTDSubset extSubset = findCachedSubset ( dtdId , intSubset ) ; if ( extSubset != null ) { return extSubset ; } } // No useful...
public class DFAs { /** * Minimizes the given DFA over the given alphabet . This method does not modify the given DFA , but returns the * minimized version as a new instance . * < b > Note : < / b > the DFA must be completely specified . * @ param dfa * the DFA to be minimized * @ param alphabet * the input...
return HopcroftMinimization . minimizeDFA ( dfa , alphabet ) ;
public class AJP13Packet { public void addString ( String s ) throws IOException { } }
if ( s == null ) { addInt ( 0xFFFF ) ; return ; } if ( _byteWriter == null ) _byteWriter = new ByteArrayISO8859Writer ( _buf ) ; int p = _bytes + 2 ; _byteWriter . setLength ( p ) ; _byteWriter . write ( s ) ; int l = _byteWriter . size ( ) - p ; addInt ( l ) ; _bytes += l ; _buf [ _bytes ++ ] = ( byte ) 0 ;
public class GVRPose { /** * Get the world rotations for all the bones in this pose . * The world space rotations for each bone are copied into the * destination array as quaterions in the order of their bone index . * The array must be as large as the number of bones in the skeleton * ( which can be obtained b...
if ( rotations . length != mBones . length * 4 ) { throw new IllegalArgumentException ( "Destination array is the wrong size" ) ; } sync ( ) ; for ( int i = 0 ; i < mBones . length ; i ++ ) { Bone bone = mBones [ i ] ; int t = i * 4 ; bone . WorldMatrix . getUnnormalizedRotation ( mTempQuat ) ; mTempQuat . normalize ( ...
public class Client { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . map . api . MAPDialogListener # onDialogTimeout * ( org . restcomm . protocols . ss7 . map . api . MAPDialog ) */ @ Override public void onDialogTimeout ( MAPDialog mapDialog ) { } }
logger . error ( String . format ( "onDialogTimeout for DialogId=%d" , mapDialog . getLocalDialogId ( ) ) ) ; this . csvWriter . incrementCounter ( ERROR_DIALOGS ) ;
public class Browser { /** * allows the browser selected to be passed in with a case insensitive name * @ param b - the string name of the browser * @ return Browser : the enum version of the browser * @ throws InvalidBrowserException If a browser that is not one specified in the * Selenium . Browser class is u...
for ( BrowserName browser : BrowserName . values ( ) ) { if ( browser . name ( ) . equalsIgnoreCase ( b ) ) { return browser ; } } throw new InvalidBrowserException ( "The selected browser " + b + " is not an applicable choice" ) ;
public class BindingInstaller { /** * Adds the given implicit binding in the graph to the injector hierarchy in the position * specified by the { @ link BindingPositioner } . Also ensures that the dependencies of the implicit * binding are available at the chosen position . */ private void installBinding ( Dependen...
// Figure out where we ' re putting the implicit entry GinjectorBindings implicitEntryPosition = positions . getInstallPosition ( key ) ; // Ensure that the dependencies are available to the ginjector inheritBindingsForDeps ( implicitEntryPosition , graph . getDependenciesOf ( key ) ) ; // Now add the implicit binding ...
public class EIPManager { /** * Get the list of EIPS from the DNS . * This mechanism looks for the EIP pool in the zone the instance is in by * looking up the DNS name < code > { zone } . { region } . { domainName } < / code > . The * zone is fetched from the { @ link InstanceInfo } object ; the region is picked ...
List < String > ec2Urls = EndpointUtils . getServiceUrlsFromDNS ( clientConfig , myZone , true , new EndpointUtils . InstanceInfoBasedUrlRandomizer ( applicationInfoManager . getInfo ( ) ) ) ; return getEIPsFromServiceUrls ( ec2Urls ) ;
public class Graphics { /** * Fill a rectangle on the canvas in the current color * @ param x1 * The x coordinate of the top left corner * @ param y1 * The y coordinate of the top left corner * @ param width * The width of the rectangle to fill * @ param height * The height of the rectangle to fill */ p...
predraw ( ) ; TextureImpl . bindNone ( ) ; currentColor . bind ( ) ; GL . glBegin ( SGL . GL_QUADS ) ; GL . glVertex2f ( x1 , y1 ) ; GL . glVertex2f ( x1 + width , y1 ) ; GL . glVertex2f ( x1 + width , y1 + height ) ; GL . glVertex2f ( x1 , y1 + height ) ; GL . glEnd ( ) ; postdraw ( ) ;
public class Drawer { /** * Set a footerDrawerItem at a specific position * @ param drawerItem * @ param position */ public void setStickyFooterItemAtPosition ( @ NonNull IDrawerItem drawerItem , int position ) { } }
if ( mDrawerBuilder . mStickyDrawerItems != null && mDrawerBuilder . mStickyDrawerItems . size ( ) > position ) { mDrawerBuilder . mStickyDrawerItems . set ( position , drawerItem ) ; } DrawerUtils . rebuildStickyFooterView ( mDrawerBuilder ) ;
public class Phrase { /** * Gets a special kind of Phrase that changes some characters into corresponding symbols . * @ param leading * @ param string * @ param font * @ return a newly constructed Phrase */ public static final Phrase getInstance ( int leading , String string , Font font ) { } }
Phrase p = new Phrase ( true ) ; p . setLeading ( leading ) ; p . font = font ; if ( font . getFamily ( ) != Font . SYMBOL && font . getFamily ( ) != Font . ZAPFDINGBATS && font . getBaseFont ( ) == null ) { int index ; while ( ( index = SpecialSymbol . index ( string ) ) > - 1 ) { if ( index > 0 ) { String firstPart =...
public class OcciVMUtils { /** * Creates a VM ( OCCI / VMWare ) using JSON rendering . * @ param hostIpPort IP and port of OCCI server ( eg . " 172.16.225.91:8080 " ) * @ param id Unique VM ID * @ param template VM image ID ( null means no image specified ) * @ param title VM title * @ param summary VM summar...
// Count VM creations ( + make title unique , it is used as VM ID by VMWare ! ) String uniqueTitle = title + ( ++ vmCount ) ; // TODO Expecting more interoperable implementation ! if ( config . get ( CloudautomationMixins . PROVIDER_ENDPOINT ) != null ) { return createCloudAutomationVM ( hostIpPort , id , template , ti...
public class PEMKeyStore { /** * Add a certificate to the keystore . * @ param alias * The certificate alias . * @ param certificate * The certificate to store . * @ throws KeyStoreException */ @ Override public void engineSetCertificateEntry ( String alias , Certificate certificate ) throws KeyStoreException...
if ( ! ( certificate instanceof X509Certificate ) ) { throw new KeyStoreException ( "Certificate must be instance of X509Certificate" ) ; } File file ; ResourceTrustAnchor trustAnchor = getCertificateEntry ( alias ) ; if ( trustAnchor != null ) { file = trustAnchor . getFile ( ) ; } else { file = new File ( defaultDire...
public class ManagementRequestHeader { /** * { @ inheritDoc } */ public void read ( final DataInput input ) throws IOException { } }
ProtocolUtils . expectHeader ( input , ManagementProtocol . REQUEST_ID ) ; requestId = input . readInt ( ) ; ProtocolUtils . expectHeader ( input , ManagementProtocol . BATCH_ID ) ; batchId = input . readInt ( ) ; ProtocolUtils . expectHeader ( input , ManagementProtocol . OPERATION_ID ) ; operationId = input . readByt...
public class Operation { /** * preceeds . * @ param rightOp a { @ link com . obdobion . algebrain . Operation } object . * @ return a boolean . */ public boolean preceeds ( final Operation rightOp ) { } }
if ( getLevel ( ) > rightOp . getLevel ( ) ) return true ; if ( getLevel ( ) < rightOp . getLevel ( ) ) return false ; if ( precedence ( ) <= rightOp . precedence ( ) ) return true ; return false ;
public class ConstructorDefImpl { /** * Check to see if two boundConstructors take indistinguishable arguments . If * so ( and they are in the same class ) , then this would lead to ambiguous * injection targets , and we want to fail fast . * @ param def * @ return */ private boolean equalsIgnoreOrder ( final C...
HashMap map = new HashMap ( ) ; for ( ConstructorArg a : def . getArgs ( ) ) { map . put ( a . getName ( ) , null ) ; } for ( ConstructorArg a : getArgs ( ) ) { if ( ! map . containsKey ( a . getName ( ) ) ) { return false ; } } return true ;
public class ImageUtils { /** * Returns a String identifying the format of given web image . < br > * e . g : image source is " < span style = ' color : blue ' > example . png < / span > " then * return " < span style = ' color : blue ' > png < / span > " . Even the name just is * " < span style = ' color : blue ...
ImageReader imageReaderFromHttpImage = getImageReaderFromHttpImage ( sourceImageHttpURL ) ; return imageReaderFromHttpImage != null ? imageReaderFromHttpImage . getFormatName ( ) : null ;
public class UNode { /** * Return true if this node has child nodes and all of them are simple value nodes . * This means that each child must be a { @ link NodeType # VALUE } and its name must be * " value " . If this node has no children or if at least one child is not a simple * value , false is returned . *...
if ( m_children == null || m_children . size ( ) == 0 ) { return false ; } for ( UNode child : m_children ) { if ( ! child . isValue ( ) || ! child . getName ( ) . equals ( "value" ) ) { return false ; } } return true ;
public class ClassFileWriter { /** * Add a method and begin adding code . * This method must be called before other methods for adding code , exception tables , etc . can be * invoked . * @ param methodName the name of the method * @ param type a string representing the type * @ param flags the attributes of ...
short methodNameIndex = itsConstantPool . addUtf8 ( methodName ) ; short typeIndex = itsConstantPool . addUtf8 ( type ) ; itsCurrentMethod = new ClassFileMethod ( methodName , methodNameIndex , type , typeIndex , flags ) ; itsJumpFroms = new UintMap ( ) ; itsMethods . add ( itsCurrentMethod ) ; addSuperBlockStart ( 0 )...
public class ObjectByteOffsetImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . OBJECT_BYTE_OFFSET__DIR_BY_OFF : setDirByOff ( DIR_BY_OFF_EDEFAULT ) ; return ; case AfplibPackage . OBJECT_BYTE_OFFSET__DIR_BY_HI : setDirByHi ( DIR_BY_HI_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class MPP14Reader { /** * This method extracts and collates constraint data . * @ throws java . io . IOException */ private void processConstraintData ( ) throws IOException { } }
ConstraintFactory factory = new ConstraintFactory ( ) ; factory . process ( m_projectDir , m_file , m_inputStreamFactory ) ;
public class AnnotationImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case XtextPackage . ANNOTATION__NAME : return NAME_EDEFAULT == null ? name != null : ! NAME_EDEFAULT . equals ( name ) ; } return super . eIsSet ( featureID ) ;
public class Postconditions { /** * An { @ code int } specialized version of { @ link # checkPostconditions ( Object , * ContractConditionType [ ] ) } * @ param value The value * @ param conditions The conditions the value must obey * @ return value * @ throws PostconditionViolationException If any of the con...
final Violations violations = innerCheckAllInt ( value , conditions ) ; if ( violations != null ) { throw failed ( null , Integer . valueOf ( value ) , violations ) ; } return value ;
public class vlan_channel_binding { /** * Use this API to fetch vlan _ channel _ binding resources of given name . */ public static vlan_channel_binding [ ] get ( nitro_service service , Long id ) throws Exception { } }
vlan_channel_binding obj = new vlan_channel_binding ( ) ; obj . set_id ( id ) ; vlan_channel_binding response [ ] = ( vlan_channel_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class AbstractBigtableConnection { /** * This should not be used . The hbase shell needs this in hbase 0.99.2 . Remove this once * 1.0.0 comes out . * @ param tableName a { @ link java . lang . String } object . * @ return a { @ link org . apache . hadoop . hbase . client . Table } object . * @ throws ja...
return getTable ( TableName . valueOf ( tableName ) ) ;
public class JawrRequestHandler { /** * Initialize the config properties source that will provide with all * configuration options . * @ param context * the servlet context * @ param configProps * the config properties * @ return the config properties source * @ throws ServletException * if an exception...
String configLocation = getInitParameter ( "configLocation" ) ; String configPropsSourceClass = getInitParameter ( "configPropertiesSourceClass" ) ; if ( null == configProps && null == configLocation && null == configPropsSourceClass ) throw new ServletException ( "Neither configLocation nor configPropertiesSourceClass...
public class StripeSourceTypeModel { /** * Put the key - value pairs from the second map into the first map . Note : this does * not protect against overwriting original values . This method assumes * a 1 - level map . * @ param map a { @ link Map } into which new values are being written * @ param additionalFi...
if ( map == null || additionalFields == null || additionalFields . isEmpty ( ) ) { return ; } map . putAll ( additionalFields ) ;
public class OWLInverseObjectPropertiesAxiomImpl_CustomFieldSerializer { /** * Serializes the content of the object into the * { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } . * @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } ...
serialize ( streamWriter , instance ) ;
public class BlockingQueueOperationListener { /** * Retrieves and removes the head of this queue , waiting up to the specified wait time if necessary for an element to become available . * @ param timeout the timeout * @ param timeUnit the time unit * @ return the prepared operation * @ throws InterruptedExcept...
return queue . poll ( timeout , timeUnit ) ;
public class TcpWorker { /** * First close the connection . Then reply . * @ param response * the response * @ param error * the error * @ param errorMessage * the error message * @ param stackTrace * the stack trace * @ param statusCode * the status code * @ param statusCodeInt * the status cod...
if ( ! sentReply ) { // must update sentReply first to avoid duplicated msg . sentReply = true ; // Close the connection . Make sure the close operation ends because // all I / O operations are asynchronous in Netty . if ( channel != null && channel . isOpen ( ) ) channel . close ( ) . awaitUninterruptibly ( ) ; final ...
public class LongHashMap { /** * Associates the specified value with the specified key in this identity * hash map . If the map previously contained a mapping for the key , the * old value is replaced . * @ param key the key with which the specified value is to be associated * @ param value the value to be asso...
assert key != 0 ; long k = key ; long [ ] tab = table ; int len = tab . length ; int i = hash ( k , len ) ; long item ; while ( ( item = tab [ i ] ) != 0 ) { if ( item == k ) { long oldValue = tab [ i + 1 ] ; tab [ i + 1 ] = value ; return oldValue ; } i = nextKeyIndex ( i , len ) ; } modCount ++ ; tab [ i ] = k ; tab ...
public class SpringJdbcRepository { /** * Removes an entity from the repository . * For this operation the delete query received on the constructor will be * used . * @ param entity * the entity to remove */ @ Override public final void remove ( final V entity ) { } }
final SqlParameterSource parameterSource ; // Parameters source parameterSource = new BeanPropertySqlParameterSource ( entity ) ; getTemplate ( ) . update ( getDeleteQueryTemplate ( ) , parameterSource ) ;
public class ColorHolder { /** * a small static helper class to get the color from the colorHolder * @ param colorHolder * @ param ctx * @ return */ public static int color ( ColorHolder colorHolder , Context ctx ) { } }
if ( colorHolder == null ) { return 0 ; } else { return colorHolder . color ( ctx ) ; }
public class JspCompilationContext { /** * Gets the actual path of a URI relative to the context of * the compilation . * @ param path The webapp path * @ return the corresponding path in the filesystem */ public String getRealPath ( String path ) { } }
if ( context != null ) { return context . getRealPath ( path ) ; } return path ;
public class OObjectDatabaseTx { /** * Register a new POJO */ @ Override public void registerUserObject ( final Object iObject , final ORecordInternal < ? > iRecord ) { } }
if ( ! ( iRecord instanceof ODocument ) ) return ; final ODocument doc = ( ODocument ) iRecord ; if ( retainObjects ) { final ORID rid = iRecord . getIdentity ( ) ; if ( rid . isValid ( ) ) rid2Records . put ( rid , doc ) ; }
public class NUID { /** * Generate the next NUID string from this instance . * @ return the next NUID string from this instance . */ public final synchronized String next ( ) { } }
// Increment and capture . seq += inc ; if ( seq >= maxSeq ) { randomizePrefix ( ) ; resetSequential ( ) ; } // Copy prefix char [ ] b = new char [ totalLen ] ; System . arraycopy ( pre , 0 , b , 0 , preLen ) ; // copy in the seq in base36. int i = b . length ; for ( long l = seq ; i > preLen ; l /= base ) { i -- ; b [...
public class BigMoney { /** * Returns a copy of this monetary value converted into another currency * using the specified conversion rate , with a rounding mode used to adjust * the decimal places in the result . * The result will have the same scale as this instance even though it will * be in a different curr...
return convertedTo ( currency , conversionMultipler ) . withScale ( getScale ( ) , roundingMode ) ;
public class DateUtils { /** * 校验两段时间是否有重合 * @ param date1StartStr 时间段1开始 * @ param date1EndStr 时间段1结束 * @ param date2StartStr 时间段2开始 * @ param date2EndStr 时间段2结束 * @ param patten * @ return < p / > * < code > true < / code > : 有重合 * < code > false < / code > : 无重合 */ public static boolean isOverlay ( S...
Date date1Start = DateUtils . parseDate ( date1StartStr , patten ) ; Date date1End = DateUtils . parseDate ( date1EndStr , patten ) ; Date date2Start = DateUtils . parseDate ( date2StartStr , patten ) ; Date date2End = DateUtils . parseDate ( date2EndStr , patten ) ; return isOverlay ( date1Start , date1End , date2Star...
public class StringUtils { /** * Constructs a new < code > String < / code > by decoding the specified array of bytes using the given charset . * This method catches { @ link UnsupportedEncodingException } and re - throws it as { @ link IllegalStateException } , which * should never happen for a required charset na...
if ( bytes == null ) { return null ; } try { return new String ( bytes , charsetName ) ; } catch ( UnsupportedEncodingException e ) { throw StringUtils . newIllegalStateException ( charsetName , e ) ; }
public class JSchema { /** * variant */ private JMFType findChildByIndex ( JMFType start , int index ) { } }
if ( index < 0 ) return null ; if ( start instanceof JSVariant ) { JSVariant var = ( JSVariant ) start ; int cases = var . getCaseCount ( ) ; if ( index >= cases ) return null ; else return getEffectiveType ( var . getCase ( index ) ) ; } else { JSTuple tup = ( JSTuple ) start ; int fields = tup . getFieldCount ( ) ; i...
public class QueryBuilder { /** * Query for selecting changes ( or snapshots ) * made on all ValueObjects at given path , owned by any instance of given Entity . * < br / > < br / > * See < b > path < / b > parameter hints in { @ link # byValueObjectId ( Object , Class , String ) } . */ public static QueryBuilder...
Validate . argumentsAreNotNull ( ownerEntityClass , path ) ; return new QueryBuilder ( new VoOwnerFilterDefinition ( ownerEntityClass , path ) ) ;
public class Computer { /** * Used to render the list of executors . * @ return a snapshot of the executor display information * @ since 1.607 */ @ Restricted ( NoExternalUse . class ) public List < DisplayExecutor > getDisplayExecutors ( ) { } }
// The size may change while we are populating , but let ' s start with a reasonable guess to minimize resizing List < DisplayExecutor > result = new ArrayList < > ( executors . size ( ) + oneOffExecutors . size ( ) ) ; int index = 0 ; for ( Executor e : executors ) { if ( e . isDisplayCell ( ) ) { result . add ( new D...
public class UpdateBuilder { /** * Deletes the document referred to by this DocumentReference . * @ param documentReference The DocumentReference to delete . * @ param precondition Precondition for the delete operation . * @ return The instance for chaining . */ @ Nonnull public T delete ( @ Nonnull DocumentRefer...
return performDelete ( documentReference , precondition ) ;
public class HttpMethodBase { /** * Generates < tt > Proxy - Connection : Keep - Alive < / tt > request header when * communicating via a proxy server . * @ param state the { @ link HttpState state } information associated with this method * @ param conn the { @ link HttpConnection connection } used to execute ...
LOG . trace ( "enter HttpMethodBase.addProxyConnectionHeader(" + "HttpState, HttpConnection)" ) ; if ( ! conn . isTransparent ( ) ) { if ( getRequestHeader ( "Proxy-Connection" ) == null ) { addRequestHeader ( "Proxy-Connection" , "Keep-Alive" ) ; } }
public class DenseGrid { /** * Creates an empty { @ code DenseGrid } of the specified size . * @ param < V > the type of the value * @ param rowCount the number of rows , zero or greater * @ param columnCount the number of rows , zero or greater * @ return the mutable grid , not null */ public static < V > Dens...
return new DenseGrid < V > ( rowCount , columnCount ) ;
public class ImmutableRoaringBitmap { /** * iterate over the positions of the true values . * @ return the iterator */ @ Override public Iterator < Integer > iterator ( ) { } }
return new Iterator < Integer > ( ) { int hs = 0 ; ShortIterator iter ; int pos = 0 ; int x ; @ Override public boolean hasNext ( ) { return pos < ImmutableRoaringBitmap . this . highLowContainer . size ( ) ; } public Iterator < Integer > init ( ) { if ( pos < ImmutableRoaringBitmap . this . highLowContainer . size ( )...
public class JsonPathAssert { /** * Extracts a JSON array using a JsonPath expression and wrap it in a { @ link ListAssert } . This method requires * the JsonPath to be < a href = " https : / / github . com / jayway / JsonPath # jsonprovider - spi " > configured with Jackson or * Gson < / a > . * @ param path Jso...
return Assertions . assertThat ( actual . read ( path , new TypeRef < List < T > > ( ) { } ) ) ;
public class BoxDeveloperEditionAPIConnection { /** * Creates a new Box Developer Edition connection with App User token . * @ param userId the user ID to use for an App User . * @ param clientId the client ID to use when exchanging the JWT assertion for an access token . * @ param clientSecret the client secret ...
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection ( userId , DeveloperEditionEntityType . USER , clientId , clientSecret , encryptionPref , accessTokenCache ) ; connection . tryRestoreUsingAccessTokenCache ( ) ; return connection ;
public class ListEventSourceMappingsResult { /** * A list of event source mappings . * @ param eventSourceMappings * A list of event source mappings . */ public void setEventSourceMappings ( java . util . Collection < EventSourceMappingConfiguration > eventSourceMappings ) { } }
if ( eventSourceMappings == null ) { this . eventSourceMappings = null ; return ; } this . eventSourceMappings = new com . amazonaws . internal . SdkInternalList < EventSourceMappingConfiguration > ( eventSourceMappings ) ;
public class Iterate { /** * Returns true if the predicate evaluates to true for any element of the iterable . * Returns false if the iterable is empty or if no elements return true for the predicate . */ public static < T > boolean anySatisfy ( Iterable < T > iterable , Predicate < ? super T > predicate ) { } }
if ( iterable instanceof RichIterable ) { return ( ( RichIterable < T > ) iterable ) . anySatisfy ( predicate ) ; } if ( iterable instanceof ArrayList ) { return ArrayListIterate . anySatisfy ( ( ArrayList < T > ) iterable , predicate ) ; } if ( iterable instanceof RandomAccess ) { return RandomAccessListIterate . anyS...
public class BulkheadMetricsCollector { /** * Creates a new collector with custom metric names and * using given { @ code supplier } as source of bulkheads . * @ param names the custom metric names * @ param supplier the supplier of bulkheads , note that supplier will be called one every { @ link # collect ( ) } ...
return new BulkheadMetricsCollector ( names , supplier ) ;
public class DSClient { /** * ( non - Javadoc ) * @ see com . impetus . kundera . client . Client # deleteByColumn ( java . lang . String , java . lang . String , java . lang . String , * java . lang . Object ) */ @ Override public void deleteByColumn ( String schemaName , String tableName , String columnName , Obj...
Session session = factory . getConnection ( ) ; String rowKeyName = null ; CQLTranslator translator = new CQLTranslator ( ) ; try { List < ColumnMetadata > primaryKeys = session . getCluster ( ) . getMetadata ( ) . getKeyspace ( "\"" + schemaName + "\"" ) . getTable ( "\"" + tableName + "\"" ) . getPrimaryKey ( ) ; row...