Program: 137623
Project: 137623
Buggy source:
/** 
 * DOC zhao Comment method "testMatchThreshold".
 */
private void testMatchThreshold(){
  List<Map<String,String>> matchingRule;
  Map<String,String> lnameRecords;
  Map<String,String> accountRecords;
  groupingRecords.clear();
  recordGroup=new AbstractRecordGrouping(){
    @Override protected void outputRow(    String row){
      System.out.println(row);
      groupingRecords.add(StringUtils.splitByWholeSeparator(row,columnDelimiter));
    }
  }
;
  recordGroup.setColumnDelimiter(columnDelimiter);
  recordGroup.setIsLinkToPrevious(Boolean.FALSE);
  matchingRule=new ArrayList<Map<String,String>>();
  lnameRecords=new HashMap<String,String>();
  lnameRecords.put(IRecordGrouping.COLUMN_IDX,String.valueOf(1));
  lnameRecords.put(IRecordGrouping.MATCHING_TYPE,"String_Node_Str");
  lnameRecords.put(IRecordGrouping.CONFIDENCE_WEIGHT,String.valueOf(1));
  lnameRecords.put(IRecordGrouping.RECORD_MATCH_THRESHOLD,String.valueOf(0.95f));
  matchingRule.add(lnameRecords);
  accountRecords=new HashMap<String,String>();
  accountRecords.put(IRecordGrouping.COLUMN_IDX,String.valueOf(6));
  accountRecords.put(IRecordGrouping.MATCHING_TYPE,"String_Node_Str");
  accountRecords.put(IRecordGrouping.CONFIDENCE_WEIGHT,String.valueOf(0.8));
  accountRecords.put(IRecordGrouping.RECORD_MATCH_THRESHOLD,String.valueOf(0.95f));
  matchingRule.add(accountRecords);
  recordGroup.addMatchRule(matchingRule);
  recordGroup.setIsOutputDistDetails(true);
  recordGroup.initialize();
  try {
    for (    String[] inputRow : inputList) {
      recordGroup.doGroup(inputRow);
    }
    recordGroup.end();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  InterruptedException e) {
    log.error(e.getMessage(),e);
  }
  for (  String[] rds : groupingRecords) {
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(5,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(6,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(4,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(2,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(2,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    for (    String rd : rds) {
      log.info(rd + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC zhao Comment method "testMatchThreshold".
 */
private void testMatchThreshold(){
  List<Map<String,String>> matchingRule;
  Map<String,String> lnameRecords;
  Map<String,String> accountRecords;
  groupingRecords.clear();
  recordGroup=new AbstractRecordGrouping(){
    @Override protected void outputRow(    String row){
      System.out.println(row);
      groupingRecords.add(StringUtils.splitByWholeSeparator(row,columnDelimiter));
    }
  }
;
  recordGroup.setColumnDelimiter(columnDelimiter);
  recordGroup.setIsLinkToPrevious(Boolean.FALSE);
  matchingRule=new ArrayList<Map<String,String>>();
  lnameRecords=new HashMap<String,String>();
  lnameRecords.put(IRecordGrouping.COLUMN_IDX,String.valueOf(1));
  lnameRecords.put(IRecordGrouping.MATCHING_TYPE,"String_Node_Str");
  lnameRecords.put(IRecordGrouping.CONFIDENCE_WEIGHT,String.valueOf(1));
  lnameRecords.put(IRecordGrouping.RECORD_MATCH_THRESHOLD,String.valueOf(0.95f));
  matchingRule.add(lnameRecords);
  accountRecords=new HashMap<String,String>();
  accountRecords.put(IRecordGrouping.COLUMN_IDX,String.valueOf(6));
  accountRecords.put(IRecordGrouping.MATCHING_TYPE,"String_Node_Str");
  accountRecords.put(IRecordGrouping.CONFIDENCE_WEIGHT,String.valueOf(0.8));
  accountRecords.put(IRecordGrouping.RECORD_MATCH_THRESHOLD,String.valueOf(0.95f));
  matchingRule.add(accountRecords);
  recordGroup.addMatchRule(matchingRule);
  recordGroup.setIsOutputDistDetails(true);
  try {
    recordGroup.initialize();
  }
 catch (  InstantiationException e) {
    log.error(e.getMessage(),e);
    Assert.fail();
  }
catch (  IllegalAccessException e) {
    log.error(e.getMessage(),e);
    Assert.fail();
  }
catch (  ClassNotFoundException e) {
    log.error(e.getMessage(),e);
    Assert.fail();
  }
  try {
    for (    String[] inputRow : inputList) {
      recordGroup.doGroup(inputRow);
    }
    recordGroup.end();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  InterruptedException e) {
    log.error(e.getMessage(),e);
  }
  for (  String[] rds : groupingRecords) {
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(5,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(6,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(4,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(2,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(2,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    for (    String rd : rds) {
      log.info(rd + "String_Node_Str");
    }
  }
}