signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AdminImpl { /** * { @ inheritDoc } */ @ Override public void run ( ) { } }
if ( this . state . compareAndSet ( NEW , RUNNING ) ) { try { LOG . debug ( "AdminImpl starting up" ) ; this . threadRef . set ( Thread . currentThread ( ) ) ; while ( ! isShutdown ( ) ) { this . jedis . subscribe ( this . jedisPubSub , createFullChannels ( ) ) ; } } finally { LOG . debug ( "AdminImpl shutting down" ) ; this . jedis . quit ( ) ; this . threadRef . set ( null ) ; } } else { if ( RUNNING . equals ( this . state . get ( ) ) ) { throw new IllegalStateException ( "This AdminImpl is already running" ) ; } else { throw new IllegalStateException ( "This AdminImpl is shutdown" ) ; } }
public class DescribeStorediSCSIVolumesResult { /** * Describes a single unit of output from < a > DescribeStorediSCSIVolumes < / a > . The following fields are returned : * < ul > * < li > * < b > ChapEnabled < / b > : Indicates whether mutual CHAP is enabled for the iSCSI target . * < / li > * < li > * < b > LunNumber < / b > : The logical disk number . * < / li > * < li > * < b > NetworkInterfaceId < / b > : The network interface ID of the stored volume that initiator use to map the stored * volume as an iSCSI target . * < / li > * < li > * < b > NetworkInterfacePort < / b > : The port used to communicate with iSCSI targets . * < / li > * < li > * < b > PreservedExistingData < / b > : Indicates if when the stored volume was created , existing data on the underlying * local disk was preserved . * < / li > * < li > * < b > SourceSnapshotId < / b > : If the stored volume was created from a snapshot , this field contains the snapshot ID * used , e . g . snap - 1122aabb . Otherwise , this field is not included . * < / li > * < li > * < b > StorediSCSIVolumes < / b > : An array of StorediSCSIVolume objects where each object contains metadata about one * stored volume . * < / li > * < li > * < b > TargetARN < / b > : The Amazon Resource Name ( ARN ) of the volume target . * < / li > * < li > * < b > VolumeARN < / b > : The Amazon Resource Name ( ARN ) of the stored volume . * < / li > * < li > * < b > VolumeDiskId < / b > : The disk ID of the local disk that was specified in the < a > CreateStorediSCSIVolume < / a > * operation . * < / li > * < li > * < b > VolumeId < / b > : The unique identifier of the storage volume , e . g . vol - 1122AABB . * < / li > * < li > * < b > VolumeiSCSIAttributes < / b > : An < a > VolumeiSCSIAttributes < / a > object that represents a collection of iSCSI * attributes for one stored volume . * < / li > * < li > * < b > VolumeProgress < / b > : Represents the percentage complete if the volume is restoring or bootstrapping that * represents the percent of data transferred . This field does not appear in the response if the stored volume is * not restoring or bootstrapping . * < / li > * < li > * < b > VolumeSizeInBytes < / b > : The size of the volume in bytes . * < / li > * < li > * < b > VolumeStatus < / b > : One of the < code > VolumeStatus < / code > values that indicates the state of the volume . * < / li > * < li > * < b > VolumeType < / b > : One of the enumeration values describing the type of the volume . Currently , on STORED volumes * are supported . * < / li > * < / ul > * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setStorediSCSIVolumes ( java . util . Collection ) } or { @ link # withStorediSCSIVolumes ( java . util . Collection ) } if * you want to override the existing values . * @ param storediSCSIVolumes * Describes a single unit of output from < a > DescribeStorediSCSIVolumes < / a > . The following fields are * returned : < / p > * < ul > * < li > * < b > ChapEnabled < / b > : Indicates whether mutual CHAP is enabled for the iSCSI target . * < / li > * < li > * < b > LunNumber < / b > : The logical disk number . * < / li > * < li > * < b > NetworkInterfaceId < / b > : The network interface ID of the stored volume that initiator use to map the * stored volume as an iSCSI target . * < / li > * < li > * < b > NetworkInterfacePort < / b > : The port used to communicate with iSCSI targets . * < / li > * < li > * < b > PreservedExistingData < / b > : Indicates if when the stored volume was created , existing data on the * underlying local disk was preserved . * < / li > * < li > * < b > SourceSnapshotId < / b > : If the stored volume was created from a snapshot , this field contains the * snapshot ID used , e . g . snap - 1122aabb . Otherwise , this field is not included . * < / li > * < li > * < b > StorediSCSIVolumes < / b > : An array of StorediSCSIVolume objects where each object contains metadata about * one stored volume . * < / li > * < li > * < b > TargetARN < / b > : The Amazon Resource Name ( ARN ) of the volume target . * < / li > * < li > * < b > VolumeARN < / b > : The Amazon Resource Name ( ARN ) of the stored volume . * < / li > * < li > * < b > VolumeDiskId < / b > : The disk ID of the local disk that was specified in the * < a > CreateStorediSCSIVolume < / a > operation . * < / li > * < li > * < b > VolumeId < / b > : The unique identifier of the storage volume , e . g . vol - 1122AABB . * < / li > * < li > * < b > VolumeiSCSIAttributes < / b > : An < a > VolumeiSCSIAttributes < / a > object that represents a collection of iSCSI * attributes for one stored volume . * < / li > * < li > * < b > VolumeProgress < / b > : Represents the percentage complete if the volume is restoring or bootstrapping that * represents the percent of data transferred . This field does not appear in the response if the stored * volume is not restoring or bootstrapping . * < / li > * < li > * < b > VolumeSizeInBytes < / b > : The size of the volume in bytes . * < / li > * < li > * < b > VolumeStatus < / b > : One of the < code > VolumeStatus < / code > values that indicates the state of the volume . * < / li > * < li > * < b > VolumeType < / b > : One of the enumeration values describing the type of the volume . Currently , on STORED * volumes are supported . * < / li > * @ return Returns a reference to this object so that method calls can be chained together . */ public DescribeStorediSCSIVolumesResult withStorediSCSIVolumes ( StorediSCSIVolume ... storediSCSIVolumes ) { } }
if ( this . storediSCSIVolumes == null ) { setStorediSCSIVolumes ( new com . amazonaws . internal . SdkInternalList < StorediSCSIVolume > ( storediSCSIVolumes . length ) ) ; } for ( StorediSCSIVolume ele : storediSCSIVolumes ) { this . storediSCSIVolumes . add ( ele ) ; } return this ;
public class Collectors { /** * Returns a { @ code Collector } that calculates average of integer - valued input elements . * @ param < T > the type of the input elements * @ param mapper the mapping function which extracts value from element to calculate result * @ return a { @ code Collector } * @ since 1.1.3 */ @ NotNull public static < T > Collector < T , ? , Double > averagingInt ( @ NotNull final ToIntFunction < ? super T > mapper ) { } }
return averagingHelper ( new BiConsumer < long [ ] , T > ( ) { @ Override public void accept ( long [ ] t , T u ) { t [ 0 ] ++ ; // count t [ 1 ] += mapper . applyAsInt ( u ) ; // sum } } ) ;
public class MetaUtil { /** * 获得所有表名 * @ param ds 数据源 * @ param types 表类型 * @ return 表名列表 */ public static List < String > getTables ( DataSource ds , TableType ... types ) { } }
return getTables ( ds , null , null , types ) ;
public class ResourceCache { /** * Initialises cache for current thread - scope . */ public void init ( ) { } }
if ( initDepth . get ( ) == null ) { initDepth . set ( 1 ) ; } else { initDepth . set ( initDepth . get ( ) + 1 ) ; } if ( resourceCache . get ( ) == null ) { resourceCache . set ( new HashMap < String , Object > ( ) ) ; } if ( cacheLocked . get ( ) == null ) { cacheLocked . set ( Boolean . FALSE ) ; }
public class BufferedCollectionValueModel { /** * Gets the list value associated with this value model , creating a list * model buffer containing its contents , suitable for manipulation . * @ return The list model buffer */ private Object updateBufferedListModel ( final Object wrappedCollection ) { } }
if ( bufferedListModel == null ) { bufferedListModel = createBufferedListModel ( ) ; bufferedListModel . addListDataListener ( listChangeHandler ) ; setValue ( bufferedListModel ) ; } if ( wrappedCollection == null ) { bufferedListModel . clear ( ) ; } else { if ( wrappedType . isAssignableFrom ( wrappedCollection . getClass ( ) ) ) { Collection buffer = null ; if ( wrappedCollection instanceof Object [ ] ) { Object [ ] wrappedArray = ( Object [ ] ) wrappedCollection ; buffer = Arrays . asList ( wrappedArray ) ; } else { buffer = ( Collection ) wrappedCollection ; } bufferedListModel . clear ( ) ; bufferedListModel . addAll ( prepareBackingCollection ( buffer ) ) ; } else { throw new IllegalArgumentException ( "wrappedCollection must be assignable from " + wrappedType . getName ( ) ) ; } } return bufferedListModel ;
public class ActivityDataMap { /** * Returns the value of the named action ' s process result * without storing it in the cache . * If no process result of the given name exists , returns null . * @ param name a { @ code String } specifying the name of the action * @ return an { @ code Object } containing the value of the action result , * or { @ code null } if the action result does not exist */ public Object getActionResultWithoutCache ( String name ) { } }
if ( activity . getProcessResult ( ) != null ) { return activity . getProcessResult ( ) . getResultValue ( name ) ; } else { return null ; }
public class ClientVpnEndpoint { /** * Information about the authentication method used by the Client VPN endpoint . * @ param authenticationOptions * Information about the authentication method used by the Client VPN endpoint . */ public void setAuthenticationOptions ( java . util . Collection < ClientVpnAuthentication > authenticationOptions ) { } }
if ( authenticationOptions == null ) { this . authenticationOptions = null ; return ; } this . authenticationOptions = new com . amazonaws . internal . SdkInternalList < ClientVpnAuthentication > ( authenticationOptions ) ;
public class PropertiesManager { /** * Load the current values of all properties . < br > * < br > * This method will block and wait for the properties to be loaded . See * { @ link # loadNB ( ) } for a non - blocking version . * @ throws IOException * if there is an error while attempting to load the properties */ public void load ( ) throws IOException { } }
try { Future < Void > task = loadNB ( ) ; task . get ( ) ; } catch ( ExecutionException e ) { Throwable t = e . getCause ( ) ; if ( t instanceof IOException ) { throw ( IOException ) t ; } throw new IOException ( t ) ; } catch ( InterruptedException e ) { throw new IOException ( "Loading of the properties file \"" + getFile ( ) . getAbsolutePath ( ) + "\" was interrupted." ) ; }
public class XElementBase { /** * Sets or clears the content of this element . * @ param value the value set or null to clear */ public final void setValue ( Object value ) { } }
if ( value instanceof Date ) { content = formatDateTime ( ( Date ) value ) ; } else if ( value != null ) { content = value . toString ( ) ; } else { content = null ; }
public class ReadExcelUtils { /** * 将指定Sheet页的数据转化成beanMap存入List中 , 列名对应值从第2行开始 , 0 - based * @ param sheet 指定Sheet页 * @ return 无结果返回空List * @ throws ReadExcelException */ public static List < Map < String , Object > > handleSheetToMapList ( Sheet sheet ) throws ReadExcelException { } }
List < Map < String , Object > > listMap = new ArrayList < Map < String , Object > > ( ) ; // 得到Sheet里的列名 List < String > columnList = ReadExcelUtils . getColumnOfSheet ( sheet ) ; for ( int i = 2 ; i < sheet . getLastRowNum ( ) + 1 ; i ++ ) { Map < String , Object > beanMap = new HashMap < String , Object > ( ) ; // 得到行 Row row = sheet . getRow ( i ) ; // 遍历列 for ( int j = 0 ; j < row . getLastCellNum ( ) ; j ++ ) { // 获取单元格 Cell cell = row . getCell ( j ) ; if ( cell != null ) { // 单元格对应列名 String key = columnList . get ( j ) ; // 单元格对应值 Object value = ReadExcelUtils . getCellValue ( cell . getCellType ( ) , cell ) ; // key - value pairs 放入map if ( value != null ) { beanMap . put ( key , value ) ; } } } // 将每个beanMap放入List中 if ( ! beanMap . isEmpty ( ) ) { listMap . add ( beanMap ) ; } } return listMap ;
public class SerializationUtils { /** * Serialize an object into a byte array . * @ param obj A { @ link Serializable } object * @ return Byte serialization of input object * @ throws IOException if it fails to serialize the object */ public static < T extends Serializable > byte [ ] serializeIntoBytes ( T obj ) throws IOException { } }
try ( ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( bos ) ) { oos . writeObject ( obj ) ; oos . flush ( ) ; return bos . toByteArray ( ) ; }
public class TextElement { /** * Creates a block of text with placeholders ( " % s " ) that will be replaced with proper string representation of * given { @ link InlineElement } . For example : * < p > { @ code text ( " This is a text with a link % s " , link ( " https : / / somepage " , " to here " ) ) } * @ param format text with placeholders for elements * @ param elements elements to be put in the text * @ return block of text */ public static TextElement text ( String format , InlineElement ... elements ) { } }
return new TextElement ( format , Arrays . asList ( elements ) ) ;
public class NumberExpression { /** * Create a { @ code this > right } expression * @ param < A > * @ param right rhs of the comparison * @ return { @ code this > right } * @ see java . lang . Comparable # compareTo ( Object ) */ public final < A extends Number & Comparable < ? > > BooleanExpression gt ( Expression < A > right ) { } }
return Expressions . booleanOperation ( Ops . GT , mixin , right ) ;
public class Clicker { /** * Clicks on a certain list line on a specified List and * returns the { @ link TextView } s that the list line is showing . * @ param itemIndex the item index that should be clicked * @ param recyclerViewIndex the index of the RecyclerView . E . g . Index 1 if two RecyclerViews are available * @ param id the resource id of the View to click * @ return an { @ code ArrayList } of the { @ code TextView } s located in the list line */ public ArrayList < TextView > clickInRecyclerView ( int itemIndex , int recyclerViewIndex , int id , boolean longClick , int time ) { } }
View viewOnLine = null ; final long endTime = SystemClock . uptimeMillis ( ) + Timeout . getSmallTimeout ( ) ; if ( itemIndex < 0 ) itemIndex = 0 ; ArrayList < View > views = new ArrayList < View > ( ) ; ViewGroup recyclerView = viewFetcher . getRecyclerView ( recyclerViewIndex , Timeout . getSmallTimeout ( ) ) ; if ( recyclerView == null ) { Assert . fail ( "RecyclerView is not found!" ) ; } else { failIfIndexHigherThenChildCount ( recyclerView , itemIndex , endTime ) ; viewOnLine = getViewOnRecyclerItemIndex ( ( ViewGroup ) recyclerView , recyclerViewIndex , itemIndex ) ; } if ( viewOnLine != null ) { views = viewFetcher . getViews ( viewOnLine , true ) ; views = RobotiumUtils . removeInvisibleViews ( views ) ; if ( id == 0 ) { clickOnScreen ( viewOnLine , longClick , time ) ; } else { clickOnScreen ( getView ( id , views ) ) ; } } return RobotiumUtils . filterViews ( TextView . class , views ) ;
public class HTMLReporter { /** * Generate a groups list for each suite . * @ param outputDirectory The target directory for the generated file ( s ) . */ private void createGroups ( List < ISuite > suites , File outputDirectory ) throws Exception { } }
int index = 1 ; for ( ISuite suite : suites ) { SortedMap < String , SortedSet < ITestNGMethod > > groups = sortGroups ( suite . getMethodsByGroups ( ) ) ; if ( ! groups . isEmpty ( ) ) { VelocityContext context = createContext ( ) ; context . put ( SUITE_KEY , suite ) ; context . put ( GROUPS_KEY , groups ) ; String fileName = String . format ( "suite%d_%s" , index , GROUPS_FILE ) ; generateFile ( new File ( outputDirectory , fileName ) , GROUPS_FILE + TEMPLATE_EXTENSION , context ) ; } ++ index ; }
public class ProfileSummaryBuilder { /** * Build the summary for the interfaces in the package . * @ param node the XML element that specifies which components to document * @ param packageSummaryContentTree the tree to which the interface summary * will be added */ public void buildInterfaceSummary ( XMLNode node , Content packageSummaryContentTree ) { } }
String interfaceTableSummary = configuration . getText ( "doclet.Member_Table_Summary" , configuration . getText ( "doclet.Interface_Summary" ) , configuration . getText ( "doclet.interfaces" ) ) ; String [ ] interfaceTableHeader = new String [ ] { configuration . getText ( "doclet.Interface" ) , configuration . getText ( "doclet.Description" ) } ; ClassDoc [ ] interfaces = pkg . interfaces ( ) ; if ( interfaces . length > 0 ) { profileWriter . addClassesSummary ( interfaces , configuration . getText ( "doclet.Interface_Summary" ) , interfaceTableSummary , interfaceTableHeader , packageSummaryContentTree ) ; }
public class NeuralNetwork { /** * Compute the network output error . * @ param output the desired output . * @ param gradient the array to store gradient on output . * @ return the error defined by loss function . */ private double computeOutputError ( double output , double [ ] gradient ) { } }
double error = 0.0 ; double out = outputLayer . output [ 0 ] ; double g = output - out ; error += ( 0.5 * g * g ) ; gradient [ 0 ] = g ; return error ;
public class DaoManager { /** * Helper method to lookup a DAO if it has already been associated with the table - config . Otherwise this returns * null . */ public synchronized static < D extends Dao < T , ? > , T > D lookupDao ( ConnectionSource connectionSource , DatabaseTableConfig < T > tableConfig ) { } }
if ( connectionSource == null ) { throw new IllegalArgumentException ( "connectionSource argument cannot be null" ) ; } TableConfigConnectionSource key = new TableConfigConnectionSource ( connectionSource , tableConfig ) ; Dao < ? , ? > dao = lookupDao ( key ) ; if ( dao == null ) { return null ; } else { @ SuppressWarnings ( "unchecked" ) D castDao = ( D ) dao ; return castDao ; }
public class QuickStartSecurityRegistry { /** * { @ inheritDoc } */ @ Override public SearchResult getUsers ( String pattern , int limit ) throws RegistryException { } }
if ( pattern == null ) { throw new IllegalArgumentException ( "pattern is null" ) ; } if ( pattern . isEmpty ( ) ) { throw new IllegalArgumentException ( "pattern is an empty String" ) ; } if ( limit >= 0 && user . matches ( pattern ) ) { List < String > list = new ArrayList < String > ( ) ; list . add ( user ) ; return new SearchResult ( list , false ) ; } else { return new SearchResult ( ) ; }
public class CustomFieldServiceLocator { /** * For the given interface , get the stub implementation . * If this service has no port for the given interface , * then ServiceException is thrown . */ public java . rmi . Remote getPort ( Class serviceEndpointInterface ) throws javax . xml . rpc . ServiceException { } }
try { if ( com . google . api . ads . admanager . axis . v201808 . CustomFieldServiceInterface . class . isAssignableFrom ( serviceEndpointInterface ) ) { com . google . api . ads . admanager . axis . v201808 . CustomFieldServiceSoapBindingStub _stub = new com . google . api . ads . admanager . axis . v201808 . CustomFieldServiceSoapBindingStub ( new java . net . URL ( CustomFieldServiceInterfacePort_address ) , this ) ; _stub . setPortName ( getCustomFieldServiceInterfacePortWSDDServiceName ( ) ) ; return _stub ; } } catch ( java . lang . Throwable t ) { throw new javax . xml . rpc . ServiceException ( t ) ; } throw new javax . xml . rpc . ServiceException ( "There is no stub implementation for the interface: " + ( serviceEndpointInterface == null ? "null" : serviceEndpointInterface . getName ( ) ) ) ;
public class MetaCSPLogging { /** * Set a desired log level for a specific class . * @ param c The class to set the log level for . * @ param l The desired log level . */ public static void setLevel ( Class < ? > c , Level l ) /* throws LoggerNotDefined */ { } }
if ( ! loggers . containsKey ( c ) ) tempLevels . put ( c , l ) ; else loggers . get ( c ) . setLevel ( l ) ; // System . out . println ( " Set level " + l + " for logger " + loggers . get ( c ) . getName ( ) ) ;
public class MethodNode { /** * Provides a nicely formatted string of the method definition . For simplicity , generic types on some of the elements * are not displayed . * @ return * string form of node with some generic elements suppressed */ @ Override public String getText ( ) { } }
String retType = AstToTextHelper . getClassText ( returnType ) ; String exceptionTypes = AstToTextHelper . getThrowsClauseText ( exceptions ) ; String parms = AstToTextHelper . getParametersText ( parameters ) ; return AstToTextHelper . getModifiersText ( modifiers ) + " " + retType + " " + name + "(" + parms + ") " + exceptionTypes + " { ... }" ;
public class SubtitleChatOverlay { /** * Display the specified message now , unless we are to ignore it . */ protected void displayMessage ( ChatMessage message , Graphics2D gfx ) { } }
// get the non - history message type . . . int type = getType ( message , false ) ; if ( type != ChatLogic . IGNORECHAT ) { // display it now displayMessage ( message , type , gfx ) ; }
public class CmsSessionManager { /** * Updates the the OpenCms session data used for quick authentication of users . < p > * This is required if the user data ( current group or project ) was changed in * the requested document . < p > * The user data is only updated if the user was authenticated to the system . * @ param cms the current OpenCms user context * @ param req the current request */ public void updateSessionInfo ( CmsObject cms , HttpServletRequest req ) { } }
if ( ! cms . getRequestContext ( ) . isUpdateSessionEnabled ( ) ) { // this request must not update the user session info // this is true for long running " thread " requests , e . g . during project publish return ; } if ( cms . getRequestContext ( ) . getUri ( ) . equals ( CmsToolManager . VIEW_JSPPAGE_LOCATION ) ) { // this request must not update the user session info // if not the switch user feature would not work return ; } if ( ! cms . getRequestContext ( ) . getCurrentUser ( ) . isGuestUser ( ) ) { // Guest user requests don ' t need to update the OpenCms user session information // get the session info object for the user CmsSessionInfo sessionInfo = getSessionInfo ( req ) ; if ( sessionInfo != null ) { // update the users session information sessionInfo . update ( cms . getRequestContext ( ) ) ; addSessionInfo ( sessionInfo ) ; } else { HttpSession session = req . getSession ( false ) ; // only create session info if a session is already available if ( session != null ) { // create a new session info for the user sessionInfo = new CmsSessionInfo ( cms . getRequestContext ( ) , new CmsUUID ( ) , session . getMaxInactiveInterval ( ) ) ; // append the session info to the http session session . setAttribute ( CmsSessionInfo . ATTRIBUTE_SESSION_ID , sessionInfo . getSessionId ( ) . clone ( ) ) ; // update the session info user data addSessionInfo ( sessionInfo ) ; } } }
public class ConcurrentReferenceHashMap { /** * { @ inheritDoc } * @ throws UnsupportedOperationException { @ inheritDoc } * @ throws ClassCastException { @ inheritDoc } * @ throws NullPointerException { @ inheritDoc } * @ implSpec The default implementation is equivalent to the following steps for this * { @ code map } , then returning the current value or { @ code null } if now * absent : * < pre > { @ code * if ( map . get ( key ) = = null ) { * V newValue = mappingFunction . apply ( key ) ; * if ( newValue ! = null ) * return map . putIfAbsent ( key , newValue ) ; * } < / pre > * The default implementation may retry these steps when multiple * threads attempt updates including potentially calling the mapping * function multiple times . * < p > This implementation assumes that the ConcurrentMap cannot contain null * values and { @ code get ( ) } returning null unambiguously means the key is * absent . Implementations which support null values < strong > must < / strong > * override this default implementation . */ @ Override public V applyIfAbsent ( K key , IFunction < ? super K , ? extends V > mappingFunction ) { } }
checkNotNull ( key ) ; checkNotNull ( mappingFunction ) ; int hash = hashOf ( key ) ; Segment < K , V > segment = segmentFor ( hash ) ; V v = segment . get ( key , hash ) ; return v == null ? segment . put ( key , hash , null , mappingFunction , true ) : v ;
public class Discovery { /** * Update a collection . * @ param updateCollectionOptions the { @ link UpdateCollectionOptions } containing the options for the call * @ return a { @ link ServiceCall } with a response type of { @ link Collection } */ public ServiceCall < Collection > updateCollection ( UpdateCollectionOptions updateCollectionOptions ) { } }
Validator . notNull ( updateCollectionOptions , "updateCollectionOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" } ; String [ ] pathParameters = { updateCollectionOptions . environmentId ( ) , updateCollectionOptions . collectionId ( ) } ; RequestBuilder builder = RequestBuilder . put ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "updateCollection" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateCollectionOptions . name ( ) != null ) { contentJson . addProperty ( "name" , updateCollectionOptions . name ( ) ) ; } if ( updateCollectionOptions . description ( ) != null ) { contentJson . addProperty ( "description" , updateCollectionOptions . description ( ) ) ; } if ( updateCollectionOptions . configurationId ( ) != null ) { contentJson . addProperty ( "configuration_id" , updateCollectionOptions . configurationId ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Collection . class ) ) ;
public class Linqy { /** * Exclude all elements from an iterable that don ' t match a given * predicate . */ public static < T > Iterable < T > filter ( final Iterable < T > sequence , final Predicate < ? super T > filter ) { } }
return new Iterable < T > ( ) { @ Override public Iterator < T > iterator ( ) { return new FilteringIterator < T > ( sequence . iterator ( ) , filter ) ; } } ;
public class current_hostname { /** * < pre > * Use this operation to modify current hostname . * < / pre > */ public static current_hostname modify ( nitro_service client , current_hostname resource ) throws Exception { } }
resource . validate ( "modify" ) ; return ( ( current_hostname [ ] ) resource . update_resource ( client ) ) [ 0 ] ;
public class ResourceConfiguration { /** * Deserializing a Resourceconfiguration out of a JSON - file from the persistent storage . * The order is important and the reader is passed through the objects as visitor . * @ param pFile * where the resource lies in . * @ return a complete { @ link ResourceConfiguration } instance . * @ throws TTIOException */ public static ResourceConfiguration deserialize ( final File pFile , final String pResource ) throws TTIOException { } }
try { final File file = new File ( new File ( new File ( pFile , StorageConfiguration . Paths . Data . getFile ( ) . getName ( ) ) , pResource ) , Paths . ConfigBinary . getFile ( ) . getName ( ) ) ; FileReader fileReader = new FileReader ( file ) ; JsonReader jsonReader = new JsonReader ( fileReader ) ; jsonReader . beginObject ( ) ; // caring about the kind of the metabucket jsonReader . nextName ( ) . equals ( JSONNAMES [ 0 ] ) ; Class < ? > metaBucketClazz = Class . forName ( jsonReader . nextString ( ) ) ; // caring about the versioning jsonReader . nextName ( ) . equals ( JSONNAMES [ 1 ] ) ; Class < ? > revClazz = Class . forName ( jsonReader . nextString ( ) ) ; // caring about the DataFactory jsonReader . nextName ( ) . equals ( JSONNAMES [ 2 ] ) ; Class < ? > dataFacClazz = Class . forName ( jsonReader . nextString ( ) ) ; // caring about the ByteHandlers List < IByteHandler > handlerList = new ArrayList < IByteHandler > ( ) ; if ( jsonReader . nextName ( ) . equals ( JSONNAMES [ 3 ] ) ) { jsonReader . beginArray ( ) ; while ( jsonReader . hasNext ( ) ) { Class < ? > handlerClazz = Class . forName ( jsonReader . nextString ( ) ) ; Constructor < ? > handlerCons = handlerClazz . getConstructors ( ) [ 0 ] ; if ( handlerClazz . getName ( ) . equals ( Encryptor . class . getName ( ) ) ) { handlerList . add ( ( IByteHandler ) handlerCons . newInstance ( StandardSettings . KEY ) ) ; } else { handlerList . add ( ( IByteHandler ) handlerCons . newInstance ( ) ) ; } } jsonReader . endArray ( ) ; } ByteHandlerPipeline pipeline = new ByteHandlerPipeline ( handlerList . toArray ( new IByteHandler [ handlerList . size ( ) ] ) ) ; // caring about the storage jsonReader . nextName ( ) . equals ( JSONNAMES [ 4 ] ) ; Class < ? > storageClazz = Class . forName ( jsonReader . nextString ( ) ) ; jsonReader . nextName ( ) . equals ( JSONNAMES [ 5 ] ) ; Properties props = new Properties ( ) ; jsonReader . beginObject ( ) ; while ( jsonReader . hasNext ( ) ) { props . setProperty ( jsonReader . nextName ( ) , jsonReader . nextString ( ) ) ; } jsonReader . endObject ( ) ; jsonReader . endObject ( ) ; jsonReader . close ( ) ; fileReader . close ( ) ; Constructor < ? > metaBucketCons = metaBucketClazz . getConstructors ( ) [ 0 ] ; IMetaEntryFactory metaFac = ( IMetaEntryFactory ) metaBucketCons . newInstance ( ) ; Constructor < ? > dataFacCons = dataFacClazz . getConstructors ( ) [ 0 ] ; IDataFactory dataFactory = ( IDataFactory ) dataFacCons . newInstance ( ) ; Constructor < ? > revCons = revClazz . getConstructors ( ) [ 0 ] ; IRevisioning revObject = ( IRevisioning ) revCons . newInstance ( ) ; Constructor < ? > storageCons = storageClazz . getConstructors ( ) [ 0 ] ; IBackend backend = ( IBackend ) storageCons . newInstance ( props , dataFactory , metaFac , pipeline ) ; return new ResourceConfiguration ( props , backend , revObject , dataFactory , metaFac ) ; } catch ( IOException | ClassNotFoundException | InstantiationException | IllegalAccessException | InvocationTargetException exc ) { throw new TTIOException ( exc ) ; }
public class FileLastModifiedFilter { /** * Factory method to create an instance of the { @ link FileLastModifiedFilter } that evaluates and filters { @ link File } s * based on whether they were last modified before or after a given span of time . * @ param onBefore { @ link LocalDateTime } used to filter { @ link File } ' s that were last modified * on or before this date / time . * @ param onAfter { @ link LocalDateTime } used to filter { @ link File } ' s that were last modified * on or after this date / time . * @ return an instance of the { @ link FileLastModifiedFilter } . * @ see java . time . LocalDateTime * @ see # outside ( long , long ) */ public static FileLastModifiedFilter outside ( LocalDateTime onBefore , LocalDateTime onAfter ) { } }
return outside ( onBefore . atZone ( ZoneId . systemDefault ( ) ) . toInstant ( ) . toEpochMilli ( ) , onAfter . atZone ( ZoneId . systemDefault ( ) ) . toInstant ( ) . toEpochMilli ( ) ) ;
public class ApiOvhMe { /** * Retrieve associated payment method transaction ID list * REST : GET / me / payment / transaction * @ param paymentMethodId [ required ] Payment method ID * @ param status [ required ] Transaction status * API beta */ public ArrayList < Long > payment_transaction_GET ( Long paymentMethodId , net . minidev . ovh . api . me . payment . method . transaction . OvhStatus status ) throws IOException { } }
String qPath = "/me/payment/transaction" ; StringBuilder sb = path ( qPath ) ; query ( sb , "paymentMethodId" , paymentMethodId ) ; query ( sb , "status" , status ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ;
public class AbstractMinMaxTextBox { /** * get minimum allowed value . * @ return minimum value allowed */ public T getMin ( ) { } }
if ( StringUtils . isEmpty ( getInputElement ( ) . getMin ( ) ) ) { return null ; } try { return this . numberParser . parse ( getInputElement ( ) . getMin ( ) ) ; } catch ( final ParseException e ) { return null ; }
public class ThreadDumpMessage { /** * Returns the ThreadDump in printable format . * @ return the ThreadDump suitable for logging . */ @ Override public String getFormattedMessage ( ) { } }
if ( formattedMessage != null ) { return formattedMessage ; } final StringBuilder sb = new StringBuilder ( 255 ) ; formatTo ( sb ) ; return sb . toString ( ) ;
public class ConcentrationNormalizer { /** * deals with normalization of measure of molarity */ private ValueUnitWrapper normalizeMolarUnit ( final double value , final String unit ) throws UnknownUnitException { } }
Matcher matcher = mMolarUnitPattern . matcher ( unit ) ; if ( matcher . find ( ) ) { String siPrefix = matcher . group ( 1 ) ; Double convFactor = getSIFactor ( siPrefix ) ; if ( convFactor == null ) { throw new UnknownUnitException ( unit ) ; } else { double normalizedValue = convFactor * value ; return new ValueUnitWrapper ( normalizedValue , MOLAR_NORMALIZED_UNIT ) ; } } else { throw new UnknownUnitException ( unit ) ; }
public class VSkin { /** * * * * * * Private Methods * * * * * */ private double getStartAngle ( ) { } }
ScaleDirection scaleDirection = gauge . getScaleDirection ( ) ; Pos knobPosition = gauge . getKnobPosition ( ) ; switch ( knobPosition ) { case CENTER_LEFT : return ScaleDirection . CLOCKWISE == scaleDirection ? angleRange * 0.5 + 90 : 90 - angleRange * 0.5 ; case CENTER_RIGHT : default : return ScaleDirection . CLOCKWISE == scaleDirection ? angleRange * 0.5 - 90 : 270 - angleRange * 0.5 ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcFacetedBrep ( ) { } }
if ( ifcFacetedBrepEClass == null ) { ifcFacetedBrepEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 225 ) ; } return ifcFacetedBrepEClass ;
public class SipServletMessageImpl { /** * ( non - Javadoc ) * @ see javax . servlet . sip . SipServletMessage # addAddressHeader ( java . lang . String , javax . servlet . sip . Address , boolean ) */ public void addAddressHeader ( String name , Address addr , boolean first ) throws IllegalArgumentException { } }
checkCommitted ( ) ; String hName = getFullHeaderName ( name ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Adding address header [" + hName + "] as first [" + first + "] value [" + addr + "]" ) ; } // we should test for // This method can be used with headers which are defined to contain one // or more entries matching ( name - addr | addr - spec ) * ( SEMI generic - param ) as defined in RFC 3261 // if ( ! isAddressTypeHeader ( hName ) ) { // logger . error ( " Header [ " + hName + " ] is not address type header " ) ; // throw new IllegalArgumentException ( " Header [ " + hName // + " ] is not of an address type " ) ; if ( isSystemHeaderAndNotGruu ( getModifiableRule ( hName ) , ( Parameterable ) addr . getURI ( ) ) ) { logger . error ( "Error, can't add system header [" + hName + "]" ) ; throw new IllegalArgumentException ( "Header[" + hName + "] is system header, cant add, modify it!!!" ) ; } if ( hName . equalsIgnoreCase ( "From" ) || hName . equalsIgnoreCase ( "To" ) ) { logger . error ( "Error, can't add From or To header [" + hName + "]" ) ; throw new IllegalArgumentException ( "Can't add From or To header, see JSR 289 Section 4.1.2" ) ; } try { String nameToAdd = getCorrectHeaderName ( hName ) ; Header h = SipFactoryImpl . headerFactory . createHeader ( nameToAdd , addr . toString ( ) ) ; if ( first ) { this . message . addFirst ( h ) ; } else { this . message . addLast ( h ) ; } } catch ( Exception e ) { throw new IllegalArgumentException ( "Error adding header" , e ) ; }
public class ClassFile { /** * Returns all classnames ( in internal form ) that this class references * @ return */ public SortedSet < String > getReferencedClassnames ( ) { } }
SortedSet < String > set = new TreeSet < String > ( ) ; List < ConstantInfo > list = constantPoolMap . get ( ConstantInfo . Clazz . class ) ; if ( list != null ) { for ( ConstantInfo ci : list ) { ConstantInfo . Clazz cls = ( Clazz ) ci ; int ni = cls . getName_index ( ) ; String name = getString ( ni ) ; if ( name . startsWith ( "[" ) ) { for ( int ii = 1 ; ii < name . length ( ) ; ii ++ ) { if ( name . charAt ( ii ) == 'L' ) { name = name . substring ( ii + 1 , name . length ( ) - 1 ) ; set . add ( name ) ; break ; } } } else { set . add ( name ) ; } } } return set ;
public class Texture2dProgram { /** * Issues the draw call . Does the full setup on every call . * @ param mvpMatrix The 4x4 projection matrix . * @ param vertexBuffer Buffer with vertex position data . * @ param firstVertex Index of first vertex to use in vertexBuffer . * @ param vertexCount Number of vertices in vertexBuffer . * @ param coordsPerVertex The number of coordinates per vertex ( e . g . x , y is 2 ) . * @ param vertexStride Width , in bytes , of the position data for each vertex ( often * vertexCount * sizeof ( float ) ) . * @ param texMatrix A 4x4 transformation matrix for texture coords . * @ param texBuffer Buffer with vertex texture data . * @ param texStride Width , in bytes , of the texture data for each vertex . */ public void draw ( float [ ] mvpMatrix , FloatBuffer vertexBuffer , int firstVertex , int vertexCount , int coordsPerVertex , int vertexStride , float [ ] texMatrix , FloatBuffer texBuffer , int textureId , int texStride ) { } }
GlUtil . checkGlError ( "draw start" ) ; // Select the program . GLES20 . glUseProgram ( mProgramHandle ) ; GlUtil . checkGlError ( "glUseProgram" ) ; // Set the texture . GLES20 . glActiveTexture ( GLES20 . GL_TEXTURE0 ) ; GLES20 . glBindTexture ( mTextureTarget , textureId ) ; // Copy the model / view / projection matrix over . GLES20 . glUniformMatrix4fv ( muMVPMatrixLoc , 1 , false , mvpMatrix , 0 ) ; GlUtil . checkGlError ( "glUniformMatrix4fv" ) ; // Copy the texture transformation matrix over . GLES20 . glUniformMatrix4fv ( muTexMatrixLoc , 1 , false , texMatrix , 0 ) ; GlUtil . checkGlError ( "glUniformMatrix4fv" ) ; // Enable the " aPosition " vertex attribute . GLES20 . glEnableVertexAttribArray ( maPositionLoc ) ; GlUtil . checkGlError ( "glEnableVertexAttribArray" ) ; // Connect vertexBuffer to " aPosition " . GLES20 . glVertexAttribPointer ( maPositionLoc , coordsPerVertex , GLES20 . GL_FLOAT , false , vertexStride , vertexBuffer ) ; GlUtil . checkGlError ( "glVertexAttribPointer" ) ; // Enable the " aTextureCoord " vertex attribute . GLES20 . glEnableVertexAttribArray ( maTextureCoordLoc ) ; GlUtil . checkGlError ( "glEnableVertexAttribArray" ) ; // Connect texBuffer to " aTextureCoord " . GLES20 . glVertexAttribPointer ( maTextureCoordLoc , 2 , GLES20 . GL_FLOAT , false , texStride , texBuffer ) ; GlUtil . checkGlError ( "glVertexAttribPointer" ) ; // Populate the convolution kernel , if present . if ( muKernelLoc >= 0 ) { GLES20 . glUniform1fv ( muKernelLoc , KERNEL_SIZE , mKernel , 0 ) ; GLES20 . glUniform2fv ( muTexOffsetLoc , KERNEL_SIZE , mTexOffset , 0 ) ; GLES20 . glUniform1f ( muColorAdjustLoc , mColorAdjust ) ; } // Populate touch position data , if present if ( muTouchPositionLoc >= 0 ) { GLES20 . glUniform2fv ( muTouchPositionLoc , 1 , mSummedTouchPosition , 0 ) ; } // Draw the rect . GLES20 . glDrawArrays ( GLES20 . GL_TRIANGLE_STRIP , firstVertex , vertexCount ) ; GlUtil . checkGlError ( "glDrawArrays" ) ; // Done - - disable vertex array , texture , and program . GLES20 . glDisableVertexAttribArray ( maPositionLoc ) ; GLES20 . glDisableVertexAttribArray ( maTextureCoordLoc ) ; GLES20 . glBindTexture ( mTextureTarget , 0 ) ; GLES20 . glUseProgram ( 0 ) ;
public class GenericFilter { /** * < p > Returns a < code > String < / code > containing the value of the named * initialization parameter , or < code > null < / code > if the parameter does * not exist . See { @ link FilterConfig # getInitParameter } . < / p > * < p > This method is supplied for convenience . It gets the * value of the named parameter from the servlet ' s * < code > ServletConfig < / code > object . * @ param name a < code > String < / code > specifying the name * of the initialization parameter * @ return String a < code > String < / code > containing the value * of the initialization parameter * @ since Servlet 4.0 */ @ Override public String getInitParameter ( String name ) { } }
FilterConfig fc = getFilterConfig ( ) ; if ( fc == null ) { throw new IllegalStateException ( lStrings . getString ( "err.filter_config_not_initialized" ) ) ; } return fc . getInitParameter ( name ) ;
public class PatternsImpl { /** * Adds a batch of patterns to the specified application . * @ param appId The application ID . * @ param versionId The version ID . * @ param patterns A JSON array containing patterns . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the List & lt ; PatternRuleInfo & gt ; object */ public Observable < ServiceResponse < List < PatternRuleInfo > > > batchAddPatternsWithServiceResponseAsync ( UUID appId , String versionId , List < PatternRuleCreateObject > patterns ) { } }
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgumentException ( "Parameter versionId is required and cannot be null." ) ; } if ( patterns == null ) { throw new IllegalArgumentException ( "Parameter patterns is required and cannot be null." ) ; } Validator . validate ( patterns ) ; String parameterizedHost = Joiner . on ( ", " ) . join ( "{Endpoint}" , this . client . endpoint ( ) ) ; return service . batchAddPatterns ( appId , versionId , patterns , this . client . acceptLanguage ( ) , parameterizedHost , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < List < PatternRuleInfo > > > > ( ) { @ Override public Observable < ServiceResponse < List < PatternRuleInfo > > > call ( Response < ResponseBody > response ) { try { ServiceResponse < List < PatternRuleInfo > > clientResponse = batchAddPatternsDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class BeanContextSupport { /** * The implementation goes through following steps : * < ol > * < li > Reads non - transient properties by calling < code > defaultReadObject ( ) < / code > . < / li > * < li > Calls < code > bcsPreDeserializationHook ( ) < / code > . < / li > * < li > Reads children by calling < code > readChildren ( ) < / code > if this context works standalone . Otherwise it is the peer ' s responsibility to call * < code > readChildren ( ) < / code > after this object is deserialized . < / li > * < li > Reads serializable membership listeners . < / li > * < / ol > * @ param ois * the object input stream * @ throws IOException * if I / O error occurs * @ throws ClassNotFoundException * if class of read object is not found */ private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } }
ois . defaultReadObject ( ) ; initialize ( ) ; // init transient fields bcsPreDeserializationHook ( ois ) ; if ( this == getBeanContextPeer ( ) ) { readChildren ( ois ) ; } deserialize ( ois , bcmListeners ) ;
public class TagletWriter { /** * Given an output object , append to it the tag documentation for * the given member . * @ param tagletManager the manager that manages the taglets . * @ param element the Doc that we are print tags for . * @ param taglets the taglets to print . * @ param writer the writer that will generate the output strings . * @ param output the output buffer to store the output in . */ public static void genTagOutput ( TagletManager tagletManager , Element element , List < Taglet > taglets , TagletWriter writer , Content output ) { } }
Utils utils = writer . configuration ( ) . utils ; tagletManager . checkTags ( utils , element , utils . getBlockTags ( element ) , false ) ; tagletManager . checkTags ( utils , element , utils . getFullBody ( element ) , true ) ; for ( Taglet taglet : taglets ) { if ( utils . isTypeElement ( element ) && taglet instanceof ParamTaglet ) { // The type parameters are documented in a special section away // from the tag info , so skip here . continue ; } if ( taglet instanceof DeprecatedTaglet ) { // Deprecated information is documented " inline " , not in tag info // section . continue ; } Content currentOutput = null ; try { currentOutput = taglet . getTagletOutput ( element , writer ) ; } catch ( UnsupportedTagletOperationException utoe ) { // The taglet does not take a member as an argument . Let ' s try // a single tag . List < ? extends DocTree > tags = utils . getBlockTags ( element , taglet . getName ( ) ) ; if ( ! tags . isEmpty ( ) ) { currentOutput = taglet . getTagletOutput ( element , tags . get ( 0 ) , writer ) ; } } if ( currentOutput != null ) { tagletManager . seenCustomTag ( taglet . getName ( ) ) ; output . addContent ( currentOutput ) ; } }
public class Timex3Interval { /** * getter for endTimex - gets * @ generated * @ return value of the feature */ public String getEndTimex ( ) { } }
if ( Timex3Interval_Type . featOkTst && ( ( Timex3Interval_Type ) jcasType ) . casFeat_endTimex == null ) jcasType . jcas . throwFeatMissing ( "endTimex" , "de.unihd.dbs.uima.types.heideltime.Timex3Interval" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Timex3Interval_Type ) jcasType ) . casFeatCode_endTimex ) ;
public class DefaultJobExecutor { /** * JobManager */ @ Override public Job getCurrentJob ( JobGroupPath path ) { } }
JobGroupExecutor executor = this . groupExecutors . get ( path ) ; return executor != null ? executor . currentJob : null ;
public class SibRaCommonEndpointActivation { /** * Attempts to connect to an ME . Attempts will be made to the supplied ME list if the * list is not empty ( these are local MEs ) . If the list is empty then TRM will be called * to attempt to get a connection . * @ param MEList A list of local MEs that match the target data . Having no target data means * that all MEs will match for point to point and non durable pub sub and no messaging * engines will match for durable pub sub * @ param targetType Whether the target is an ME or BusMember * @ param targetSignificance Whether the target significance is required or preferred * @ param target The target itself * @ param isPreferred Whether we are attempting to connect to a preferred ME . This will * be true for the first attempts , but if target significance is set to preferred and no * connection was made to a preferred ME then this method will be called again to locaet * any ME but this time isPreferred will be set to false . * @ throws ResourceException */ void connect ( JsMessagingEngine [ ] MEList , String targetType , String targetSignificance , String target , boolean isPreferred ) throws ResourceException { } }
final String methodName = "connect" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { MEList , targetType , targetSignificance , target , isPreferred } ) ; } // TRM will decide if we have to connect to local or remote ME we needn ' t do a check connectUsingTrm ( targetType , targetSignificance , target , isPreferred ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( TRACE , methodName ) ; }
public class FnNumber { /** * It rounds the target with the specified scale and rounding mode * @ param scale the scale to be used * @ param roundingMode the { @ link RoundingMode } to round the input with * @ return the { @ link Float } */ public static final Function < Float , Float > roundFloat ( final int scale , final RoundingMode roundingMode ) { } }
return new RoundFloat ( scale , roundingMode ) ;
public class GuiBootstrap { /** * Setups ZAP ' s and GUI { @ code Locale } , if not previously defined . Otherwise it ' s determined automatically or , if not * possible , by asking the user to choose one of the supported locales . * @ param options ZAP ' s options , used to check if a locale was already defined and save it if not . * @ see # setDefaultViewLocale ( Locale ) * @ see Constant # setLocale ( String ) */ private void setupLocale ( OptionsParam options ) { } }
// Prompt for language if not set String locale = options . getViewParam ( ) . getConfigLocale ( ) ; if ( locale == null || locale . length ( ) == 0 ) { // Don ' t use a parent of the MainFrame - that will initialise it // with English ! final Locale userloc = determineUsersSystemLocale ( ) ; if ( userloc == null ) { // Only show the dialog , when the user ' s language can ' t be // guessed . setDefaultViewLocale ( Constant . getSystemsLocale ( ) ) ; final LocaleDialog dialog = new LocaleDialog ( null , true ) ; dialog . init ( options ) ; dialog . setVisible ( true ) ; } else { options . getViewParam ( ) . setLocale ( userloc ) ; } setDefaultViewLocale ( createLocale ( options . getViewParam ( ) . getLocale ( ) . split ( "_" ) ) ) ; Constant . setLocale ( Model . getSingleton ( ) . getOptionsParam ( ) . getViewParam ( ) . getLocale ( ) ) ; try { options . getViewParam ( ) . getConfig ( ) . save ( ) ; } catch ( ConfigurationException e ) { logger . warn ( "Failed to save locale: " , e ) ; } }
public class ConfigurationSource { /** * Called by the ConfigurationSourceRegistry if a change in the underlying source is detected . * @ param timestamp a long . */ public void fireUpdateEvent ( final long timestamp ) { } }
synchronized ( listeners ) { for ( final ConfigurationSourceListener listener : listeners ) { try { log . debug ( "Calling configurationSourceUpdated on " + listener ) ; listener . configurationSourceUpdated ( this ) ; } catch ( final Exception e ) { log . error ( "Error in notifying configuration source listener:" + listener , e ) ; } } } lastChangeTimestamp = timestamp ;
public class VoiceApi { /** * Send a userEvent event to T - Server * Send EventUserEvent to T - Server with the provided attached data . For details about EventUserEvent , refer to the [ * Genesys Events and Models Reference Manual * ] ( https : / / docs . genesys . com / Documentation / System ) . * @ param userEventData The data to send . This is an array of objects with the properties key , type , and value . ( required ) * @ return ApiSuccessResponse * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiSuccessResponse sendUserEvent ( SendUserEventData userEventData ) throws ApiException { } }
ApiResponse < ApiSuccessResponse > resp = sendUserEventWithHttpInfo ( userEventData ) ; return resp . getData ( ) ;
public class SqlBuilderHelper { /** * look for variable name in place holders defined through path of content * provider . * @ param value * the value * @ param placeHolders * the place holders * @ param pos * the pos * @ return < code > true < / code > if we found it path */ static boolean validate ( String value , List < JQLPlaceHolder > placeHolders , int pos ) { } }
return placeHolders . get ( pos ) . value . equals ( value ) ;
public class ScriptContainer { /** * This method will add Script as a function . * @ param placement * @ param script the text of the function . This value must not be null . */ public void addScriptFunction ( ScriptPlacement placement , String script ) { } }
assert ( script != null ) : "The paramter 'script' must not be null" ; IScriptReporter sr = getParentScriptReporter ( ) ; if ( sr != null ) { sr . addScriptFunction ( placement , script ) ; return ; } // get the list of function blocks and add this script to it . if ( placement == null || placement == ScriptPlacement . PLACE_INFRAMEWORK ) { if ( _funcBlocks == null ) { _funcBlocks = new ArrayList /* < String > */ ( ) ; } assert ( _funcBlocks != null ) : "_funcBlocks should not be null" ; _funcBlocks . add ( script ) ; } else if ( placement == ScriptPlacement . PLACE_BEFORE ) { if ( _codeBefore == null ) _codeBefore = new ArrayList /* < String > */ ( ) ; _codeBefore . add ( script ) ; } else if ( placement == ScriptPlacement . PLACE_AFTER ) { if ( _codeAfter == null ) _codeAfter = new ArrayList /* < String > */ ( ) ; _codeAfter . add ( script ) ; } else { assert ( false ) : "unsupported placement:" + placement ; }
public class SoundStore { /** * Set the pitch at which the current music is being played * @ param pitch The pitch at which the current music is being played */ public void setMusicPitch ( float pitch ) { } }
if ( soundWorks ) { AL10 . alSourcef ( sources . get ( 0 ) , AL10 . AL_PITCH , pitch ) ; }
public class IoUtil { /** * 获得 { @ link BufferedReader } < br > * 如果是 { @ link BufferedReader } 强转返回 , 否则新建 。 如果提供的Reader为null返回null * @ param reader 普通Reader , 如果为null返回null * @ return { @ link BufferedReader } or null * @ since 3.0.9 */ public static BufferedReader getReader ( Reader reader ) { } }
if ( null == reader ) { return null ; } return ( reader instanceof BufferedReader ) ? ( BufferedReader ) reader : new BufferedReader ( reader ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link CmisExtensionType } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = UpdatePropertiesResponse . class ) public JAXBElement < CmisExtensionType > createUpdatePropertiesResponseExtension ( CmisExtensionType value ) { } }
return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , UpdatePropertiesResponse . class , value ) ;
public class WorkbenchPanel { /** * Gets the panels that were added to the workbench with the given panel type . * @ param panelType the type of the panel * @ return a { @ code List } with the panels of the given type * @ throws IllegalArgumentException if the given parameter is { @ code null } . * @ since 2.5.0 */ public List < AbstractPanel > getPanels ( PanelType panelType ) { } }
validateNotNull ( panelType , "panelType" ) ; List < AbstractPanel > panels = new ArrayList < > ( ) ; switch ( panelType ) { case SELECT : panels . addAll ( getTabbedSelect ( ) . getPanels ( ) ) ; break ; case STATUS : panels . addAll ( getTabbedStatus ( ) . getPanels ( ) ) ; break ; case WORK : panels . addAll ( getTabbedWork ( ) . getPanels ( ) ) ; break ; default : break ; } return panels ;
public class XtextLinker { /** * We add typeRefs without Nodes on the fly , so we should remove them before relinking . */ @ Override protected void clearReference ( EObject obj , EReference ref ) { } }
super . clearReference ( obj , ref ) ; if ( obj . eIsSet ( ref ) && ref . getEType ( ) . equals ( XtextPackage . Literals . TYPE_REF ) ) { INode node = NodeModelUtils . getNode ( ( EObject ) obj . eGet ( ref ) ) ; if ( node == null ) obj . eUnset ( ref ) ; } if ( obj . eIsSet ( ref ) && ref == XtextPackage . Literals . CROSS_REFERENCE__TERMINAL ) { INode node = NodeModelUtils . getNode ( ( EObject ) obj . eGet ( ref ) ) ; if ( node == null ) obj . eUnset ( ref ) ; } if ( ref == XtextPackage . Literals . RULE_CALL__RULE ) { obj . eUnset ( XtextPackage . Literals . RULE_CALL__EXPLICITLY_CALLED ) ; }
public class AtlasClientV2 { /** * / * Lineage Calls */ public AtlasLineageInfo getLineageInfo ( final String guid , final LineageDirection direction , final int depth ) throws AtlasServiceException { } }
MultivaluedMap < String , String > queryParams = new MultivaluedMapImpl ( ) ; queryParams . add ( "direction" , direction . toString ( ) ) ; queryParams . add ( "depth" , String . valueOf ( depth ) ) ; return callAPI ( LINEAGE_INFO , AtlasLineageInfo . class , queryParams , guid ) ;
public class MessageFormat { /** * Formats the arguments and writes the result into the * AppendableWrapper , updates the field position . * < p > Exactly one of args and argsMap must be null , the other non - null . * @ param msgStart Index to msgPattern part to start formatting from . * @ param pluralNumber null except when formatting a plural argument sub - message * where a ' # ' is replaced by the format string for this number . * @ param args The formattable objects array . Non - null iff numbered values are used . * @ param argsMap The key - value map of formattable objects . Non - null iff named values are used . * @ param dest Output parameter to receive the result . * The result ( string & attributes ) is appended to existing contents . * @ param fp Field position status . */ private void format ( int msgStart , PluralSelectorContext pluralNumber , Object [ ] args , Map < String , Object > argsMap , AppendableWrapper dest , FieldPosition fp ) { } }
String msgString = msgPattern . getPatternString ( ) ; int prevIndex = msgPattern . getPart ( msgStart ) . getLimit ( ) ; for ( int i = msgStart + 1 ; ; ++ i ) { Part part = msgPattern . getPart ( i ) ; Part . Type type = part . getType ( ) ; int index = part . getIndex ( ) ; dest . append ( msgString , prevIndex , index ) ; if ( type == Part . Type . MSG_LIMIT ) { return ; } prevIndex = part . getLimit ( ) ; if ( type == Part . Type . REPLACE_NUMBER ) { if ( pluralNumber . forReplaceNumber ) { // number - offset was already formatted . dest . formatAndAppend ( pluralNumber . formatter , pluralNumber . number , pluralNumber . numberString ) ; } else { dest . formatAndAppend ( getStockNumberFormatter ( ) , pluralNumber . number ) ; } continue ; } if ( type != Part . Type . ARG_START ) { continue ; } int argLimit = msgPattern . getLimitPartIndex ( i ) ; ArgType argType = part . getArgType ( ) ; part = msgPattern . getPart ( ++ i ) ; Object arg ; boolean noArg = false ; Object argId = null ; String argName = msgPattern . getSubstring ( part ) ; if ( args != null ) { int argNumber = part . getValue ( ) ; // ARG _ NUMBER if ( dest . attributes != null ) { // We only need argId if we add it into the attributes . argId = Integer . valueOf ( argNumber ) ; } if ( 0 <= argNumber && argNumber < args . length ) { arg = args [ argNumber ] ; } else { arg = null ; noArg = true ; } } else { argId = argName ; if ( argsMap != null && argsMap . containsKey ( argName ) ) { arg = argsMap . get ( argName ) ; } else { arg = null ; noArg = true ; } } ++ i ; int prevDestLength = dest . length ; Format formatter = null ; if ( noArg ) { dest . append ( "{" + argName + "}" ) ; } else if ( arg == null ) { dest . append ( "null" ) ; } else if ( pluralNumber != null && pluralNumber . numberArgIndex == ( i - 2 ) ) { if ( pluralNumber . offset == 0 ) { // The number was already formatted with this formatter . dest . formatAndAppend ( pluralNumber . formatter , pluralNumber . number , pluralNumber . numberString ) ; } else { // Do not use the formatted ( number - offset ) string for a named argument // that formats the number without subtracting the offset . dest . formatAndAppend ( pluralNumber . formatter , arg ) ; } } else if ( cachedFormatters != null && ( formatter = cachedFormatters . get ( i - 2 ) ) != null ) { // Handles all ArgType . SIMPLE , and formatters from setFormat ( ) and its siblings . if ( formatter instanceof ChoiceFormat || formatter instanceof PluralFormat || formatter instanceof SelectFormat ) { // We only handle nested formats here if they were provided via setFormat ( ) or its siblings . // Otherwise they are not cached and instead handled below according to argType . String subMsgString = formatter . format ( arg ) ; if ( subMsgString . indexOf ( '{' ) >= 0 || ( subMsgString . indexOf ( '\'' ) >= 0 && ! msgPattern . jdkAposMode ( ) ) ) { MessageFormat subMsgFormat = new MessageFormat ( subMsgString , ulocale ) ; subMsgFormat . format ( 0 , null , args , argsMap , dest , null ) ; } else if ( dest . attributes == null ) { dest . append ( subMsgString ) ; } else { // This formats the argument twice , once above to get the subMsgString // and then once more here . // It only happens in formatToCharacterIterator ( ) // on a complex Format set via setFormat ( ) , // and only when the selected subMsgString does not need further formatting . // This imitates ICU 4.6 behavior . dest . formatAndAppend ( formatter , arg ) ; } } else { dest . formatAndAppend ( formatter , arg ) ; } } else if ( argType == ArgType . NONE || ( cachedFormatters != null && cachedFormatters . containsKey ( i - 2 ) ) ) { // ArgType . NONE , or // any argument which got reset to null via setFormat ( ) or its siblings . if ( arg instanceof Number ) { // format number if can dest . formatAndAppend ( getStockNumberFormatter ( ) , arg ) ; } else if ( arg instanceof Date ) { // format a Date if can dest . formatAndAppend ( getStockDateFormatter ( ) , arg ) ; } else { dest . append ( arg . toString ( ) ) ; } } else if ( argType == ArgType . CHOICE ) { if ( ! ( arg instanceof Number ) ) { throw new IllegalArgumentException ( "'" + arg + "' is not a Number" ) ; } double number = ( ( Number ) arg ) . doubleValue ( ) ; int subMsgStart = findChoiceSubMessage ( msgPattern , i , number ) ; formatComplexSubMessage ( subMsgStart , null , args , argsMap , dest ) ; } else if ( argType . hasPluralStyle ( ) ) { if ( ! ( arg instanceof Number ) ) { throw new IllegalArgumentException ( "'" + arg + "' is not a Number" ) ; } PluralSelectorProvider selector ; if ( argType == ArgType . PLURAL ) { if ( pluralProvider == null ) { pluralProvider = new PluralSelectorProvider ( this , PluralType . CARDINAL ) ; } selector = pluralProvider ; } else { if ( ordinalProvider == null ) { ordinalProvider = new PluralSelectorProvider ( this , PluralType . ORDINAL ) ; } selector = ordinalProvider ; } Number number = ( Number ) arg ; double offset = msgPattern . getPluralOffset ( i ) ; PluralSelectorContext context = new PluralSelectorContext ( i , argName , number , offset ) ; int subMsgStart = PluralFormat . findSubMessage ( msgPattern , i , selector , context , number . doubleValue ( ) ) ; formatComplexSubMessage ( subMsgStart , context , args , argsMap , dest ) ; } else if ( argType == ArgType . SELECT ) { int subMsgStart = SelectFormat . findSubMessage ( msgPattern , i , arg . toString ( ) ) ; formatComplexSubMessage ( subMsgStart , null , args , argsMap , dest ) ; } else { // This should never happen . throw new IllegalStateException ( "unexpected argType " + argType ) ; } fp = updateMetaData ( dest , prevDestLength , fp , argId ) ; prevIndex = msgPattern . getPart ( argLimit ) . getLimit ( ) ; i = argLimit ; }
public class HttpInboundLink { /** * Called by the device side channel when a new request is ready for work . * @ param inVC */ @ Override public void ready ( VirtualConnection inVC ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "ready: " + this + " " + inVC ) ; } this . myTSC = ( TCPConnectionContext ) getDeviceLink ( ) . getChannelAccessor ( ) ; HttpInboundServiceContextImpl sc = getHTTPContext ( ) ; sc . init ( this . myTSC , this , inVC , getChannel ( ) . getHttpConfig ( ) ) ; if ( getChannel ( ) . getHttpConfig ( ) . getDebugLog ( ) . isEnabled ( DebugLog . Level . INFO ) ) { getChannel ( ) . getHttpConfig ( ) . getDebugLog ( ) . log ( DebugLog . Level . INFO , HttpMessages . MSG_CONN_STARTING , sc ) ; } processRequest ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "ready" ) ; }
public class IntentFactory { /** * Build an Intent specified by the given input Strategy . * @ param parameters Strategy instance * @ return Intent */ public Intent buildIntent ( IntentFactoryStrategy parameters ) { } }
android . content . Intent intent = intentMockFactory . buildIntent ( context , parameters . getTargetContext ( ) ) ; intent . setFlags ( parameters . getFlags ( ) ) ; for ( String category : parameters . getCategories ( ) ) { intent . addCategory ( category ) ; } intent . putExtras ( parameters . getExtras ( ) ) ; return intent ;
public class EntitiesToSymbol { /** * Gets a chunk with a symbol character . * @ param e a symbol value ( see Entities class : alfa is greek alfa , . . . ) * @ param font the font if the symbol isn ' t found ( otherwise Font . SYMBOL ) * @ return a Chunk */ public static Chunk get ( String e , Font font ) { } }
char s = getCorrespondingSymbol ( e ) ; if ( s == ( char ) 0 ) { try { return new Chunk ( String . valueOf ( ( char ) Integer . parseInt ( e ) ) , font ) ; } catch ( Exception exception ) { return new Chunk ( e , font ) ; } } Font symbol = new Font ( Font . SYMBOL , font . getSize ( ) , font . getStyle ( ) , font . getColor ( ) ) ; return new Chunk ( String . valueOf ( s ) , symbol ) ;
public class Iban { /** * Returns an Iban object holding the value of the specified String . * @ param iban the String to be parsed . * @ param format the format of the Iban . * @ return an Iban object holding the value represented by the string argument . * @ throws IbanFormatException if the String doesn ' t contain parsable Iban * InvalidCheckDigitException if Iban has invalid check digit * UnsupportedCountryException if Iban ' s Country is not supported . */ public static Iban valueOf ( final String iban , final IbanFormat format ) throws IbanFormatException , InvalidCheckDigitException , UnsupportedCountryException { } }
switch ( format ) { case Default : final String ibanWithoutSpaces = iban . replace ( " " , "" ) ; final Iban ibanObj = valueOf ( ibanWithoutSpaces ) ; if ( ibanObj . toFormattedString ( ) . equals ( iban ) ) { return ibanObj ; } throw new IbanFormatException ( IBAN_FORMATTING , String . format ( "Iban must be formatted using 4 characters and space combination. " + "Instead of [%s]" , iban ) ) ; default : return valueOf ( iban ) ; }
public class Matrix4d { /** * Apply a projection transformation to this matrix that projects onto the plane specified via the general plane equation * < code > x * a + y * b + z * c + d = 0 < / code > as if casting a shadow from a given light position / direction < code > ( lightX , lightY , lightZ , lightW ) < / code > . * If < code > lightW < / code > is < code > 0.0 < / code > the light is being treated as a directional light ; if it is < code > 1.0 < / code > it is a point light . * If < code > M < / code > is < code > this < / code > matrix and < code > S < / code > the shadow matrix , * then the new matrix will be < code > M * S < / code > . So when transforming a * vector < code > v < / code > with the new matrix by using < code > M * S * v < / code > , the * reflection will be applied first ! * Reference : < a href = " ftp : / / ftp . sgi . com / opengl / contrib / blythe / advanced99 / notes / node192 . html " > ftp . sgi . com < / a > * @ param lightX * the x - component of the light ' s vector * @ param lightY * the y - component of the light ' s vector * @ param lightZ * the z - component of the light ' s vector * @ param lightW * the w - component of the light ' s vector * @ param a * the x factor in the plane equation * @ param b * the y factor in the plane equation * @ param c * the z factor in the plane equation * @ param d * the constant in the plane equation * @ return this */ public Matrix4d shadow ( double lightX , double lightY , double lightZ , double lightW , double a , double b , double c , double d ) { } }
return shadow ( lightX , lightY , lightZ , lightW , a , b , c , d , this ) ;
public class AWSMediaTailorClient { /** * Returns the playback configuration for the specified name . * @ param getPlaybackConfigurationRequest * @ return Result of the GetPlaybackConfiguration operation returned by the service . * @ sample AWSMediaTailor . GetPlaybackConfiguration * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / mediatailor - 2018-04-23 / GetPlaybackConfiguration " * target = " _ top " > AWS API Documentation < / a > */ @ Override public GetPlaybackConfigurationResult getPlaybackConfiguration ( GetPlaybackConfigurationRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeGetPlaybackConfiguration ( request ) ;
public class ReportsProvider { /** * Loads a report , this does the deserialization , this method can be substituted with another , called by child * classes . Once it has deserialized it , it put it into the map . * @ param result * @ param report * @ param reportName * @ return */ protected boolean loadReport ( ReportsConfig result , InputStream report , String reportName ) { } }
ObjectMapper mapper = new ObjectMapper ( new YAMLFactory ( ) ) ; ReportConfig reportConfig = null ; try { reportConfig = mapper . readValue ( report , ReportConfig . class ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; errors . add ( "Error parsing " + reportName + " " + e . getMessage ( ) ) ; return false ; } reportConfig . setReportId ( reportName ) ; result . getReports ( ) . put ( reportName , reportConfig ) ; return true ;
public class ColorTransform { /** * Calculates the transformation . * @ param transformable the transformable * @ param comp the comp */ @ Override protected void doTransform ( ITransformable . Color transformable , float comp ) { } }
if ( comp <= 0 ) return ; int from = reversed ? toColor : fromColor ; int to = reversed ? fromColor : toColor ; int r = ( int ) ( red ( from ) + ( red ( to ) - red ( from ) ) * comp ) ; int g = ( int ) ( green ( from ) + ( green ( to ) - green ( from ) ) * comp ) ; int b = ( int ) ( blue ( from ) + ( blue ( to ) - blue ( from ) ) * comp ) ; transformable . setColor ( ( r & 0xFF ) << 16 | ( g & 0xFF ) << 8 | b & 0xFF ) ;
public class CollationBuilder { /** * Finds or inserts the node for a secondary or tertiary weight . */ private int findOrInsertWeakNode ( int index , int weight16 , int level ) { } }
assert ( 0 <= index && index < nodes . size ( ) ) ; assert ( Collator . SECONDARY <= level && level <= Collator . TERTIARY ) ; if ( weight16 == Collation . COMMON_WEIGHT16 ) { return findCommonNode ( index , level ) ; } // If this will be the first below - common weight for the parent node , // then we will also need to insert a common weight after it . long node = nodes . elementAti ( index ) ; assert ( strengthFromNode ( node ) < level ) ; // parent node is stronger if ( weight16 != 0 && weight16 < Collation . COMMON_WEIGHT16 ) { int hasThisLevelBefore = level == Collator . SECONDARY ? HAS_BEFORE2 : HAS_BEFORE3 ; if ( ( node & hasThisLevelBefore ) == 0 ) { // The parent node has an implied level - common weight . long commonNode = nodeFromWeight16 ( Collation . COMMON_WEIGHT16 ) | nodeFromStrength ( level ) ; if ( level == Collator . SECONDARY ) { // Move the HAS _ BEFORE3 flag from the parent node // to the new secondary common node . commonNode |= node & HAS_BEFORE3 ; node &= ~ ( long ) HAS_BEFORE3 ; } nodes . setElementAt ( node | hasThisLevelBefore , index ) ; // Insert below - common - weight node . int nextIndex = nextIndexFromNode ( node ) ; node = nodeFromWeight16 ( weight16 ) | nodeFromStrength ( level ) ; index = insertNodeBetween ( index , nextIndex , node ) ; // Insert common - weight node . insertNodeBetween ( index , nextIndex , commonNode ) ; // Return index of below - common - weight node . return index ; } } // Find the root CE ' s weight for this level . // Postpone insertion if not found : // Insert the new root node before the next stronger node , // or before the next root node with the same strength and a larger weight . int nextIndex ; while ( ( nextIndex = nextIndexFromNode ( node ) ) != 0 ) { node = nodes . elementAti ( nextIndex ) ; int nextStrength = strengthFromNode ( node ) ; if ( nextStrength <= level ) { // Insert before a stronger node . if ( nextStrength < level ) { break ; } // nextStrength = = level if ( ! isTailoredNode ( node ) ) { int nextWeight16 = weight16FromNode ( node ) ; if ( nextWeight16 == weight16 ) { // Found the node for the root CE up to this level . return nextIndex ; } // Insert before a node with a larger same - strength weight . if ( nextWeight16 > weight16 ) { break ; } } } // Skip the next node . index = nextIndex ; } node = nodeFromWeight16 ( weight16 ) | nodeFromStrength ( level ) ; return insertNodeBetween ( index , nextIndex , node ) ;
public class GrpcServer { /** * Shuts down the server . * @ return { @ code true } if the server was successfully terminated * @ throws InterruptedException */ public boolean shutdown ( ) { } }
mServer . shutdown ( ) ; try { return mServer . awaitTermination ( mServerShutdownTimeoutMs , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException ie ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } finally { mServer . shutdownNow ( ) ; }
public class ByteBuffers { /** * Moves bytes from bb to bbArray as much as is possible . Positions are moved * according to move . Returns number of bytes moved . * @ param bb * @ param bbArray * @ param offset * @ param length * @ return */ public static final long move ( ByteBuffer bb , ByteBuffer [ ] bbArray , int offset , int length ) { } }
return move ( new ByteBuffer [ ] { bb } , 0 , 1 , bbArray , offset , length ) ;
public class ApplicationResponseImpl { /** * Flush the internal buffer to the output stream and clear the internal * buffer to allow new data to be written . If the stream was marked for * compression , then an I / O exception is thrown as compressed streams may * not be sent down early to the connection . */ public void flushBuffer ( ) throws IOException { } }
if ( mCompressedSegments != 0 ) { throw new IOException ( "cannot flush a compressed buffer" ) ; } // marked the stream as having been previously flushed to avoid // attempting to compress the stream after the fact mFlushed = true ; // write the internal buffer to the output stream and then clear any // data in the internal buffer to avoid duplicated data . ByteBuffer bytes = mBuffer ; OutputStream out = super . getOutputStream ( ) ; bytes . writeTo ( out ) ; bytes . clear ( ) ; super . flushBuffer ( ) ;
public class ConcurrentBag { /** * Add a new object to the bag for others to borrow . * @ param bagEntry an object to add to the bag */ public void add ( final T bagEntry ) { } }
if ( closed ) { LOGGER . info ( "ConcurrentBag has been closed, ignoring add()" ) ; throw new IllegalStateException ( "ConcurrentBag has been closed, ignoring add()" ) ; } sharedList . add ( bagEntry ) ; // spin until a thread takes it or none are waiting while ( waiters . get ( ) > 0 && bagEntry . getState ( ) == STATE_NOT_IN_USE && ! handoffQueue . offer ( bagEntry ) ) { yield ( ) ; }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MultiPointPropertyType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link MultiPointPropertyType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "multiLocation" ) public JAXBElement < MultiPointPropertyType > createMultiLocation ( MultiPointPropertyType value ) { } }
return new JAXBElement < MultiPointPropertyType > ( _MultiLocation_QNAME , MultiPointPropertyType . class , null , value ) ;
public class LABInitialMeans { /** * Get the minimum distance to previous medoids . * @ param j current object * @ param distQ distance query * @ param mi medoid iterator * @ param mindist distance storage * @ return minimum distance */ protected static double getMinDist ( DBIDArrayIter j , DistanceQuery < ? > distQ , DBIDArrayIter mi , WritableDoubleDataStore mindist ) { } }
double prev = mindist . doubleValue ( j ) ; if ( Double . isNaN ( prev ) ) { // NaN = unknown prev = Double . POSITIVE_INFINITY ; for ( mi . seek ( 0 ) ; mi . valid ( ) ; mi . advance ( ) ) { double d = distQ . distance ( j , mi ) ; prev = d < prev ? d : prev ; } mindist . putDouble ( j , prev ) ; } return prev ;
public class PartitionBalance { /** * Summarizes balance for the given nodeId to PartitionCount . * @ param nodeIdToPartitionCount * @ param title for use in pretty string * @ return Pair : getFirst ( ) is utility value to be minimized , getSecond ( ) is * pretty summary string of balance */ private Pair < Double , String > summarizeBalance ( final Map < Integer , Integer > nodeIdToPartitionCount , String title ) { } }
StringBuilder builder = new StringBuilder ( ) ; builder . append ( "\n" + title + "\n" ) ; Map < Integer , ZoneBalanceStats > zoneToBalanceStats = new HashMap < Integer , ZoneBalanceStats > ( ) ; for ( Integer zoneId : cluster . getZoneIds ( ) ) { zoneToBalanceStats . put ( zoneId , new ZoneBalanceStats ( ) ) ; } for ( Node node : cluster . getNodes ( ) ) { int curCount = nodeIdToPartitionCount . get ( node . getId ( ) ) ; builder . append ( "\tNode ID: " + node . getId ( ) + " : " + curCount + " (" + node . getHost ( ) + ")\n" ) ; zoneToBalanceStats . get ( node . getZoneId ( ) ) . addPartitions ( curCount ) ; } // double utilityToBeMinimized = Double . MIN _ VALUE ; double utilityToBeMinimized = 0 ; for ( Integer zoneId : cluster . getZoneIds ( ) ) { builder . append ( "Zone " + zoneId + "\n" ) ; builder . append ( zoneToBalanceStats . get ( zoneId ) . dumpStats ( ) ) ; utilityToBeMinimized += zoneToBalanceStats . get ( zoneId ) . getUtility ( ) ; /* * Another utility function to consider if ( zoneToBalanceStats . get ( zoneId ) . getMaxMinRatio ( ) > utilityToBeMinimized ) { utilityToBeMinimized = zoneToBalanceStats . get ( zoneId ) . getUtility ( ) ; */ } return Pair . create ( utilityToBeMinimized , builder . toString ( ) ) ;
public class JSONParser { /** * call after ' e ' or ' E ' has been seen to read the rest of the exponent */ private int readExp ( CharArr arr , int lim ) throws IOException { } }
nstate |= HAS_EXPONENT ; int ch = getChar ( ) ; lim -- ; if ( ch == '+' || ch == '-' ) { arr . write ( ch ) ; ch = getChar ( ) ; lim -- ; } // make sure at least one digit is read . if ( ch < '0' || ch > '9' ) { throw err ( "missing exponent number" ) ; } arr . write ( ch ) ; return readExpDigits ( arr , lim ) ;
public class ContextAwareTreeAppendable { /** * Define a contextual value . * @ param < T > the type of the value . * @ param key the name of the value . * @ return the previous value associated to the key , or { @ code null } if none . */ @ SuppressWarnings ( "unchecked" ) public < T > T deleteContextualValue ( String key ) { } }
return ( T ) this . values . remove ( key ) ;
public class Actions { /** * Converts an { @ link Action7 } to a function that calls the action and returns { @ code null } . * @ param action the { @ link Action7 } to convert * @ return a { @ link Func7 } that calls { @ code action } and returns { @ code null } */ public static < T1 , T2 , T3 , T4 , T5 , T6 , T7 > Func7 < T1 , T2 , T3 , T4 , T5 , T6 , T7 , Void > toFunc ( final Action7 < T1 , T2 , T3 , T4 , T5 , T6 , T7 > action ) { } }
return toFunc ( action , ( Void ) null ) ;
public class CommerceOrderPersistenceImpl { /** * Creates a new commerce order with the primary key . Does not add the commerce order to the database . * @ param commerceOrderId the primary key for the new commerce order * @ return the new commerce order */ @ Override public CommerceOrder create ( long commerceOrderId ) { } }
CommerceOrder commerceOrder = new CommerceOrderImpl ( ) ; commerceOrder . setNew ( true ) ; commerceOrder . setPrimaryKey ( commerceOrderId ) ; String uuid = PortalUUIDUtil . generate ( ) ; commerceOrder . setUuid ( uuid ) ; commerceOrder . setCompanyId ( companyProvider . getCompanyId ( ) ) ; return commerceOrder ;
public class HttpTemplate { /** * Determine the response encoding if specified * @ param connection The HTTP connection * @ return The response encoding as a string ( taken from " Content - Type " ) */ String getResponseEncoding ( URLConnection connection ) { } }
String charset = null ; String contentType = connection . getHeaderField ( "Content-Type" ) ; if ( contentType != null ) { for ( String param : contentType . replace ( " " , "" ) . split ( ";" ) ) { if ( param . startsWith ( "charset=" ) ) { charset = param . split ( "=" , 2 ) [ 1 ] ; break ; } } } return charset ;
public class EventSubscriptionEntityManagerImpl { /** * Processing / / / / / */ @ Override public void eventReceived ( EventSubscriptionEntity eventSubscriptionEntity , Object payload , boolean processASync ) { } }
if ( processASync ) { scheduleEventAsync ( eventSubscriptionEntity , payload ) ; } else { processEventSync ( eventSubscriptionEntity , payload ) ; }
public class DestinationManager { /** * Get a destination from its name . This is the full name , which is both * the destination name and its bus name . * @ param destinationName . * @ param busName . Can be null , in which case the local bus will be assumed . * @ return Destination */ public DestinationHandler getDestination ( String destinationName , String busName , boolean includeInvisible ) throws SIResourceException , SITemporaryDestinationNotFoundException , SINotPossibleInCurrentConfigurationException { } }
return getDestination ( destinationName , busName , includeInvisible , false ) ;
public class ColorValidator { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public boolean validateHexColor ( String hexColor , DiagnosticChain diagnostics , Map < Object , Object > context ) { } }
boolean result = validateHexColor_Pattern ( hexColor , diagnostics , context ) ; return result ;
public class CcAes { /** * Decrypt the given bytes using AES . * @ param bytes Bytes to decrypt * @ return Decrypted bytes * @ throws IOException for all unexpected exceptions */ private byte [ ] decrypt ( final byte [ ] bytes ) throws IOException { } }
if ( bytes . length < CcAes . BLOCK << 1 ) { throw new DecodingException ( "Invalid encrypted message format" ) ; } try { final byte [ ] vector = new byte [ CcAes . BLOCK ] ; final byte [ ] message = new byte [ bytes . length - vector . length ] ; System . arraycopy ( bytes , 0 , vector , 0 , vector . length ) ; System . arraycopy ( bytes , vector . length , message , 0 , message . length ) ; return this . cipher ( Cipher . DECRYPT_MODE , new IvParameterSpec ( vector ) ) . doFinal ( message ) ; } catch ( final BadPaddingException | IllegalBlockSizeException ex ) { throw new DecodingException ( ex ) ; }
public class StorageDir { /** * Changes the size of a temp block . * @ param tempBlockMeta the metadata of the temp block to resize * @ param newSize the new size after change in bytes * @ throws InvalidWorkerStateException when newSize is smaller than oldSize */ public void resizeTempBlockMeta ( TempBlockMeta tempBlockMeta , long newSize ) throws InvalidWorkerStateException { } }
long oldSize = tempBlockMeta . getBlockSize ( ) ; if ( newSize > oldSize ) { reserveSpace ( newSize - oldSize , false ) ; tempBlockMeta . setBlockSize ( newSize ) ; } else if ( newSize < oldSize ) { throw new InvalidWorkerStateException ( "Shrinking block, not supported!" ) ; }
public class Import { /** * Add a Filter to be instantiated on import * @ param conf Configuration to update ( will be passed to the job ) * @ param clazz { @ link org . apache . hadoop . hbase . filter . Filter } subclass to instantiate on the server . * @ param filterArgs List of arguments to pass to the filter on instantiation */ public static void addFilterAndArguments ( Configuration conf , Class < ? extends Filter > clazz , List < String > filterArgs ) { } }
conf . set ( Import . FILTER_CLASS_CONF_KEY , clazz . getName ( ) ) ; conf . setStrings ( Import . FILTER_ARGS_CONF_KEY , filterArgs . toArray ( new String [ filterArgs . size ( ) ] ) ) ;
public class CalendarPanel { /** * dateLabelMousePressed , This event is called any time that the user clicks on a date label in * the calendar . This sets the date picker to the selected date , and closes the calendar panel . */ private void dateLabelMousePressed ( MouseEvent e ) { } }
// Get the label that was clicked . JLabel label = ( JLabel ) e . getSource ( ) ; // If the label is empty , do nothing and return . String labelText = label . getText ( ) ; if ( "" . equals ( labelText ) ) { return ; } // We have a label with a specific date , so set the date and close the calendar . int dayOfMonth = Integer . parseInt ( labelText ) ; LocalDate clickedDate = LocalDate . of ( displayedYearMonth . getYear ( ) , displayedYearMonth . getMonth ( ) , dayOfMonth ) ; userSelectedADate ( clickedDate ) ;
public class FileMetadata { /** * Compute hash of a file ignoring line ends differences . * Maximum performance is needed . */ public Metadata readMetadata ( InputStream stream , Charset encoding , String filePath , @ Nullable CharHandler otherHandler ) { } }
LineCounter lineCounter = new LineCounter ( filePath , encoding ) ; FileHashComputer fileHashComputer = new FileHashComputer ( filePath ) ; LineOffsetCounter lineOffsetCounter = new LineOffsetCounter ( ) ; if ( otherHandler != null ) { CharHandler [ ] handlers = { lineCounter , fileHashComputer , lineOffsetCounter , otherHandler } ; readFile ( stream , encoding , filePath , handlers ) ; } else { CharHandler [ ] handlers = { lineCounter , fileHashComputer , lineOffsetCounter } ; readFile ( stream , encoding , filePath , handlers ) ; } return new Metadata ( lineCounter . lines ( ) , lineCounter . nonBlankLines ( ) , fileHashComputer . getHash ( ) , lineOffsetCounter . getOriginalLineStartOffsets ( ) , lineOffsetCounter . getOriginalLineEndOffsets ( ) , lineOffsetCounter . getLastValidOffset ( ) ) ;
public class InternationalFixedDate { /** * Factory method , validates the given triplet year , month and dayOfMonth . * @ param prolepticYear the International fixed proleptic - year * @ param month the International fixed month , from 1 to 13 * @ param dayOfMonth the International fixed day - of - month , from 1 to 28 ( 29 for Leap Day or Year Day ) * @ return the International fixed date * @ throws DateTimeException if the date is invalid */ static InternationalFixedDate create ( int prolepticYear , int month , int dayOfMonth ) { } }
YEAR_RANGE . checkValidValue ( prolepticYear , ChronoField . YEAR_OF_ERA ) ; MONTH_OF_YEAR_RANGE . checkValidValue ( month , ChronoField . MONTH_OF_YEAR ) ; DAY_OF_MONTH_RANGE . checkValidValue ( dayOfMonth , ChronoField . DAY_OF_MONTH ) ; if ( dayOfMonth == DAYS_IN_LONG_MONTH && month != 6 && month != MONTHS_IN_YEAR ) { throw new DateTimeException ( "Invalid date: " + prolepticYear + '/' + month + '/' + dayOfMonth ) ; } if ( month == 6 && dayOfMonth == DAYS_IN_LONG_MONTH && ! INSTANCE . isLeapYear ( prolepticYear ) ) { throw new DateTimeException ( "Invalid Leap Day as '" + prolepticYear + "' is not a leap year" ) ; } return new InternationalFixedDate ( prolepticYear , month , dayOfMonth ) ;
public class TimeUtils { /** * TODO : Horrific levels of nesting , do something about this . */ public static DateTime getDateTime ( String strTime ) { } }
DateTime dateTime = null ; if ( ( dateTime = tryFormat ( strTime , dateTimeWithSubSecAndTZFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeAndTZFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeWithSubSecFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateHourMinOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateHourOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeWithSubSecAndTZWithSpaceFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeAndTZWithSpaceFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeWithSubSecWithSpaceFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateTimeWithSpaceFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateHourMinWithSpaceOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateHourWithSpaceOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , dateOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , yearMonthOnlyFormat ) ) == null ) { if ( ( dateTime = tryFormat ( strTime , yearOnlyFormat ) ) == null ) { return dateTime ; } } } } } } } } } } } } } } } return dateTime ;
public class ProbabilityParameterControl { /** * { @ inheritDoc } */ public void reset ( ) { } }
int value = ( int ) Math . round ( range * defaultValue . doubleValue ( ) ) ; probabilitySlider . setValue ( value ) ; valueLabel . setText ( format . format ( defaultValue ) ) ; numberGenerator . setValue ( defaultValue ) ;
public class ArtifactListenerSelector { /** * { @ inheritDoc } */ @ Override public void notifyEntryChange ( ArtifactNotification added , ArtifactNotification removed , ArtifactNotification modified ) { } }
listener . notifyEntryChange ( added , removed , modified ) ;
public class TransactionManager { /** * Removes the given transaction ids from the invalid list . * @ param invalidTxIds transaction ids * @ return true if invalid list got changed , false otherwise */ public boolean truncateInvalidTx ( Set < Long > invalidTxIds ) { } }
// guard against changes to the transaction log while processing txMetricsCollector . rate ( "truncateInvalidTx" ) ; Stopwatch timer = new Stopwatch ( ) . start ( ) ; this . logReadLock . lock ( ) ; try { boolean success ; synchronized ( this ) { ensureAvailable ( ) ; success = doTruncateInvalidTx ( invalidTxIds ) ; } appendToLog ( TransactionEdit . createTruncateInvalidTx ( invalidTxIds ) ) ; txMetricsCollector . histogram ( "truncateInvalidTx.latency" , ( int ) timer . elapsedMillis ( ) ) ; return success ; } finally { this . logReadLock . unlock ( ) ; }
public class BDDFactory { /** * Creates an assignment from a BDD . * @ param modelBDD the BDD * @ return the assignment * @ throws IllegalStateException if the BDD does not represent a unique model */ private Assignment createAssignment ( final int modelBDD ) { } }
if ( modelBDD == BDDKernel . BDD_FALSE ) return null ; if ( modelBDD == BDDKernel . BDD_TRUE ) return new Assignment ( ) ; final List < int [ ] > nodes = this . kernel . allNodes ( modelBDD ) ; final Assignment assignment = new Assignment ( ) ; for ( final int [ ] node : nodes ) { final Variable variable = this . idx2var . get ( node [ 1 ] ) ; if ( node [ 2 ] == BDDKernel . BDD_FALSE ) assignment . addLiteral ( variable ) ; else if ( node [ 3 ] == BDDKernel . BDD_FALSE ) assignment . addLiteral ( variable . negate ( ) ) ; else throw new IllegalStateException ( "Expected that the model BDD has one unique path through the BDD." ) ; } return assignment ;
public class OptimalCECPMain { /** * Finds the optimal alignment between two proteins allowing for a circular * permutation ( CP ) . * The precise algorithm is controlled by the * { @ link OptimalCECPParameters parameters } . If the parameter * { @ link OptimalCECPParameters # isTryAllCPs ( ) tryAllCPs } is true , all possible * CP sites are tried and the optimal site is returned . Otherwise , the * { @ link OptimalCECPParameters # getCPPoint ( ) cpPoint } parameter is used to * determine the CP point , greatly reducing the computation required . * @ param ca1 CA atoms of the first protein * @ param ca2 CA atoms of the second protein * @ param param { @ link CeParameters } object * @ return The best - scoring alignment * @ throws StructureException * @ see # alignOptimal ( Atom [ ] , Atom [ ] , Object , AFPChain [ ] ) */ @ Override public AFPChain align ( Atom [ ] ca1 , Atom [ ] ca2 , Object param ) throws StructureException { } }
if ( params . isTryAllCPs ( ) ) { return alignOptimal ( ca1 , ca2 , param , null ) ; } else { int cpPoint = params . getCPPoint ( ) ; return alignPermuted ( ca1 , ca2 , param , cpPoint ) ; }
public class NfsPosixAttributes { /** * Reads the Xdr response , as specified by RFC 1813 * ( https : / / tools . ietf . org / html / rfc1813 ) . * @ param xdr */ public void unmarshalling ( Xdr xdr ) { } }
_loaded = true ; linkMaximum = xdr . getUnsignedInt ( ) ; nameMaximum = xdr . getUnsignedInt ( ) ; noTruncation = xdr . getBoolean ( ) ; chownRestricted = xdr . getBoolean ( ) ; caseInsensitive = xdr . getBoolean ( ) ; casePreserving = xdr . getBoolean ( ) ;
public class WordNet { /** * Gets the siblings of the given Synset , i . e . the synsets with which the given synset shares a hypernym . * @ param synset The synset * @ return A set of siblings */ public Set < Synset > getSiblings ( @ NonNull Synset synset ) { } }
return getHypernyms ( synset ) . stream ( ) . flatMap ( s -> getHyponyms ( s ) . stream ( ) ) . filter ( s -> ! s . equals ( synset ) ) . collect ( Collectors . toSet ( ) ) ;
public class ObjectManager { /** * Locate a Token by name within this objectManager . * @ param name The name of the Token to be located . * @ param transaction controlling visibility of the named ManagedObject . * @ return Token of the named ManagedObject or null . * @ throws ObjectManagerException */ public final Token getNamedObject ( String name , Transaction transaction ) throws ObjectManagerException { } }
final String methodName = "getNamedObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { name , transaction } ) ; // Is the definitive tree assigned ? if ( objectManagerState . namedObjects == null ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , "via NoRestartableObjectStoresAvailableException" ) ; throw new NoRestartableObjectStoresAvailableException ( this ) ; } // if ( objectManagerState . namedObjects = = null ) . TreeMap namedObjectsTree = ( TreeMap ) objectManagerState . namedObjects . getManagedObject ( ) ; Token token = ( Token ) namedObjectsTree . get ( name , transaction ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , methodName , new Object [ ] { token } ) ; return token ;
public class SessionBeanO { /** * Obtain an object that can be used to invoke the current bean through * the given business interface . < p > * @ param businessInterface One of the local business interfaces or remote * business interfaces for this session bean . * @ return The business object corresponding to the given business interface . * @ throws IllegalStateException - Thrown if this method is invoked with an * invalid business interface for the current bean . */ @ Override // New for EJB 3.0 d366807.1 @ SuppressWarnings ( "unchecked" ) public < T > T getBusinessObject ( Class < T > businessInterface ) throws IllegalStateException { } }
Object result = null ; // d367572.1 start if ( state == PRE_CREATE || state == DESTROYED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getBusinessObject: Incorrect state: " + getStateName ( state ) ) ; throw new IllegalStateException ( getStateName ( state ) ) ; } // d367572.1 end if ( businessInterface == null ) { throw new IllegalStateException ( "Requested business interface not found : null" ) ; } try { EJSWrapperCommon common = container . wrapperManager . getWrapper ( beanId ) ; result = common . getBusinessObject ( businessInterface . getName ( ) ) ; } catch ( IllegalStateException ise ) { // FFDC not logged for this spec required scenario throw ise ; } catch ( Throwable ex ) { // Not expecting any Throwable to occur . Log unexpected Throwable and // throw an EJBException since this is a Java EE architected interface . FFDCFilter . processException ( ex , CLASS_NAME + ".getBusinessObject" , "516" , this ) ; EJBException ejbex = ExceptionUtil . EJBException ( "getBusinessObject() failed" , ex ) ; Tr . error ( tc , "CAUGHT_EXCEPTION_THROWING_NEW_EXCEPTION_CNTR0035E" , new Object [ ] { ex , ejbex . toString ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getBusinessObject() failed" , ex ) ; throw ejbex ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getBusinessObject : " + result . getClass ( ) . getName ( ) ) ; return ( T ) result ;