Program: 84076
Project: 84076
Buggy source:
public void startElement(String uri,String localName,String qName,Attributes baseAttributes) throws SAXException {
  Attributes atts=new ExpandingAttributes(baseAttributes);
  try {
    if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      String version=uri.substring(uri.lastIndexOf("String_Node_Str") + 1);
      if (!version.equals(XMLChangeLogParser.getSchemaVersion())) {
        log.warning(databaseChangeLog.getPhysicalFilePath() + "String_Node_Str" + version+ "String_Node_Str"+ XMLChangeLogParser.getSchemaVersion());
      }
      databaseChangeLog.setLogicalFilePath(atts.getValue("String_Node_Str"));
    }
 else     if ("String_Node_Str".equals(qName)) {
      String fileName=atts.getValue("String_Node_Str");
      boolean isRelativeToChangelogFile=Boolean.parseBoolean(atts.getValue("String_Node_Str"));
      handleIncludedChangeLog(fileName,isRelativeToChangelogFile,databaseChangeLog.getPhysicalFilePath());
    }
 else     if ("String_Node_Str".equals(qName)) {
      String pathName=atts.getValue("String_Node_Str");
      Enumeration<URL> resources=fileOpener.getResources(pathName);
      while (resources.hasMoreElements()) {
        URL dirUrl=resources.nextElement();
        if (dirUrl.getAuthority() != null) {
          continue;
        }
        File dir=new File(new URI(dirUrl.toExternalForm()));
        if (!dir.exists()) {
          throw new SAXException("String_Node_Str" + pathName + "String_Node_Str"+ dir.toString());
        }
        File[] files=dir.listFiles(new FilenameFilter(){
          public boolean accept(          File dir,          String name){
            return name.endsWith("String_Node_Str") || name.endsWith("String_Node_Str");
          }
        }
);
        for (        File file : files) {
          handleIncludedChangeLog(pathName + file.getName(),false,databaseChangeLog.getPhysicalFilePath());
        }
      }
    }
 else     if (changeSet == null && "String_Node_Str".equals(qName)) {
      boolean alwaysRun=false;
      boolean runOnChange=false;
      if ("String_Node_Str".equalsIgnoreCase(atts.getValue("String_Node_Str"))) {
        alwaysRun=true;
      }
      if ("String_Node_Str".equalsIgnoreCase(atts.getValue("String_Node_Str"))) {
        runOnChange=true;
      }
      changeSet=new ChangeSet(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"),alwaysRun,runOnChange,databaseChangeLog.getFilePath(),databaseChangeLog.getPhysicalFilePath(),atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"),Boolean.valueOf(atts.getValue("String_Node_Str")));
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) != null) {
        changeSet.setFailOnError(Boolean.parseBoolean(atts.getValue("String_Node_Str")));
      }
    }
 else     if (changeSet != null && "String_Node_Str".equals(qName)) {
      text=new StringBuffer();
      String id=atts.getValue("String_Node_Str");
      if (id != null) {
        String path=atts.getValue("String_Node_Str");
        if (path == null) {
          path=databaseChangeLog.getFilePath();
        }
        String author=atts.getValue("String_Node_Str");
        ChangeSet changeSet=databaseChangeLog.getChangeSet(path,author,id);
        if (changeSet == null) {
          throw new SAXException("String_Node_Str" + path + "String_Node_Str"+ author+ "String_Node_Str"+ id);
        }
 else {
          for (          Change change : changeSet.getChanges()) {
            this.changeSet.addRollbackChange(change);
          }
        }
      }
      inRollback=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      rootPrecondition=new Preconditions();
      rootPrecondition.setOnFail(StringUtils.trimToNull(atts.getValue("String_Node_Str")));
      rootPrecondition.setOnError(StringUtils.trimToNull(atts.getValue("String_Node_Str")));
      preconditionLogicStack.push(rootPrecondition);
    }
 else     if (currentPrecondition != null && currentPrecondition instanceof CustomPreconditionWrapper && qName.equals("String_Node_Str")) {
      ((CustomPreconditionWrapper)currentPrecondition).setParam(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
    }
 else     if (rootPrecondition != null) {
      currentPrecondition=PreconditionFactory.getInstance().create(qName);
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(currentPrecondition,attributeName,attributeValue);
      }
      preconditionLogicStack.peek().addNestedPrecondition(currentPrecondition);
      if (currentPrecondition instanceof PreconditionLogic) {
        preconditionLogicStack.push(((PreconditionLogic)currentPrecondition));
      }
      if ("String_Node_Str".equals(qName)) {
        text=new StringBuffer();
      }
    }
 else     if ("String_Node_Str".equals(qName)) {
      inModifySql=true;
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) != null) {
        modifySqlDbmsList=StringUtils.splitAndTrim(atts.getValue("String_Node_Str"),"String_Node_Str");
      }
    }
 else     if (inModifySql) {
      SqlVisitor sqlVisitor=SqlVisitorFactory.getInstance().create(qName);
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(sqlVisitor,attributeName,attributeValue);
      }
      sqlVisitor.setApplicableDbms(modifySqlDbmsList);
      changeSet.addSqlVisitor(sqlVisitor);
    }
 else     if (changeSet != null && change == null) {
      change=ChangeFactory.getInstance().create(qName);
      change.setChangeSet(changeSet);
      text=new StringBuffer();
      if (change == null) {
        throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
      }
      change.setFileOpener(fileOpener);
      if (change instanceof CustomChangeWrapper) {
        ((CustomChangeWrapper)change).setClassLoader(fileOpener.toClassLoader());
      }
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(change,attributeName,attributeValue);
      }
      change.setUp();
    }
 else     if (change != null && "String_Node_Str".equals(qName)) {
      ColumnConfig column;
      if (change instanceof LoadDataChange) {
        column=new LoadDataColumnConfig();
      }
 else {
        column=new ColumnConfig();
      }
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(column,attributeName,attributeValue);
      }
      if (change instanceof ChangeWithColumns) {
        ((ChangeWithColumns)change).addColumn(column);
      }
 else {
        throw new RuntimeException("String_Node_Str" + change.getClass().getName());
      }
    }
 else     if (change != null && "String_Node_Str".equals(qName)) {
      ConstraintsConfig constraints=new ConstraintsConfig();
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(constraints,attributeName,attributeValue);
      }
      ColumnConfig lastColumn;
      if (change instanceof AddColumnChange) {
        lastColumn=((AddColumnChange)change).getLastColumn();
      }
 else       if (change instanceof CreateTableChange) {
        lastColumn=((CreateTableChange)change).getColumns().get(((CreateTableChange)change).getColumns().size() - 1);
      }
 else       if (change instanceof ModifyColumnChange) {
        lastColumn=((ModifyColumnChange)change).getColumns().get(((ModifyColumnChange)change).getColumns().size() - 1);
      }
 else {
        throw new RuntimeException("String_Node_Str" + change.getClass().getName());
      }
      lastColumn.setConstraints(constraints);
    }
 else     if ("String_Node_Str".equals(qName)) {
      if (change instanceof CustomChangeWrapper) {
        if (atts.getValue("String_Node_Str") == null) {
          paramName=atts.getValue("String_Node_Str");
          text=new StringBuffer();
        }
 else {
          ((CustomChangeWrapper)change).setParam(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
        }
      }
 else {
        throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
      }
    }
 else     if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) == null) {
        this.setParameterValue(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
      }
 else {
        Properties props=new Properties();
        InputStream propertiesStream=fileOpener.getResourceAsStream(atts.getValue("String_Node_Str"));
        if (propertiesStream == null) {
          log.info("String_Node_Str" + atts.getValue("String_Node_Str"));
        }
 else {
          props.load(propertiesStream);
          for (          Map.Entry entry : props.entrySet()) {
            this.setParameterValue(entry.getKey().toString(),entry.getValue().toString());
          }
        }
      }
    }
 else     if (change instanceof ExecuteShellCommandChange && "String_Node_Str".equals(qName)) {
      ((ExecuteShellCommandChange)change).addArg(atts.getValue("String_Node_Str"));
    }
 else {
      throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
    }
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"String_Node_Str" + e.getMessage(),e);
    e.printStackTrace();
    throw new SAXException(e);
  }
}

