Program: 137272
Project: 137272
Buggy source:
/** 
 * when RECORD_MATCH_THRESHOLD=0, all records should be in one group
 */
private void testMatchThreshold_0(){
  List<Map<String,String>> matchingRule;
  Map<String,String> lnameRecords;
  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.0f));
  matchingRule.add(lnameRecords);
  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(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(101,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    for (    String rd : rds) {
      log.info(rd + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * when RECORD_MATCH_THRESHOLD=0, all records should be in one group
 */
private void testMatchThreshold_0(){
  List<Map<String,String>> matchingRule;
  Map<String,String> lnameRecords;
  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.0f));
  matchingRule.add(lnameRecords);
  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(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(0,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    if (rds[0].equals("String_Node_Str")) {
      Assert.assertEquals(101,Integer.valueOf(rds[rds.length - 4]).intValue());
    }
    for (    String rd : rds) {
      log.info(rd + "String_Node_Str");
    }
  }
}