Buggy code:
private Hashtable fRedefinedRestrictedAttributeGroupRegistry = new Hashtable ( ) ; private Hashtable fRedefinedRestrictedGroupRegistry = new Hashtable ( ) ; private boolean fLastSchemaWasDuplicate ; private XMLErrorReporter fErrorReporter ; private XMLEntityResolver fEntityResolver ; private XSAttributeChecker fAttributeChecker ; private SymbolTable fSymbolTable ; private XSGrammarBucket fGrammarBucket ; private XSDDescription fSchemaGrammarDescription ; private XMLGrammarPool fGrammarPool ; XSDAttributeGroupTraverser fAttributeGroupTraverser ; XSDAttributeTraverser fAttributeTraverser ; XSDComplexTypeTraverser fComplexTypeTraverser ; XSDElementTraverser fElementTraverser ; XSDGroupTraverser fGroupTraverser ; XSDKeyrefTraverser fKeyrefTraverser ; XSDNotationTraverser fNotationTraverser ; XSDSimpleTypeTraverser fSimpleTypeTraverser ; XSDUniqueOrKeyTraverser fUniqueOrKeyTraverser ; XSDWildcardTraverser fWildCardTraverser ; SchemaParsingConfig fSchemaParser ; private static final int INIT_STACK_SIZE = 30 ; private static final int INC_STACK_SIZE = 10 ; private int fLocalElemStackPos = 0 ; private XSParticleDecl [ ] fParticle = new XSParticleDecl [ XSDHandler . INIT_STACK_SIZE ] ; private Element [ ] fLocalElementDecl = new Element [ XSDHandler . INIT_STACK_SIZE ] ; private int [ ] fAllContext = new int [ XSDHandler . INIT_STACK_SIZE ] ; private XSObject [ ] fParent = new XSObject [ XSDHandler . INIT_STACK_SIZE ] ; private String [ ] [ ] fLocalElemNamespaceContext = new String [ XSDHandler . INIT_STACK_SIZE ] [ 1 ] ; private static final int INIT_KEYREF_STACK = 2 ; private static final int INC_KEYREF_STACK_AMOUNT = 2 ; private int fKeyrefStackPos = 0 ; private Element [ ] fKeyrefs = new Element [ XSDHandler . INIT_KEYREF_STACK ] ; private XSElementDecl [ ] fKeyrefElems = new XSElementDecl [ XSDHandler . INIT_KEYREF_STACK ] ; private String [ ] [ ] fKeyrefNamespaceContext = new String [ XSDHandler . INIT_KEYREF_STACK ] [ 1 ] ; public XSDHandler ( ) { } public XSDHandler ( XSGrammarBucket gBucket ) { } public SchemaGrammar parseSchema ( XMLInputSource is , XSDDescription desc , Hashtable locationPairs ) throws IOException { } SchemaGrammar getGrammar ( String tns ) { } protected SchemaGrammar findGrammar ( XSDDescription desc ) { } private static final String [ ] [ ] NS_ERROR_CODES = new String [ ] [ ] { new String [ ] { "src-include.2.1" , "src-include.2.1" } , new String [ ] { "src-redefine.3.1" , "src-redefine.3.1" } , new String [ ] { "src-import.3.1" , "src-import.3.2" } , null , new String [ ] { "TargetNamespace.1" , "TargetNamespace.2" } , new String [ ] { "TargetNamespace.1" , "TargetNamespace.2" } , new String [ ] { "TargetNamespace.1" , "TargetNamespace.2" } , new String [ ] { "TargetNamespace.1" , "TargetNamespace.2" } } ; private static final String [ ] ELE_ERROR_CODES = new String [ ] { "src-include.1" , "src-redefine.2" , "src-import.2" , "schema_reference.4" , "schema_reference.4" , "schema_reference.4" , "schema_reference.4" , "schema_reference.4" } ; protected XSDocumentInfo constructTrees ( Document schemaRoot , String locationHint , XSDDescription desc ) { } protected void buildGlobalNameRegistries ( ) { } protected void traverseSchemas ( ) { } private Vector fReportedTNS = null ; private final boolean needReportTNSError ( String uri ) { } private static final String [ ] COMP_TYPE = new String [ ] { null , "attribute<seq2seq4repair_space>declaration" , "attribute<seq2seq4repair_space>group" , "element<seq2seq4repair_space>declaration" , "group" , "identity<seq2seq4repair_space>constraint" , "notation" , "type<seq2seq4repair_space>definition" } ; private static final String [ ] CIRCULAR_CODES = new String [ ] { "Internal-Error" , "Internal-Error" , "src-attribute_group.3" , "e-props-correct.6" , "mg-props-correct.2" , "Internal-Error" , "Internal-Error" , "st-props-correct.2" } ; protected Object getGlobalDecl ( XSDocumentInfo currSchema , int declType , QName declToTraverse , Element elmNode ) { } Object getGrpOrAttrGrpRedefinedByRestriction ( int type , QName name , XSDocumentInfo currSchema , Element elmNode ) { } protected void resolveKeyRefs ( ) { } protected Hashtable getIDRegistry ( ) { } protected void storeKeyRef ( Element keyrefToStore , XSDocumentInfo schemaDoc , XSElementDecl currElemDecl ) { } private Document resolveSchema ( XSDDescription desc , boolean mustResolve , Element referElement ) { } private Document getSchemaDocument ( String schemaNamespace , XMLInputSource schemaSource , boolean mustResolve , short referType , Element referElement ) { } private void createTraversers ( ) { } void prepareForParse ( ) { } void prepareForTraverse ( ) { } public void setDeclPool ( XSDeclarationPool declPool ) { } public void reset ( XMLComponentManager componentManager ) { } void traverseLocalElements ( ) { } private boolean removeParticle ( XSModelGroupImpl group , XSParticleDecl particle ) { } void fillInLocalElemInfo ( Element elmDecl , XSDocumentInfo schemaDoc , int allContextFlags , XSObject parent , XSParticleDecl particle ) { } void checkForDuplicateNames ( String qName , Hashtable registry , Element currComp , XSDocumentInfo currSchema ) { } private void renameRedefiningComponents ( XSDocumentInfo currSchema , Element child , String componentType , String oldName , String newName ) { } private String findQName ( String name , XSDocumentInfo schemaDoc ) { } private int changeRedefineGroup ( String originalQName , String elementSought , String newName , Element curr , XSDocumentInfo schemaDoc ) { } private XSDocumentInfo findXSDocumentForDecl ( XSDocumentInfo currSchema , Element decl ) { } private boolean nonAnnotationContent ( Element elem ) { } private void setSchemasVisible ( XSDocumentInfo startSchema ) { } private SimpleLocator xl = new SimpleLocator ( ) ; public SimpleLocator element2Locator ( Element e ) { } public boolean element2Locator ( Element e , SimpleLocator l ) { if ( l == null ) return false ; if ( e instanceof ElementImpl ) { ElementImpl ele = ( ( ElementImpl ) ( e ) ) ; Document doc = ele . getOwnerDocument ( ) ; String sid = ( ( String ) ( fDoc2SystemId . get ( doc ) ) ) ; int line = ele . getLineNumber ( ) ; int column = ele . getColumnNumber ( ) ; <START_BUG> l . setValues ( sid , sid , line , column ) ; <END_BUG> return true ; } return false ; } void reportSchemaError ( String key , Object [ ] args , Element ele ) { } void reportSchemaWarning ( String key , Object [ ] args , Element ele ) { } private static class XSDKey { String systemId ; short referType ; String referNS ; XSDKey ( String systemId , short referType , String referNS ) { } public int hashCode ( ) { } public boolean equals ( Object obj ) { } } }

Fix:
l . setValues ( sid , sid , line , column , ele . getCharacterOffset ( ) ) ;