Fixed version (ground truth):
public void startElement(String uri,String localName,String qName,Attributes baseAttributes) throws SAXException {
  Attributes atts=new ExpandingAttributes(baseAttributes);
  try {
    if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      String version=uri.substring(uri.lastIndexOf("String_Node_Str") + 1);
      if (!version.equals(XMLChangeLogParser.getSchemaVersion())) {
        log.warning(databaseChangeLog.getPhysicalFilePath() + "String_Node_Str" + version+ "String_Node_Str"+ XMLChangeLogParser.getSchemaVersion());
      }
      databaseChangeLog.setLogicalFilePath(atts.getValue("String_Node_Str"));
    }
 else     if ("String_Node_Str".equals(qName)) {
      String fileName=atts.getValue("String_Node_Str");
      boolean isRelativeToChangelogFile=Boolean.parseBoolean(atts.getValue("String_Node_Str"));
      handleIncludedChangeLog(fileName,isRelativeToChangelogFile,databaseChangeLog.getPhysicalFilePath());
    }
 else     if ("String_Node_Str".equals(qName)) {
      String pathName=atts.getValue("String_Node_Str");
      if (!(pathName.endsWith("String_Node_Str") || pathName.endsWith("String_Node_Str"))) {
        pathName=pathName + "String_Node_Str";
      }
      log.finest("String_Node_Str" + pathName);
      log.finest("String_Node_Str" + fileOpener.getClass().getName());
      Enumeration<URL> resources=fileOpener.getResources(pathName);
      boolean foundResource=false;
      while (resources.hasMoreElements()) {
        URL fileUrl=resources.nextElement();
        if (!fileUrl.toExternalForm().startsWith("String_Node_Str")) {
          log.finest(fileUrl.toExternalForm() + "String_Node_Str");
          continue;
        }
        File file=new File(fileUrl.toExternalForm().replaceFirst("String_Node_Str","String_Node_Str"));
        log.finest("String_Node_Str" + file.getCanonicalPath());
        if (!file.exists()) {
          throw new SAXException("String_Node_Str" + pathName + "String_Node_Str"+ file.toString());
        }
        if (file.isDirectory()) {
          log.finest(file.getCanonicalPath() + "String_Node_Str");
          continue;
        }
        foundResource=true;
        if (!(file.getName().endsWith("String_Node_Str") || file.getName().endsWith("String_Node_Str"))) {
          log.finest(file.getCanonicalPath() + "String_Node_Str");
          continue;
        }
        handleIncludedChangeLog(pathName + file.getName(),false,databaseChangeLog.getPhysicalFilePath());
      }
      if (!foundResource) {
        throw new SAXException("String_Node_Str" + pathName);
      }
    }
 else     if (changeSet == null && "String_Node_Str".equals(qName)) {
      boolean alwaysRun=false;
      boolean runOnChange=false;
      if ("String_Node_Str".equalsIgnoreCase(atts.getValue("String_Node_Str"))) {
        alwaysRun=true;
      }
      if ("String_Node_Str".equalsIgnoreCase(atts.getValue("String_Node_Str"))) {
        runOnChange=true;
      }
      changeSet=new ChangeSet(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"),alwaysRun,runOnChange,databaseChangeLog.getFilePath(),databaseChangeLog.getPhysicalFilePath(),atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"),Boolean.valueOf(atts.getValue("String_Node_Str")));
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) != null) {
        changeSet.setFailOnError(Boolean.parseBoolean(atts.getValue("String_Node_Str")));
      }
    }
 else     if (changeSet != null && "String_Node_Str".equals(qName)) {
      text=new StringBuffer();
      String id=atts.getValue("String_Node_Str");
      if (id != null) {
        String path=atts.getValue("String_Node_Str");
        if (path == null) {
          path=databaseChangeLog.getFilePath();
        }
        String author=atts.getValue("String_Node_Str");
        ChangeSet changeSet=databaseChangeLog.getChangeSet(path,author,id);
        if (changeSet == null) {
          throw new SAXException("String_Node_Str" + path + "String_Node_Str"+ author+ "String_Node_Str"+ id);
        }
 else {
          for (          Change change : changeSet.getChanges()) {
            this.changeSet.addRollbackChange(change);
          }
        }
      }
      inRollback=true;
    }
 else     if ("String_Node_Str".equals(qName)) {
      rootPrecondition=new Preconditions();
      rootPrecondition.setOnFail(StringUtils.trimToNull(atts.getValue("String_Node_Str")));
      rootPrecondition.setOnError(StringUtils.trimToNull(atts.getValue("String_Node_Str")));
      preconditionLogicStack.push(rootPrecondition);
    }
 else     if (currentPrecondition != null && currentPrecondition instanceof CustomPreconditionWrapper && qName.equals("String_Node_Str")) {
      ((CustomPreconditionWrapper)currentPrecondition).setParam(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
    }
 else     if (rootPrecondition != null) {
      currentPrecondition=PreconditionFactory.getInstance().create(qName);
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(currentPrecondition,attributeName,attributeValue);
      }
      preconditionLogicStack.peek().addNestedPrecondition(currentPrecondition);
      if (currentPrecondition instanceof PreconditionLogic) {
        preconditionLogicStack.push(((PreconditionLogic)currentPrecondition));
      }
      if ("String_Node_Str".equals(qName)) {
        text=new StringBuffer();
      }
    }
 else     if ("String_Node_Str".equals(qName)) {
      inModifySql=true;
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) != null) {
        modifySqlDbmsList=StringUtils.splitAndTrim(atts.getValue("String_Node_Str"),"String_Node_Str");
      }
    }
 else     if (inModifySql) {
      SqlVisitor sqlVisitor=SqlVisitorFactory.getInstance().create(qName);
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(sqlVisitor,attributeName,attributeValue);
      }
      sqlVisitor.setApplicableDbms(modifySqlDbmsList);
      changeSet.addSqlVisitor(sqlVisitor);
    }
 else     if (changeSet != null && change == null) {
      change=ChangeFactory.getInstance().create(qName);
      change.setChangeSet(changeSet);
      text=new StringBuffer();
      if (change == null) {
        throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
      }
      change.setFileOpener(fileOpener);
      if (change instanceof CustomChangeWrapper) {
        ((CustomChangeWrapper)change).setClassLoader(fileOpener.toClassLoader());
      }
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(change,attributeName,attributeValue);
      }
      change.setUp();
    }
 else     if (change != null && "String_Node_Str".equals(qName)) {
      ColumnConfig column;
      if (change instanceof LoadDataChange) {
        column=new LoadDataColumnConfig();
      }
 else {
        column=new ColumnConfig();
      }
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(column,attributeName,attributeValue);
      }
      if (change instanceof ChangeWithColumns) {
        ((ChangeWithColumns)change).addColumn(column);
      }
 else {
        throw new RuntimeException("String_Node_Str" + change.getClass().getName());
      }
    }
 else     if (change != null && "String_Node_Str".equals(qName)) {
      ConstraintsConfig constraints=new ConstraintsConfig();
      for (int i=0; i < atts.getLength(); i++) {
        String attributeName=atts.getQName(i);
        String attributeValue=atts.getValue(i);
        setProperty(constraints,attributeName,attributeValue);
      }
      ColumnConfig lastColumn;
      if (change instanceof AddColumnChange) {
        lastColumn=((AddColumnChange)change).getLastColumn();
      }
 else       if (change instanceof CreateTableChange) {
        lastColumn=((CreateTableChange)change).getColumns().get(((CreateTableChange)change).getColumns().size() - 1);
      }
 else       if (change instanceof ModifyColumnChange) {
        lastColumn=((ModifyColumnChange)change).getColumns().get(((ModifyColumnChange)change).getColumns().size() - 1);
      }
 else {
        throw new RuntimeException("String_Node_Str" + change.getClass().getName());
      }
      lastColumn.setConstraints(constraints);
    }
 else     if ("String_Node_Str".equals(qName)) {
      if (change instanceof CustomChangeWrapper) {
        if (atts.getValue("String_Node_Str") == null) {
          paramName=atts.getValue("String_Node_Str");
          text=new StringBuffer();
        }
 else {
          ((CustomChangeWrapper)change).setParam(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
        }
      }
 else {
        throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
      }
    }
 else     if ("String_Node_Str".equals(qName)) {
      text=new StringBuffer();
    }
 else     if ("String_Node_Str".equals(qName)) {
      if (StringUtils.trimToNull(atts.getValue("String_Node_Str")) == null) {
        this.setParameterValue(atts.getValue("String_Node_Str"),atts.getValue("String_Node_Str"));
      }
 else {
        Properties props=new Properties();
        InputStream propertiesStream=fileOpener.getResourceAsStream(atts.getValue("String_Node_Str"));
        if (propertiesStream == null) {
          log.info("String_Node_Str" + atts.getValue("String_Node_Str"));
        }
 else {
          props.load(propertiesStream);
          for (          Map.Entry entry : props.entrySet()) {
            this.setParameterValue(entry.getKey().toString(),entry.getValue().toString());
          }
        }
      }
    }
 else     if (change instanceof ExecuteShellCommandChange && "String_Node_Str".equals(qName)) {
      ((ExecuteShellCommandChange)change).addArg(atts.getValue("String_Node_Str"));
    }
 else {
      throw new MigrationFailedException(changeSet,"String_Node_Str" + qName);
    }
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"String_Node_Str" + e.getMessage(),e);
    e.printStackTrace();
    throw new SAXException(e);
  }
}