Program: 124080
Project: 124080
Buggy source:
public void endElement(String uri,String localName,String qName) throws SAXException {
  String loopPath=this.loopPath;
  if (loopPath.indexOf("String_Node_Str") != -1) {
    loopPath=this.loopPath.replace("String_Node_Str",qName);
  }
  if (isLooping) {
    for (int i=0; i < selectColumns.size(); i++) {
      if (outputTexts[i]) {
        if (!currentRowHaveValue[i]) {
          if (currentRow[i] == null) {
            currentRow[i]="String_Node_Str";
          }
        }
        currentRowHaveValue[i]=true;
      }
      String column=selectColumns.get(i);
      boolean asXML=this.asXMLs.get(i);
      if (asXML && (currentPath.equals(column) || currentPath.startsWith(column + "String_Node_Str"))) {
        currentRow[i]+="String_Node_Str" + qName + "String_Node_Str";
        if (this.currentPath.equals(column)) {
          currentRowHaveValue[i]=true;
        }
      }
      outputTexts[i]=false;
    }
  }
  if (currentPath.equals(loopPath)) {
    isLooping=false;
    if (this.entry.hasFunctions()) {
      entry.execFunctions(listArgs);
      List<Map<String,String>> results=entry.getFunctionResults();
      for (int i=0; i < results.size(); i++) {
        Map<String,String> map=results.get(i);
        String strKey=map.get("String_Node_Str");
        int index=this.loopCols.indexOf(strKey);
        if (index >= 0 && currentRowHaveValue[index] == false) {
          currentRow[index]=map.get("String_Node_Str");
          currentRowHaveValue[index]=true;
        }
      }
    }
    currentRow[currentRow.length - 1]=Integer.toString(subLoopCount);
    entry.getRows().add(currentRow);
    if (this.entry.getOriginalLoopPath() != null) {
      this.saxLooper.addLoopOrder(this.entry.getOriginalLoopPath());
    }
    reset();
  }
  currentPath=currentPath.substring(0,currentPath.lastIndexOf("String_Node_Str"));
}

Fixed version (ground truth):
public void endElement(String uri,String localName,String qName) throws SAXException {
  String loopPath=this.loopPath;
  if (loopPath.indexOf("String_Node_Str") != -1) {
    loopPath=this.loopPath.replace("String_Node_Str",qName);
  }
  if (isLooping) {
    for (int i=0; i < selectColumns.size(); i++) {
      if (outputTexts[i]) {
        if (!currentRowHaveValue[i]) {
          if (currentRow[i] == null) {
            currentRow[i]="String_Node_Str";
          }
        }
        currentRowHaveValue[i]=true;
      }
      String column=selectColumns.get(i);
      boolean asXML=this.asXMLs.get(i);
      boolean isDot=this.isDots.get(i);
      if ((asXML || isDot) && (currentPath.equals(column) || currentPath.startsWith(column + "String_Node_Str"))) {
        if (asXML) {
          currentRow[i]+="String_Node_Str" + qName + "String_Node_Str";
        }
        if (this.currentPath.equals(column)) {
          currentRowHaveValue[i]=true;
        }
      }
      outputTexts[i]=false;
    }
  }
  if (currentPath.equals(loopPath)) {
    isLooping=false;
    if (this.entry.hasFunctions()) {
      entry.execFunctions(listArgs);
      List<Map<String,String>> results=entry.getFunctionResults();
      for (int i=0; i < results.size(); i++) {
        Map<String,String> map=results.get(i);
        String strKey=map.get("String_Node_Str");
        int index=this.loopCols.indexOf(strKey);
        if (index >= 0 && currentRowHaveValue[index] == false) {
          currentRow[index]=map.get("String_Node_Str");
          currentRowHaveValue[index]=true;
        }
      }
    }
    currentRow[currentRow.length - 1]=Integer.toString(subLoopCount);
    entry.getRows().add(currentRow);
    if (this.entry.getOriginalLoopPath() != null) {
      this.saxLooper.addLoopOrder(this.entry.getOriginalLoopPath());
    }
    reset();
  }
  currentPath=currentPath.substring(0,currentPath.lastIndexOf("String_Node_Str"));
}