signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class SqlParserImpl { /** * BEGIN文解析 */
protected void parseBegin ( ) { } } | BeginNode beginNode = new BeginNode ( Math . max ( this . position - 2 , 0 ) ) ; this . position = this . tokenizer . getPosition ( ) ; peek ( ) . addChild ( beginNode ) ; push ( beginNode ) ; parseEnd ( ) ; |
public class Logger { /** * Log a message at the given level .
* @ param level the level
* @ param message the message */
public void log ( Level level , Object message ) { } } | doLog ( level , FQCN , message , null , null ) ; |
public class Broker { /** * the broker info saved in zookeeper
* format : < b > creatorId : host : port < / b >
* @ return broker info saved in zookeeper */
public String getZKString ( ) { } } | return String . format ( "%s:%s:%s:%s" , creatorId . replace ( ':' , '#' ) , host . replace ( ':' , '#' ) , port , autocreated ) ; |
public class Main { /** * Gets the Media Server Home directory .
* @ param args the command line arguments
* @ return the path to the home directory . */
protected static String getHomeDir ( String [ ] args ) { } } | if ( System . getenv ( HOME_DIR ) == null ) { if ( args . length > index ) { return args [ index ++ ] ; } else { return "." ; } } else { return System . getenv ( HOME_DIR ) ; } |
public class RemotingClient { /** * Send authentication data with each remoting request .
* @ param userid
* User identifier
* @ param password
* Password */
public void setCredentials ( String userid , String password ) { } } | Map < String , String > data = new HashMap < String , String > ( ) ; data . put ( "userid" , userid ) ; data . put ( "password" , password ) ; RemotingHeader header = new RemotingHeader ( RemotingHeader . CREDENTIALS , true , data ) ; headers . put ( RemotingHeader . CREDENTIALS , header ) ; |
public class ExecutionJobVertex { public void connectToPredecessors ( Map < IntermediateDataSetID , IntermediateResult > intermediateDataSets ) throws JobException { } } | List < JobEdge > inputs = jobVertex . getInputs ( ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( String . format ( "Connecting ExecutionJobVertex %s (%s) to %d predecessors." , jobVertex . getID ( ) , jobVertex . getName ( ) , inputs . size ( ) ) ) ; } for ( int num = 0 ; num < inputs . size ( ) ; num ++ ) { JobEdge edge = inputs . get ( num ) ; if ( LOG . isDebugEnabled ( ) ) { if ( edge . getSource ( ) == null ) { LOG . debug ( String . format ( "Connecting input %d of vertex %s (%s) to intermediate result referenced via ID %s." , num , jobVertex . getID ( ) , jobVertex . getName ( ) , edge . getSourceId ( ) ) ) ; } else { LOG . debug ( String . format ( "Connecting input %d of vertex %s (%s) to intermediate result referenced via predecessor %s (%s)." , num , jobVertex . getID ( ) , jobVertex . getName ( ) , edge . getSource ( ) . getProducer ( ) . getID ( ) , edge . getSource ( ) . getProducer ( ) . getName ( ) ) ) ; } } // fetch the intermediate result via ID . if it does not exist , then it either has not been created , or the order
// in which this method is called for the job vertices is not a topological order
IntermediateResult ires = intermediateDataSets . get ( edge . getSourceId ( ) ) ; if ( ires == null ) { throw new JobException ( "Cannot connect this job graph to the previous graph. No previous intermediate result found for ID " + edge . getSourceId ( ) ) ; } this . inputs . add ( ires ) ; int consumerIndex = ires . registerConsumer ( ) ; for ( int i = 0 ; i < parallelism ; i ++ ) { ExecutionVertex ev = taskVertices [ i ] ; ev . connectSource ( num , ires , edge , consumerIndex ) ; } } |
public class HashExtensions { /** * Gets the hash value of the given queue and the given algorithm .
* @ see < a href = " https : / / en . wikipedia . org / wiki / Merkle _ tree " > wikipedia Merkle tree < / a >
* @ param hashQueue
* the hash queue
* @ param algorithm
* the algorithm
* @ return the merkle root tree */
public static byte [ ] getMerkleRootHash ( Queue < byte [ ] > hashQueue , @ NonNull HashAlgorithm algorithm ) { } } | while ( hashQueue . size ( ) > 1 ) { byte [ ] hashValue = ArrayUtils . addAll ( hashQueue . poll ( ) , hashQueue . poll ( ) ) ; switch ( algorithm ) { case SHA1 : hashQueue . add ( DigestUtils . sha1 ( hashValue ) ) ; case SHA256 : hashQueue . add ( DigestUtils . sha256 ( hashValue ) ) ; case SHA384 : hashQueue . add ( DigestUtils . sha384 ( hashValue ) ) ; case SHA512 : hashQueue . add ( DigestUtils . sha512 ( hashValue ) ) ; case SHA_1 : hashQueue . add ( DigestUtils . sha1 ( hashValue ) ) ; case SHA_256 : hashQueue . add ( DigestUtils . sha256 ( hashValue ) ) ; case SHA_384 : hashQueue . add ( DigestUtils . sha384 ( hashValue ) ) ; case SHA_512 : hashQueue . add ( DigestUtils . sha512 ( hashValue ) ) ; default : hashQueue . add ( DigestUtils . sha256 ( hashValue ) ) ; } } return hashQueue . poll ( ) ; |
public class MapDataStores { /** * Creates a write through data store .
* @ param mapStoreContext context for map store operations
* @ param < K > type of key to store
* @ param < V > type of value to store
* @ return new write through store manager */
public static < K , V > MapDataStore < K , V > createWriteThroughStore ( MapStoreContext mapStoreContext ) { } } | final MapStoreWrapper store = mapStoreContext . getMapStoreWrapper ( ) ; final MapServiceContext mapServiceContext = mapStoreContext . getMapServiceContext ( ) ; final NodeEngine nodeEngine = mapServiceContext . getNodeEngine ( ) ; final InternalSerializationService serializationService = ( ( InternalSerializationService ) nodeEngine . getSerializationService ( ) ) ; return ( MapDataStore < K , V > ) new WriteThroughStore ( store , serializationService ) ; |
public class PathUtils { /** * Removes the Scheme and Authority from a Path .
* @ see Path
* @ see URI */
public static Path getPathWithoutSchemeAndAuthority ( Path path ) { } } | return new Path ( null , null , path . toUri ( ) . getPath ( ) ) ; |
public class HistoryServer { void start ( ) throws IOException , InterruptedException { } } | synchronized ( startupShutdownLock ) { LOG . info ( "Starting history server." ) ; Files . createDirectories ( webDir . toPath ( ) ) ; LOG . info ( "Using directory {} as local cache." , webDir ) ; Router router = new Router ( ) ; router . addGet ( "/:*" , new HistoryServerStaticFileServerHandler ( webDir ) ) ; if ( ! webDir . exists ( ) && ! webDir . mkdirs ( ) ) { throw new IOException ( "Failed to create local directory " + webDir . getAbsoluteFile ( ) + "." ) ; } createDashboardConfigFile ( ) ; archiveFetcher . start ( ) ; netty = new WebFrontendBootstrap ( router , LOG , webDir , serverSSLFactory , webAddress , webPort , config ) ; } |
public class UniformUtils { /** * Returns the first value of a list , or null if the list is empty .
* @ param < T > List type
* @ param list Input list
* @ return First value or null */
public static < T > T firstValue ( List < T > list ) { } } | if ( list != null && ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class WmsClient { /** * Create a new WMS layer . This layer does not support a GetFeatureInfo call ! If you need that , you ' ll have to use
* the server extension of this plug - in .
* @ param title The layer title .
* @ param crs The CRS for this layer .
* @ param tileConfig The tile configuration object .
* @ param layerConfig The layer configuration object .
* @ param layerInfo The layer info object . Acquired from a WMS GetCapabilities . This object is optional .
* @ return A new WMS layer . */
public WmsLayer createLayer ( String title , String crs , TileConfiguration tileConfig , WmsLayerConfiguration layerConfig , WmsLayerInfo layerInfo ) { } } | if ( layerInfo == null || layerInfo . isQueryable ( ) ) { return new FeatureInfoSupportedWmsLayer ( title , crs , layerConfig , tileConfig , layerInfo ) ; } else { return new WmsLayerImpl ( title , crs , layerConfig , tileConfig , layerInfo ) ; } |
public class FilterCriteriaReader14 { /** * { @ inheritDoc } */
@ Override protected byte [ ] getChildBlock ( byte [ ] block ) { } } | int offset = MPPUtility . getShort ( block , 32 ) ; return m_criteriaBlockMap . get ( Integer . valueOf ( offset ) ) ; |
public class ReflectionUtils { /** * Invoke the specified JDBC API { @ link Method } against the supplied target
* object with the supplied arguments .
* @ param method the method to invoke
* @ param target the target object to invoke the method on
* @ param args the invocation arguments ( may be { @ code null } )
* @ return the invocation result , if any
* @ throws SQLException the JDBC API SQLException to rethrow ( if any )
* @ see # invokeMethod ( java . lang . reflect . Method , Object , Object [ ] ) */
public static Object invokeJdbcMethod ( Method method , Object target , Object ... args ) throws SQLException { } } | try { return method . invoke ( target , args ) ; } catch ( IllegalAccessException ex ) { handleReflectionException ( ex ) ; } catch ( InvocationTargetException ex ) { if ( ex . getTargetException ( ) instanceof SQLException ) { throw ( SQLException ) ex . getTargetException ( ) ; } handleInvocationTargetException ( ex ) ; } throw new IllegalStateException ( "Should never get here" ) ; |
public class AnalyzeTab { /** * < / editor - fold > / / GEN - END : initComponents */
private void jButtonResultsActionPerformed ( java . awt . event . ActionEvent evt ) { } } | // GEN - FIRST : event _ jButtonResultsActionPerformed
BaseDirectoryChooser resultsFile = new BaseDirectoryChooser ( ) ; // resultsFile . setFileSelectionMode ( JFileChooser . DIRECTORIES _ ONLY ) ;
int selection = resultsFile . showOpenDialog ( this ) ; if ( selection == JFileChooser . APPROVE_OPTION ) { path = resultsFile . getSelectedFile ( ) . getAbsolutePath ( ) ; } if ( ! path . equals ( "" ) ) { reset ( ) ; this . jTextFieldResultsPath . setText ( path ) ; rf = new ReadFile ( path ) ; String str = rf . processFiles ( ) ; if ( str . equals ( "" ) ) { int algSize = rf . getAlgShortNames ( ) . size ( ) ; int streamSize = rf . getStream ( ) . size ( ) ; this . measures = rf . getMeasures ( ) ; for ( int i = 0 ; i < algSize ; i ++ ) { this . algoritmModel . addRow ( new Object [ ] { rf . getAlgNames ( ) . get ( i ) , rf . getAlgShortNames ( ) . get ( i ) } ) ; } for ( int i = 0 ; i < streamSize ; i ++ ) { this . streamModel . addRow ( new Object [ ] { rf . getStream ( ) . get ( i ) , rf . getStream ( ) . get ( i ) } ) ; } String measuresNames [ ] = measures . getFirst ( ) . split ( "," ) ; for ( String measuresName : measuresNames ) { jComboBoxMeasure . addItem ( measuresName ) ; if ( measuresName . equals ( "classifications correct (percent)" ) == true || measuresName . equals ( "[avg] classifications correct (percent)" ) == true ) { jComboBoxMeasure . setSelectedItem ( measuresName ) ; } } } else { JOptionPane . showMessageDialog ( this , str , "Error" , JOptionPane . ERROR_MESSAGE ) ; } } |
public class OptionsCheckForUpdatesPanel { /** * This method initializes this */
private void initialize ( ) { } } | this . setLayout ( new CardLayout ( ) ) ; this . setName ( Constant . messages . getString ( "cfu.options.title" ) ) ; this . add ( getPanelMisc ( ) , getPanelMisc ( ) . getName ( ) ) ; |
public class RegistrationManagerImpl { /** * { @ inheritDoc } */
@ Override public void setUserPassword ( String userName , String password ) throws ServiceException { } } | if ( ! isStarted ) { ServiceDirectoryError error = new ServiceDirectoryError ( ErrorCode . SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED ) ; throw new ServiceException ( error ) ; } getRegistrationService ( ) . setUserPassword ( userName , password ) ; |
public class ConstructorBuilder { /** * Build the constructor documentation .
* @ param node the XML element that specifies which components to document
* @ param memberDetailsTree the content tree to which the documentation will be added */
public void buildConstructorDoc ( XMLNode node , Content memberDetailsTree ) { } } | if ( writer == null ) { return ; } int size = constructors . size ( ) ; if ( size > 0 ) { Content constructorDetailsTree = writer . getConstructorDetailsTreeHeader ( classDoc , memberDetailsTree ) ; for ( currentConstructorIndex = 0 ; currentConstructorIndex < size ; currentConstructorIndex ++ ) { Content constructorDocTree = writer . getConstructorDocTreeHeader ( ( ConstructorDoc ) constructors . get ( currentConstructorIndex ) , constructorDetailsTree ) ; buildChildren ( node , constructorDocTree ) ; constructorDetailsTree . addContent ( writer . getConstructorDoc ( constructorDocTree , ( currentConstructorIndex == size - 1 ) ) ) ; } memberDetailsTree . addContent ( writer . getConstructorDetails ( constructorDetailsTree ) ) ; } |
public class TextUICommandLine { /** * Handle - xargs command line option by reading jar file names from standard
* input and adding them to the project .
* @ throws IOException */
public void handleXArgs ( ) throws IOException { } } | if ( getXargs ( ) ) { try ( BufferedReader in = UTF8 . bufferedReader ( System . in ) ) { while ( true ) { String s = in . readLine ( ) ; if ( s == null ) { break ; } project . addFile ( s ) ; } } } |
public class CompactionCombineFileInputFormat { /** * Set the number of locations in the split to SPLIT _ MAX _ NUM _ LOCATIONS if it is larger than
* SPLIT _ MAX _ NUM _ LOCATIONS ( MAPREDUCE - 5186 ) . */
private static List < InputSplit > cleanSplits ( List < InputSplit > splits ) throws IOException { } } | if ( VersionInfo . getVersion ( ) . compareTo ( "2.3.0" ) >= 0 ) { // This issue was fixed in 2.3.0 , if newer version , no need to clean up splits
return splits ; } List < InputSplit > cleanedSplits = Lists . newArrayList ( ) ; for ( int i = 0 ; i < splits . size ( ) ; i ++ ) { CombineFileSplit oldSplit = ( CombineFileSplit ) splits . get ( i ) ; String [ ] locations = oldSplit . getLocations ( ) ; Preconditions . checkNotNull ( locations , "CombineFileSplit.getLocations() returned null" ) ; if ( locations . length > SPLIT_MAX_NUM_LOCATIONS ) { locations = Arrays . copyOf ( locations , SPLIT_MAX_NUM_LOCATIONS ) ; } cleanedSplits . add ( new CombineFileSplit ( oldSplit . getPaths ( ) , oldSplit . getStartOffsets ( ) , oldSplit . getLengths ( ) , locations ) ) ; } return cleanedSplits ; |
public class RelationalDatabaseHardwareMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RelationalDatabaseHardware relationalDatabaseHardware , ProtocolMarshaller protocolMarshaller ) { } } | if ( relationalDatabaseHardware == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( relationalDatabaseHardware . getCpuCount ( ) , CPUCOUNT_BINDING ) ; protocolMarshaller . marshall ( relationalDatabaseHardware . getDiskSizeInGb ( ) , DISKSIZEINGB_BINDING ) ; protocolMarshaller . marshall ( relationalDatabaseHardware . getRamSizeInGb ( ) , RAMSIZEINGB_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class Tuple9 { /** * Skip 4 degrees from this tuple . */
public final Tuple5 < T5 , T6 , T7 , T8 , T9 > skip4 ( ) { } } | return new Tuple5 < > ( v5 , v6 , v7 , v8 , v9 ) ; |
public class HandlerRequestUtils { /** * Returns { @ code requestValue } if it is not null , otherwise returns the query parameter value
* if it is not null , otherwise returns the default value . */
public static < T > T fromRequestBodyOrQueryParameter ( T requestValue , SupplierWithException < T , RestHandlerException > queryParameterExtractor , T defaultValue , Logger log ) throws RestHandlerException { } } | if ( requestValue != null ) { return requestValue ; } else { T queryParameterValue = queryParameterExtractor . get ( ) ; if ( queryParameterValue != null ) { log . warn ( "Configuring the job submission via query parameters is deprecated." + " Please migrate to submitting a JSON request instead." ) ; return queryParameterValue ; } else { return defaultValue ; } } |
public class CmsXmlSitemapActionElement { /** * Creates an XML sitemap generator instance given a class name and the root path for the sitemap . < p >
* @ param className the class name of the sitemap generator ( may be null for the default
* @ param folderRootPath the root path of the start folder for the sitemap
* @ return the sitemap generator instance
* @ throws CmsException if something goes wrong */
public static CmsXmlSitemapGenerator createSitemapGenerator ( String className , String folderRootPath ) throws CmsException { } } | if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( className ) ) { className = ( String ) ( OpenCms . getRuntimeProperty ( PARAM_DEFAULT_SITEMAP_GENERATOR ) ) ; } if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( className ) ) { className = CmsXmlSitemapGenerator . class . getName ( ) ; } try { Class < ? extends CmsXmlSitemapGenerator > generatorClass = Class . forName ( className ) . asSubclass ( CmsXmlSitemapGenerator . class ) ; Constructor < ? extends CmsXmlSitemapGenerator > constructor = generatorClass . getConstructor ( String . class ) ; CmsXmlSitemapGenerator generator = constructor . newInstance ( folderRootPath ) ; return generator ; } catch ( Exception e ) { LOG . error ( "Could not create configured sitemap generator " + className + ", using the default class instead" , e ) ; return new CmsXmlSitemapGenerator ( folderRootPath ) ; } |
public class ParseUtils { /** * Returns CompiledPage produced by the SWEBLE parser using the
* SimpleWikiConfiguration .
* @ return the parsed page
* @ throws LinkTargetException
* @ throws EngineException if the wiki page could not be compiled by the parser
* @ throws JAXBException
* @ throws FileNotFoundException */
private static EngProcessedPage getCompiledPage ( String text , String title , long revision ) throws LinkTargetException , EngineException , FileNotFoundException , JAXBException { } } | WikiConfig config = DefaultConfigEnWp . generate ( ) ; PageTitle pageTitle = PageTitle . make ( config , title ) ; PageId pageId = new PageId ( pageTitle , revision ) ; // Compile the retrieved page
WtEngineImpl engine = new WtEngineImpl ( config ) ; // Compile the retrieved page
return engine . postprocess ( pageId , text , null ) ; |
public class BeanTypeImpl { /** * Returns all < code > field < / code > elements
* @ return list of < code > field < / code > */
public List < FieldType < BeanType < T > > > getAllField ( ) { } } | List < FieldType < BeanType < T > > > list = new ArrayList < FieldType < BeanType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "field" ) ; for ( Node node : nodeList ) { FieldType < BeanType < T > > type = new FieldTypeImpl < BeanType < T > > ( this , "field" , childNode , node ) ; list . add ( type ) ; } return list ; |
public class JsonArray { /** * Returns the value at { @ code index } if it exists and is a { @ code
* JsonArray } .
* @ throws JsonException if the value doesn ' t exist or is not a { @ code
* JsonArray } . */
public JsonArray getJsonArray ( int index ) throws JsonException { } } | JsonElement el = get ( index ) ; if ( ! el . isJsonArray ( ) ) { throw Util . typeMismatch ( index , el , "JsonArray" ) ; } return el . asJsonArray ( ) ; |
public class OcelotProcessor { /** * Get optional output directory
* @ param options
* @ return */
String getJsFramework ( Map < String , String > options ) { } } | if ( null != options ) { if ( options . containsKey ( ProcessorConstants . FRAMEWORK ) ) { return options . get ( ProcessorConstants . FRAMEWORK ) ; } } return null ; |
public class CastorDao { /** * sync / / / / / */
protected < L , S extends Persistable < L > > S _sync ( final Class < S > type , final S object ) { } } | if ( _LOG_ . isTraceEnabled ( ) ) { _LOG_ . trace ( "type: " + type . getName ( ) ) ; _LOG_ . trace ( "object: " + object ) ; } if ( object == null ) { return null ; } CastorDao < L , S > dao = getForwardingDao ( type ) ; S p_object = dao . _sync ( object ) ; return p_object ; |
public class CPDefinitionUtil { /** * Returns all the cp definitions where displayDate & lt ; & # 63 ; and status = & # 63 ; .
* @ param displayDate the display date
* @ param status the status
* @ return the matching cp definitions */
public static List < CPDefinition > findByLtD_S ( Date displayDate , int status ) { } } | return getPersistence ( ) . findByLtD_S ( displayDate , status ) ; |
public class ApiResponseConversionUtils { /** * Converts the given HTTP message into an { @ code ApiResponseSet } .
* @ param historyId the ID of the message
* @ param historyType the type of the message
* @ param msg the HTTP message to be converted
* @ return the { @ code ApiResponseSet } with the ID , type and the HTTP message
* @ since 2.6.0 */
public static ApiResponseSet < String > httpMessageToSet ( int historyId , int historyType , HttpMessage msg ) { } } | Map < String , String > map = new HashMap < > ( ) ; map . put ( "id" , String . valueOf ( historyId ) ) ; map . put ( "type" , String . valueOf ( historyType ) ) ; map . put ( "timestamp" , String . valueOf ( msg . getTimeSentMillis ( ) ) ) ; map . put ( "rtt" , String . valueOf ( msg . getTimeElapsedMillis ( ) ) ) ; map . put ( "cookieParams" , msg . getCookieParamsAsString ( ) ) ; map . put ( "note" , msg . getNote ( ) ) ; map . put ( "requestHeader" , msg . getRequestHeader ( ) . toString ( ) ) ; map . put ( "requestBody" , msg . getRequestBody ( ) . toString ( ) ) ; map . put ( "responseHeader" , msg . getResponseHeader ( ) . toString ( ) ) ; if ( HttpHeader . GZIP . equals ( msg . getResponseHeader ( ) . getHeader ( HttpHeader . CONTENT_ENCODING ) ) ) { // Uncompress gziped content
try ( ByteArrayInputStream bais = new ByteArrayInputStream ( msg . getResponseBody ( ) . getBytes ( ) ) ; GZIPInputStream gis = new GZIPInputStream ( bais ) ; InputStreamReader isr = new InputStreamReader ( gis ) ; BufferedReader br = new BufferedReader ( isr ) ; ) { StringBuilder sb = new StringBuilder ( ) ; String line = null ; while ( ( line = br . readLine ( ) ) != null ) { sb . append ( line ) ; } map . put ( "responseBody" , sb . toString ( ) ) ; } catch ( IOException e ) { LOGGER . error ( "Unable to uncompress gzip content: " + e . getMessage ( ) , e ) ; map . put ( "responseBody" , msg . getResponseBody ( ) . toString ( ) ) ; } } else { map . put ( "responseBody" , msg . getResponseBody ( ) . toString ( ) ) ; } List < String > tags = Collections . emptyList ( ) ; try { tags = HistoryReference . getTags ( historyId ) ; } catch ( DatabaseException e ) { LOGGER . warn ( "Failed to obtain the tags for message with ID " + historyId , e ) ; } return new HttpMessageResponseSet ( map , tags ) ; |
public class InteractionCoordinator { /** * Procedures of same kind ( same ID ) can coexist if they can be further distinguished . < br / >
* A typical example stock procedures ( save , load , etc ) that are registered for different origins ( interaction units ) .
* @ param procedure */
@ Override public void addProcedure ( Procedure procedure ) { } } | // TODO : verification of behaviour model
// known behaviour - > accept
// unknown behaviour - > issue warning
// provide context
procedure . setCoordinator ( this ) ; procedure . setStatementScope ( dialogState ) ; procedure . setRuntimeAPI ( this ) ; procedures . add ( procedure ) ; |
public class NameUtil { /** * Return the name of the MDB proxy class using the
* following template :
* The deployed name format is :
* < package name > . MDBProxy < bean name > _ < hashcode >
* Returns the name of the deployed class that implements the
* interface methods of the MDB bean . < p >
* See the NameUtil class overview documentation for a complete
* description of the deployed name format . An example for the
* MDB proxy implementation class name is as follows : < p >
* MDBProxyClaim _ 12345678
* @ return the name of the deployed class that implements the MDB
* interface methods . */
public String getMDBProxyClassName ( ) { } } | StringBuilder result = new StringBuilder ( ) ; // Use the package of the MDB implementation .
String packageName = packageName ( ivBeanClass ) ; if ( packageName != null ) { result . append ( packageName ) ; result . append ( '.' ) ; } result . append ( mdbProxyPrefix ) ; // MDBProxy
result . append ( ivBeanName ) ; // First 32 characters
result . append ( '_' ) ; result . append ( ivHashSuffix ) ; // 8 digit hashcode
return result . toString ( ) ; |
public class InternalXbaseWithAnnotationsParser { /** * InternalXbaseWithAnnotations . g : 2901:1 : ruleXListLiteral returns [ EObject current = null ] : ( ( ) otherlv _ 1 = ' # ' otherlv _ 2 = ' [ ' ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ? otherlv _ 6 = ' ] ' ) ; */
public final EObject ruleXListLiteral ( ) throws RecognitionException { } } | EObject current = null ; Token otherlv_1 = null ; Token otherlv_2 = null ; Token otherlv_4 = null ; Token otherlv_6 = null ; EObject lv_elements_3_0 = null ; EObject lv_elements_5_0 = null ; enterRule ( ) ; try { // InternalXbaseWithAnnotations . g : 2907:2 : ( ( ( ) otherlv _ 1 = ' # ' otherlv _ 2 = ' [ ' ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ? otherlv _ 6 = ' ] ' ) )
// InternalXbaseWithAnnotations . g : 2908:2 : ( ( ) otherlv _ 1 = ' # ' otherlv _ 2 = ' [ ' ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ? otherlv _ 6 = ' ] ' )
{ // InternalXbaseWithAnnotations . g : 2908:2 : ( ( ) otherlv _ 1 = ' # ' otherlv _ 2 = ' [ ' ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ? otherlv _ 6 = ' ] ' )
// InternalXbaseWithAnnotations . g : 2909:3 : ( ) otherlv _ 1 = ' # ' otherlv _ 2 = ' [ ' ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ? otherlv _ 6 = ' ] '
{ // InternalXbaseWithAnnotations . g : 2909:3 : ( )
// InternalXbaseWithAnnotations . g : 2910:4:
{ if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getXListLiteralAccess ( ) . getXListLiteralAction_0 ( ) , current ) ; } } otherlv_1 = ( Token ) match ( input , 18 , FOLLOW_10 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_1 , grammarAccess . getXListLiteralAccess ( ) . getNumberSignKeyword_1 ( ) ) ; } otherlv_2 = ( Token ) match ( input , 19 , FOLLOW_11 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_2 , grammarAccess . getXListLiteralAccess ( ) . getLeftSquareBracketKeyword_2 ( ) ) ; } // InternalXbaseWithAnnotations . g : 2924:3 : ( ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) * ) ?
int alt51 = 2 ; int LA51_0 = input . LA ( 1 ) ; if ( ( ( LA51_0 >= RULE_STRING && LA51_0 <= RULE_ID ) || LA51_0 == 14 || ( LA51_0 >= 18 && LA51_0 <= 19 ) || LA51_0 == 26 || ( LA51_0 >= 42 && LA51_0 <= 43 ) || LA51_0 == 48 || LA51_0 == 55 || LA51_0 == 59 || LA51_0 == 61 || ( LA51_0 >= 65 && LA51_0 <= 67 ) || ( LA51_0 >= 70 && LA51_0 <= 82 ) || LA51_0 == 84 ) ) { alt51 = 1 ; } switch ( alt51 ) { case 1 : // InternalXbaseWithAnnotations . g : 2925:4 : ( ( lv _ elements _ 3_0 = ruleXExpression ) ) ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) *
{ // InternalXbaseWithAnnotations . g : 2925:4 : ( ( lv _ elements _ 3_0 = ruleXExpression ) )
// InternalXbaseWithAnnotations . g : 2926:5 : ( lv _ elements _ 3_0 = ruleXExpression )
{ // InternalXbaseWithAnnotations . g : 2926:5 : ( lv _ elements _ 3_0 = ruleXExpression )
// InternalXbaseWithAnnotations . g : 2927:6 : lv _ elements _ 3_0 = ruleXExpression
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXListLiteralAccess ( ) . getElementsXExpressionParserRuleCall_3_0_0 ( ) ) ; } pushFollow ( FOLLOW_12 ) ; lv_elements_3_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXListLiteralRule ( ) ) ; } add ( current , "elements" , lv_elements_3_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalXbaseWithAnnotations . g : 2944:4 : ( otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) ) ) *
loop50 : do { int alt50 = 2 ; int LA50_0 = input . LA ( 1 ) ; if ( ( LA50_0 == 15 ) ) { alt50 = 1 ; } switch ( alt50 ) { case 1 : // InternalXbaseWithAnnotations . g : 2945:5 : otherlv _ 4 = ' , ' ( ( lv _ elements _ 5_0 = ruleXExpression ) )
{ otherlv_4 = ( Token ) match ( input , 15 , FOLLOW_9 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_4 , grammarAccess . getXListLiteralAccess ( ) . getCommaKeyword_3_1_0 ( ) ) ; } // InternalXbaseWithAnnotations . g : 2949:5 : ( ( lv _ elements _ 5_0 = ruleXExpression ) )
// InternalXbaseWithAnnotations . g : 2950:6 : ( lv _ elements _ 5_0 = ruleXExpression )
{ // InternalXbaseWithAnnotations . g : 2950:6 : ( lv _ elements _ 5_0 = ruleXExpression )
// InternalXbaseWithAnnotations . g : 2951:7 : lv _ elements _ 5_0 = ruleXExpression
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXListLiteralAccess ( ) . getElementsXExpressionParserRuleCall_3_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_12 ) ; lv_elements_5_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXListLiteralRule ( ) ) ; } add ( current , "elements" , lv_elements_5_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop50 ; } } while ( true ) ; } break ; } otherlv_6 = ( Token ) match ( input , 20 , FOLLOW_2 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_6 , grammarAccess . getXListLiteralAccess ( ) . getRightSquareBracketKeyword_4 ( ) ) ; } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ; |
public class SshConnectionFactory { /** * Creates a { @ link SshConnection } .
* @ param host the host name
* @ param port the port
* @ param authentication the credentials
* @ return a new connection .
* @ throws IOException if so .
* @ see SshConnection
* @ see SshConnectionImpl */
public static SshConnection getConnection ( String host , int port , Authentication authentication ) throws IOException { } } | return getConnection ( host , port , GerritDefaultValues . DEFAULT_GERRIT_PROXY , authentication ) ; |
public class Function { /** * Gets the rhsOperand value for this Function .
* @ return rhsOperand * Operand on the RHS of the equation . */
public com . google . api . ads . adwords . axis . v201809 . cm . FunctionArgumentOperand [ ] getRhsOperand ( ) { } } | return rhsOperand ; |
public class PriorityBlockingQueue { /** * Returns an array containing all of the elements in this queue ; the
* runtime type of the returned array is that of the specified array .
* The returned array elements are in no particular order .
* If the queue fits in the specified array , it is returned therein .
* Otherwise , a new array is allocated with the runtime type of the
* specified array and the size of this queue .
* < p > If this queue fits in the specified array with room to spare
* ( i . e . , the array has more elements than this queue ) , the element in
* the array immediately following the end of the queue is set to
* { @ code null } .
* < p > Like the { @ link # toArray ( ) } method , this method acts as bridge between
* array - based and collection - based APIs . Further , this method allows
* precise control over the runtime type of the output array , and may ,
* under certain circumstances , be used to save allocation costs .
* < p > Suppose { @ code x } is a queue known to contain only strings .
* The following code can be used to dump the queue into a newly
* allocated array of { @ code String } :
* < pre > { @ code String [ ] y = x . toArray ( new String [ 0 ] ) ; } < / pre >
* Note that { @ code toArray ( new Object [ 0 ] ) } is identical in function to
* { @ code toArray ( ) } .
* @ param a the array into which the elements of the queue are to
* be stored , if it is big enough ; otherwise , a new array of the
* same runtime type is allocated for this purpose
* @ return an array containing all of the elements in this queue
* @ throws ArrayStoreException if the runtime type of the specified array
* is not a supertype of the runtime type of every element in
* this queue
* @ throws NullPointerException if the specified array is null */
public < T > T [ ] toArray ( T [ ] a ) { } } | final ReentrantLock lock = this . lock ; lock . lock ( ) ; try { int n = size ; if ( a . length < n ) // Make a new array of a ' s runtime type , but my contents :
return ( T [ ] ) Arrays . copyOf ( queue , size , a . getClass ( ) ) ; System . arraycopy ( queue , 0 , a , 0 , n ) ; if ( a . length > n ) a [ n ] = null ; return a ; } finally { lock . unlock ( ) ; } |
public class ICalProperty { /** * Gets all values of a parameter with the given name .
* @ param name the parameter name ( case insensitive , e . g . " LANGUAGE " )
* @ return the parameter values ( this list is immutable ) */
public List < String > getParameters ( String name ) { } } | return Collections . unmodifiableList ( parameters . get ( name ) ) ; |
public class NumberSummaryStatistics { /** * Add all number summary statistics .
* @ param < N > the type parameter
* @ param numberStream the number stream
* @ return the number summary statistics */
public < N extends Number > NumberSummaryStatistics addAll ( Stream < N > numberStream ) { } } | return addAll ( numberStream . collect ( toList ( ) ) ) ; |
public class CeylonInstallJar { /** * Populates missing mojo parameters from the specified POM .
* @ param readModel The POM to extract missing artifact coordinates from ,
* must not be < code > null < / code > . */
private void processModel ( final Model readModel ) { } } | this . model = readModel ; Parent parent = readModel . getParent ( ) ; if ( this . groupId == null ) { this . groupId = readModel . getGroupId ( ) ; if ( this . groupId == null && parent != null ) { this . groupId = parent . getGroupId ( ) ; } } if ( this . artifactId == null ) { this . artifactId = readModel . getArtifactId ( ) ; } if ( this . version == null ) { this . version = readModel . getVersion ( ) ; if ( this . version == null && parent != null ) { this . version = parent . getVersion ( ) ; } } if ( this . packaging == null ) { this . packaging = readModel . getPackaging ( ) ; } |
public class bit { /** * Convert a binary representation of the given byte array to a string . The
* string has the following format :
* < pre >
* Byte : 3 2 1 0
* Array : " 11110011 | 10011101 | 0100000 | 00101010"
* Bit : 23 15 7 0
* < / pre >
* < i > Only the array string is printed . < / i >
* @ see # fromByteString ( String )
* @ param data the byte array to convert to a string .
* @ return the binary representation of the given byte array . */
public static String toByteString ( final byte ... data ) { } } | final StringBuilder out = new StringBuilder ( ) ; if ( data . length > 0 ) { for ( int j = 7 ; j >= 0 ; -- j ) { out . append ( ( data [ data . length - 1 ] >>> j ) & 1 ) ; } } for ( int i = data . length - 2 ; i >= 0 ; -- i ) { out . append ( '|' ) ; for ( int j = 7 ; j >= 0 ; -- j ) { out . append ( ( data [ i ] >>> j ) & 1 ) ; } } return out . toString ( ) ; |
public class WTableRenderer { /** * Paints a single column heading .
* @ param col the column to paint .
* @ param sortable true if the column is sortable , false otherwise
* @ param renderContext the RenderContext to paint to . */
private void paintColumnHeading ( final WTableColumn col , final boolean sortable , final WebXmlRenderContext renderContext ) { } } | XmlStringBuilder xml = renderContext . getWriter ( ) ; int width = col . getWidth ( ) ; Alignment align = col . getAlign ( ) ; xml . appendTagOpen ( "ui:th" ) ; xml . appendOptionalAttribute ( "width" , width > 0 , width ) ; xml . appendOptionalAttribute ( "sortable" , sortable , "true" ) ; if ( Alignment . RIGHT . equals ( align ) ) { xml . appendAttribute ( "align" , "right" ) ; } else if ( Alignment . CENTER . equals ( align ) ) { xml . appendAttribute ( "align" , "center" ) ; } xml . appendClose ( ) ; col . paint ( renderContext ) ; xml . appendEndTag ( "ui:th" ) ; |
public class PersistenceBrokerImpl { /** * retrieve an Object by query
* I . e perform a SELECT . . . FROM . . . WHERE . . . in an RDBMS */
public Object getObjectByQuery ( Query query ) throws PersistenceBrokerException { } } | Object result = null ; if ( query instanceof QueryByIdentity ) { // example obj may be an entity or an Identity
Object obj = query . getExampleObject ( ) ; if ( obj instanceof Identity ) { Identity oid = ( Identity ) obj ; result = getObjectByIdentity ( oid ) ; } else { // TODO : This workaround doesn ' t allow ' null ' for PK fields
if ( ! serviceBrokerHelper ( ) . hasNullPKField ( getClassDescriptor ( obj . getClass ( ) ) , obj ) ) { Identity oid = serviceIdentity ( ) . buildIdentity ( obj ) ; result = getObjectByIdentity ( oid ) ; } } } else { Class itemClass = query . getSearchClass ( ) ; ClassDescriptor cld = getClassDescriptor ( itemClass ) ; /* use OJB intern Iterator , thus we are able to close used
resources instantly */
OJBIterator it = getIteratorFromQuery ( query , cld ) ; /* arminw :
patch by Andre Clute , instead of taking the first found result
try to get the first found none null result .
He wrote :
I have a situation where an item with a certain criteria is in my
database twice - - once deleted , and then a non - deleted version of it .
When I do a PB . getObjectByQuery ( ) , the RsIterator get ' s both results
from the database , but the first row is the deleted row , so my RowReader
filters it out , and do not get the right result . */
try { while ( result == null && it . hasNext ( ) ) { result = it . next ( ) ; } } // make sure that we close the used resources
finally { if ( it != null ) it . releaseDbResources ( ) ; } } return result ; |
public class XmlUtils { /** * Return an XMLStreamWriter which indents the xml
* ( ideally XMLOutputFactory would support a property which would set this up for us to avoid a dependency
* on a com . sun . xml class , but it doesn ' t for the present time appear to do so ) */
public static XMLStreamWriter getIndentingXmlStreamWriter ( Writer writer ) throws XMLStreamException , IOException { } } | XMLOutputFactory f = XMLOutputFactory . newInstance ( ) ; return new IndentingXMLStreamWriter ( f . createXMLStreamWriter ( writer ) ) ; |
public class CmsRemovedElementDeletionDialog { /** * Gets a list of the dialog buttons . < p >
* @ return the list of dialog buttons */
private List < CmsPushButton > getDialogButtons ( ) { } } | List < CmsPushButton > result = new ArrayList < CmsPushButton > ( ) ; result . add ( m_cancelButton ) ; result . add ( m_okButton ) ; return result ; |
public class NetworkWatchersInner { /** * Verify IP flow from the specified VM to a location given the currently configured NSG rules .
* @ param resourceGroupName The name of the resource group .
* @ param networkWatcherName The name of the network watcher .
* @ param parameters Parameters that define the IP flow to be verified .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the VerificationIPFlowResultInner object */
public Observable < ServiceResponse < VerificationIPFlowResultInner > > beginVerifyIPFlowWithServiceResponseAsync ( String resourceGroupName , String networkWatcherName , VerificationIPFlowParameters parameters ) { } } | if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( networkWatcherName == null ) { throw new IllegalArgumentException ( "Parameter networkWatcherName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( parameters == null ) { throw new IllegalArgumentException ( "Parameter parameters is required and cannot be null." ) ; } Validator . validate ( parameters ) ; final String apiVersion = "2018-04-01" ; return service . beginVerifyIPFlow ( resourceGroupName , networkWatcherName , this . client . subscriptionId ( ) , parameters , apiVersion , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < VerificationIPFlowResultInner > > > ( ) { @ Override public Observable < ServiceResponse < VerificationIPFlowResultInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < VerificationIPFlowResultInner > clientResponse = beginVerifyIPFlowDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; |
public class BshClassPath { /** * Begin Static stuff */
static String [ ] traverseDirForClasses ( File dir ) throws IOException { } } | List list = traverseDirForClassesAux ( dir , dir ) ; return ( String [ ] ) list . toArray ( new String [ 0 ] ) ; |
public class CollectionDef { /** * < code > optional . tensorflow . CollectionDef . AnyList any _ list = 5 ; < / code > */
public org . tensorflow . framework . CollectionDef . AnyList getAnyList ( ) { } } | if ( kindCase_ == 5 ) { return ( org . tensorflow . framework . CollectionDef . AnyList ) kind_ ; } return org . tensorflow . framework . CollectionDef . AnyList . getDefaultInstance ( ) ; |
public class Tabs { /** * Method to reload the content of an Ajax tab programmatically within the ajax
* request
* @ param index
* Index tab to select
* @ param ajaxRequestTarget */
public void load ( AjaxRequestTarget ajaxRequestTarget , int index ) { } } | ajaxRequestTarget . appendJavaScript ( this . load ( index ) . render ( ) . toString ( ) ) ; |
public class DynamoDBReflector { /** * Returns whether the method given is a getter method we should serialize /
* deserialize to the service . The method must begin with " get " or " is " ,
* have no arguments , belong to a class that declares its table , and not be
* marked ignored . */
private boolean isRelevantGetter ( Method m ) { } } | return ( m . getName ( ) . startsWith ( "get" ) || m . getName ( ) . startsWith ( "is" ) ) && m . getParameterTypes ( ) . length == 0 && m . getDeclaringClass ( ) . getAnnotation ( DynamoDBTable . class ) != null && ! m . isAnnotationPresent ( DynamoDBIgnore . class ) ; |
public class SamlServiceProvider { /** * Creates a decorator which initiates a SAML authentication if a request is not authenticated . */
public Function < Service < HttpRequest , HttpResponse > , Service < HttpRequest , HttpResponse > > newSamlDecorator ( ) { } } | return delegate -> new SamlDecorator ( this , delegate ) ; |
public class QueuedSink { /** * so , setting up minimum threshold as 1 message per millisecond */
public long checkPause ( ) { } } | if ( pauseOnLongQueue && ( getNumOfPendingMessages ( ) > queue4Sink . remainingCapacity ( ) || getNumOfPendingMessages ( ) > MAX_PENDING_MESSAGES_TO_PAUSE ) ) { double throughputRate = Math . max ( throughput . meanRate ( ) , 1.0 ) ; return ( long ) ( getNumOfPendingMessages ( ) / throughputRate ) ; } else { return 0 ; } |
public class ProducerSessionProxy { /** * This helper method is used to send the final or only part of a message to our peer . It takes
* care of whether we should be exchanging the message and deals with the exceptions returned .
* @ param request The request buffer
* @ param jfapPriority The JFap priority to send the message
* @ param requireReply Whether we require a reply ( or fire - and - forget it )
* @ param tran The transaction being used to send the message ( may be null )
* @ param outboundSegmentType The segment type to exchange with
* @ param outboundNoReplySegmentType The segment type to fire - and - forget with
* @ param replySegmentType The segment type to expect on replies
* @ throws SIResourceException
* @ throws SISessionUnavailableException
* @ throws SINotPossibleInCurrentConfigurationException
* @ throws SIIncorrectCallException
* @ throws SIConnectionUnavailableException */
private void sendData ( CommsByteBuffer request , short jfapPriority , boolean requireReply , SITransaction tran , int outboundSegmentType , int outboundNoReplySegmentType , int replySegmentType ) throws SIResourceException , SISessionUnavailableException , SINotPossibleInCurrentConfigurationException , SIIncorrectCallException , SIConnectionUnavailableException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendData" , new Object [ ] { request , jfapPriority , requireReply , tran , outboundSegmentType , outboundNoReplySegmentType , replySegmentType } ) ; if ( requireReply ) { // Pass on call to server
CommsByteBuffer reply = jfapExchange ( request , outboundSegmentType , jfapPriority , false ) ; try { short err = reply . getCommandCompletionCode ( replySegmentType ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SISessionUnavailableException ( reply , err ) ; checkFor_SISessionDroppedException ( reply , err ) ; checkFor_SIConnectionUnavailableException ( reply , err ) ; checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SILimitExceededException ( reply , err ) ; checkFor_SINotAuthorizedException ( reply , err ) ; checkFor_SIIncorrectCallException ( reply , err ) ; checkFor_SINotPossibleInCurrentConfigurationException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } } else { jfapSend ( request , outboundNoReplySegmentType , jfapPriority , false , ThrottlingPolicy . BLOCK_THREAD ) ; // Update the lowest priority
if ( tran != null ) { ( ( Transaction ) tran ) . updateLowestMessagePriority ( jfapPriority ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "sendData" ) ; |
public class PrimitiveTransformation { /** * < code > . google . privacy . dlp . v2 . RedactConfig redact _ config = 2 ; < / code > */
public com . google . privacy . dlp . v2 . RedactConfigOrBuilder getRedactConfigOrBuilder ( ) { } } | if ( transformationCase_ == 2 ) { return ( com . google . privacy . dlp . v2 . RedactConfig ) transformation_ ; } return com . google . privacy . dlp . v2 . RedactConfig . getDefaultInstance ( ) ; |
public class ModificationExpansionRule { /** * { @ inheritDoc } */
@ Override public List < Statement > expand ( Term term ) { } } | List < Statement > statements = new ArrayList < Statement > ( ) ; // first argument of a protein mod term is the protein parameter
BELObject proteinArgument = term . getFunctionArguments ( ) . get ( 0 ) ; Parameter pp = ( Parameter ) proteinArgument ; // second argument of a protein mod term is the modification
BELObject modArgument = term . getFunctionArguments ( ) . get ( 1 ) ; Term mt = ( Term ) modArgument ; FunctionEnum fx = mt . getFunctionEnum ( ) ; Term proteinTrm = new Term ( PROTEIN_ABUNDANCE ) ; proteinTrm . addFunctionArgument ( pp ) ; Statement stmt = null ; final Object obj = new Object ( term ) ; if ( isMutation ( fx ) ) { // mutation
// protein term connects to its mutation with HAS _ VARIANT
// relationship
stmt = new Statement ( proteinTrm , null , null , obj , HAS_VARIANT ) ; } else { // modified protein
// protein term connects to its modification with HAS _ MODIFICATION
// relationship
stmt = new Statement ( proteinTrm , null , null , obj , HAS_MODIFICATION ) ; } attachExpansionRuleCitation ( stmt ) ; statements . add ( stmt ) ; return statements ; |
public class NotificationEntry { /** * Set a action to be fired when the notification content gets clicked .
* @ param listener
* @ param extra */
public void setContentAction ( Action . OnActionListener listener , Bundle extra ) { } } | setContentAction ( listener , null , null , null , extra ) ; |
public class ConstantsSummaryWriterImpl { /** * Add the row for the constant summary table .
* @ param member the field to be documented .
* @ param trTree an htmltree object for the table row */
private void addConstantMember ( FieldDoc member , HtmlTree trTree ) { } } | trTree . addContent ( getTypeColumn ( member ) ) ; trTree . addContent ( getNameColumn ( member ) ) ; trTree . addContent ( getValue ( member ) ) ; |
public class CPFriendlyURLEntryUtil { /** * Returns the cp friendly url entry where groupId = & # 63 ; and classNameId = & # 63 ; and languageId = & # 63 ; and urlTitle = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache .
* @ param groupId the group ID
* @ param classNameId the class name ID
* @ param languageId the language ID
* @ param urlTitle the url title
* @ return the matching cp friendly url entry , or < code > null < / code > if a matching cp friendly url entry could not be found */
public static CPFriendlyURLEntry fetchByG_C_L_U ( long groupId , long classNameId , String languageId , String urlTitle ) { } } | return getPersistence ( ) . fetchByG_C_L_U ( groupId , classNameId , languageId , urlTitle ) ; |
public class HttpURI { public void clear ( ) { } } | _uri = null ; _scheme = null ; _host = null ; _port = - 1 ; _path = null ; _param = null ; _query = null ; _fragment = null ; _decodedPath = null ; |
public class ReferenceDescriptorConstraints { /** * Ensures that the given reference descriptor has the class - ref property .
* @ param refDef The reference descriptor
* @ param checkLevel The current check level ( this constraint is checked in basic ( partly ) and strict )
* @ exception ConstraintException If a constraint has been violated */
private void ensureClassRef ( ReferenceDescriptorDef refDef , String checkLevel ) throws ConstraintException { } } | if ( CHECKLEVEL_NONE . equals ( checkLevel ) ) { return ; } if ( ! refDef . hasProperty ( PropertyHelper . OJB_PROPERTY_CLASS_REF ) ) { if ( refDef . hasProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_CLASS_REF ) ) { // we use the type of the reference variable
refDef . setProperty ( PropertyHelper . OJB_PROPERTY_CLASS_REF , refDef . getProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_CLASS_REF ) ) ; } else { throw new ConstraintException ( "Reference " + refDef . getName ( ) + " in class " + refDef . getOwner ( ) . getName ( ) + " does not reference any class" ) ; } } // now checking the type
ClassDescriptorDef ownerClassDef = ( ClassDescriptorDef ) refDef . getOwner ( ) ; ModelDef model = ( ModelDef ) ownerClassDef . getOwner ( ) ; String targetClassName = refDef . getProperty ( PropertyHelper . OJB_PROPERTY_CLASS_REF ) ; ClassDescriptorDef targetClassDef = model . getClass ( targetClassName ) ; if ( targetClassDef == null ) { throw new ConstraintException ( "The class " + targetClassName + " referenced by " + refDef . getName ( ) + " in class " + ownerClassDef . getName ( ) + " is unknown or not persistent" ) ; } if ( ! targetClassDef . getBooleanProperty ( PropertyHelper . OJB_PROPERTY_OJB_PERSISTENT , false ) ) { throw new ConstraintException ( "The class " + targetClassName + " referenced by " + refDef . getName ( ) + " in class " + ownerClassDef . getName ( ) + " is not persistent" ) ; } if ( CHECKLEVEL_STRICT . equals ( checkLevel ) ) { try { InheritanceHelper helper = new InheritanceHelper ( ) ; if ( refDef . isAnonymous ( ) ) { // anonymous reference : class must be a baseclass of the owner class
if ( ! helper . isSameOrSubTypeOf ( ownerClassDef , targetClassDef . getName ( ) , true ) ) { throw new ConstraintException ( "The class " + targetClassName + " referenced by the anonymous reference " + refDef . getName ( ) + " in class " + ownerClassDef . getName ( ) + " is not a basetype of the class" ) ; } } else { // specified element class must be a subtype of the variable type ( if it exists , i . e . not for anonymous references )
String varType = refDef . getProperty ( PropertyHelper . OJB_PROPERTY_VARIABLE_TYPE ) ; boolean performCheck = true ; // but we first check whether there is a useable type for the the variable type
if ( model . getClass ( varType ) == null ) { try { InheritanceHelper . getClass ( varType ) ; } catch ( ClassNotFoundException ex ) { // no , so defer the check but issue a warning
performCheck = false ; LogHelper . warn ( true , getClass ( ) , "ensureClassRef" , "Cannot check whether the type " + targetClassDef . getQualifiedName ( ) + " specified as class-ref at reference " + refDef . getName ( ) + " in class " + ownerClassDef . getName ( ) + " is assignable to the declared type " + varType + " of the reference because this variable type cannot be found in source or on the classpath" ) ; } } if ( performCheck && ! helper . isSameOrSubTypeOf ( targetClassDef , varType , true ) ) { throw new ConstraintException ( "The class " + targetClassName + " referenced by " + refDef . getName ( ) + " in class " + ownerClassDef . getName ( ) + " is not the same or a subtype of the variable type " + varType ) ; } } } catch ( ClassNotFoundException ex ) { throw new ConstraintException ( "Could not find the class " + ex . getMessage ( ) + " on the classpath while checking the reference " + refDef . getName ( ) + " in class " + refDef . getOwner ( ) . getName ( ) ) ; } } // we ' re adjusting the property to use the classloader - compatible form
refDef . setProperty ( PropertyHelper . OJB_PROPERTY_CLASS_REF , targetClassDef . getName ( ) ) ; |
public class MutableRoaringBitmap { /** * Set the specified values to true , within given boundaries . This can be expected to be slightly
* faster than calling " add " repeatedly . The provided integers values don ' t
* have to be in sorted order , but it may be preferable to sort them from a performance point of
* view .
* @ param dat set values
* @ param offset from which index the values should be set to true
* @ param n how many values should be set to true */
public void addN ( final int [ ] dat , final int offset , final int n ) { } } | MutableRoaringArray mra = ( MutableRoaringArray ) highLowContainer ; MappeableContainer currentcont = null ; short currenthb = 0 ; int currentcontainerindex = 0 ; int j = 0 ; if ( j < n ) { int val = dat [ j + offset ] ; currenthb = BufferUtil . highbits ( val ) ; currentcontainerindex = highLowContainer . getIndex ( currenthb ) ; if ( currentcontainerindex >= 0 ) { currentcont = highLowContainer . getContainerAtIndex ( currentcontainerindex ) ; MappeableContainer newcont = currentcont . add ( BufferUtil . lowbits ( val ) ) ; if ( newcont != currentcont ) { mra . setContainerAtIndex ( currentcontainerindex , newcont ) ; currentcont = newcont ; } } else { currentcontainerindex = - currentcontainerindex - 1 ; final MappeableArrayContainer newac = new MappeableArrayContainer ( ) ; currentcont = newac . add ( BufferUtil . lowbits ( val ) ) ; mra . insertNewKeyValueAt ( currentcontainerindex , currenthb , currentcont ) ; } j ++ ; } for ( ; j < n ; ++ j ) { int val = dat [ j + offset ] ; short newhb = BufferUtil . highbits ( val ) ; if ( currenthb == newhb ) { // easy case
// this could be quite frequent
MappeableContainer newcont = currentcont . add ( BufferUtil . lowbits ( val ) ) ; if ( newcont != currentcont ) { mra . setContainerAtIndex ( currentcontainerindex , newcont ) ; currentcont = newcont ; } } else { currenthb = newhb ; currentcontainerindex = highLowContainer . getIndex ( currenthb ) ; if ( currentcontainerindex >= 0 ) { currentcont = highLowContainer . getContainerAtIndex ( currentcontainerindex ) ; MappeableContainer newcont = currentcont . add ( BufferUtil . lowbits ( val ) ) ; if ( newcont != currentcont ) { mra . setContainerAtIndex ( currentcontainerindex , newcont ) ; currentcont = newcont ; } } else { currentcontainerindex = - currentcontainerindex - 1 ; final MappeableArrayContainer newac = new MappeableArrayContainer ( ) ; currentcont = newac . add ( BufferUtil . lowbits ( val ) ) ; mra . insertNewKeyValueAt ( currentcontainerindex , currenthb , currentcont ) ; } } } |
public class FieldUtils { /** * Gets an accessible { @ link Field } by name , breaking scope if requested . Only the specified class will be
* considered .
* @ param cls
* the { @ link Class } to reflect , must not be { @ code null }
* @ param fieldName
* the field name to obtain
* @ param forceAccess
* whether to break scope restrictions using the
* { @ link java . lang . reflect . AccessibleObject # setAccessible ( boolean ) } method . { @ code false } will only
* match { @ code public } fields .
* @ return the Field object
* @ throws IllegalArgumentException
* if the class is { @ code null } , or the field name is blank or empty */
public static Field getDeclaredField ( final Class < ? > cls , final String fieldName , final boolean forceAccess ) { } } | Validate . isTrue ( cls != null , "The class must not be null" ) ; Validate . isTrue ( StringUtils . isNotBlank ( fieldName ) , "The field name must not be blank/empty" ) ; try { // only consider the specified class by using getDeclaredField ( )
final Field field = cls . getDeclaredField ( fieldName ) ; if ( ! MemberUtils . isAccessible ( field ) ) { if ( forceAccess ) { field . setAccessible ( true ) ; } else { return null ; } } return field ; } catch ( final NoSuchFieldException e ) { // NOPMD
// ignore
} return null ; |
public class TransactionException { /** * Thrown when a Type has incoming edges and therefore cannot be deleted */
public static TransactionException cannotBeDeleted ( SchemaConcept schemaConcept ) { } } | return create ( ErrorMessage . CANNOT_DELETE . getMessage ( schemaConcept . label ( ) ) ) ; |
public class IOUtils { /** * < p > getJarManifestValue . < / p >
* @ param clazz a { @ link java . lang . Class } object .
* @ param attrName a { @ link java . lang . String } object .
* @ return a { @ link java . lang . String } object . */
public static String getJarManifestValue ( Class clazz , String attrName ) { } } | URL url = getResource ( "/" + clazz . getName ( ) . replace ( '.' , '/' ) + ".class" ) ; if ( url != null ) try { URLConnection uc = url . openConnection ( ) ; if ( uc instanceof java . net . JarURLConnection ) { JarURLConnection juc = ( JarURLConnection ) uc ; Manifest m = juc . getManifest ( ) ; return m . getMainAttributes ( ) . getValue ( attrName ) ; } } catch ( IOException e ) { return null ; } return null ; |
public class PoolablePreparedStatement { /** * Method setURL .
* @ param parameterIndex
* @ param x
* @ throws SQLException
* @ see java . sql . PreparedStatement # setURL ( int , URL ) */
@ Override public void setURL ( int parameterIndex , URL x ) throws SQLException { } } | internalStmt . setURL ( parameterIndex , x ) ; |
public class DescribeGameSessionQueuesResult { /** * Collection of objects that describes the requested game session queues .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setGameSessionQueues ( java . util . Collection ) } or { @ link # withGameSessionQueues ( java . util . Collection ) } if
* you want to override the existing values .
* @ param gameSessionQueues
* Collection of objects that describes the requested game session queues .
* @ return Returns a reference to this object so that method calls can be chained together . */
public DescribeGameSessionQueuesResult withGameSessionQueues ( GameSessionQueue ... gameSessionQueues ) { } } | if ( this . gameSessionQueues == null ) { setGameSessionQueues ( new java . util . ArrayList < GameSessionQueue > ( gameSessionQueues . length ) ) ; } for ( GameSessionQueue ele : gameSessionQueues ) { this . gameSessionQueues . add ( ele ) ; } return this ; |
public class Choice5 { /** * Specialize this choice ' s projection to a { @ link Tuple5 } .
* @ return a { @ link Tuple5} */
@ Override public Tuple5 < Maybe < A > , Maybe < B > , Maybe < C > , Maybe < D > , Maybe < E > > project ( ) { } } | return into5 ( HList :: tuple , CoProduct5 . super . project ( ) ) ; |
public class JmsMessageImpl { /** * Clear special case properties held in this
* message . Invoked at send time . */
void clearLocalProperties ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "clearLocalProperties" ) ; if ( locallyStoredPropertyValues != null ) locallyStoredPropertyValues . clear ( ) ; // d255144 Also clear the local version of the messageID
localJMSMessageID = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "clearLocalProperties" ) ; |
public class AliasDestinationHandler { /** * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # choosePtoPOutputHandler ( com . ibm . ws . sib . mfp . JsDestinationAddress ) */
@ Override public OutputHandler choosePtoPOutputHandler ( SIBUuid8 fixedMEUuid , SIBUuid8 preferredMEUuid , boolean localMessage , boolean forcePut , HashSet < SIBUuid8 > scopedMEs ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "choosePtoPOutputHandler" , new Object [ ] { fixedMEUuid , preferredMEUuid , localMessage , forcePut , scopedMEs } ) ; OutputHandler result = null ; boolean error = false ; // We ' re an alias so we should never be called with a scoped ME set
if ( scopedMEs != null ) { SIMPErrorException e = new SIMPErrorException ( "Alias called with scoped ME set" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exception ( tc , e ) ; } e . setExceptionReason ( SIRCConstants . SIRC0901_INTERNAL_MESSAGING_ERROR ) ; e . setExceptionInserts ( new String [ ] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage" , "1:750:1.71.2.6" , SIMPUtils . getStackTrace ( e ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "choosePtoPOutputHandlers" , e ) ; throw e ; } // Pull out any scoped ME set that we have configured
SIBUuid8 singleScopedME = null ; HashSet < SIBUuid8 > definedScopedMEs = null ; // If this is an alias that ' s scoped the message points of the target destination
// then we need to pass these onto the target .
if ( _hasScopedMessagePoints ) { if ( _singleScopedQueuePointME != null ) singleScopedME = _singleScopedQueuePointME ; else definedScopedMEs = _scopedQueuePointMEs ; // If the caller has fixed an ME , first check it ' s in our set
if ( fixedMEUuid != null ) { if ( ( singleScopedME != null ) && ! fixedMEUuid . equals ( singleScopedME ) ) error = true ; else if ( ( definedScopedMEs != null ) && ! definedScopedMEs . contains ( fixedMEUuid ) ) error = true ; } // If we have a single ME scoped by this alias we may as pass it to the target as
// a fixed ME ( which it must match as we ' ve already checked that ) to save
// having to parse a HashSet everywhere for no need .
if ( singleScopedME != null ) fixedMEUuid = singleScopedME ; } // Look to the resolved destination to choose an output handler as the
// alias destination doesnt store any messages
if ( ! error ) result = _targetDestinationHandler . choosePtoPOutputHandler ( fixedMEUuid , preferredMEUuid , localMessage , forcePut , definedScopedMEs ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "choosePtoPOutputHandler" , result ) ; return result ; |
public class ElementMatchers { /** * Matches a field ' s generic type against the provided matcher .
* @ param fieldType The field type to match .
* @ param < T > The type of the matched object .
* @ return A matcher matching the provided field type . */
public static < T extends FieldDescription > ElementMatcher . Junction < T > genericFieldType ( Type fieldType ) { } } | return genericFieldType ( TypeDefinition . Sort . describe ( fieldType ) ) ; |
public class TeletextSourceSettingsMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TeletextSourceSettings teletextSourceSettings , ProtocolMarshaller protocolMarshaller ) { } } | if ( teletextSourceSettings == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( teletextSourceSettings . getPageNumber ( ) , PAGENUMBER_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class AbstractIntDoubleMap { /** * Returns the first key the given value is associated with .
* It is often a good idea to first check with { @ link # containsValue ( double ) } whether there exists an association from a key to this value .
* Search order is guaranteed to be < i > identical < / i > to the order used by method { @ link # forEachKey ( IntProcedure ) } .
* @ param value the value to search for .
* @ return the first key for which holds < tt > get ( key ) = = value < / tt > ;
* returns < tt > Integer . MIN _ VALUE < / tt > if no such key exists . */
public int keyOf ( final double value ) { } } | final int [ ] foundKey = new int [ 1 ] ; boolean notFound = forEachPair ( new IntDoubleProcedure ( ) { public boolean apply ( int iterKey , double iterValue ) { boolean found = value == iterValue ; if ( found ) foundKey [ 0 ] = iterKey ; return ! found ; } } ) ; if ( notFound ) return Integer . MIN_VALUE ; return foundKey [ 0 ] ; |
public class JMLambda { /** * Merge map .
* @ param < T > the type parameter
* @ param < R > the type parameter
* @ param stream the stream
* @ return the map */
public static < T , R > Map < R , T > merge ( Stream < Map < R , T > > stream ) { } } | return stream . collect ( HashMap :: new , Map :: putAll , Map :: putAll ) ; |
public class PathMatchingResourcePatternResolver { /** * Search all { @ link URLClassLoader } URLs for jar file references and add them to the
* given set of resources in the form of pointers to the root of the jar file content .
* @ param classLoader the ClassLoader to search ( including its ancestors )
* @ param result the set of resources to add jar roots to */
protected void addAllClassLoaderJarRoots ( ClassLoader classLoader , Set < Resource > result ) { } } | if ( classLoader instanceof URLClassLoader ) { try { for ( URL url : ( ( URLClassLoader ) classLoader ) . getURLs ( ) ) { if ( ResourceUtils . isJarFileURL ( url ) ) { try { UrlResource jarResource = new UrlResource ( ResourceUtils . JAR_URL_PREFIX + url . toString ( ) + ResourceUtils . JAR_URL_SEPARATOR ) ; if ( jarResource . exists ( ) ) { result . add ( jarResource ) ; } } catch ( MalformedURLException ex ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Cannot search for matching files underneath [" + url + "] because it cannot be converted to a valid 'jar:' URL: " + ex . getMessage ( ) ) ; } } } } } catch ( Exception ex ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Cannot introspect jar files since ClassLoader [" + classLoader + "] does not support 'getURLs()': " + ex ) ; } } } if ( classLoader != null ) { try { addAllClassLoaderJarRoots ( classLoader . getParent ( ) , result ) ; } catch ( Exception ex ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Cannot introspect jar files in parent ClassLoader since [" + classLoader + "] does not support 'getParent()': " + ex ) ; } } } |
public class XXHash32 { /** * Computes the hash of the given { @ link ByteBuffer } . The
* { @ link ByteBuffer # position ( ) position } is moved in order to reflect bytes
* which have been read .
* @ param buf the input data
* @ param seed the seed to use
* @ return the hash value */
public final int hash ( ByteBuffer buf , int seed ) { } } | final int hash = hash ( buf , buf . position ( ) , buf . remaining ( ) , seed ) ; buf . position ( buf . limit ( ) ) ; return hash ; |
public class FileUtils { /** * Compare two strings , with case sensitivity determined by the operating system .
* @ param s1 the first String to compare .
* @ param s2 the second String to compare .
* @ return < code > true < / code > when :
* < ul >
* < li > the strings match exactly ( including case ) , or , < / li >
* < li > the operating system is not case - sensitive with regard to file names , and the strings match ,
* ignoring case . < / li >
* < / ul >
* @ see # isOSCaseSensitive ( ) */
public static boolean osSensitiveEquals ( String s1 , String s2 ) { } } | if ( OS_CASE_SENSITIVE ) { return s1 . equals ( s2 ) ; } else { return s1 . equalsIgnoreCase ( s2 ) ; } |
public class ListManagementImageListsImpl { /** * Refreshes the index of the list with list Id equal to list Id passed .
* @ param listId List Id of the image list .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < RefreshIndex > refreshIndexMethodAsync ( String listId , final ServiceCallback < RefreshIndex > serviceCallback ) { } } | return ServiceFuture . fromResponse ( refreshIndexMethodWithServiceResponseAsync ( listId ) , serviceCallback ) ; |
public class LocalsStateGenerators { /** * Generates instructions to load the local variables table .
* @ param markerType debug marker type
* @ param storageVars variables to load locals from
* @ param frame execution frame at the instruction for which the local variables table is to be restored
* @ return instructions to load the local variables table from an array
* @ throws NullPointerException if any argument is { @ code null } */
public static InsnList loadLocals ( MarkerType markerType , StorageVariables storageVars , Frame < BasicValue > frame ) { } } | Validate . notNull ( markerType ) ; Validate . notNull ( storageVars ) ; Validate . notNull ( frame ) ; Variable intsVar = storageVars . getIntStorageVar ( ) ; Variable floatsVar = storageVars . getFloatStorageVar ( ) ; Variable longsVar = storageVars . getLongStorageVar ( ) ; Variable doublesVar = storageVars . getDoubleStorageVar ( ) ; Variable objectsVar = storageVars . getObjectStorageVar ( ) ; int intsCounter = 0 ; int floatsCounter = 0 ; int longsCounter = 0 ; int doublesCounter = 0 ; int objectsCounter = 0 ; InsnList ret = new InsnList ( ) ; // Load the locals
ret . add ( debugMarker ( markerType , "Loading locals" ) ) ; for ( int i = 0 ; i < frame . getLocals ( ) ; i ++ ) { BasicValue basicValue = frame . getLocal ( i ) ; Type type = basicValue . getType ( ) ; // If type = = null , basicValue is pointing to uninitialized var - - basicValue . toString ( ) will return " . " . This means that this
// slot contains nothing to load . So , skip this slot if we encounter it ( such that it will remain uninitialized ) .
if ( type == null ) { ret . add ( debugMarker ( markerType , "Skipping uninitialized value at " + i ) ) ; continue ; } // If type is ' Lnull ; ' , this means that the slot has been assigned null and that " there has been no merge yet that would ' raise '
// the type toward some class or interface type " ( from ASM mailing list ) . We know this slot will always contain null at this
// point in the code so there ' s no specific value to load up from the array . Instead we push a null in to that slot , thereby
// keeping the same ' Lnull ; ' type originally assigned to that slot ( it doesn ' t make sense to do a CHECKCAST because ' null ' is
// not a real class and can never be a real class - - null is a reserved word in Java ) .
if ( type . getSort ( ) == Type . OBJECT && "Lnull;" . equals ( type . getDescriptor ( ) ) ) { ret . add ( debugMarker ( markerType , "Putting null value at " + i ) ) ; ret . add ( new InsnNode ( Opcodes . ACONST_NULL ) ) ; ret . add ( new VarInsnNode ( Opcodes . ASTORE , i ) ) ; continue ; } // Load the locals
switch ( type . getSort ( ) ) { case Type . BOOLEAN : case Type . BYTE : case Type . SHORT : case Type . CHAR : case Type . INT : ret . add ( debugMarker ( markerType , "Loading int to LVT index " + i + " from storage index " + intsCounter ) ) ; ret . add ( new VarInsnNode ( Opcodes . ALOAD , intsVar . getIndex ( ) ) ) ; // [ int [ ] ]
ret . add ( new LdcInsnNode ( intsCounter ) ) ; // [ int [ ] , idx ]
ret . add ( new InsnNode ( Opcodes . IALOAD ) ) ; // [ val ]
ret . add ( new VarInsnNode ( Opcodes . ISTORE , i ) ) ; intsCounter ++ ; break ; case Type . FLOAT : ret . add ( debugMarker ( markerType , "Loading float to LVT index " + i + " from storage index " + floatsCounter ) ) ; ret . add ( new VarInsnNode ( Opcodes . ALOAD , floatsVar . getIndex ( ) ) ) ; // [ float [ ] ]
ret . add ( new LdcInsnNode ( floatsCounter ) ) ; // [ float [ ] , idx ]
ret . add ( new InsnNode ( Opcodes . FALOAD ) ) ; // [ val ]
ret . add ( new VarInsnNode ( Opcodes . FSTORE , i ) ) ; floatsCounter ++ ; break ; case Type . LONG : ret . add ( debugMarker ( markerType , "Loading long to LVT index " + i + " from storage index " + longsCounter ) ) ; ret . add ( new VarInsnNode ( Opcodes . ALOAD , longsVar . getIndex ( ) ) ) ; // [ long [ ] ]
ret . add ( new LdcInsnNode ( longsCounter ) ) ; // [ long [ ] , idx ]
ret . add ( new InsnNode ( Opcodes . LALOAD ) ) ; // [ val _ PART1 , val _ PART2]
ret . add ( new VarInsnNode ( Opcodes . LSTORE , i ) ) ; longsCounter ++ ; break ; case Type . DOUBLE : ret . add ( debugMarker ( markerType , "Loading double to LVT index " + i + " from storage index " + doublesCounter ) ) ; ret . add ( new VarInsnNode ( Opcodes . ALOAD , doublesVar . getIndex ( ) ) ) ; // [ double [ ] ]
ret . add ( new LdcInsnNode ( doublesCounter ) ) ; // [ double [ ] , idx ]
ret . add ( new InsnNode ( Opcodes . DALOAD ) ) ; // [ val _ PART1 , val _ PART2]
ret . add ( new VarInsnNode ( Opcodes . DSTORE , i ) ) ; doublesCounter ++ ; break ; case Type . ARRAY : case Type . OBJECT : ret . add ( debugMarker ( markerType , "Loading object to LVT index " + i + " from storage index " + objectsCounter ) ) ; ret . add ( new VarInsnNode ( Opcodes . ALOAD , objectsVar . getIndex ( ) ) ) ; // [ Object [ ] ]
ret . add ( new LdcInsnNode ( objectsCounter ) ) ; // [ Object [ ] , idx ]
ret . add ( new InsnNode ( Opcodes . AALOAD ) ) ; // [ val ]
// must cast , otherwise the jvm won ' t know the type that ' s in the localvariable slot and it ' ll fail when the code tries
// to access a method / field on it
ret . add ( new TypeInsnNode ( Opcodes . CHECKCAST , basicValue . getType ( ) . getInternalName ( ) ) ) ; ret . add ( new VarInsnNode ( Opcodes . ASTORE , i ) ) ; objectsCounter ++ ; break ; case Type . METHOD : case Type . VOID : default : throw new IllegalStateException ( ) ; } } return ret ; |
public class DoubleArrayTrie { /** * 将自己序列化到
* @ param path
* @ return */
public boolean serializeTo ( String path ) { } } | ObjectOutputStream out = null ; try { out = new ObjectOutputStream ( IOUtil . newOutputStream ( path ) ) ; out . writeObject ( this ) ; } catch ( Exception e ) { // e . printStackTrace ( ) ;
return false ; } return true ; |
public class RecordingReader { /** * Add the requested query string arguments to the Request .
* @ param request Request to add query string arguments to */
private void addQueryParams ( final Request request ) { } } | if ( absoluteDateCreated != null ) { request . addQueryParam ( "DateCreated" , absoluteDateCreated . toString ( Request . QUERY_STRING_DATE_FORMAT ) ) ; } else if ( rangeDateCreated != null ) { request . addQueryDateRange ( "DateCreated" , rangeDateCreated ) ; } if ( getPageSize ( ) != null ) { request . addQueryParam ( "PageSize" , Integer . toString ( getPageSize ( ) ) ) ; } |
public class SkillsApi { /** * Get character skills ( asynchronously ) List all trained skills for the
* given character - - - This route is cached for up to 120 seconds SSO Scope :
* esi - skills . read _ skills . v1
* @ param characterId
* An EVE character ID ( required )
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* @ param ifNoneMatch
* ETag from a previous request . A 304 will be returned if this
* matches the current ETag ( optional )
* @ param token
* Access token to use if unable to set a header ( optional )
* @ param callback
* The callback to be executed when the API call finishes
* @ return The request call
* @ throws ApiException
* If fail to process the API call , e . g . serializing the request
* body object */
public com . squareup . okhttp . Call getCharactersCharacterIdSkillsAsync ( Integer characterId , String datasource , String ifNoneMatch , String token , final ApiCallback < CharacterSkillsResponse > callback ) throws ApiException { } } | com . squareup . okhttp . Call call = getCharactersCharacterIdSkillsValidateBeforeCall ( characterId , datasource , ifNoneMatch , token , callback ) ; Type localVarReturnType = new TypeToken < CharacterSkillsResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ; |
public class EquinoxClassLoaderHandler { /** * Add the bundle file .
* @ param bundlefile
* the bundle file
* @ param path
* the path
* @ param classLoader
* the classloader
* @ param classpathOrderOut
* the classpath order
* @ param scanSpec
* the scan spec
* @ param log
* the log */
private static void addBundleFile ( final Object bundlefile , final Set < Object > path , final ClassLoader classLoader , final ClasspathOrder classpathOrderOut , final ScanSpec scanSpec , final LogNode log ) { } } | // Don ' t get stuck in infinite loop
if ( bundlefile != null && path . add ( bundlefile ) ) { // type File
final Object basefile = ReflectionUtils . getFieldVal ( bundlefile , "basefile" , false ) ; if ( basefile != null ) { boolean foundClassPathElement = false ; for ( final String fieldName : FIELD_NAMES ) { final Object fieldVal = ReflectionUtils . getFieldVal ( bundlefile , fieldName , false ) ; foundClassPathElement = fieldVal != null ; if ( foundClassPathElement ) { // We found the base file and a classpath element , e . g . " bin / "
classpathOrderOut . addClasspathEntry ( basefile . toString ( ) + "/" + fieldVal . toString ( ) , classLoader , scanSpec , log ) ; break ; } } if ( ! foundClassPathElement ) { // No classpath element found , just use basefile
classpathOrderOut . addClasspathEntry ( basefile . toString ( ) , classLoader , scanSpec , log ) ; } } addBundleFile ( ReflectionUtils . getFieldVal ( bundlefile , "wrapped" , false ) , path , classLoader , classpathOrderOut , scanSpec , log ) ; addBundleFile ( ReflectionUtils . getFieldVal ( bundlefile , "next" , false ) , path , classLoader , classpathOrderOut , scanSpec , log ) ; } |
public class CacheConfigurationBuilder { /** * Adds or updates the { @ link DefaultSizeOfEngineConfiguration } with the specified object graph maximum size to the configured
* builder .
* { @ link SizeOfEngine } is what enables the heap tier to be sized in { @ link MemoryUnit } .
* @ param size the maximum graph size
* @ return a new builder with the added / updated configuration */
public CacheConfigurationBuilder < K , V > withSizeOfMaxObjectGraph ( long size ) { } } | return mapServiceConfiguration ( DefaultSizeOfEngineConfiguration . class , existing -> ofNullable ( existing ) . map ( e -> new DefaultSizeOfEngineConfiguration ( e . getMaxObjectSize ( ) , e . getUnit ( ) , size ) ) . orElse ( new DefaultSizeOfEngineConfiguration ( DEFAULT_MAX_OBJECT_SIZE , DEFAULT_UNIT , size ) ) ) ; |
public class Main { /** * Validator standalone tool
* @ param args command line arguments */
public static void main ( String [ ] args ) { } } | boolean quiet = false ; String outputDir = "." ; // put report into current directory by default
int arg = 0 ; String [ ] classpath = null ; if ( args . length > 0 ) { while ( args . length > arg + 1 ) { if ( args [ arg ] . startsWith ( "-" ) ) { if ( args [ arg ] . endsWith ( "quiet" ) ) { quiet = true ; } else if ( args [ arg ] . endsWith ( "output" ) ) { arg ++ ; if ( arg + 1 >= args . length ) { usage ( ) ; System . exit ( OTHER ) ; } outputDir = args [ arg ] ; } else if ( args [ arg ] . endsWith ( "classpath" ) ) { arg ++ ; classpath = args [ arg ] . split ( System . getProperty ( "path.separator" ) ) ; } } else { usage ( ) ; System . exit ( OTHER ) ; } arg ++ ; } try { int systemExitCode = Validation . validate ( new File ( args [ arg ] ) . toURI ( ) . toURL ( ) , outputDir , classpath ) ; if ( ! quiet ) { if ( systemExitCode == SUCCESS ) { System . out . println ( "Validation sucessful" ) ; } else if ( systemExitCode == FAIL ) { System . out . println ( "Validation errors" ) ; } else if ( systemExitCode == OTHER ) { System . out . println ( "Validation unknown" ) ; } } System . exit ( systemExitCode ) ; } catch ( ArrayIndexOutOfBoundsException oe ) { usage ( ) ; System . exit ( OTHER ) ; } catch ( MalformedURLException e ) { e . printStackTrace ( ) ; } } else { usage ( ) ; } System . exit ( SUCCESS ) ; |
public class CodingUtil { /** * AES解密 */
public static String decryptToAes ( String content , String pwd ) { } } | if ( StringUtil . isEmpty ( content ) || StringUtil . isEmpty ( pwd ) ) { return null ; } try { SecretKeySpec key = new SecretKeySpec ( getKey ( pwd ) . getEncoded ( ) , AES ) ; Cipher cipher = Cipher . getInstance ( AES ) ; cipher . init ( Cipher . DECRYPT_MODE , key ) ; byte [ ] result = cipher . doFinal ( hexToByte ( content ) ) ; return new String ( result ) ; } catch ( NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | BadPaddingException | IllegalBlockSizeException e ) { LOG . error ( e ) ; } return null ; |
public class DescribeTapeArchivesResult { /** * An array of virtual tape objects in the virtual tape shelf ( VTS ) . The description includes of the Amazon Resource
* Name ( ARN ) of the virtual tapes . The information returned includes the Amazon Resource Names ( ARNs ) of the tapes ,
* size of the tapes , status of the tapes , progress of the description and tape barcode .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setTapeArchives ( java . util . Collection ) } or { @ link # withTapeArchives ( java . util . Collection ) } if you want to
* override the existing values .
* @ param tapeArchives
* An array of virtual tape objects in the virtual tape shelf ( VTS ) . The description includes of the Amazon
* Resource Name ( ARN ) of the virtual tapes . The information returned includes the Amazon Resource Names
* ( ARNs ) of the tapes , size of the tapes , status of the tapes , progress of the description and tape barcode .
* @ return Returns a reference to this object so that method calls can be chained together . */
public DescribeTapeArchivesResult withTapeArchives ( TapeArchive ... tapeArchives ) { } } | if ( this . tapeArchives == null ) { setTapeArchives ( new com . amazonaws . internal . SdkInternalList < TapeArchive > ( tapeArchives . length ) ) ; } for ( TapeArchive ele : tapeArchives ) { this . tapeArchives . add ( ele ) ; } return this ; |
public class HibernateClient { /** * ( non - Javadoc )
* @ see com . impetus . kundera . client . Client # find ( java . lang . Class ,
* java . lang . String ) */
@ Override public Object find ( Class clazz , Object key ) { } } | s = getStatelessSession ( ) ; Object result = null ; try { result = s . get ( clazz , ( Serializable ) key ) ; } catch ( ClassCastException ccex ) { log . error ( "Class can not be serializable, Caused by {}." , ccex ) ; throw new KunderaException ( ccex ) ; } catch ( Exception e ) { log . error ( "Error while finding, Caused by {}. " , e ) ; throw new KunderaException ( e ) ; } return result ; |
public class StringUtils { /** * Removes any whitespace from a String , correctly handling surrogate characters
* @ param string String to process
* @ return String with any whitespace removed */
public static String removeWhitespace ( String string ) { } } | if ( string == null || string . length ( ) == 0 ) { return string ; } else { int codePoints = string . codePointCount ( 0 , string . length ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < codePoints ; i ++ ) { int offset = string . offsetByCodePoints ( 0 , i ) ; int nextCodePoint = string . codePointAt ( offset ) ; if ( ! Character . isWhitespace ( nextCodePoint ) ) { sb . appendCodePoint ( nextCodePoint ) ; } } if ( string . length ( ) == sb . length ( ) ) { return string ; } else { return sb . toString ( ) ; } } |
public class LottieAnimationView { /** * Sets a composition .
* You can set a default cache strategy if this view was inflated with xml by
* using { @ link R . attr # lottie _ cacheStrategy } . */
public void setComposition ( @ NonNull LottieComposition composition ) { } } | if ( L . DBG ) { Log . v ( TAG , "Set Composition \n" + composition ) ; } lottieDrawable . setCallback ( this ) ; this . composition = composition ; boolean isNewComposition = lottieDrawable . setComposition ( composition ) ; enableOrDisableHardwareLayer ( ) ; if ( getDrawable ( ) == lottieDrawable && ! isNewComposition ) { // We can avoid re - setting the drawable , and invalidating the view , since the composition
// hasn ' t changed .
return ; } // If you set a different composition on the view , the bounds will not update unless
// the drawable is different than the original .
setImageDrawable ( null ) ; setImageDrawable ( lottieDrawable ) ; requestLayout ( ) ; for ( LottieOnCompositionLoadedListener lottieOnCompositionLoadedListener : lottieOnCompositionLoadedListeners ) { lottieOnCompositionLoadedListener . onCompositionLoaded ( composition ) ; } |
public class RelaxNGDefaultsComponent { /** * This method is copied from com . icl . saxon . ProcInstParser and used in the
* PIFinder
* Interpret character references and built - in entity references */
private String unescape ( String value ) { } } | if ( value . indexOf ( '&' ) < 0 ) { return value ; } StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < value . length ( ) ; i ++ ) { char c = value . charAt ( i ) ; if ( c == '&' ) { if ( i + 2 < value . length ( ) && value . charAt ( i + 1 ) == '#' ) { if ( value . charAt ( i + 2 ) == 'x' ) { int x = i + 3 ; int charval = 0 ; while ( x < value . length ( ) && value . charAt ( x ) != ';' ) { int digit = "0123456789abcdef" . indexOf ( value . charAt ( x ) ) ; if ( digit < 0 ) { digit = "0123456789ABCDEF" . indexOf ( value . charAt ( x ) ) ; } if ( digit < 0 ) { return null ; } charval = charval * 16 + digit ; x ++ ; } char hexchar = ( char ) charval ; sb . append ( hexchar ) ; i = x ; } else { int x = i + 2 ; int charval = 0 ; while ( x < value . length ( ) && value . charAt ( x ) != ';' ) { int digit = "0123456789" . indexOf ( value . charAt ( x ) ) ; if ( digit < 0 ) { return null ; } charval = charval * 10 + digit ; x ++ ; } char decchar = ( char ) charval ; sb . append ( decchar ) ; i = x ; } } else if ( value . substring ( i + 1 ) . startsWith ( "lt;" ) ) { sb . append ( '<' ) ; i += 3 ; } else if ( value . substring ( i + 1 ) . startsWith ( "gt;" ) ) { sb . append ( '>' ) ; i += 3 ; } else if ( value . substring ( i + 1 ) . startsWith ( "amp;" ) ) { sb . append ( '&' ) ; i += 4 ; } else if ( value . substring ( i + 1 ) . startsWith ( "quot;" ) ) { sb . append ( '"' ) ; i += 5 ; } else if ( value . substring ( i + 1 ) . startsWith ( "apos;" ) ) { sb . append ( '\'' ) ; i += 5 ; } else { return null ; } } else { sb . append ( c ) ; } } return sb . toString ( ) ; |
public class MultiScopeRecoveryLog { /** * Removes a RecoverableUnitImpl object , keyed from its identity from this
* classes collection of such objects .
* @ param identity The identity of the RecoverableUnitImpl to be removed
* @ return RecoverableUnitImpl The RecoverableUnitImpl thats no longer associated
* with the MultiScopeRecoveryLog . */
protected RecoverableUnitImpl removeRecoverableUnitMapEntries ( long identity ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "removeRecoverableUnitMapEntries" , new Object [ ] { identity , this } ) ; final RecoverableUnitImpl recoverableUnit = ( RecoverableUnitImpl ) _recoverableUnits . remove ( identity ) ; if ( recoverableUnit != null ) { _recUnitIdTable . removeId ( identity ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "removeRecoverableUnitMapEntries" , recoverableUnit ) ; return recoverableUnit ; |
public class Criteria { /** * Adds and equals ( = ) criteria for field comparison .
* The field name will be translated into the appropriate columnName by SqlStatement .
* < br >
* name < > boss . name
* @ param attribute The field name to be used
* @ param fieldName The field name to compare with */
public void addNotEqualToField ( String attribute , String fieldName ) { } } | // PAW
// SelectionCriteria c = FieldCriteria . buildNotEqualToCriteria ( attribute , fieldName , getAlias ( ) ) ;
SelectionCriteria c = FieldCriteria . buildNotEqualToCriteria ( attribute , fieldName , getUserAlias ( attribute ) ) ; addSelectionCriteria ( c ) ; |
public class CollectionInterpreter { /** * < p > missingRow . < / p >
* @ param row a { @ link com . greenpepper . Example } object . */
protected void missingRow ( Example row ) { } } | Example firstChild = row . firstChild ( ) ; firstChild . annotate ( Annotations . missing ( ) ) ; stats . wrong ( ) ; if ( firstChild . hasSibling ( ) ) { for ( Example cell : firstChild . nextSibling ( ) ) { cell . annotate ( Annotations . missing ( ) ) ; } } |
public class AbstractCacheMap { /** * ( non - Javadoc )
* @ see java . util . Map # get ( java . lang . Object ) */
@ Override public V get ( Object key ) { } } | if ( key == null ) { throw new NullPointerException ( ) ; } CachedValue < K , V > entry = map . get ( key ) ; if ( entry == null ) { return null ; } if ( isValueExpired ( entry ) ) { if ( map . remove ( key , entry ) ) { onValueRemove ( entry ) ; return null ; } return get ( key ) ; } return readValue ( entry ) ; |
public class ExtraParamMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ExtraParam extraParam , ProtocolMarshaller protocolMarshaller ) { } } | if ( extraParam == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( extraParam . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( extraParam . getValue ( ) , VALUE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class InventoryFilterMarshaller { /** * Marshall the given parameter object . */
public void marshall ( InventoryFilter inventoryFilter , ProtocolMarshaller protocolMarshaller ) { } } | if ( inventoryFilter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( inventoryFilter . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( inventoryFilter . getCondition ( ) , CONDITION_BINDING ) ; protocolMarshaller . marshall ( inventoryFilter . getValue ( ) , VALUE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class AppServiceCertificateOrdersInner { /** * Resend certificate email .
* Resend certificate email .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param certificateOrderName Name of the certificate order .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void resendEmail ( String resourceGroupName , String certificateOrderName ) { } } | resendEmailWithServiceResponseAsync ( resourceGroupName , certificateOrderName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class RTMPProtocolDecoder { /** * Sets incoming connection parameters and / or returns encoded parameters for use in a call .
* @ param in
* @ param notify
* @ param input
* @ return parameters array */
private Object [ ] handleParameters ( IoBuffer in , Notify notify , Input input ) { } } | Object [ ] params = new Object [ ] { } ; List < Object > paramList = new ArrayList < > ( ) ; final Object obj = Deserializer . deserialize ( input , Object . class ) ; if ( obj instanceof Map ) { // Before the actual parameters we sometimes ( connect ) get a map of parameters , this is usually null , but if set should be
// passed to the connection object .
@ SuppressWarnings ( "unchecked" ) final Map < String , Object > connParams = ( Map < String , Object > ) obj ; notify . setConnectionParams ( connParams ) ; } else if ( obj != null ) { paramList . add ( obj ) ; } while ( in . hasRemaining ( ) ) { paramList . add ( Deserializer . deserialize ( input , Object . class ) ) ; } params = paramList . toArray ( ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Num params: {}" , paramList . size ( ) ) ; for ( int i = 0 ; i < params . length ; i ++ ) { log . debug ( " > {}: {}" , i , params [ i ] ) ; } } return params ; |
public class DescribeGameSessionDetailsResult { /** * Collection of objects containing game session properties and the protection policy currently in force for each
* session matching the request .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setGameSessionDetails ( java . util . Collection ) } or { @ link # withGameSessionDetails ( java . util . Collection ) } if
* you want to override the existing values .
* @ param gameSessionDetails
* Collection of objects containing game session properties and the protection policy currently in force for
* each session matching the request .
* @ return Returns a reference to this object so that method calls can be chained together . */
public DescribeGameSessionDetailsResult withGameSessionDetails ( GameSessionDetail ... gameSessionDetails ) { } } | if ( this . gameSessionDetails == null ) { setGameSessionDetails ( new java . util . ArrayList < GameSessionDetail > ( gameSessionDetails . length ) ) ; } for ( GameSessionDetail ele : gameSessionDetails ) { this . gameSessionDetails . add ( ele ) ; } return this ; |
public class UriUtils { /** * TODO use UTF - 8 before escaping , this only works for ascii ( which is all we currently need ) */
private static void appendEncoded ( StringBuilder sb , String value ) { } } | for ( char ch : value . toCharArray ( ) ) { if ( isUnreserved ( ch ) ) sb . append ( ch ) ; else appendEscapedByte ( sb , ( byte ) ch ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.