signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PackageBasedActionConfigBuilder { /** * Interfaces , enums , annotations , and abstract classes cannot be
* instantiated .
* @ param actionClass
* class to check
* @ return returns true if the class cannot be instantiated or should be
* ignored */
protected boolean cannotInstantiate ( Class < ? > actionClass ) { } } | return actionClass . isAnnotation ( ) || actionClass . isInterface ( ) || actionClass . isEnum ( ) || ( actionClass . getModifiers ( ) & Modifier . ABSTRACT ) != 0 || actionClass . isAnonymousClass ( ) ; |
public class ProjectImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < Revision > getRevisions ( ) { } } | return ( EList < Revision > ) eGet ( StorePackage . Literals . PROJECT__REVISIONS , true ) ; |
public class Pipe { /** * Dimensiona il tubo , imponendo uno sforzo tangenziale al fondo .
* < ol >
* < li > Calcola l ' angolo theta in funzione di g .
* < li > Nota la portata di progetto del tratto considerato , determina il
* diametro oldD ( adottando una pendenza che garantisca l ' autopulizia ) .
* < li > Successivamente oldD viene approssimato al diametro commerciale piu
* vicino , letto dalla martice diametrs . Lo spessore adottato , anche esso
* letto dalla matrice dei diametri , viene assegnato al puntatore dD . Mentre
* la varabile maxd fa in modo che andando verso valle i diametri utilizzati
* possano solo aumentare .
* < li > A questo punto la get _ diameter ( ) ricalcola il nuovo valore
* dell ' angolo theta , chiamando la funzione this _ bisection ( ) , theta deve
* risultare piu piccolo .
* < li > Se invece oldD risulta maggiore del diametro commerciale piu grande
* disponibile , allora si mantiene il suo valore .
* < li > Infine calcola il grado di riempimento e pendenza del tratto a
* partire dal raggio idraulico , e li registra nella matrice networkPipes .
* < ol >
* @ param diametrs
* matrice che contiene i diametri e spessori commerciali .
* @ param tau
* [ Pa ] Sforzo tangenziale al fondo che garantisca l ' autopulizia
* della rete
* @ param dD
* @ param g
* Grado di riempimento da considerare nella progettazione della
* rete
* @ param maxd
* Diamtetro o altezza piu ' grande adottato nei tratti piu ' a
* monte
* @ param strWarnings
* a string which collect all the warning messages . */
private double getDiameter ( double [ ] [ ] diameters , double tau , double g , double [ ] dD , double maxd , StringBuilder strWarnings ) { } } | /* Pari a A * ( Rh ^ 1/6 ) */
double B ; /* Anglo formato dalla sezione bagnata */
double thta ; /* Diametro calcolato imponendo il criterio di autopulizia della rete */
double oldD ; /* [ cm ] Diametro commerciale */
double D = 0 ; /* Costane */
double known ; /* * [ rad ] Angolo formato dalla sezione bagnata , adottando un diametro
* commerciale */
double newtheta ; /* * [ cm ] Nuovo raggio idraulico calcolato in funzione del diametro
* commerciale */
double newrh ; /* B = A ( Rh ^ 1/6 ) [ m ^ 13/6] */
B = ( discharge * sqrt ( WSPECIFICWEIGHT / tau ) ) / ( CUBICMETER2LITER * getKs ( ) ) ; /* Angolo formato dalla sezione bagnata [ rad ] */
thta = 2 * acos ( 1 - 2 * g ) ; /* Diametro tubo [ cm ] */
oldD = TWO_TWENTYOVERTHIRTEEN * pow ( B , SIXOVERTHIRTEEN ) / ( pow ( ( 1 - sin ( thta ) / thta ) , ONEOVERTHIRTEEN ) * pow ( thta - sin ( thta ) , SIXOVERTHIRTEEN ) ) ; /* * Se il diametro ottenuto e piu piccolo del diametro commerciale piu
* grande , allora lo approssimo per eccesso col diametro commerciale piu
* prossimo . */
if ( oldD < diameters [ diameters . length - 1 ] [ 0 ] ) { int j = 0 ; for ( j = 0 ; j < diameters . length ; j ++ ) { /* Diametro commerciale [ cm ] */
D = diameters [ j ] [ 0 ] ; if ( D >= oldD ) break ; } if ( D < maxd ) { /* * Scendendo verso valle i diametri usati non possono diventare
* piu piccoli */
D = maxd ; } diameter = ( D ) ; /* Spessore corrispondente al diametro commerciale scelto [ cm ] */
dD [ 0 ] = diameters [ j ] [ 1 ] ; known = ( B * TWO_TENOVERTHREE ) / pow ( D / METER2CM , THIRTHEENOVERSIX ) ; /* * Angolo formato dalla sezione bagnata considerando un diametro
* commerciale [ rad ] */
newtheta = Utility . thisBisection ( thta , known , ONEOVERSIX , minG , accuracy , jMax , pm , strWarnings ) ; /* * E ovvio che adottando un diametro commerciale piu grande di
* quello che sarebbe strettamente neccessario , il grado di
* riempimento non puo aumentare */
if ( newtheta > thta ) { strWarnings . append ( msg . message ( "trentoP.warning.bisection" ) + id ) ; } } /* * se il diametro necessario e piu grande del massimo diametro
* commerciale disponibile , allora mantengo il risultato ottenuto senza
* nessuna approssimazione */
else { D = oldD ; diameter = D ; /* COSA SUCCEDE ALLO SPESSORE ? ? ! ! */
newtheta = thta ; } /* Grado di riempimento del tubo */
emptyDegree = 0.5 * ( 1 - cos ( newtheta / 2 ) ) ; /* Rh [ cm ] */
newrh = 0.25 * D * ( 1 - sin ( newtheta ) / newtheta ) ; /* pendenza del tratto progettato [ % ] */
pipeSlope = ( tau / ( WSPECIFICWEIGHT * newrh ) * METER2CMSQUARED ) ; return newtheta ; |
public class CacheImpl { /** * Executes a { @ link VisitableCommand } .
* This method creates the { @ link InvocationContext } using { @ link ContextBuilder } and initializes it .
* If the cache is transactional and no transaction is running , a transaction is created and committed for the
* command ( i . e . an injected transaction ) */
private < T > T executeCommandAndCommitIfNeeded ( ContextBuilder contextBuilder , VisitableCommand command , int keyCount ) { } } | InvocationContext ctx = contextBuilder . create ( keyCount ) ; checkLockOwner ( ctx , command ) ; // noinspection unchecked
return isTxInjected ( ctx ) ? ( T ) executeCommandWithInjectedTx ( ctx , command ) : ( T ) invoker . invoke ( ctx , command ) ; |
public class Activator { /** * Activate a bean in the context of a transaction . If an instance of the
* bean is already active in the transaction , that instance is returned .
* Otherwise , one of several strategies is used to activate an instance
* depending on what the bean supports . < p >
* If this method completes normally , it must be balanced with a call to
* one of the following methods : removeBean , commitBean , rollbackBean .
* If this method throws an exception , any partial work has already been
* undone , and there should be no balancing method call . < p >
* This method should never be used to obtain bean instances for method
* invocations . See { @ link # preInvokeActivateBean } . < p >
* @ param threadData the EJB thread data for the currently executing thread
* @ param tx the transaction context in which the bean instance should
* be activated .
* @ param beanId the < code > BeanId < / code > identifying the bean to
* activate .
* @ return a fully - activated bean instance . */
public BeanO activateBean ( EJBThreadData threadData , ContainerTx tx , BeanId beanId ) throws RemoteException { } } | BeanO beanO = null ; try { beanO = beanId . getActivationStrategy ( ) . atActivate ( threadData , tx , beanId ) ; // d630940
} finally { if ( beanO != null ) { threadData . popCallbackBeanO ( ) ; } } return beanO ; |
public class SimpleExcelFlinkFileInputFormat { /** * Open an Excel file
* @ param split
* contains the Excel file */
@ Override public void open ( FileInputSplit split ) throws IOException { } } | // read Excel
super . open ( split ) ; // infer schema ( requires to read file again )
if ( this . customSchema == null ) { ExcelFlinkFileInputFormat effif = new ExcelFlinkFileInputFormat ( this . shocr ) ; effif . open ( split ) ; SpreadSheetCellDAO [ ] currentRow = effif . nextRecord ( null ) ; int i = 0 ; while ( ( currentRow != null ) && ( i != this . maxInferRows ) ) { this . converter . updateSpreadSheetCellRowToInferSchemaInformation ( currentRow ) ; i ++ ; currentRow = effif . nextRecord ( null ) ; } effif . close ( ) ; this . customSchema = this . converter . getSchemaRow ( ) ; } else { this . converter . setSchemaRow ( this . customSchema ) ; } |
public class NavigationResultBuilder { /** * Add a UICommand instance to create a single navigation entry .
* @ param result The NavigationResult to add
* @ return This NavigationResultBuilder instance */
public NavigationResultBuilder add ( NavigationResult result ) { } } | if ( result != null && result . getNext ( ) != null ) { entries . addAll ( Arrays . asList ( result . getNext ( ) ) ) ; } return this ; |
public class xen_health_monitor_temp { /** * < pre >
* Converts API response of bulk operation into object and returns the object array in case of get request .
* < / pre > */
protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } } | xen_health_monitor_temp_responses result = ( xen_health_monitor_temp_responses ) service . get_payload_formatter ( ) . string_to_resource ( xen_health_monitor_temp_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , result . errorcode , ( base_response [ ] ) result . xen_health_monitor_temp_response_array ) ; } xen_health_monitor_temp [ ] result_xen_health_monitor_temp = new xen_health_monitor_temp [ result . xen_health_monitor_temp_response_array . length ] ; for ( int i = 0 ; i < result . xen_health_monitor_temp_response_array . length ; i ++ ) { result_xen_health_monitor_temp [ i ] = result . xen_health_monitor_temp_response_array [ i ] . xen_health_monitor_temp [ 0 ] ; } return result_xen_health_monitor_temp ; |
public class ResourceCache { /** * Returns an array of resources corresponding to the specified pattern . If the pattern has not
* yet been cached , the resources will be enumerated by the application context and stored in
* the cache .
* @ param pattern Pattern to be used to lookup resources .
* @ return An array of matching resources , sorted alphabetically by file name . */
@ Override public Resource [ ] getResources ( String pattern ) { } } | Resource [ ] resources = cache . get ( pattern ) ; return resources == null ? internalGet ( pattern ) : resources ; |
public class BeanTypeImpl { /** * If not already created , a new < code > class < / code > element with the given value will be created .
* Otherwise , the existing < code > class < / code > element will be returned .
* @ return a new or existing instance of < code > ClassType < BeanType < T > > < / code > */
public ClassType < BeanType < T > > getOrCreateClazz ( ) { } } | Node node = childNode . getOrCreate ( "class" ) ; ClassType < BeanType < T > > clazz = new ClassTypeImpl < BeanType < T > > ( this , "class" , childNode , node ) ; return clazz ; |
public class HRavenRestClient { /** * Fetches a list of flows that include jobs in that flow that include the
* specified flow fields and job fields specified configuration properties
* @ param cluster
* @ param username
* @ param batchDesc
* @ param signature
* @ param limit
* @ param flowResponseFilters
* @ param jobResponseFilters
* @ param configPropertyFields
* @ return list of flows
* @ throws IOException */
public List < Flow > fetchFlowsWithConfig ( String cluster , String username , String batchDesc , String signature , int limit , List < String > flowResponseFilters , List < String > jobResponseFilters , List < String > configPropertyFields ) throws IOException { } } | LOG . info ( String . format ( "Fetching last %d matching jobs for cluster=%s, user.name=%s, " + "batch.desc=%s, pig.logical.plan.signature=%s" , limit , cluster , username , batchDesc , signature ) ) ; StringBuilder urlStringBuilder = buildFlowURL ( cluster , username , batchDesc , signature , limit , flowResponseFilters , jobResponseFilters ) ; if ( ( configPropertyFields != null ) && ( configPropertyFields . size ( ) > 0 ) ) { urlStringBuilder . append ( AND ) ; urlStringBuilder . append ( StringUtil . buildParam ( "includeConf" , configPropertyFields ) ) ; } return retrieveFlowsFromURL ( urlStringBuilder . toString ( ) ) ; |
public class ItemCategory { /** * A { @ link ItemCategory } associated to this { @ link TopLevelItemDescriptor } .
* @ return A { @ link ItemCategory } , if not found , { @ link ItemCategory . UncategorizedCategory } is returned */
@ Nonnull public static ItemCategory getCategory ( TopLevelItemDescriptor descriptor ) { } } | int order = 0 ; ExtensionList < ItemCategory > categories = ExtensionList . lookup ( ItemCategory . class ) ; for ( ItemCategory category : categories ) { if ( category . getId ( ) . equals ( descriptor . getCategoryId ( ) ) ) { category . setOrder ( ++ order ) ; return category ; } order ++ ; } return new UncategorizedCategory ( ) ; |
public class Layout { /** * adds if new . . . */
public void add ( Attribute attr ) { } } | int symbol ; List < Attribute > lst ; if ( locate ( attr ) == - 1 ) { symbol = attr . symbol ; while ( attrs . size ( ) <= symbol ) { attrs . add ( new ArrayList < Attribute > ( ) ) ; } lst = attrs . get ( symbol ) ; lst . add ( attr ) ; } |
public class SmiOidNode { /** * public int [ ] determineFullOid ( ) {
* if ( m _ oid = = null ) {
* SmiOidNode parent = getParent ( ) ;
* if ( parent ! = null ) {
* int [ ] parentOid = parent . determineFullOid ( ) ;
* if ( parentOid ! = null ) {
* m _ oid = new int [ parentOid . length + 1 ] ;
* System . arraycopy ( parentOid , 0 , m _ oid , 0 , parentOid . length ) ;
* m _ oid [ m _ oid . length - 1 ] = getLastOid ( ) ;
* m _ oidStr = parent . getOidStr ( ) + " . " + getLastOid ( ) ;
* } else {
* m _ oid = new int [ ] { getLastOid ( ) } ;
* m _ oidStr = String . valueOf ( getLastOid ( ) ) ;
* return m _ oid ; */
public int getTotalChildCount ( ) { } } | int result = m_childMap . size ( ) ; for ( SmiOidNode child : m_childMap . values ( ) ) { result += child . getTotalChildCount ( ) ; } return result ; |
public class ApiOvhUtils { /** * Convert JSON String to a POJO java
* @ param in
* @ param mapTo
* @ return POJO Object
* @ throws IOException */
public static < T > T convertTo ( String in , TypeReference < T > mapTo ) throws IOException { } } | try { return mapper . readValue ( in , mapTo ) ; } catch ( Exception e ) { log . error ( "Can not convert:{} to {}" , in , mapTo , e ) ; throw new OvhServiceException ( "local" , "conversion Error to " + mapTo ) ; } |
public class CompareStringQuery { /** * Construct a { @ link Query } implementation that scores documents with a string field value that is equal to the supplied
* constraint value .
* @ param constraintValue the constraint value ; may not be null
* @ param fieldName the name of the document field containing the value ; may not be null
* @ param caseOperation the operation that should be performed on the indexed values before the constraint value is being
* evaluated ; may be null which indicates that no case conversion should be done
* @ return the query ; never null */
public static Query createQueryForNodesWithFieldEqualTo ( String constraintValue , String fieldName , Function < String , String > caseOperation ) { } } | return FieldComparison . EQ . createQueryForNodesWithField ( constraintValue , fieldName , caseOperation ) ; |
public class AnnotationConfigurator { /** * < p > Return an array of all < code > Field < / code > s reflecting declared
* fields in this class , or in any superclass other than
* < code > java . lang . Object < / code > . < / p >
* @ param clazz Class to be analyzed */
private Field [ ] fields ( Class < ? > clazz ) { } } | Map < String , Field > fields = new HashMap < String , Field > ( ) ; do { for ( Field field : clazz . getDeclaredFields ( ) ) { if ( ! fields . containsKey ( field . getName ( ) ) ) { fields . put ( field . getName ( ) , field ) ; } } clazz = clazz . getSuperclass ( ) ; } while ( clazz != Object . class ) ; return fields . values ( ) . toArray ( new Field [ fields . size ( ) ] ) ; |
public class VersionedFileResource { /** * { @ inheritDoc } */
@ Override public HierarchicalProperty getProperty ( QName name ) throws PathNotFoundException , AccessDeniedException , RepositoryException { } } | if ( name . equals ( ISVERSIONED ) ) { return new HierarchicalProperty ( name , "1" ) ; } else if ( name . equals ( CHECKEDIN ) ) { if ( node . isCheckedOut ( ) ) { throw new PathNotFoundException ( ) ; } String checkedInHref = identifier . toASCIIString ( ) + "?version=" + node . getBaseVersion ( ) . getName ( ) ; HierarchicalProperty checkedIn = new HierarchicalProperty ( name ) ; checkedIn . addChild ( new HierarchicalProperty ( new QName ( "DAV:" , "href" ) , checkedInHref ) ) ; return checkedIn ; } else if ( name . equals ( CHECKEDOUT ) ) { if ( ! node . isCheckedOut ( ) ) { throw new PathNotFoundException ( ) ; } return new HierarchicalProperty ( name ) ; } else if ( name . equals ( VERSIONNAME ) ) { return new HierarchicalProperty ( name , node . getBaseVersion ( ) . getName ( ) ) ; } return super . getProperty ( name ) ; |
public class GraphHandler { /** * generate the data from the actual visualization ( removing all duped code ) . */
private void doGraph ( final TSDB tsdb , final HttpQuery query ) throws IOException { } } | final String basepath = getGnuplotBasePath ( tsdb , query ) ; long start_time = DateTime . parseDateTimeString ( query . getRequiredQueryStringParam ( "start" ) , query . getQueryStringParam ( "tz" ) ) ; final boolean nocache = query . hasQueryStringParam ( "nocache" ) ; if ( start_time == - 1 ) { throw BadRequestException . missingParameter ( "start" ) ; } else { // temp fixup to seconds from ms until the rest of TSDB supports ms
// Note you can ' t append this to the DateTime . parseDateTimeString ( ) call as
// it clobbers - 1 results
start_time /= 1000 ; } long end_time = DateTime . parseDateTimeString ( query . getQueryStringParam ( "end" ) , query . getQueryStringParam ( "tz" ) ) ; final long now = System . currentTimeMillis ( ) / 1000 ; if ( end_time == - 1 ) { end_time = now ; } else { // temp fixup to seconds from ms until the rest of TSDB supports ms
// Note you can ' t append this to the DateTime . parseDateTimeString ( ) call as
// it clobbers - 1 results
end_time /= 1000 ; } final int max_age = computeMaxAge ( query , start_time , end_time , now ) ; if ( ! nocache && isDiskCacheHit ( query , end_time , max_age , basepath ) ) { return ; } // Parse TSQuery from HTTP query
final TSQuery tsquery = QueryRpc . parseQuery ( tsdb , query ) ; tsquery . validateAndSetQuery ( ) ; // Build the queries for the parsed TSQuery
Query [ ] tsdbqueries = tsquery . buildQueries ( tsdb ) ; List < String > options = query . getQueryStringParams ( "o" ) ; if ( options == null ) { options = new ArrayList < String > ( tsdbqueries . length ) ; for ( int i = 0 ; i < tsdbqueries . length ; i ++ ) { options . add ( "" ) ; } } else if ( options . size ( ) != tsdbqueries . length ) { throw new BadRequestException ( options . size ( ) + " `o' parameters, but " + tsdbqueries . length + " `m' parameters." ) ; } else { for ( final String option : options ) { // TODO - far from perfect , should help a little .
if ( option . contains ( "`" ) || option . contains ( "%60" ) || option . contains ( "`" ) ) { throw new BadRequestException ( "Option contained a back-tick. " + "That's a no-no." ) ; } } } for ( final Query tsdbquery : tsdbqueries ) { try { tsdbquery . setStartTime ( start_time ) ; } catch ( IllegalArgumentException e ) { throw new BadRequestException ( "start time: " + e . getMessage ( ) ) ; } try { tsdbquery . setEndTime ( end_time ) ; } catch ( IllegalArgumentException e ) { throw new BadRequestException ( "end time: " + e . getMessage ( ) ) ; } } final Plot plot = new Plot ( start_time , end_time , DateTime . timezones . get ( query . getQueryStringParam ( "tz" ) ) ) ; setPlotDimensions ( query , plot ) ; setPlotParams ( query , plot ) ; final int nqueries = tsdbqueries . length ; @ SuppressWarnings ( "unchecked" ) final HashSet < String > [ ] aggregated_tags = new HashSet [ nqueries ] ; int npoints = 0 ; for ( int i = 0 ; i < nqueries ; i ++ ) { try { // execute the TSDB query !
// XXX This is slow and will block Netty . TODO ( tsuna ) : Don ' t block .
// TODO ( tsuna ) : Optimization : run each query in parallel .
final DataPoints [ ] series = tsdbqueries [ i ] . run ( ) ; for ( final DataPoints datapoints : series ) { plot . add ( datapoints , options . get ( i ) ) ; aggregated_tags [ i ] = new HashSet < String > ( ) ; aggregated_tags [ i ] . addAll ( datapoints . getAggregatedTags ( ) ) ; npoints += datapoints . aggregatedSize ( ) ; } } catch ( RuntimeException e ) { logInfo ( query , "Query failed (stack trace coming): " + tsdbqueries [ i ] ) ; throw e ; } tsdbqueries [ i ] = null ; // free ( )
} tsdbqueries = null ; // free ( )
if ( query . hasQueryStringParam ( "ascii" ) ) { respondAsciiQuery ( query , max_age , basepath , plot ) ; return ; } final RunGnuplot rungnuplot = new RunGnuplot ( query , max_age , plot , basepath , aggregated_tags , npoints ) ; class ErrorCB implements Callback < Object , Exception > { public Object call ( final Exception e ) throws Exception { LOG . warn ( "Failed to retrieve global annotations: " , e ) ; throw e ; } } class GlobalCB implements Callback < Object , List < Annotation > > { public Object call ( final List < Annotation > global_annotations ) throws Exception { rungnuplot . plot . setGlobals ( global_annotations ) ; execGnuplot ( rungnuplot , query ) ; return null ; } } // Fetch global annotations , if needed
if ( ! tsquery . getNoAnnotations ( ) && tsquery . getGlobalAnnotations ( ) ) { Annotation . getGlobalAnnotations ( tsdb , start_time , end_time ) . addCallback ( new GlobalCB ( ) ) . addErrback ( new ErrorCB ( ) ) ; } else { execGnuplot ( rungnuplot , query ) ; } |
public class JComponentFactory { /** * Factory method for create new { @ link JSplitPane } object
* @ param newOrientation
* < code > JSplitPane . HORIZONTAL _ SPLIT < / code > or < code > JSplitPane . VERTICAL _ SPLIT < / code >
* @ param newContinuousLayout
* a boolean , true for the components to redraw continuously as the divider changes
* position , false to wait until the divider position stops changing to redraw
* @ param newLeftComponent
* the < code > Component < / code > that will appear on the left of a horizontally - split
* pane , or at the top of a vertically - split pane
* @ param newRightComponent
* the < code > Component < / code > that will appear on the right of a horizontally - split
* pane , or at the bottom of a vertically - split pane
* @ return the new { @ link JSplitPane } object */
public static JSplitPane newJSplitPane ( int newOrientation , boolean newContinuousLayout , Component newLeftComponent , Component newRightComponent ) { } } | return new JSplitPane ( newOrientation , newContinuousLayout , newLeftComponent , newRightComponent ) ; |
public class DynamicObject { /** * Update specified target from this object .
* @ param target target object to update */
public void update ( Object target ) { } } | if ( target == null ) { throw new IllegalArgumentException ( "Target to update cannot be null" ) ; } BeanWrapper bw = new BeanWrapperImpl ( target ) ; bw . registerCustomEditor ( Date . class , new CustomDateEditor ( new SimpleDateFormat ( "yyyy-MM-dd" ) , true ) ) ; for ( Map . Entry < String , Object > property : m_properties . entrySet ( ) ) { String propertyName = property . getKey ( ) ; Object value = property . getValue ( ) ; if ( value instanceof Map ) { PropertyDescriptor pd = bw . getPropertyDescriptor ( propertyName ) ; if ( ! Map . class . isAssignableFrom ( pd . getPropertyType ( ) ) || pd . getWriteMethod ( ) == null ) { value = new DynamicObject ( ( Map < String , Object > ) value ) ; } } if ( value instanceof DynamicObject ) { ( ( DynamicObject ) value ) . update ( bw . getPropertyValue ( propertyName ) ) ; } else { bw . setPropertyValue ( propertyName , value ) ; } } |
public class FunctionLibFactory { /** * Laedt mehrere FunctionLib ' s die innerhalb eines Verzeichnisses liegen .
* @ param dir Verzeichnis im dem die FunctionLib ' s liegen .
* @ param saxParser Definition des Sax Parser mit dem die FunctionLib ' s eingelesen werden sollen .
* @ return FunctionLib ' s als Array
* @ throws FunctionLibException */
public static FunctionLib [ ] loadFromDirectory ( Resource dir , Identification id ) throws FunctionLibException { } } | if ( ! dir . isDirectory ( ) ) return new FunctionLib [ 0 ] ; ArrayList < FunctionLib > arr = new ArrayList < FunctionLib > ( ) ; Resource [ ] files = dir . listResources ( new ExtensionResourceFilter ( new String [ ] { "fld" , "fldx" } ) ) ; for ( int i = 0 ; i < files . length ; i ++ ) { if ( files [ i ] . isFile ( ) ) arr . add ( FunctionLibFactory . loadFromFile ( files [ i ] , id ) ) ; } return arr . toArray ( new FunctionLib [ arr . size ( ) ] ) ; |
public class SofaHessianSerializer { /** * Gets serializer factory .
* @ param multipleClassLoader the multiple class loader
* @ param generic the generic
* @ return the serializer factory */
protected SerializerFactory getSerializerFactory ( boolean multipleClassLoader , boolean generic ) { } } | if ( generic ) { return multipleClassLoader ? new GenericMultipleClassLoaderSofaSerializerFactory ( ) : new GenericSingleClassLoaderSofaSerializerFactory ( ) ; } else { return multipleClassLoader ? new MultipleClassLoaderSofaSerializerFactory ( ) : new SingleClassLoaderSofaSerializerFactory ( ) ; } |
public class ClientConnection { /** * Executes a procedure asynchronously , returning a Future that can be used by the caller to wait upon completion before processing the server response .
* @ param procedure the name of the procedure to call .
* @ param parameters the list of parameters to pass to the procedure .
* @ return the Future created to wrap around the asynchronous process . */
public Future < ClientResponse > executeAsync ( String procedure , Object ... parameters ) throws Exception { } } | final ExecutionFuture future = new ExecutionFuture ( DefaultAsyncTimeout ) ; this . Client . callProcedure ( new TrackingCallback ( this , procedure , new ProcedureCallback ( ) { final ExecutionFuture result ; { this . result = future ; } @ Override public void clientCallback ( ClientResponse response ) throws Exception { future . set ( response ) ; } } ) , procedure , parameters ) ; return future ; |
public class TextComponent { /** * Sets the plain text content .
* @ param content the plain text content
* @ return a copy of this component */
public @ NonNull TextComponent content ( final @ NonNull String content ) { } } | return new TextComponent ( this . children , this . color , this . obfuscated , this . bold , this . strikethrough , this . underlined , this . italic , this . clickEvent , this . hoverEvent , this . insertion , requireNonNull ( content , "content" ) ) ; |
public class XAnnotated { /** * Returns annotations for this annotated item .
* @ return Array of annotations . */
public Annotation [ ] getAnnotations ( ) { } } | final XAnnotation < ? > [ ] xannotations = getXAnnotations ( ) ; final Annotation [ ] annotations = new Annotation [ xannotations . length ] ; for ( int index = 0 ; index < xannotations . length ; index ++ ) { annotations [ index ] = xannotations [ index ] . getResult ( ) ; } return annotations ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link LengthType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link LengthType } { @ code > } */
@ XmlElementDecl ( namespace = "http://www.opengis.net/citygml/relief/1.0" , name = "Elevation" , substitutionHeadNamespace = "http://www.opengis.net/gml" , substitutionHeadName = "_Object" ) public JAXBElement < LengthType > createElevation ( LengthType value ) { } } | return new JAXBElement < LengthType > ( _Elevation_QNAME , LengthType . class , null , value ) ; |
public class AbstractDecoratedMap { /** * / * protected */
Entry < K , V > createEntry ( K pKey , V pValue ) { } } | return new BasicEntry < K , V > ( pKey , pValue ) ; |
public class MatrixFeatures_ZDRM { /** * Checks to see if any element in the matrix is NaN of Infinite .
* @ param m A matrix . Not modified .
* @ return True if any element in the matrix is NaN of Infinite . */
public static boolean hasUncountable ( ZMatrixD1 m ) { } } | int length = m . getDataLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { double a = m . data [ i ] ; if ( Double . isNaN ( a ) || Double . isInfinite ( a ) ) return true ; } return false ; |
public class ListStringArrayFactory { /** * { @ inheritDoc } */
public List < String [ ] > create ( ) { } } | List < String [ ] > lines ; String [ ] lineOne ; String [ ] lineTwo ; String [ ] lineThree ; lineOne = ArrayFactory . newArray ( "John" , "23" , "male" ) ; lineTwo = ArrayFactory . newArray ( "Jim" , "25" , "male" ) ; lineThree = ArrayFactory . newArray ( "Mary" , "21" , "female" ) ; lines = ListFactory . newArrayList ( lineOne , lineTwo , lineThree ) ; return lines ; |
public class PlainTime { /** * / * [ deutsch ]
* < p > Addiert den angegebenen Betrag der entsprechenden Zeiteinheit
* zu dieser Uhrzeit und liefert das Additionsergebnis zur & uuml ; ck . < / p >
* < p > Deckt die wichtigsten Zeiteinheiten ab , die mit diesem Typ verwendet werden
* k & ouml ; nnen und ist aus Performance - Gr & uuml ; nden & uuml ; berladen . < / p >
* @ param amount the amount of units to be added to this clock time ( maybe negative )
* @ param unit the unit to be used in addition
* @ return result of addition as changed copy while this instance remains unaffected
* @ throws ArithmeticException in case of numerical overflow
* @ see # plus ( long , Object ) plus ( long , IsoTimeUnit )
* @ since 4.19 */
public PlainTime plus ( long amount , ClockUnit unit ) { } } | if ( unit == null ) { throw new NullPointerException ( "Missing unit." ) ; } else if ( amount == 0 ) { return this ; } try { return ClockUnitRule . doAdd ( PlainTime . class , unit , this , amount ) ; } catch ( IllegalArgumentException iae ) { ArithmeticException ex = new ArithmeticException ( "Result beyond boundaries of time axis." ) ; ex . initCause ( iae ) ; throw ex ; } |
public class BooleanCondition { /** * And of all the given conditions
* @ param first the first condition
* @ param second the second condition for xor
* @ return the xor of these 2 conditions */
public static Condition XOR ( Condition first , Condition second ) { } } | return new BooleanCondition ( Type . XOR , first , second ) ; |
public class FileExistsValidator { /** * CHECKSTYLE : OFF : RedundantThrows */
public static void requireArgValid ( @ NotNull final String name , @ NotNull final File value ) throws ConstraintViolationException { } } | // CHECKSTYLE : ON
if ( ! value . exists ( ) ) { throw new ConstraintViolationException ( "The argument '" + name + "' is not an existing file: '" + value + "'" ) ; } |
public class Engine { /** * Adds an entity to this Engine .
* This will throw an IllegalArgumentException if the given entity
* was already registered with an engine . */
public void addEntity ( Entity entity ) { } } | boolean delayed = updating || familyManager . notifying ( ) ; entityManager . addEntity ( entity , delayed ) ; |
public class Yoke { /** * Starts listening at a already created server .
* @ param server
* @ return { Yoke } */
public Yoke listen ( final @ NotNull HttpServer server ) { } } | server . requestHandler ( new Handler < HttpServerRequest > ( ) { @ Override public void handle ( HttpServerRequest req ) { // the context map is shared with all middlewares
final YokeRequest request = requestWrapper . wrap ( req , new Context ( defaultContext ) , engineMap , store ) ; // add x - powered - by header is enabled
Boolean poweredBy = request . get ( "x-powered-by" ) ; if ( poweredBy != null && poweredBy ) { request . response ( ) . putHeader ( "x-powered-by" , "yoke" ) ; } new Handler < Object > ( ) { int currentMiddleware = - 1 ; @ Override public void handle ( Object error ) { if ( error == null ) { currentMiddleware ++ ; if ( currentMiddleware < middlewareList . size ( ) ) { final MountedMiddleware mountedMiddleware = middlewareList . get ( currentMiddleware ) ; if ( ! mountedMiddleware . enabled ) { // the middleware is disabled
handle ( null ) ; } else { if ( request . path ( ) . startsWith ( mountedMiddleware . mount ) ) { mountedMiddleware . middleware . handle ( request , this ) ; } else { // the middleware was not mounted on this uri , skip to the next entry
handle ( null ) ; } } } else { HttpServerResponse response = request . response ( ) ; // reached the end and no handler was able to answer the request
response . setStatusCode ( 404 ) ; response . setStatusMessage ( HttpResponseStatus . valueOf ( 404 ) . reasonPhrase ( ) ) ; if ( errorHandler != null ) { errorHandler . handle ( request , null ) ; } else { response . end ( HttpResponseStatus . valueOf ( 404 ) . reasonPhrase ( ) ) ; } } } else { request . put ( "error" , error ) ; if ( errorHandler != null ) { errorHandler . handle ( request , null ) ; } else { HttpServerResponse response = request . response ( ) ; int errorCode ; // if the error was set on the response use it
if ( response . getStatusCode ( ) >= 400 ) { errorCode = response . getStatusCode ( ) ; } else { // if it was set as the error object use it
if ( error instanceof Number ) { errorCode = ( ( Number ) error ) . intValue ( ) ; } else if ( error instanceof YokeException ) { errorCode = ( ( YokeException ) error ) . getErrorCode ( ) . intValue ( ) ; } else if ( error instanceof JsonObject ) { errorCode = ( ( JsonObject ) error ) . getInteger ( "errorCode" , 500 ) ; } else if ( error instanceof Map ) { Integer tmp = ( Integer ) ( ( Map ) error ) . get ( "errorCode" ) ; errorCode = tmp != null ? tmp : 500 ; } else { // default error code
errorCode = 500 ; } } response . setStatusCode ( errorCode ) ; response . setStatusMessage ( HttpResponseStatus . valueOf ( errorCode ) . reasonPhrase ( ) ) ; response . end ( HttpResponseStatus . valueOf ( errorCode ) . reasonPhrase ( ) ) ; } } } } . handle ( null ) ; } } ) ; return this ; |
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertModelCheckerResultTypeToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class J4pRequestHandler { /** * Get an HTTP Request for requesting multiples requests at once
* @ param pRequests requests to put into a HTTP request
* @ return HTTP request to send to the server */
public < T extends J4pRequest > HttpUriRequest getHttpRequest ( List < T > pRequests , Map < J4pQueryParameter , String > pProcessingOptions ) throws UnsupportedEncodingException , URISyntaxException { } } | JSONArray bulkRequest = new JSONArray ( ) ; String queryParams = prepareQueryParameters ( pProcessingOptions ) ; HttpPost postReq = new HttpPost ( createRequestURI ( j4pServerUrl . getPath ( ) , queryParams ) ) ; for ( T request : pRequests ) { JSONObject requestContent = getJsonRequestContent ( request ) ; bulkRequest . add ( requestContent ) ; } postReq . setEntity ( new StringEntity ( bulkRequest . toJSONString ( ) , "utf-8" ) ) ; return postReq ; |
public class ConcurrentSparqlGraphStoreManager { /** * This method will be called when the server is being shutdown .
* Ensure a clean shutdown . */
@ Override public void shutdown ( ) { } } | log . info ( "Shutting down Ontology crawlers." ) ; this . executor . shutdown ( ) ; // Disable new tasks from being submitted
try { // Wait a while for existing tasks to terminate
if ( ! this . executor . awaitTermination ( 5 , TimeUnit . SECONDS ) ) { this . executor . shutdownNow ( ) ; // Cancel currently executing tasks
// Wait a while for tasks to respond to being cancelled
if ( ! this . executor . awaitTermination ( 2 , TimeUnit . SECONDS ) ) log . error ( "Pool did not terminate" ) ; } } catch ( InterruptedException ie ) { // ( Re - ) Cancel if current thread also interrupted
this . executor . shutdownNow ( ) ; // Preserve interrupt status
Thread . currentThread ( ) . interrupt ( ) ; } |
public class IncludeTagHandler { protected String resolveVariableIfNeeds ( String expr , String path , ScriptingExpression expression ) { } } | if ( expr == null ) { return null ; } return doResolveShortExistsIfNeeds ( doResolvePathExpIfNeeds ( ( String ) expr , path , expression ) , expression ) ; |
public class HTTPConduit { /** * updates the HTTPClientPolicy that is compatible with the assertions
* included in the service , endpoint , operation and message policy subjects
* if a PolicyDataEngine is installed
* wsdl extensors are superseded by policies which in
* turn are superseded by injection */
private void updateClientPolicy ( Message m ) { } } | if ( ! clientSidePolicyCalced ) { PolicyDataEngine policyEngine = bus . getExtension ( PolicyDataEngine . class ) ; if ( policyEngine != null && endpointInfo . getService ( ) != null ) { clientSidePolicy = policyEngine . getClientEndpointPolicy ( m , endpointInfo , this , new ClientPolicyCalculator ( ) ) ; if ( clientSidePolicy != null ) { clientSidePolicy . removePropertyChangeListener ( this ) ; // make sure we aren ' t added twice
clientSidePolicy . addPropertyChangeListener ( this ) ; } } } clientSidePolicyCalced = true ; |
public class DiskBuffer { /** * Returns an Iterator of Events that are stored on disk < b > at the point in time this method
* is called < / b > . Note that files may not deserialize correctly , may be corrupted ,
* or may be missing on disk by the time we attempt to open them - so some care is taken to
* only return valid { @ link Event } s .
* If Events are written to disk after this Iterator is created they < b > will not < / b > be returned
* by this Iterator .
* @ return Iterator of Events on disk */
@ Override public Iterator < Event > getEvents ( ) { } } | final Iterator < File > files = Arrays . asList ( bufferDir . listFiles ( ) ) . iterator ( ) ; return new Iterator < Event > ( ) { private Event next = getNextEvent ( files ) ; @ Override public boolean hasNext ( ) { return next != null ; } @ Override public Event next ( ) { Event toReturn = next ; next = getNextEvent ( files ) ; return toReturn ; } @ Override public void remove ( ) { throw new UnsupportedOperationException ( ) ; } } ; |
public class JCommander { /** * Reads the file specified by filename and returns the file content as a string .
* End of lines are replaced by a space .
* @ param fileName the command line filename
* @ return the file content as a string . */
private List < String > readFile ( String fileName ) { } } | List < String > result = Lists . newArrayList ( ) ; try ( BufferedReader bufRead = Files . newBufferedReader ( Paths . get ( fileName ) , options . atFileCharset ) ) { String line ; // Read through file one line at time . Print line # and line
while ( ( line = bufRead . readLine ( ) ) != null ) { // Allow empty lines and # comments in these at files
if ( line . length ( ) > 0 && ! line . trim ( ) . startsWith ( "#" ) ) { result . add ( line ) ; } } } catch ( IOException e ) { throw new ParameterException ( "Could not read file " + fileName + ": " + e ) ; } return result ; |
public class AmazonRekognitionClient { /** * Gets a list of stream processors that you have created with < a > CreateStreamProcessor < / a > .
* @ param listStreamProcessorsRequest
* @ return Result of the ListStreamProcessors operation returned by the service .
* @ throws AccessDeniedException
* You are not authorized to perform the action .
* @ throws InternalServerErrorException
* Amazon Rekognition experienced a service issue . Try your call again .
* @ throws ThrottlingException
* Amazon Rekognition is temporarily unable to process the request . Try your call again .
* @ throws InvalidParameterException
* Input parameter violated a constraint . Validate your parameter before calling the API operation again .
* @ throws InvalidPaginationTokenException
* Pagination token in the request is not valid .
* @ throws ProvisionedThroughputExceededException
* The number of requests exceeded your throughput limit . If you want to increase this limit , contact Amazon
* Rekognition .
* @ sample AmazonRekognition . ListStreamProcessors */
@ Override public ListStreamProcessorsResult listStreamProcessors ( ListStreamProcessorsRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeListStreamProcessors ( request ) ; |
public class TimecodeComparator { /** * Returns the larger of a number of timecodes
* @ param timecodes
* some timecodes
* @ return */
public static Timecode max ( final Timecode ... timecodes ) { } } | Timecode max = null ; for ( Timecode timecode : timecodes ) if ( max == null || lt ( max , timecode ) ) max = timecode ; return max ; |
public class HttpResponses { /** * Serves a static resource specified by the URL .
* @ param resource
* The static resource to be served .
* @ param expiration
* The number of milliseconds until the resource will " expire " .
* Until it expires the browser will be allowed to cache it
* and serve it without checking back with the server .
* After it expires , the client will send conditional GET to
* check if the resource is actually modified or not .
* If 0 , it will immediately expire . */
public static HttpResponse staticResource ( final URL resource , final long expiration ) { } } | return new HttpResponse ( ) { public void generateResponse ( StaplerRequest req , StaplerResponse rsp , Object node ) throws IOException , ServletException { rsp . serveFile ( req , resource , expiration ) ; } } ; |
public class TVRageApi { /** * Search for the show using the show ID
* @ param showID
* @ return ShowInfo
* @ throws com . omertron . tvrageapi . TVRageException */
public ShowInfo getShowInfo ( int showID ) throws TVRageException { } } | if ( showID == 0 ) { return new ShowInfo ( ) ; } String tvrageURL = buildURL ( API_SHOWINFO , Integer . toString ( showID ) ) . toString ( ) ; List < ShowInfo > showList = TVRageParser . getShowInfo ( tvrageURL ) ; if ( showList . isEmpty ( ) ) { return new ShowInfo ( ) ; } else { return showList . get ( 0 ) ; } |
public class KeyRange { /** * Create a { @ link KeyRangeType # FORWARD _ CLOSED } range .
* @ param < T > buffer type
* @ param start start key ( required )
* @ param stop stop key ( required )
* @ return a key range ( never null ) */
public static < T > KeyRange < T > closed ( final T start , final T stop ) { } } | return new KeyRange < > ( KeyRangeType . FORWARD_CLOSED , start , stop ) ; |
public class DoubleUnaryOperatorBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static DoubleUnaryOperator dblUnaryOperatorFrom ( Consumer < DoubleUnaryOperatorBuilder > buildingFunction ) { } } | DoubleUnaryOperatorBuilder builder = new DoubleUnaryOperatorBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class HString { /** * Creates a labeled data point from this HString using the value of the given attribute type as the label , i . e .
* class .
* @ param attributeTypeLabel the attribute type whose value will become the label of the data point
* @ return the labeled datum */
public LabeledDatum < HString > asLabeledData ( @ NonNull AttributeType attributeTypeLabel ) { } } | return LabeledDatum . of ( get ( attributeTypeLabel ) , this ) ; |
public class WordCountTable { public static void main ( String [ ] args ) throws Exception { } } | ExecutionEnvironment env = ExecutionEnvironment . createCollectionsEnvironment ( ) ; BatchTableEnvironment tEnv = BatchTableEnvironment . create ( env ) ; DataSet < WC > input = env . fromElements ( new WC ( "Hello" , 1 ) , new WC ( "Ciao" , 1 ) , new WC ( "Hello" , 1 ) ) ; Table table = tEnv . fromDataSet ( input ) ; Table filtered = table . groupBy ( "word" ) . select ( "word, frequency.sum as frequency" ) . filter ( "frequency = 2" ) ; DataSet < WC > result = tEnv . toDataSet ( filtered , WC . class ) ; result . print ( ) ; |
public class DCModuleParser { /** * Utility method to parse a taxonomy from an element .
* @ param desc the taxonomy description element .
* @ return the string contained in the resource of the element . */
protected final String getTaxonomy ( final Element desc ) { } } | String taxonomy = null ; final Element topic = desc . getChild ( "topic" , getTaxonomyNamespace ( ) ) ; if ( topic != null ) { final Attribute resource = topic . getAttribute ( "resource" , getRDFNamespace ( ) ) ; if ( resource != null ) { taxonomy = resource . getValue ( ) ; } } return taxonomy ; |
public class AbstractDocumentationMojo { /** * Replies the source files .
* @ return the map from the source files to the corresponding source folders . */
protected Map < File , File > getFiles ( ) { } } | final Map < File , File > files = new TreeMap < > ( ) ; for ( final String rootName : this . inferredSourceDirectories ) { File root = FileSystem . convertStringToFile ( rootName ) ; if ( ! root . isAbsolute ( ) ) { root = FileSystem . makeAbsolute ( root , this . baseDirectory ) ; } getLog ( ) . debug ( MessageFormat . format ( Messages . AbstractDocumentationMojo_4 , root . getName ( ) ) ) ; for ( final File file : Files . fileTreeTraverser ( ) . breadthFirstTraversal ( root ) ) { if ( file . exists ( ) && file . isFile ( ) && ! file . isHidden ( ) && file . canRead ( ) && hasExtension ( file ) ) { files . put ( file , root ) ; } } } return files ; |
public class Distance { /** * Estimates the manhattan distance of two Associative Arrays .
* @ param a1
* @ param a2
* @ return */
public static double manhattan ( AssociativeArray a1 , AssociativeArray a2 ) { } } | Map < Object , Double > columnDistances = columnDistances ( a1 , a2 , null ) ; double distance = 0.0 ; for ( double columnDistance : columnDistances . values ( ) ) { distance += Math . abs ( columnDistance ) ; } return distance ; |
public class SimpleDbRepositoryNamespaceHandler { /** * ( non - Javadoc )
* @ see org . springframework . beans . factory . xml . NamespaceHandler # init ( ) */
@ Override public void init ( ) { } } | RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension ( ) ; RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser ( extension ) ; registerBeanDefinitionParser ( "repositories" , repositoryBeanDefinitionParser ) ; |
public class QueueRef { /** * / * ( non - Javadoc )
* @ see javax . naming . Referenceable # getReference ( ) */
@ Override public final Reference getReference ( ) throws NamingException { } } | Reference ref = new Reference ( getClass ( ) . getName ( ) , JNDIObjectFactory . class . getName ( ) , null ) ; ref . add ( new StringRefAddr ( "queueName" , name ) ) ; return ref ; |
public class dnspolicylabel { /** * Use this API to add dnspolicylabel resources . */
public static base_responses add ( nitro_service client , dnspolicylabel resources [ ] ) throws Exception { } } | base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnspolicylabel addresources [ ] = new dnspolicylabel [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new dnspolicylabel ( ) ; addresources [ i ] . labelname = resources [ i ] . labelname ; addresources [ i ] . transform = resources [ i ] . transform ; } result = add_bulk_request ( client , addresources ) ; } return result ; |
public class StrutsApp { /** * Returns a list of { @ link FormBeanModel } . */
public List getFormBeansByActualType ( String actualTypeName , Boolean usesPageFlowScopedBean ) { } } | ArrayList beans = null ; for ( Iterator i = _formBeans . values ( ) . iterator ( ) ; i . hasNext ( ) ; ) { FormBeanModel formBean = ( FormBeanModel ) i . next ( ) ; if ( formBean != null && formBean . getActualType ( ) . equals ( actualTypeName ) && ( usesPageFlowScopedBean == null || usesPageFlowScopedBean . booleanValue ( ) == formBean . isPageFlowScoped ( ) ) ) { if ( beans == null ) beans = new ArrayList ( ) ; beans . add ( formBean ) ; } } return beans ; |
public class AllClassesFrameWriter { /** * Use the sorted index of all the classes and add all the classes to the
* content list .
* @ param content HtmlTree content to which all classes information will be added
* @ param wantFrames True if we want frames . */
protected void addAllClasses ( Content content , boolean wantFrames ) { } } | for ( Character unicode : indexbuilder . index ( ) ) { addContents ( indexbuilder . getMemberList ( unicode ) , wantFrames , content ) ; } |
public class WebListener { /** * Shuts down the application in Web environment and deassociates the
* current { @ code ServletContext } from { @ link Application } context .
* @ param sce The event the { @ code ServletContext } is destroyed . */
@ SuppressWarnings ( "unchecked" ) public void contextDestroyed ( ServletContextEvent sce ) { } } | WebContext < ServletContext > context = ( WebContext < ServletContext > ) container . component ( container . contexts ( ) . get ( Application . class ) ) ; context . deassociate ( sce . getServletContext ( ) ) ; synchronized ( Jaguar . class ) { if ( running ( ) ) { shutdown ( ) ; } } |
public class OAuth2PlatformClient { /** * Build Map from response
* @ param content
* @ return
* @ throws ConnectionException */
private HashMap < String , JSONObject > buildKeyMap ( String content ) throws ConnectionException { } } | HashMap < String , JSONObject > retMap = new HashMap < String , JSONObject > ( ) ; JSONObject jwksPayload = new JSONObject ( content ) ; JSONArray keysArray = jwksPayload . getJSONArray ( "keys" ) ; for ( int i = 0 ; i < keysArray . length ( ) ; i ++ ) { JSONObject object = keysArray . getJSONObject ( i ) ; String keyId = object . getString ( "kid" ) ; retMap . put ( keyId , object ) ; } return retMap ; |
public class bridgegroup { /** * Use this API to fetch filtered set of bridgegroup resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static bridgegroup [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | bridgegroup obj = new bridgegroup ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; bridgegroup [ ] response = ( bridgegroup [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class ReflectionUtils { /** * Returns the type argument
* @ param clazz the Class to examine
* @ param tv the TypeVariable to look for
* @ param < T > the type of the Class
* @ return the Class type */
public static < T > Class < ? > getTypeArgument ( final Class < ? extends T > clazz , final TypeVariable < ? extends GenericDeclaration > tv ) { } } | final Map < Type , Type > resolvedTypes = new HashMap < Type , Type > ( ) ; Type type = clazz ; // start walking up the inheritance hierarchy until we hit the end
while ( type != null && ! Object . class . equals ( getClass ( type ) ) ) { if ( type instanceof Class ) { // there is no useful information for us in raw types , so just
// keep going .
type = ( ( Class ) type ) . getGenericSuperclass ( ) ; } else { final ParameterizedType parameterizedType = ( ParameterizedType ) type ; final Class < ? > rawType = ( Class ) parameterizedType . getRawType ( ) ; final Type [ ] actualTypeArguments = parameterizedType . getActualTypeArguments ( ) ; final TypeVariable < ? > [ ] typeParameters = rawType . getTypeParameters ( ) ; for ( int i = 0 ; i < actualTypeArguments . length ; i ++ ) { if ( typeParameters [ i ] . equals ( tv ) ) { final Class cls = getClass ( actualTypeArguments [ i ] ) ; if ( cls != null ) { return cls ; } // We don ' t know that the type we want is the one in the map , if this argument has been
// passed through multiple levels of the hierarchy . Walk back until we run out .
Type typeToTest = resolvedTypes . get ( actualTypeArguments [ i ] ) ; while ( typeToTest != null ) { final Class classToTest = getClass ( typeToTest ) ; if ( classToTest != null ) { return classToTest ; } typeToTest = resolvedTypes . get ( typeToTest ) ; } } resolvedTypes . put ( typeParameters [ i ] , actualTypeArguments [ i ] ) ; } if ( ! rawType . equals ( Object . class ) ) { type = rawType . getGenericSuperclass ( ) ; } } } return null ; |
public class AmazonMTurkClient { /** * The < code > ListQualificationRequests < / code > operation retrieves requests for Qualifications of a particular
* Qualification type . The owner of the Qualification type calls this operation to poll for pending requests , and
* accepts them using the AcceptQualification operation .
* @ param listQualificationRequestsRequest
* @ return Result of the ListQualificationRequests operation returned by the service .
* @ throws ServiceException
* Amazon Mechanical Turk is temporarily unable to process your request . Try your call again .
* @ throws RequestErrorException
* Your request is invalid .
* @ sample AmazonMTurk . ListQualificationRequests
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / mturk - requester - 2017-01-17 / ListQualificationRequests "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public ListQualificationRequestsResult listQualificationRequests ( ListQualificationRequestsRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeListQualificationRequests ( request ) ; |
public class ListRecoveryPointsByResourceResult { /** * An array of objects that contain detailed information about recovery points of the specified resource type .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setRecoveryPoints ( java . util . Collection ) } or { @ link # withRecoveryPoints ( java . util . Collection ) } if you want
* to override the existing values .
* @ param recoveryPoints
* An array of objects that contain detailed information about recovery points of the specified resource
* type .
* @ return Returns a reference to this object so that method calls can be chained together . */
public ListRecoveryPointsByResourceResult withRecoveryPoints ( RecoveryPointByResource ... recoveryPoints ) { } } | if ( this . recoveryPoints == null ) { setRecoveryPoints ( new java . util . ArrayList < RecoveryPointByResource > ( recoveryPoints . length ) ) ; } for ( RecoveryPointByResource ele : recoveryPoints ) { this . recoveryPoints . add ( ele ) ; } return this ; |
public class WTable { /** * Update the column in the row .
* @ param rowRenderer the table row renderer
* @ param rowContext the row context
* @ param rowIndex the row id to update
* @ param col the column to update
* @ param model the table model */
private void updateBeanValueForColumnInRow ( final WTableRowRenderer rowRenderer , final UIContext rowContext , final List < Integer > rowIndex , final int col , final TableModel model ) { } } | // The actual component is wrapped in a renderer wrapper , so we have to fetch it from that
WComponent renderer = ( ( Container ) rowRenderer . getRenderer ( col ) ) . getChildAt ( 0 ) ; UIContextHolder . pushContext ( rowContext ) ; try { // If the column is a Container then call updateBeanValue to let the column renderer and its children update
// the " bean " returned by getValueAt ( row , col )
if ( renderer instanceof Container ) { WebUtilities . updateBeanValue ( renderer ) ; } else if ( renderer instanceof DataBound ) { // Update Databound renderer
Object oldValue = model . getValueAt ( rowIndex , col ) ; Object newValue = ( ( DataBound ) renderer ) . getData ( ) ; if ( ! Util . equals ( oldValue , newValue ) ) { model . setValueAt ( newValue , rowIndex , col ) ; } } } finally { UIContextHolder . popContext ( ) ; } |
public class BeanBuilder { /** * Defines a Spring namespace definition to use .
* @ param definition The definition */
public void xmlns ( Map < String , String > definition ) { } } | Assert . notNull ( namespaceHandlerResolver , "You cannot define a Spring namespace without a [namespaceHandlerResolver] set" ) ; if ( definition . isEmpty ( ) ) { return ; } for ( Map . Entry < String , String > entry : definition . entrySet ( ) ) { String namespace = entry . getKey ( ) ; String uri = entry . getValue ( ) == null ? null : entry . getValue ( ) ; Assert . notNull ( uri , "Namespace definition cannot supply a null URI" ) ; final NamespaceHandler namespaceHandler = namespaceHandlerResolver . resolve ( uri ) ; if ( namespaceHandler == null ) { throw new BeanDefinitionParsingException ( new Problem ( "No namespace handler found for URI: " + uri , new Location ( readerContext . getResource ( ) ) ) ) ; } namespaceHandlers . put ( namespace , namespaceHandler ) ; namespaces . put ( namespace , uri ) ; } |
public class Maps { /** * Removes the given element from the list that is stored under the
* given key . If the list becomes empty , it is removed from the
* map .
* @ param < K > The key type
* @ param < E > The element type
* @ param map The map
* @ param k The key
* @ param e The element */
static < K , E > void removeFromList ( Map < K , List < E > > map , K k , E e ) { } } | List < E > list = map . get ( k ) ; if ( list != null ) { list . remove ( e ) ; if ( list . isEmpty ( ) ) { map . remove ( k ) ; } } |
public class VideoDevice { /** * This method returns a { @ link YUVFrameGrabber } associated with this
* video device . Captured frames will be YUV420 - encoded before being handed
* out . The video device must support an appropriate image format that v4l4j
* can convert to YUV420 . If it does not , this method will throw an
* { @ link ImageFormatException } . To check if YUV420 - encoding is possible ,
* call { @ link # supportYUVConversion ( ) } . Among all the image formats the
* video device supports , v4l4j will choose the first one that can be YUV420
* encoded . If you prefer to specify which image format is to be used , call
* { @ link # getYUVFrameGrabber ( int , int , int , int , ImageFormat ) } instead .
* This is sometimes required because some video device have a lower frame
* rate with some image formats , and a higher one with others . So far ,
* testing is the only way to find out . The returned { @ link YUVFrameGrabber }
* must be released when no longer used by calling
* { @ link # releaseFrameGrabber ( ) } . < br > < b > If YUVFrameGrabbers cannot be
* created for your video device , please let the author know about it so
* YUV420 - encoding can be added . See the README file on how to submit
* reports . < / b >
* @ param w the desired frame width . This value may be adjusted to the
* closest supported by hardware .
* @ param h the desired frame height . This value may be adjusted to the
* closest supported by hardware .
* @ param input the input index , as returned by { @ link InputInfo # getIndex ( ) }
* @ param std the video standard , as returned by
* { @ link InputInfo # getSupportedStandards ( ) } ( see { @ link V4L4JConstants } ) .
* @ return a { @ link YUVFrameGrabber } associated with this video device , if
* supported .
* @ throws VideoStandardException if the chosen video standard is not
* supported
* @ throws ImageFormatException if this video device does not have an image
* format that can be YUV420 - encoded . < b > If you encounter such device , please
* let the author know so support for it can be added . See the README file
* on how to submit reports . < / b >
* @ throws CaptureChannelException if the given channel number value is not
* valid
* @ throws ImageDimensionException if the given image dimensions are not
* supported
* @ throws InitialisationException if the video device file can not be
* initialised
* @ throws V4L4JException if there is an error applying capture parameters
* @ throws StateException if a { @ link FrameGrabber } already exists and must
* be released before a YUVFrameGrabber can be allocated , or if the
* < code > VideoDevice < / code > has been released . */
public YUVFrameGrabber getYUVFrameGrabber ( int w , int h , int input , int std ) throws V4L4JException { } } | return getYUVFrameGrabber ( w , h , input , std , null ) ; |
public class Container { /** * Computes the bitwise AND of this container with another ( intersection ) . This container as well
* as the provided container are left unaffected .
* @ param x other container
* @ return aggregated container */
public int andCardinality ( Container x ) { } } | if ( this . isEmpty ( ) ) { return 0 ; } else if ( x . isEmpty ( ) ) { return 0 ; } else { if ( x instanceof ArrayContainer ) { return andCardinality ( ( ArrayContainer ) x ) ; } else if ( x instanceof BitmapContainer ) { return andCardinality ( ( BitmapContainer ) x ) ; } return andCardinality ( ( RunContainer ) x ) ; } |
public class AWSServiceCatalogClient { /** * Terminates the specified provisioned product .
* This operation does not delete any records associated with the provisioned product .
* You can check the status of this request using < a > DescribeRecord < / a > .
* @ param terminateProvisionedProductRequest
* @ return Result of the TerminateProvisionedProduct operation returned by the service .
* @ throws ResourceNotFoundException
* The specified resource was not found .
* @ sample AWSServiceCatalog . TerminateProvisionedProduct
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / servicecatalog - 2015-12-10 / TerminateProvisionedProduct "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public TerminateProvisionedProductResult terminateProvisionedProduct ( TerminateProvisionedProductRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeTerminateProvisionedProduct ( request ) ; |
public class EndianNumbers { /** * Converting four bytes to a Big Endian float .
* @ param b1 the first byte .
* @ param b2 the second byte .
* @ param b3 the third byte .
* @ param b4 the fourth byte .
* @ return the conversion result */
@ Pure @ Inline ( value = "Float.intBitsToFloat(EndianNumbers.toBEInt($1, $2, $3, $4))" , imported = { } } | EndianNumbers . class } ) public static float toBEFloat ( int b1 , int b2 , int b3 , int b4 ) { return Float . intBitsToFloat ( toBEInt ( b1 , b2 , b3 , b4 ) ) ; |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcConstructionProductResource ( ) { } } | if ( ifcConstructionProductResourceEClass == null ) { ifcConstructionProductResourceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 113 ) ; } return ifcConstructionProductResourceEClass ; |
public class FDBigInt { /** * Add one FDBigInt to another . Return a FDBigInt */
public FDBigInt add ( FDBigInt other ) { } } | int i ; int a [ ] , b [ ] ; int n , m ; long c = 0L ; // arrange such that a . nWords > = b . nWords ;
// n = a . nWords , m = b . nWords
if ( this . nWords >= other . nWords ) { a = this . data ; n = this . nWords ; b = other . data ; m = other . nWords ; } else { a = other . data ; n = other . nWords ; b = this . data ; m = this . nWords ; } int r [ ] = new int [ n ] ; for ( i = 0 ; i < n ; i ++ ) { c += ( long ) a [ i ] & 0xffffffffL ; if ( i < m ) { c += ( long ) b [ i ] & 0xffffffffL ; } r [ i ] = ( int ) c ; c >>= 32 ; // signed shift .
} if ( c != 0L ) { // oops - - carry out - - need longer result .
int s [ ] = new int [ r . length + 1 ] ; System . arraycopy ( r , 0 , s , 0 , r . length ) ; s [ i ++ ] = ( int ) c ; return new FDBigInt ( s , i ) ; } return new FDBigInt ( r , i ) ; |
public class CreateCapacityReservationRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < CreateCapacityReservationRequest > getDryRunRequest ( ) { } } | Request < CreateCapacityReservationRequest > request = new CreateCapacityReservationRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ; |
public class MessageTransportManualSelect { /** * Get ( or make ) the current record for this reference . */
public Record makeReferenceRecord ( RecordOwner recordOwner ) { } } | Record record = super . makeReferenceRecord ( recordOwner ) ; record . addListener ( new CompareFileFilter ( record . getField ( MessageTransport . MESSAGE_TRANSPORT_TYPE ) , MessageTransportTypeField . MANUAL_RESPONSE , DBConstants . EQUALS , null , false ) ) ; return record ; |
public class BusGroup { /** * Called when a subscribe needs to be propagated to the group .
* The addSubscription puts the subscription into the list of
* Subscriptions that have been propagated to this Bus .
* @ param topicSpaceUuid The subscriptions topicSpace uuid .
* @ param topic The subscriptions topic .
* @ param messageHandler The subscriptionMessage that will be used for
* sending to Neighbouring ME ' s
* @ param subscriptionsTable The table to check for a proxy on .
* @ param sendProxy Indicates whether to send proxy messages .
* @ return SubscriptionMessageHandler The new subscription message handler
* if one was created . */
private SubscriptionMessageHandler addSubscription ( String topicSpaceName , SIBUuid12 topicSpaceUuid , String topic , SubscriptionMessageHandler messageHandler , Hashtable subscriptionsTable , boolean sendProxy ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addSubscription" , new Object [ ] { topicSpaceName , topicSpaceUuid , topic , messageHandler , subscriptionsTable , new Boolean ( sendProxy ) } ) ; // Get a key to find the Subscription with
final String key = subscriptionKey ( topicSpaceUuid , topic ) ; synchronized ( subscriptionLock ) { // Find the subscription from this Buses list of subscriptions .
MESubscription subscription = ( MESubscription ) subscriptionsTable . get ( key ) ; // defect 267686
// Lookup the local topic space name - the remote ME will need to know .
String localTSName = null ; try { DestinationHandler destHand = null ; if ( sendProxy || topicSpaceName == null ) destHand = iProxyHandler . getMessageProcessor ( ) . getDestinationManager ( ) . getDestination ( topicSpaceUuid , false ) ; else destHand = iProxyHandler . getMessageProcessor ( ) . getDestinationManager ( ) . getDestination ( topicSpaceName , false ) ; if ( destHand != null ) { localTSName = destHand . getName ( ) ; } } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.proxyhandler.BusGroup.addSubscription" , "1:339:1.49" , this ) ; SIErrorException error = new SIErrorException ( e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addSubscription" , error ) ; throw error ; } if ( localTSName != null ) { // Lookup foreign topicspace mapping
String foreignTSName = iProxyHandler . getMessageProcessor ( ) . getDestinationManager ( ) . getTopicSpaceMapping ( iBusName , topicSpaceUuid ) ; // If no topicspace mapping exists , we shouldn ` t fwd to the other ME .
if ( foreignTSName != null ) { if ( subscription == null ) { subscription = new MESubscription ( topicSpaceUuid , localTSName , topic , foreignTSName ) ; subscriptionsTable . put ( key , subscription ) ; } // Perform the proxy subscription operation .
messageHandler = doProxySubscribeOp ( subscription . addRef ( ) , subscription , messageHandler , subscriptionsTable , sendProxy ) ; } } // end if localTSName ! = null
} // end sync
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addSubscription" ) ; return messageHandler ; |
public class LargeList { /** * Delete values from list between range .
* @ param begin low value of the range ( inclusive )
* @ param end high value of the range ( inclusive )
* @ return count of entries removed */
public int remove ( Value begin , Value end ) { } } | List < byte [ ] > digestList = getDigestList ( ) ; Key beginKey = makeSubKey ( begin ) ; Key endKey = makeSubKey ( end ) ; int start = digestList . indexOf ( beginKey . digest ) ; int stop = digestList . indexOf ( endKey . digest ) ; int count = stop - start + 1 ; ; for ( int i = start ; i < stop ; i ++ ) { Key subKey = new Key ( this . key . namespace , ( byte [ ] ) digestList . get ( i ) , null , null ) ; client . delete ( this . policy , subKey ) ; } client . operate ( this . policy , this . key , ListOperation . removeRange ( this . binNameString , start , count ) ) ; return count ; |
public class BackendServiceClient { /** * Deletes a key for validating requests with signed URLs for this backend service .
* < p > Sample code :
* < pre > < code >
* try ( BackendServiceClient backendServiceClient = BackendServiceClient . create ( ) ) {
* ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName . of ( " [ PROJECT ] " , " [ BACKEND _ SERVICE ] " ) ;
* String keyName = " " ;
* Operation response = backendServiceClient . deleteSignedUrlKeyBackendService ( backendService . toString ( ) , keyName ) ;
* < / code > < / pre >
* @ param backendService Name of the BackendService resource to which the Signed URL Key should be
* added . The name should conform to RFC1035.
* @ param keyName The name of the Signed URL Key to delete .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
@ BetaApi public final Operation deleteSignedUrlKeyBackendService ( String backendService , String keyName ) { } } | DeleteSignedUrlKeyBackendServiceHttpRequest request = DeleteSignedUrlKeyBackendServiceHttpRequest . newBuilder ( ) . setBackendService ( backendService ) . setKeyName ( keyName ) . build ( ) ; return deleteSignedUrlKeyBackendService ( request ) ; |
public class ClassWriter { /** * Write " bootstrapMethods " attribute . */
void writeBootstrapMethods ( ) { } } | int alenIdx = writeAttr ( names . BootstrapMethods ) ; databuf . appendChar ( bootstrapMethods . size ( ) ) ; for ( Map . Entry < DynamicMethod . BootstrapMethodsKey , DynamicMethod . BootstrapMethodsValue > entry : bootstrapMethods . entrySet ( ) ) { DynamicMethod . BootstrapMethodsKey bsmKey = entry . getKey ( ) ; // write BSM handle
databuf . appendChar ( pool . get ( entry . getValue ( ) . mh ) ) ; Object [ ] uniqueArgs = bsmKey . getUniqueArgs ( ) ; // write static args length
databuf . appendChar ( uniqueArgs . length ) ; // write static args array
for ( Object o : uniqueArgs ) { databuf . appendChar ( pool . get ( o ) ) ; } } endAttr ( alenIdx ) ; |
public class MenuParser { /** * Output this screen using HTML . */
public void printHtmlJavaLogo ( PrintWriter out , String strTag , String strParams , String strData ) { } } | String strType = m_recDetail . getField ( MenusModel . TYPE ) . toString ( ) ; String strJava = this . getRecordOwner ( ) . getProperty ( DBParams . JAVA ) ; if ( ( strJava == null ) || ( strJava . length ( ) == 0 ) ) strJava = DBConstants . NO ; if ( strJava . toUpperCase ( ) . charAt ( 0 ) != 'N' ) if ( ( strType . equalsIgnoreCase ( DBParams . RECORD ) ) || ( strType . equalsIgnoreCase ( DBParams . SCREEN ) ) || ( strType . equalsIgnoreCase ( "form" ) ) ) out . print ( strData ) ; |
public class AccountHeader { /** * Add new profiles to the existing list of profiles
* @ param profiles */
public void addProfiles ( @ NonNull IProfile ... profiles ) { } } | if ( mAccountHeaderBuilder . mProfiles == null ) { mAccountHeaderBuilder . mProfiles = new ArrayList < > ( ) ; } Collections . addAll ( mAccountHeaderBuilder . mProfiles , profiles ) ; mAccountHeaderBuilder . updateHeaderAndList ( ) ; |
public class RqGreedy { /** * Consume the request .
* @ param req Request
* @ return New request
* @ throws IOException If fails */
private static Request consume ( final Request req ) throws IOException { } } | final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; new RqPrint ( req ) . printBody ( baos ) ; return new Request ( ) { @ Override public Iterable < String > head ( ) throws IOException { return req . head ( ) ; } @ Override public InputStream body ( ) { return new ByteArrayInputStream ( baos . toByteArray ( ) ) ; } } ; |
public class PngtasticFilterHandler { /** * { @ inheritDoc }
* The bytes are named as follows ( x = current , a = previous , b = above , c = previous and above )
* < pre >
* c b
* a x
* < / pre > */
@ Override public void filter ( byte [ ] line , byte [ ] previousLine , int sampleBitCount ) throws PngException { } } | PngFilterType filterType = PngFilterType . forValue ( line [ 0 ] ) ; line [ 0 ] = 0 ; PngFilterType previousFilterType = PngFilterType . forValue ( previousLine [ 0 ] ) ; previousLine [ 0 ] = 0 ; switch ( filterType ) { case NONE : break ; case SUB : { byte [ ] original = line . clone ( ) ; int previous = - ( Math . max ( 1 , sampleBitCount / 8 ) - 1 ) ; for ( int x = 1 , a = previous ; x < line . length ; x ++ , a ++ ) { line [ x ] = ( byte ) ( original [ x ] - ( ( a < 0 ) ? 0 : original [ a ] ) ) ; } break ; } case UP : { for ( int x = 1 ; x < line . length ; x ++ ) { line [ x ] = ( byte ) ( line [ x ] - previousLine [ x ] ) ; } break ; } case AVERAGE : { byte [ ] original = line . clone ( ) ; int previous = - ( Math . max ( 1 , sampleBitCount / 8 ) - 1 ) ; for ( int x = 1 , a = previous ; x < line . length ; x ++ , a ++ ) { line [ x ] = ( byte ) ( original [ x ] - ( ( 0xFF & original [ ( a < 0 ) ? 0 : a ] ) + ( 0xFF & previousLine [ x ] ) ) / 2 ) ; } break ; } case PAETH : { byte [ ] original = line . clone ( ) ; int previous = - ( Math . max ( 1 , sampleBitCount / 8 ) - 1 ) ; for ( int x = 1 , a = previous ; x < line . length ; x ++ , a ++ ) { int result = this . paethPredictor ( original , previousLine , x , a ) ; line [ x ] = ( byte ) ( original [ x ] - result ) ; } break ; } default : throw new PngException ( "Unrecognized filter type " + filterType ) ; } line [ 0 ] = filterType . getValue ( ) ; previousLine [ 0 ] = previousFilterType . getValue ( ) ; |
public class TemplateScanner { /** * Output the sorted map of strings to the specified output file .
* @ param strings
* @ param outputFile
* @ throws FileNotFoundException */
private static void outputMessages ( TreeMap < String , String > strings , File outputFile ) throws FileNotFoundException { } } | PrintWriter writer = new PrintWriter ( new FileOutputStream ( outputFile ) ) ; for ( Entry < String , String > entry : strings . entrySet ( ) ) { String key = entry . getKey ( ) ; String val = entry . getValue ( ) ; writer . append ( key ) ; writer . append ( '=' ) ; writer . append ( val ) ; writer . append ( "\n" ) ; } writer . flush ( ) ; writer . close ( ) ; |
public class GetRelationalDatabaseLogStreamsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetRelationalDatabaseLogStreamsRequest getRelationalDatabaseLogStreamsRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getRelationalDatabaseLogStreamsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getRelationalDatabaseLogStreamsRequest . getRelationalDatabaseName ( ) , RELATIONALDATABASENAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class TemplateParser { /** * In some case the expression is already a valid Vue . js expression that will work without any
* processing . In this case we just leave it in place . This avoid creating Computed
* properties / methods for simple expressions .
* @ param expressionString The expression to check
* @ return true if it ' s already a valid Vue . js expression , false otherwise */
private boolean isSimpleVueJsExpression ( String expressionString ) { } } | String methodName = expressionString ; if ( expressionString . endsWith ( "()" ) ) { methodName = expressionString . substring ( 0 , expressionString . length ( ) - 2 ) ; } return context . hasMethod ( methodName ) ; |
public class PolicySetDefinitionsInner { /** * Retrieves all policy set definitions in management group .
* This operation retrieves a list of all the a policy set definition in the given management group .
* @ param managementGroupId The ID of the management group .
* @ 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 < List < PolicySetDefinitionInner > > listByManagementGroupAsync ( final String managementGroupId , final ListOperationCallback < PolicySetDefinitionInner > serviceCallback ) { } } | return AzureServiceFuture . fromPageResponse ( listByManagementGroupSinglePageAsync ( managementGroupId ) , new Func1 < String , Observable < ServiceResponse < Page < PolicySetDefinitionInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < PolicySetDefinitionInner > > > call ( String nextPageLink ) { return listByManagementGroupNextSinglePageAsync ( nextPageLink ) ; } } , serviceCallback ) ; |
public class AbstractLogger { /** * Log a message at warning level .
* @ param message the message to log
* @ param exception the exception that caused the message to be generated */
public void warn ( Object message , Throwable exception ) { } } | log ( Level . WARN , message , exception ) ; |
public class ReceiveQueueProxy { /** * Add a message filter to this remote receive queue .
* @ param messageFilter The message filter to add .
* @ param remoteSession The remote session .
* @ return The filter ID . */
public BaseMessageFilter addRemoteMessageFilter ( BaseMessageFilter messageFilter , RemoteSession remoteSession ) throws RemoteException { } } | BaseTransport transport = this . createProxyTransport ( ADD_REMOTE_MESSAGE_FILTER ) ; transport . addParam ( FILTER , messageFilter ) ; // Don ' t use COMMAND
String strSessionPathID = null ; if ( remoteSession instanceof BaseProxy ) { // Always a SessionProxy
strSessionPathID = ( ( BaseProxy ) remoteSession ) . getIDPath ( ) ; } transport . addParam ( SESSION , strSessionPathID ) ; Object strReturn = transport . sendMessageAndGetReply ( ) ; Object objReturn = transport . convertReturnObject ( strReturn ) ; return ( BaseMessageFilter ) objReturn ; |
public class StripeJsonUtils { /** * Util function for putting an long value into a { @ link JSONObject } if that
* value is not null . This ignores any { @ link JSONException } that may be thrown
* due to insertion .
* @ param jsonObject the { @ link JSONObject } into which to put the field
* @ param fieldName the field name
* @ param value the potential field value */
static void putLongIfNotNull ( @ NonNull JSONObject jsonObject , @ NonNull @ Size ( min = 1 ) String fieldName , @ Nullable Long value ) { } } | if ( value == null ) { return ; } try { jsonObject . put ( fieldName , value . longValue ( ) ) ; } catch ( JSONException ignored ) { } |
public class EJBWrapper { /** * F743-34301.1 */
private static void addManagedBeanMethod ( ClassWriter cw , String className , String implClassName , Method method , String implMethodName , int methodId , boolean aroundInvoke ) { } } | GeneratorAdapter mg ; String methodName = method . getName ( ) ; String methodSignature = MethodAttribUtils . jdiMethodSignature ( method ) ; String EjbPreInvoke = "EjbPreInvokeForManagedBean" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , INDENT + "adding method : " + methodName + " " + methodSignature + " : aroundInvoke = " + aroundInvoke ) ; // Determine the list of ' checked ' exceptions , which will need to have
// catch blocks in the wrapper . . . and also perform validation .
// Note that RemoteException is never a ' checked ' exception , and
// exceptions that are subclasses of other ' checked ' exceptions
// will be eliminated , to avoid ' unreachable ' code .
Class < ? > [ ] methodExceptions = method . getExceptionTypes ( ) ; // Convert the return value , arguments , and exception classes to
// ASM Type objects , and create the ASM Method object which will
// be used to actually add the method and method code .
Type returnType = Type . getType ( method . getReturnType ( ) ) ; Type [ ] argTypes = getTypes ( method . getParameterTypes ( ) ) ; Type [ ] exceptionTypes = getTypes ( methodExceptions ) ; org . objectweb . asm . commons . Method m = new org . objectweb . asm . commons . Method ( methodName , returnType , argTypes ) ; // Create an ASM GeneratorAdapter object for the ASM Method , which
// makes generating dynamic code much easier . . . as it keeps track
// of the position of the arguments and local variables , etc .
mg = new GeneratorAdapter ( ACC_PUBLIC , m , null , exceptionTypes , cw ) ; // Begin Method Code . . .
mg . visitCode ( ) ; // When no AroundInvoke interceptors . . . the code is very simple - the
// method call is just passed through to the actual instance , which may
// be found in the BeanO stored on the wrapper .
if ( ! aroundInvoke ) { // < bean impl > bean = ( < bean impl > ) ivBeanO . getBeanInstance ( ) ;
Type implType = Type . getType ( "L" + implClassName + ";" ) ; int bean = mg . newLocal ( implType ) ; mg . loadThis ( ) ; mg . visitFieldInsn ( GETFIELD , className , "ivBeanO" , "Lcom/ibm/ejs/container/BeanO;" ) ; mg . visitMethodInsn ( INVOKEVIRTUAL , "com/ibm/ejs/container/BeanO" , "getBeanInstance" , "()Ljava/lang/Object;" ) ; mg . checkCast ( implType ) ; mg . storeLocal ( bean ) ; // bean . < method > ( < args . . . > ) ;
// or
// rtnValue = bean . < method > ( < args . . . > ) ;
mg . loadLocal ( bean ) ; mg . loadArgs ( 0 , argTypes . length ) ; // do not pass " this "
mg . visitMethodInsn ( INVOKEVIRTUAL , implClassName , implMethodName , m . getDescriptor ( ) ) ; mg . returnValue ( ) ; // End Method Code . . .
mg . endMethod ( ) ; // GeneratorAdapter accounts for visitMaxs ( x , y )
mg . visitEnd ( ) ; return ; } // The rest of the code is for handling AroundInvoke interceptors .
// EJSDeployedSupport s = new EJSDeployedSupport ( ) ;
int s = mg . newLocal ( TYPE_EJSDeployedSupport ) ; mg . newInstance ( TYPE_EJSDeployedSupport ) ; mg . dup ( ) ; mg . visitMethodInsn ( INVOKESPECIAL , "com/ibm/ejs/container/EJSDeployedSupport" , "<init>" , "()V" ) ; mg . storeLocal ( s ) ; // < return type > returnValue = false | 0 | null ;
int returnValue = - 1 ; if ( returnType != Type . VOID_TYPE ) { returnValue = mg . newLocal ( returnType ) ; switch ( returnType . getSort ( ) ) { case Type . BOOLEAN : mg . push ( false ) ; break ; case Type . CHAR : case Type . BYTE : case Type . SHORT : case Type . INT : mg . push ( 0 ) ; break ; case Type . FLOAT : mg . push ( ( float ) 0 ) ; break ; case Type . LONG : mg . push ( ( long ) 0 ) ; break ; case Type . DOUBLE : mg . push ( ( double ) 0 ) ; break ; // ARRAY & OBJECT - push a null on the stack
default : mg . visitInsn ( ACONST_NULL ) ; break ; } mg . storeLocal ( returnValue ) ; } // Object [ ] args ;
int args = mg . newLocal ( TYPE_Object_ARRAY ) ; // args = new Object [ # of args ] ;
mg . push ( argTypes . length ) ; mg . visitTypeInsn ( ANEWARRAY , "java/lang/Object" ) ; mg . storeLocal ( args ) ; // args [ i ] = " parameter " ; - > for each parameter
for ( int i = 0 ; i < argTypes . length ; i ++ ) { mg . loadLocal ( args ) ; mg . push ( i ) ; // Convert primitives to objects to put in ' args ' array .
switch ( argTypes [ i ] . getSort ( ) ) { case Type . BOOLEAN : mg . visitTypeInsn ( NEW , "java/lang/Boolean" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Boolean" , "<init>" , "(Z)V" ) ; break ; case Type . CHAR : mg . visitTypeInsn ( NEW , "java/lang/Character" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Character" , "<init>" , "(C)V" ) ; break ; case Type . BYTE : mg . visitTypeInsn ( NEW , "java/lang/Byte" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Byte" , "<init>" , "(B)V" ) ; break ; case Type . SHORT : mg . visitTypeInsn ( NEW , "java/lang/Short" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Short" , "<init>" , "(S)V" ) ; break ; case Type . INT : mg . visitTypeInsn ( NEW , "java/lang/Integer" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Integer" , "<init>" , "(I)V" ) ; break ; case Type . FLOAT : mg . visitTypeInsn ( NEW , "java/lang/Float" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Float" , "<init>" , "(F)V" ) ; break ; case Type . LONG : mg . visitTypeInsn ( NEW , "java/lang/Long" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Long" , "<init>" , "(J)V" ) ; break ; case Type . DOUBLE : mg . visitTypeInsn ( NEW , "java/lang/Double" ) ; mg . visitInsn ( DUP ) ; mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
mg . visitMethodInsn ( INVOKESPECIAL , "java/lang/Double" , "<init>" , "(D)V" ) ; break ; // ARRAY & OBJECT - no need to copy , just load the arg
default : mg . loadArg ( i ) ; // for non - static , arg 0 = " this "
break ; } mg . visitInsn ( AASTORE ) ; } // < bean impl > bean = ( bean impl ) container . EjbPreInvokeForManagedBean
// ( this ,
// methodId ,
// ivBeanO ,
// args ) ;
Type implType = Type . getType ( "L" + implClassName + ";" ) ; int bean = mg . newLocal ( implType ) ; loadContainer ( mg , className , MANAGED_BEAN ) ; loadWrapperBase ( mg , className , MANAGED_BEAN ) ; mg . push ( methodId ) ; mg . loadLocal ( s ) ; mg . loadThis ( ) ; mg . visitFieldInsn ( GETFIELD , className , "ivBeanO" , "Lcom/ibm/ejs/container/BeanO;" ) ; mg . loadLocal ( args ) ; mg . visitMethodInsn ( INVOKEVIRTUAL , "com/ibm/ejs/container/EJSContainer" , EjbPreInvoke , "(Lcom/ibm/ejs/container/EJSWrapperBase;ILcom/ibm/ejs/container/EJSDeployedSupport;Lcom/ibm/ejs/container/BeanO;[Ljava/lang/Object;)Ljava/lang/Object;" ) ; mg . checkCast ( implType ) ; mg . storeLocal ( bean ) ; // Now invoke the business method through the interceptors via
// EJSContainer . invoke ( ) ;
// container . invoke ( s ) ;
// or
// rtnValue = ( type ) container . invoke ( s ) ;
// or
// rtnValue = ( ( object type ) container . invoke ( s ) ) . < type > Value ( ) ; / / unbox
loadContainer ( mg , className , MANAGED_BEAN ) ; mg . loadLocal ( s ) ; mg . visitInsn ( ACONST_NULL ) ; mg . visitMethodInsn ( INVOKEVIRTUAL , "com/ibm/ejs/container/EJSContainer" , "invoke" , "(Lcom/ibm/ejs/container/EJSDeployedSupport;Ljavax/ejb/Timer;)Ljava/lang/Object;" ) ; if ( returnType == Type . VOID_TYPE ) { // No return value , just pop the returned value ( null ) off the stack
mg . pop ( ) ; } else { // Unbox any primitive values or add the appropriate cast
// for object / array values , and then store in local variable . d369262.7
unbox ( mg , returnType ) ; mg . storeLocal ( returnValue ) ; } // return
if ( returnType != Type . VOID_TYPE ) { mg . loadLocal ( returnValue ) ; } mg . returnValue ( ) ; // End Method Code . . .
mg . endMethod ( ) ; // GeneratorAdapter accounts for visitMaxs ( x , y )
mg . visitEnd ( ) ; |
public class ChainableReverseAbstractInterpreter { /** * Returns a version of { @ code type } that is restricted by some knowledge
* about the result of the { @ code typeof } operation .
* The behavior of the { @ code typeof } operator can be summarized by the
* following table :
* < table >
* < tr > < th > type < / th > < th > result < / th > < / tr >
* < tr > < td > { @ code undefined } < / td > < td > " undefined " < / td > < / tr >
* < tr > < td > { @ code null } < / td > < td > " object " < / td > < / tr >
* < tr > < td > { @ code boolean } < / td > < td > " boolean " < / td > < / tr >
* < tr > < td > { @ code number } < / td > < td > " number " < / td > < / tr >
* < tr > < td > { @ code string } < / td > < td > " string " < / td > < / tr >
* < tr > < td > { @ code Object } ( which doesn ' t implement [ [ Call ] ] ) < / td >
* < td > " object " < / td > < / tr >
* < tr > < td > { @ code Object } ( which implements [ [ Call ] ] ) < / td >
* < td > " function " < / td > < / tr >
* < / table >
* @ param type the type to restrict
* @ param value A value known to be equal or not equal to the result of the
* { @ code typeof } operation
* @ param resultEqualsValue { @ code true } if the { @ code typeOf } result is known
* to equal { @ code value } ; { @ code false } if it is known < em > not < / em > to
* equal { @ code value }
* @ return the restricted type or null if no version of the type matches the
* restriction */
JSType getRestrictedByTypeOfResult ( JSType type , String value , boolean resultEqualsValue ) { } } | if ( type == null ) { if ( resultEqualsValue ) { JSType result = getNativeTypeForTypeOf ( value ) ; return result == null ? getNativeType ( CHECKED_UNKNOWN_TYPE ) : result ; } else { return null ; } } return type . visit ( new RestrictByOneTypeOfResultVisitor ( value , resultEqualsValue ) ) ; |
public class RangeAxis { /** * { @ inheritDoc } */
@ Override public boolean hasNext ( ) { } } | resetToLastKey ( ) ; if ( mFirst ) { mFirst = false ; if ( mFrom . hasNext ( ) && Type . getType ( mFrom . getNode ( ) . getTypeKey ( ) ) . derivesFrom ( Type . INTEGER ) ) { mStart = Integer . parseInt ( new String ( ( ( ITreeValData ) mFrom . getNode ( ) ) . getRawValue ( ) ) ) ; if ( mTo . hasNext ( ) && Type . getType ( mTo . getNode ( ) . getTypeKey ( ) ) . derivesFrom ( Type . INTEGER ) ) { mEnd = Integer . parseInt ( new String ( ( ( ITreeValData ) mTo . getNode ( ) ) . getRawValue ( ) ) ) ; } else { // at least one operand is the empty sequence
resetToStartKey ( ) ; return false ; } } else { // at least one operand is the empty sequence
resetToStartKey ( ) ; return false ; } } if ( mStart <= mEnd ) { AtomicValue val = new AtomicValue ( TypedValue . getBytes ( Integer . toString ( mStart ) ) , NamePageHash . generateHashForString ( "xs:integer" ) ) ; final int itemKey = getItemList ( ) . addItem ( val ) ; moveTo ( itemKey ) ; mStart ++ ; return true ; } else { resetToStartKey ( ) ; return false ; } |
public class RequestQueue { /** * Cancels all requests in this queue with the given tag . Tag must be non - null
* and equality is by identity . */
public void cancelAll ( final Object tag ) { } } | if ( tag == null ) { throw new IllegalArgumentException ( "Cannot cancelAll with a null tag" ) ; } cancelAll ( new RequestFilter ( ) { @ Override public boolean apply ( Request < ? > request ) { return request . getTag ( ) == tag ; } } ) ; |
public class FileSystemGroupStore { /** * Returns an < code > Iterator < / code > over the < code > Collection < / code > of < code > IEntityGroups
* < / code > that are members of this < code > IEntityGroup < / code > .
* @ return java . util . Iterator
* @ param group org . apereo . portal . groups . IEntityGroup */
@ Override public java . util . Iterator findMemberGroups ( IEntityGroup group ) throws GroupsException { } } | String [ ] keys = findMemberGroupKeys ( group ) ; // No foreign groups here .
List groups = new ArrayList ( keys . length ) ; for ( int i = 0 ; i < keys . length ; i ++ ) { groups . add ( find ( keys [ i ] ) ) ; } return groups . iterator ( ) ; |
public class SemanticFailure { /** * { @ inheritDoc } */
@ Override public String getUserFacingMessage ( ) { } } | final StringBuilder bldr = new StringBuilder ( ) ; bldr . append ( "SEMANTIC FAILURE" ) ; final String name = getName ( ) ; if ( name != null ) { bldr . append ( " in " ) ; bldr . append ( name ) ; } bldr . append ( "\n\treason: " ) ; final String msg = getMessage ( ) ; if ( msg != null ) bldr . append ( msg ) ; else bldr . append ( "Unknown" ) ; bldr . append ( "\n" ) ; if ( causes != null ) { for ( final SemanticWarning se : causes ) { String [ ] userMsg = se . getUserFacingMessage ( ) . split ( "\n" ) ; for ( final String s : userMsg ) { bldr . append ( "\n\t" ) ; bldr . append ( s ) ; } } return bldr . toString ( ) ; } bldr . append ( getCause ( ) ) ; return bldr . toString ( ) ; |
public class BigtableSession { /** * Create a new { @ link com . google . cloud . bigtable . grpc . io . ChannelPool } , with auth headers . This
* method allows users to override the default implementation with their own .
* @ param channelFactory a { @ link ChannelPool . ChannelFactory } object .
* @ param count The number of channels in the pool .
* @ return a { @ link com . google . cloud . bigtable . grpc . io . ChannelPool } object .
* @ throws java . io . IOException if any . */
protected ManagedChannel createChannelPool ( final ChannelPool . ChannelFactory channelFactory , int count ) throws IOException { } } | return new ChannelPool ( channelFactory , count ) ; |
public class ZipUtil { /** * Unpacks a single file from a ZIP stream to a file .
* @ param is
* ZIP stream .
* @ param name
* entry name .
* @ param file
* target file to be created or overwritten .
* @ return < code > true < / code > if the entry was found and unpacked ,
* < code > false < / code > if the entry was not found .
* @ throws java . io . IOException if file is not found or writing to it fails */
public static boolean unpackEntry ( InputStream is , String name , File file ) throws IOException { } } | return handle ( is , name , new FileUnpacker ( file ) ) ; |
public class HighLevelEncoder { /** * public static byte [ ] getBytesForMessage ( String msg ) {
* return msg . getBytes ( Charset . forName ( " cp437 " ) ) ; / / See 4.4.3 and annex B of ISO / IEC 15438:2001 ( E ) */
private static char randomize253State ( char ch , int codewordPosition ) { } } | int pseudoRandom = ( ( 149 * codewordPosition ) % 253 ) + 1 ; int tempVariable = ch + pseudoRandom ; return ( char ) ( tempVariable <= 254 ? tempVariable : tempVariable - 254 ) ; |
public class HttpSessionContextImpl { /** * Called by webcontainer to do prilimary session setup , once per webapp per
* request . */
public HttpSession sessionPreInvoke ( HttpServletRequest req , HttpServletResponse res ) { } } | if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( methodClassName , methodNames [ SESSION_PRE_INVOKE ] ) ; } // getSessionAffinityContext ( req ) ; / / this call will create sac if necessary
// PK01801 Due to componentization changed in webcontainer for v7 , must make
// this
// check and call setRunningCollaborators ( true ) here for
// sessionPreInvoke . . to prevent
// possible UnauthorizedSessionRequestException from being generated by
// collaborator .
if ( _smc . getIntegrateSecurity ( ) && req instanceof IExtendedRequest ) { ( ( IExtendedRequest ) req ) . setRunningCollaborators ( true ) ; // PK01801
} HttpSession sess = null ; try { // start SCWI 106607 ( PM86470 ) - add try / catch block
sess = getIHttpSession ( req , res , false , _smc . getOnlyCheckInCacheDuringPreInvoke ( ) ) ; // false
// don ' t
// create
if ( _smc . getIntegrateSecurity ( ) && req instanceof IExtendedRequest ) { ( ( IExtendedRequest ) req ) . setRunningCollaborators ( false ) ; // PK01801 set
// back to false
} // lock session if serialization feature enabled
if ( _smc . getAllowSerializedSessionAccess ( ) ) { lockSession ( req , sess ) ; } } catch ( IllegalStateException e ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . logp ( Level . FINE , methodClassName , methodNames [ SESSION_PRE_INVOKE ] , "IllegalStateException occurred getting the session during preinvoke possibly due to a timing window. Continuing with the request" , e ) ; } } // end SCWI 106607 ( PM86470)
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . exiting ( methodClassName , methodNames [ SESSION_PRE_INVOKE ] ) ; } return sess ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.