Program: 124203
Project: 124203
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 && outputText) {
    for (    int indexOfColumn : indexOfColumns) {
      if (indexOfColumn >= 0) {
        if (currentRow[indexOfColumn] == null) {
          currentRow[indexOfColumn]="String_Node_Str";
        }
        if (currentRow[indexOfColumn].trim().startsWith("String_Node_Str")) {
          currentRow[indexOfColumn]=currentRow[indexOfColumn] + "String_Node_Str" + qName+ "String_Node_Str";
        }
 else {
          currentRowHaveValue[indexOfColumn]=true;
        }
      }
    }
  }
  outputText=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());
    }
  }
  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);
      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"));
}