Program: 137273
Project: 137273
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<String>(){
    @Override protected void outputRow(    String[] row){
      groupingRecords.add(row);
    }
    @Override protected boolean isMaster(    String col){
      return "String_Node_Str".equals(col);
    }
    @Override protected String incrementGroupSize(    String oldGroupSize){
      String newGroupSize=String.valueOf(Integer.parseInt(String.valueOf(oldGroupSize)) + 1);
      return newGroupSize;
    }
    @Override protected String[] createTYPEArray(    int size){
      String[] arrays=new String[size];
      return arrays;
    }
    @Override protected String castAsType(    Object objectValue){
      String column=String.valueOf(objectValue);
      return column;
    }
    @Override protected void outputRow(    RichRecord row){
    }
  }
;
  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);
  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.0f));
  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(1,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<String>(){
    @Override protected void outputRow(    String[] row){
      groupingRecords.add(row);
    }
    @Override protected boolean isMaster(    String col){
      return "String_Node_Str".equals(col);
    }
    @Override protected String incrementGroupSize(    String oldGroupSize){
      String newGroupSize=String.valueOf(Integer.parseInt(String.valueOf(oldGroupSize)) + 1);
      return newGroupSize;
    }
    @Override protected String[] createTYPEArray(    int size){
      String[] arrays=new String[size];
      return arrays;
    }
    @Override protected String castAsType(    Object objectValue){
      String column=String.valueOf(objectValue);
      return column;
    }
    @Override protected void outputRow(    RichRecord row){
    }
  }
;
  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.ATTRIBUTE_THRESHOLD,String.valueOf(1));
  lnameRecords.put(IRecordGrouping.RECORD_MATCH_THRESHOLD,String.valueOf(0.95f));
  matchingRule.add(lnameRecords);
  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.0f));
  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(1,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");
    }
  }
}