Program: 137271
Project: 137271
Buggy source:
@Test public void testDoGroup(){
  recordGroup=new AbstractRecordGrouping<String>(){
    @Override protected void outputRow(    String[] row){
      groupingRecords.add(row);
      for (      String c : row) {
        System.out.print(c + "String_Node_Str");
      }
      System.out.println();
    }
    @Override protected String incrementGroupSize(    String oldGroupSize){
      String newGroupSize=String.valueOf(Integer.parseInt(String.valueOf(oldGroupSize)) + 1);
      return newGroupSize;
    }
    @Override protected String castAsType(    Object objectValue){
      String column=String.valueOf(objectValue);
      return column;
    }
    @Override protected boolean isMaster(    String col){
      return "String_Node_Str".equals(col);
    }
    @Override protected String[] createTYPEArray(    int size){
      String[] arrays=new String[size];
      return arrays;
    }
    @Override protected void outputRow(    RichRecord row){
    }
  }
;
  recordGroup.setColumnDelimiter(columnDelimiter);
  recordGroup.setIsLinkToPrevious(Boolean.FALSE);
  List<Map<String,String>> matchingRule=new ArrayList<Map<String,String>>();
  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));
  matchingRule.add(lnameRecords);
  Map<String,String> 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));
  matchingRule.add(accountRecords);
  recordGroup.addMatchRule(matchingRule);
  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();
  }
  recordGroup.setIsOutputDistDetails(true);
  recordGroup.setAcceptableThreshold(0.95f);
  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");
    }
  }
  testGroupQuality();
  testMatchThreshold();
  testMatchThreshold_0();
}

Fixed version (ground truth):
@Test public void testDoGroup(){
  recordGroup=new AbstractRecordGrouping<String>(){
    @Override protected void outputRow(    String[] row){
      groupingRecords.add(row);
      for (      String c : row) {
        System.out.print(c + "String_Node_Str");
      }
      System.out.println();
    }
    @Override protected String incrementGroupSize(    String oldGroupSize){
      String newGroupSize=String.valueOf(Integer.parseInt(String.valueOf(oldGroupSize)) + 1);
      return newGroupSize;
    }
    @Override protected String castAsType(    Object objectValue){
      String column=String.valueOf(objectValue);
      return column;
    }
    @Override protected boolean isMaster(    String col){
      return "String_Node_Str".equals(col);
    }
    @Override protected String[] createTYPEArray(    int size){
      String[] arrays=new String[size];
      return arrays;
    }
    @Override protected void outputRow(    RichRecord row){
    }
  }
;
  recordGroup.setColumnDelimiter(columnDelimiter);
  recordGroup.setIsLinkToPrevious(Boolean.FALSE);
  List<Map<String,String>> matchingRule=new ArrayList<Map<String,String>>();
  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));
  matchingRule.add(lnameRecords);
  Map<String,String> 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.ATTRIBUTE_THRESHOLD,String.valueOf(1));
  matchingRule.add(accountRecords);
  recordGroup.addMatchRule(matchingRule);
  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();
  }
  recordGroup.setIsOutputDistDetails(true);
  recordGroup.setAcceptableThreshold(0.95f);
  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");
    }
  }
  testGroupQuality();
  testMatchThreshold();
  testMatchThreshold_0();
}