Program: 137483
Project: 137483
Buggy source:
@Override public void doGroup(String[] inputRow) throws IOException, InterruptedException {
  extSize=isOutputDistDetails ? 5 : 4;
  extSize=isSeperateOutput ? extSize + 1 : extSize;
  if (isLinkToPrevious && !inputRow[inputRow.length - extSize + 2].equalsIgnoreCase("String_Node_Str")) {
    outputRow(StringUtilities.join(inputRow,columnDelimiter,escapeCharacter));
    return;
  }
  if (multiMatchRules.size() == 0) {
    return;
  }
  List<Map<String,String>> matchingRule=multiMatchRules.get(0);
  String[] lookupDataArray=new String[matchingRule.size()];
  for (int idx=0; idx < lookupDataArray.length; idx++) {
    lookupDataArray[idx]=inputRow[Integer.parseInt(matchingRule.get(idx).get(IRecordGrouping.COLUMN_IDX))];
  }
  boolean isSimilar=false;
  for (  String[] masterRecord : masterRecords) {
    if (isLinkToPrevious) {
      int masterGRPSize=Integer.valueOf(masterRecord[inputRow.length - extSize + 1]);
      int inputGRPSize=Integer.valueOf(inputRow[inputRow.length - extSize + 1]);
      if (masterGRPSize > 1 && inputGRPSize > 1) {
        continue;
      }
    }
    String[] masterMatchRecord=new String[lookupDataArray.length];
    for (int idx=0; idx < lookupDataArray.length; idx++) {
      masterMatchRecord[idx]=masterRecord[Integer.parseInt(matchingRule.get(idx).get(IRecordGrouping.COLUMN_IDX))];
    }
    double matchingProba=combinedRecordMatcher.getMatchingWeight(masterMatchRecord,lookupDataArray);
    if (matchingProba >= combinedRecordMatcher.getRecordMatchThreshold()) {
      String distanceDetails=computeOutputDetails();
      isSimilar=true;
      if (isLinkToPrevious) {
        int masterGRPSize=Integer.valueOf(masterRecord[masterRecord.length - extSize + 1]);
        if (masterGRPSize == 1) {
          inputRow[inputRow.length - extSize + 1]=String.valueOf(Integer.parseInt(inputRow[inputRow.length - extSize + 1]) + 1);
          updateWithExtendedColumn(masterRecord,inputRow,matchingProba,distanceDetails,columnDelimiter,escapeCharacter);
          masterRecords.remove(masterRecord);
          masterRecords.add(inputRow);
          break;
        }
      }
      masterRecord[masterRecord.length - extSize + 1]=String.valueOf(Integer.parseInt(masterRecord[masterRecord.length - extSize + 1]) + 1);
      updateWithExtendedColumn(inputRow,masterRecord,matchingProba,distanceDetails,columnDelimiter,escapeCharacter);
      break;
    }
  }
  if (!isSimilar) {
    String[] masterRow=new String[inputRow.length + (isLinkToPrevious ? 0 : extSize)];
    for (int idx=0; idx < inputRow.length; idx++) {
      masterRow[idx]=inputRow[idx];
    }
    if (!isLinkToPrevious) {
      masterRow[masterRow.length - extSize]=String.valueOf(UUID.randomUUID());
      masterRow[masterRow.length - extSize + 1]=String.valueOf(1);
      masterRow[masterRow.length - extSize + 2]=String.valueOf(true);
      masterRow[masterRow.length - extSize + 3]=String.valueOf(1.0);
      int extIdx=3;
      if (isSeperateOutput) {
        extIdx++;
        masterRow[masterRow.length - extSize + extIdx]=String.valueOf(1.0);
      }
      if (isOutputDistDetails) {
        extIdx++;
        masterRow[masterRow.length - extSize + extIdx]="String_Node_Str";
      }
    }
    masterRecords.add(masterRow);
  }
}

Fixed version (ground truth):
@Override public void doGroup(String[] inputRow) throws IOException, InterruptedException {
  extSize=isOutputDistDetails ? 5 : 4;
  extSize=isSeperateOutput ? extSize + 1 : extSize;
  if (isLinkToPrevious && !inputRow[inputRow.length - extSize + 2].equalsIgnoreCase("String_Node_Str")) {
    outputRow(StringUtilities.join(inputRow,columnDelimiter,StringUtilities.ESCAPE_CHARACTER));
    return;
  }
  if (multiMatchRules.size() == 0) {
    return;
  }
  List<Map<String,String>> matchingRule=multiMatchRules.get(0);
  String[] lookupDataArray=new String[matchingRule.size()];
  for (int idx=0; idx < lookupDataArray.length; idx++) {
    lookupDataArray[idx]=inputRow[Integer.parseInt(matchingRule.get(idx).get(IRecordGrouping.COLUMN_IDX))];
  }
  boolean isSimilar=false;
  for (  String[] masterRecord : masterRecords) {
    if (isLinkToPrevious) {
      int masterGRPSize=Integer.valueOf(masterRecord[inputRow.length - extSize + 1]);
      int inputGRPSize=Integer.valueOf(inputRow[inputRow.length - extSize + 1]);
      if (masterGRPSize > 1 && inputGRPSize > 1) {
        continue;
      }
    }
    String[] masterMatchRecord=new String[lookupDataArray.length];
    for (int idx=0; idx < lookupDataArray.length; idx++) {
      masterMatchRecord[idx]=masterRecord[Integer.parseInt(matchingRule.get(idx).get(IRecordGrouping.COLUMN_IDX))];
    }
    double matchingProba=combinedRecordMatcher.getMatchingWeight(masterMatchRecord,lookupDataArray);
    if (matchingProba >= combinedRecordMatcher.getRecordMatchThreshold()) {
      String distanceDetails=computeOutputDetails();
      isSimilar=true;
      if (isLinkToPrevious) {
        int masterGRPSize=Integer.valueOf(masterRecord[masterRecord.length - extSize + 1]);
        if (masterGRPSize == 1) {
          inputRow[inputRow.length - extSize + 1]=String.valueOf(Integer.parseInt(inputRow[inputRow.length - extSize + 1]) + 1);
          updateWithExtendedColumn(masterRecord,inputRow,matchingProba,distanceDetails,columnDelimiter);
          masterRecords.remove(masterRecord);
          masterRecords.add(inputRow);
          break;
        }
      }
      masterRecord[masterRecord.length - extSize + 1]=String.valueOf(Integer.parseInt(masterRecord[masterRecord.length - extSize + 1]) + 1);
      updateWithExtendedColumn(inputRow,masterRecord,matchingProba,distanceDetails,columnDelimiter);
      break;
    }
  }
  if (!isSimilar) {
    String[] masterRow=new String[inputRow.length + (isLinkToPrevious ? 0 : extSize)];
    for (int idx=0; idx < inputRow.length; idx++) {
      masterRow[idx]=inputRow[idx];
    }
    if (!isLinkToPrevious) {
      masterRow[masterRow.length - extSize]=String.valueOf(UUID.randomUUID());
      masterRow[masterRow.length - extSize + 1]=String.valueOf(1);
      masterRow[masterRow.length - extSize + 2]=String.valueOf(true);
      masterRow[masterRow.length - extSize + 3]=String.valueOf(1.0);
      int extIdx=3;
      if (isSeperateOutput) {
        extIdx++;
        masterRow[masterRow.length - extSize + extIdx]=String.valueOf(1.0);
      }
      if (isOutputDistDetails) {
        extIdx++;
        masterRow[masterRow.length - extSize + extIdx]="String_Node_Str";
      }
    }
    masterRecords.add(masterRow);
  }
}