idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
164,500
public < T > Object getBeanKey ( Contextual < T > bean ) { if ( passivationCapable ) { // if the 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 .
50
26
164,501
public Contextual < ? > getBean ( Object beanKey ) { if ( passivationCapable ) { return beanManager . getPassivationCapableBean ( ( String ) beanKey ) ; } else { return ( Contextual < ? > ) beanKey ; } }
Restores the Bean from its beanKey .
58
9
164,502
@ Override 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: " + ref...
Processes registered ManagedService and updates each with their own configuration properties .
148
15
164,503
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 .
358
17
164,504
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 .
441
14
164,505
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 .
61
48
164,506
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
426
7
164,507
private void addNewChild ( String name , Object value ) { IntrospectionLevelMember prospectiveMember = new IntrospectionLevelMember ( _level + 1 , name , makeDescription ( value ) , makeMember ( value ) , _allKnownMembersInThisTree ) ; if ( makeMember ( value ) != null ) { // OK, we'd like to introspect the object furt...
Add a new IntrospectionLevelMember to _children List ( Checking to see if the new child should be introspected further
191
25
164,508
private Object getFieldValue ( final Field field ) { Object field_value = AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { @ Override public Object run ( ) { try { Object value = field . get ( _member ) ; // Don't dump sensitive data boolean sensitive = _member . getClass ( ) . isAnnotationPresen...
Return the value of the member s field
191
8
164,509
private Field [ ] getFields ( final Class < ? > currentClass ) { final Field [ ] objectFields = AccessController . doPrivileged ( new PrivilegedAction < Field [ ] > ( ) { @ Override public Field [ ] run ( ) { try { Field [ ] tempObjectFields = currentClass . getDeclaredFields ( ) ; if ( tempObjectFields . length != 0 )...
Return the fields in a particular class
205
7
164,510
private String makeDescription ( Object value ) { String answer ; // Not initialized, so the compiler tells if we miss a // case if ( value == null ) { answer = "null" ; } else if ( value instanceof String ) { answer = "\"" + value + "\"" ; } else { Class < ? > objClass = value . getClass ( ) ; if ( ( objClass == Boole...
Make a string that describes this object
276
7
164,511
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
123
10
164,512
public static RecoveryDirector recoveryDirector ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "recoveryDirector" ) ; // If the recovery director is null its an error in JET if ( _recoveryDirector == null ) { final InternalLogException ile = new InternalLogException ( ) ; if ( tc . i...
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 .
145
32
164,513
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
89
6