Buggy code:
public class LmiInitialContext implements Context { private static Hashtable lmiEnv = new Hashtable ( ) ; private static Hashtable bindings = new Hashtable ( ) ; private static NameParser lmiParser = new LmiNameParser ( ) ; private Object resolveObject ( Object o ) { try { if ( o instanceof Reference ) { Reference objRef = ( ( Reference ) ( o ) ) ; ObjectFactory objFact = ( ( ObjectFactory ) ( Class . forName ( objRef . getFactoryClassName ( ) ) . newInstance ( ) ) ) ; return ( ( Referenceable ) ( objFact . getObjectInstance ( objRef , null , null , null ) ) ) ; } else { return o ; } } catch ( Exception e ) { <START_BUG> e . printStackTrace ( ) ; <END_BUG> return o ; } } private Object encodeObject ( Object o ) throws NamingException { } public LmiInitialContext ( ) throws NamingException { } public LmiInitialContext ( Hashtable ev ) throws NamingException { } public Object lookup ( String name ) throws NamingException { } public Object lookup ( Name name ) throws NamingException { } public void bind ( String name , Object obj ) throws NamingException { } public void bind ( Name name , Object obj ) throws NamingException { } public void rebind ( String name , Object obj ) throws NamingException { } public void rebind ( Name name , Object obj ) throws NamingException { } public void unbind ( String name ) throws NamingException { } public void unbind ( Name name ) throws NamingException { } public void rename ( String oldName , String newName ) throws NamingException { } public void rename ( Name oldname , Name newname ) throws NamingException { } public NamingEnumeration list ( String name ) throws NamingException { } public NamingEnumeration list ( Name name ) throws NamingException { } public NamingEnumeration listBindings ( String name ) throws NamingException { } public NamingEnumeration listBindings ( Name name ) throws NamingException { } public void destroySubcontext ( String name ) throws NamingException { } public void destroySubcontext ( Name name ) throws NamingException { } public Context createSubcontext ( String name ) throws NamingException { } public Context createSubcontext ( Name name ) throws NamingException { } public Object lookupLink ( String name ) throws NamingException { } public Object lookupLink ( Name name ) throws NamingException { } public NameParser getNameParser ( String name ) throws NamingException { } public NameParser getNameParser ( Name name ) throws NamingException { } public String composeName ( String name , String prefix ) throws NamingException { } public Name composeName ( Name name , Name prefix ) throws NamingException { } public Object addToEnvironment ( String propName , Object propVal ) throws NamingException { } public Object removeFromEnvironment ( String propName ) throws NamingException { } public Hashtable getEnvironment ( ) throws NamingException { } public void close ( ) throws NamingException { } public String getNameInNamespace ( ) throws NamingException { } private String simpleClass ( String c ) { } class LmiNames implements NamingEnumeration { Enumeration names ; LmiNames ( Enumeration names ) { } public boolean hasMoreElements ( ) { } public boolean hasMore ( ) throws NamingException { } public Object nextElement ( ) { } public Object next ( ) throws NamingException { } public void close ( ) throws NamingException { } } class LmiBindings implements NamingEnumeration { Enumeration names ; LmiBindings ( Enumeration names ) { } public boolean hasMoreElements ( ) { } public boolean hasMore ( ) throws NamingException { } public Object nextElement ( ) { } public Object next ( ) throws NamingException { } public void close ( ) throws NamingException { } } }

Fix:
TraceCarol . error ( "LmiInitialContext.resolveObject()" , e ) ;