idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
164,900
private boolean isApplicable ( RepositoryResource resource ) { if ( resource instanceof ApplicableToProduct ) { if ( ( ( ApplicableToProduct ) resource ) . getAppliesTo ( ) == null ) { return true ; } } return ( ( RepositoryResourceImpl ) resource ) . doesResourceMatch ( productDefinitions , null ) ; }
Return whether the given resource is applicable to the current product definitions .
164,901
public Collection < ApplicableToProduct > getNonApplicableResourcesForName ( String resourceName ) { List < ApplicableToProduct > result = nameToNonApplicableResources . get ( resourceName ) ; if ( result == null ) { cacheFeaturesForName ( resourceName ) ; result = nameToNonApplicableResources . get ( resourceName ) ; ...
Return all features and samples in the repository with the given name which don t apply to the installed products
164,902
protected void close ( boolean closeWrapperOnly ) throws SQLException { TraceComponent tc = getTracer ( ) ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "close" ) ; if ( state == State . CLOSED ) { if ( isTraceOn && tc . isEntr...
Default close method for all JDBC wrappers accessible to users . This method closes all child wrappers and invokes the closeWrapper method implemented by the wrapper subclass . If the wrapper is already closed a message stating the wrapper has already been closed is logged to the trace .
164,903
final void closeChildWrappers ( ) { TraceComponent tc = getTracer ( ) ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( childWrappers != null && ! childWrappers . isEmpty ( ) ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Closing child wrappers" ) ; WSJdbcObject wrap...
Close all child objects of this wrapper . Errors that occur while closing child objects should not be thrown . Errors may be logged instead .
164,904
final void init ( WSJdbcObject parent ) { if ( parent != null ) { parentWrapper = parent ; dsConfig = parent . dsConfig ; freeResourcesOnClose = parent . freeResourcesOnClose ; } if ( freeResourcesOnClose ) { arrays = new LinkedList < Array > ( ) ; blobs = new LinkedList < Blob > ( ) ; clobs = new LinkedList < Clob > (...
Initialize the parent wrapper field and copy some fields from the parent wrapper .
164,905
protected void introspectAll ( FFDCLogger info ) { info . append ( this . toString ( ) ) ; introspectWrapperSpecificInfo ( info ) ; info . append ( "Wrapper State: " , state . name ( ) ) ; info . append ( "Parent wrapper:" , parentWrapper ) ; info . append ( "Child wrapper:" ) ; info . indent ( childWrapper ) ; if ( ch...
Collects generic FFDC information applicable to all JDBC wrappers . Formats this information to the provided FFDC logger . FFDC information for all child wrappers should be included in the result .
164,906
private void gatherMetatypeFilesAndStats ( ) throws IOException , JAXBException { for ( File bundle : directory . listFiles ( ) ) { if ( bundle . isFile ( ) ) { analyzeBundle ( bundle ) ; } } }
Iterates through and gathers the projects to validate along with scanning all the other projects to gather their information for validating the projects .
164,907
static long getFreeSpace ( final File fileInFs ) { try { long result = ( long ) getInstance ( ) . doPrivileged ( new PrivilegedAction < Long > ( ) { public Long run ( ) { return fileInFs . getFreeSpace ( ) ; } } ) ; return result ; } catch ( SecurityException se ) { return - 1 ; } }
Returns free space on a file system containing the passed in file
164,908
static Timer createTimer ( ) { try { return getInstance ( ) . doPrivileged ( new PrivilegedAction < Timer > ( ) { public Timer run ( ) { return new Timer ( true ) ; } } ) ; } catch ( SecurityException se ) { return null ; } }
creates a new nameless non - daemon Timer
164,909
public < T > Object getBeanKey ( Contextual < T > bean ) { if ( passivationCapable ) { return ( ( PassivationCapable ) bean ) . getId ( ) ; } return bean ; }
If the context is a passivating scope then we return the passivationId of the Bean . Otherwise we use the Bean directly .
164,910
public Contextual < ? > getBean ( Object beanKey ) { if ( passivationCapable ) { return beanManager . getPassivationCapableBean ( ( String ) beanKey ) ; } else { return ( Contextual < ? > ) beanKey ; } }
Restores the Bean from its beanKey .
164,911
public ManagedService addingService ( ServiceReference < ManagedService > reference ) { String [ ] pids = getServicePid ( reference ) ; if ( pids == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "handleRegistration(): Invalid service.pid type: " + reference ) ; ...
Processes registered ManagedService and updates each with their own configuration properties .
164,912
private LogRecord createLogRecord ( Level level , String msg , Object [ ] params , String sourceClassName , String sourceMethodName , String resourceBundleName , Throwable thrown ) { ResourceBundle resourceBundle = null ; if ( level . intValue ( ) >= this . ivMinimumLocalizationLevelIntValue ) { if ( null == this . ivC...
Creates a LogRecord using any available input parameters from the various Logger methods .
164,913
private WsLogRecord createWsLogRecord ( Level level , String msg , Object [ ] params , String sourceClassName , String sourceMethodName , String resourceBundleName , ResourceBundle resourceBundle , Throwable thrown ) { WsLogRecord logRecord = new WsLogRecord ( level , msg ) ; if ( params != null ) { logRecord . setPara...
Construct a WsLogRecord with the given level and message values .
164,914
private String computeResourceBundleName ( ) { Logger logger = this ; while ( logger != null ) { String name = logger . getResourceBundleName ( ) ; if ( name != null ) { return name ; } logger = logger . getParent ( ) ; } return null ; }
Worker method to determine the resource bundle name to use for logger . If set this is just the resource bundle name of this logger . If not set move up through the list of parents and find the first non - null resource bundle name .
164,915
private void introspectViaReflection ( ) { { Class < ? > memberClass = _member . getClass ( ) ; if ( memberClass . isArray ( ) ) { int length = Array . getLength ( _member ) ; Class < ? > componentType = memberClass . getComponentType ( ) ; if ( componentType . isPrimitive ( ) ) { addNewChild ( componentType + "[0.." +...
Introspect the object via reflection
164,916
private void addNewChild ( String name , Object value ) { IntrospectionLevelMember prospectiveMember = new IntrospectionLevelMember ( _level + 1 , name , makeDescription ( value ) , makeMember ( value ) , _allKnownMembersInThisTree ) ; if ( makeMember ( value ) != null ) { if ( _allKnownMembersInThisTree . contains ( p...
Add a new IntrospectionLevelMember to _children List ( Checking to see if the new child should be introspected further
164,917
private Object getFieldValue ( final Field field ) { Object field_value = AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { try { Object value = field . get ( _member ) ; boolean sensitive = _member . getClass ( ) . isAnnotationPresent ( Sensitive . class ) || field . isAnn...
Return the value of the member s field
164,918
private Field [ ] getFields ( final Class < ? > currentClass ) { final Field [ ] objectFields = AccessController . doPrivileged ( new PrivilegedAction < Field [ ] > ( ) { public Field [ ] run ( ) { try { Field [ ] tempObjectFields = currentClass . getDeclaredFields ( ) ; if ( tempObjectFields . length != 0 ) { Accessib...
Return the fields in a particular class
164,919
private String makeDescription ( Object value ) { String answer ; if ( value == null ) { answer = "null" ; } else if ( value instanceof String ) { answer = "\"" + value + "\"" ; } else { Class < ? > objClass = value . getClass ( ) ; if ( ( objClass == Boolean . class ) || ( objClass == Character . class ) || ( objClass...
Make a string that describes this object
164,920
public void print ( IncidentStream is , int maxDepth ) { StringBuffer fullName = new StringBuffer ( ) ; for ( int i = 0 ; i < _level ; i ++ ) fullName . append ( " " ) ; fullName . append ( _name ) ; is . writeLine ( fullName . toString ( ) , _description ) ; if ( _level < maxDepth ) { List < IntrospectionLevelMember ...
Print this IntrospectionLevelMember to an incident stream
164,921
public static RecoveryDirector recoveryDirector ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "recoveryDirector" ) ; if ( _recoveryDirector == null ) { final InternalLogException ile = new InternalLogException ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "recoveryDirector" ...
Returns the singleton instance of the RecoveryDirector class . This method uses reflection rather then a direct reference to the underlying class to avoid a cyclic build dependency .
164,922
public static RecoveryDirector createRecoveryDirector ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createRecoveryDirector" ) ; _recoveryDirector = LibertyRecoveryDirectorImpl . instance ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "createRecoveryDirector" , _recoveryDirector ) ; return _recoveryDire...
Create a RecoveryDirector singleton