Program: 76443
Project: 76443
Buggy source:
/** 
 * Tests the function of getDisplayValue().
 */
public void testGetDisplayValue(){
  Calendar dateCal=Calendar.getInstance(ThreadResources.getLocale());
  dateCal.set(1998,8,13,20,1,44);
  Date dateValue=dateCal.getTime();
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATETIME,DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE,dateValue,ULocale.FRANCE));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATETIME,null,dateValue));
  Double doubleValue=new Double("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,doubleValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,doubleValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCY,doubleValue,ULocale.GERMAN));
  Integer integerValue=new Integer("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_INTEGER,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,integerValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_INTEGER,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,integerValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCY,integerValue,ULocale.GERMAN));
  BigDecimal decimalValue=new BigDecimal("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DECIMAL,DesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARD,decimalValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DECIMAL,DesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARD,decimalValue,ULocale.ENGLISH));
  String stringValue="String_Node_Str";
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER,stringValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER,stringValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODE_4,stringValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null,Boolean.FALSE,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null,Boolean.FALSE,new ULocale("String_Node_Str")));
}

Fixed version (ground truth):
/** 
 * Tests the function of getDisplayValue().
 */
public void testGetDisplayValue(){
  Calendar dateCal=Calendar.getInstance(ThreadResources.getLocale());
  dateCal.set(1998,8,13,20,1,44);
  Date dateValue=dateCal.getTime();
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATETIME,DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE,dateValue,ULocale.FRANCE));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATETIME,null,dateValue));
  dateValue=new java.sql.Date(100,0,1);
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATE,DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE,dateValue,ULocale.FRANCE));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DATE,null,dateValue));
  java.sql.Time timeValue=new java.sql.Time(14,20,30);
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_TIME,DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE,timeValue,ULocale.FRANCE));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_TIME,null,timeValue));
  Double doubleValue=new Double("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,doubleValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,doubleValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCY,doubleValue,ULocale.GERMAN));
  Integer integerValue=new Integer("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_INTEGER,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,integerValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_INTEGER,DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER,integerValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_FLOAT,DesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCY,integerValue,ULocale.GERMAN));
  BigDecimal decimalValue=new BigDecimal("String_Node_Str");
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DECIMAL,DesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARD,decimalValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_DECIMAL,DesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARD,decimalValue,ULocale.ENGLISH));
  String stringValue="String_Node_Str";
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER,stringValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER,stringValue,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_STRING,DesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODE_4,stringValue,ULocale.GERMAN));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null,Boolean.FALSE,ULocale.ENGLISH));
  assertEquals("String_Node_Str",ParameterValidationUtil.getDisplayValue(DesignChoiceConstants.PARAM_TYPE_BOOLEAN,null,Boolean.FALSE,new ULocale("String_Node_Str")));
}