Buggy code:
public void addExternalEntity ( String name , String publicId , String literalSystemId , String baseSystemId ) { } public boolean isExternalEntity ( String entityName ) { } public void addUnparsedEntity ( String name , String publicId , String systemId , String baseSystemId , String notation ) { } public boolean isUnparsedEntity ( String entityName ) { } public boolean isDeclaredEntity ( String entityName ) { } public XMLInputSource resolveEntity ( XMLResourceIdentifier resourceIdentifier ) throws IOException , XNIException { } public void startEntity ( String entityName , boolean literal ) throws IOException , XNIException { } public void startDocumentEntity ( XMLInputSource xmlInputSource ) throws IOException , XNIException { } public void startDTDEntity ( XMLInputSource xmlInputSource ) throws IOException , XNIException { } public void startEntity ( String name , XMLInputSource xmlInputSource , boolean literal , boolean isExternal ) throws IOException , XNIException { } public XMLEntityScanner getEntityScanner ( ) { } protected Vector fOwnReaders = new Vector ( ) ; public void closeReaders ( ) { } public void reset ( XMLComponentManager componentManager ) throws XMLConfigurationException { } public String [ ] getRecognizedFeatures ( ) { } public void setFeature ( String featureId , boolean state ) throws XMLConfigurationException { } public String [ ] getRecognizedProperties ( ) { } public void setProperty ( String propertyId , Object value ) throws XMLConfigurationException { } public static String expandSystemId ( String systemId ) { } public static String expandSystemId ( String systemId , String baseSystemId ) { } protected void endEntity ( ) throws XNIException { } protected Object [ ] getEncodingName ( byte [ ] b4 , int count ) { } protected Reader createReader ( InputStream inputStream , String encoding , Boolean isBigEndian ) throws IOException { } protected static String fixURI ( String str ) { } Hashtable getDeclaredEntities ( ) { } final void print ( ) { } protected abstract static class Entity { public String name ; public Entity ( ) { } public Entity ( String name ) { } public abstract boolean isExternal ( ) { } public abstract boolean isUnparsed ( ) { } public void clear ( ) { } public void setValues ( XMLEntityManager . Entity entity ) { } } protected static class InternalEntity extends XMLEntityManager . Entity { public String text ; public InternalEntity ( ) { } public InternalEntity ( String name , String text ) { } public final boolean isExternal ( ) { } public final boolean isUnparsed ( ) { } public void clear ( ) { } public void setValues ( XMLEntityManager . Entity entity ) { } public void setValues ( XMLEntityManager . InternalEntity entity ) { } } protected static class ExternalEntity extends XMLEntityManager . Entity { public XMLResourceIdentifier entityLocation ; public String notation ; public ExternalEntity ( ) { } public ExternalEntity ( String name , XMLResourceIdentifier entityLocation , String notation ) { } public final boolean isExternal ( ) { } public final boolean isUnparsed ( ) { } public void clear ( ) { } public void setValues ( XMLEntityManager . Entity entity ) { } public void setValues ( XMLEntityManager . ExternalEntity entity ) { } } protected class ScannedEntity extends XMLEntityManager . Entity { public InputStream stream ; public Reader reader ; public XMLResourceIdentifier entityLocation ; public int lineNumber = 1 ; public int columnNumber = 1 ; public String encoding ; public boolean literal ; public boolean isExternal ; public char [ ] ch = new char [ fBufferSize ] ; public int position ; public int count ; public boolean mayReadChunks ; public ScannedEntity ( String name , XMLResourceIdentifier entityLocation , InputStream stream , Reader reader , String encoding , boolean literal , boolean mayReadChunks , boolean isExternal ) { } public final boolean isExternal ( ) { } public final boolean isUnparsed ( ) { } public String toString ( ) { } } protected class EntityScanner extends XMLEntityScanner { public EntityScanner ( ) { } public String getBaseSystemId ( ) { <START_BUG> return ( ( fCurrentEntity ) != null ) && ( ( fCurrentEntity . entityLocation ) != null ) ? fCurrentEntity . entityLocation . getBaseSystemId ( ) : null ; <END_BUG> } public void setEncoding ( String encoding ) throws IOException { } public boolean isExternal ( ) { } public int peekChar ( ) throws IOException { } public int scanChar ( ) throws IOException { } public String scanNmtoken ( ) throws IOException { } public String scanName ( ) throws IOException { } public boolean scanQName ( QName qname ) throws IOException { } public int scanContent ( XMLString content ) throws IOException { } public int scanLiteral ( int quote , XMLString content ) throws IOException { } public boolean scanData ( String delimiter , XMLString data ) throws IOException { } public boolean skipChar ( int c ) throws IOException { } public boolean skipSpaces ( ) throws IOException { } public boolean skipString ( String s ) throws IOException { } public String getPublicId ( ) { } public String getExpandedSystemId ( ) { } public String getLiteralSystemId ( ) { } public int getLineNumber ( ) { } public int getColumnNumber ( ) { } private final boolean load ( int offset , boolean changeEntity ) throws IOException { } } protected final class RewindableInputStream extends InputStream { private InputStream fInputStream ; private byte [ ] fData ; private int fStartOffset ; private int fEndOffset ; private int fOffset ; private int fLength ; private int fMark ; public RewindableInputStream ( InputStream is ) { } public void setStartOffset ( int offset ) { } public void rewind ( ) { } public int read ( ) throws IOException { } public int read ( byte [ ] b , int off , int len ) throws IOException { } public long skip ( long n ) throws IOException { } public int available ( ) throws IOException { }

Fix:
return ( ( fCurrentEntity ) != null ) && ( ( fCurrentEntity . entityLocation ) != null ) ? fCurrentEntity . entityLocation . getExpandedSystemId ( ) : null ;