Program: 140343
Project: 140343
Buggy source:
public static AbstractIndicatorForm[] createForm(Composite parent,ICheckListener listener,FormEnum[] formTypes,Map<FormEnum,AbstractIndicatorParameter> paramMap){
  List<AbstractIndicatorForm> list=new ArrayList<AbstractIndicatorForm>();
  AbstractIndicatorForm form=null;
  AbstractIndicatorParameter parameter=null;
  for (  FormEnum oneType : formTypes) {
switch (oneType) {
case BinsDesignerForm:
      parameter=paramMap.get(FormEnum.BinsDesignerForm);
    if (parameter == null) {
      parameter=new BinsDesignerParameter();
    }
  form=new BinsDesignerForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case TextLengthForm:
parameter=paramMap.get(FormEnum.TextLengthForm);
if (parameter == null) {
parameter=new TextLengthParameter();
}
form=new TextLengthForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case TextParametersForm:
parameter=paramMap.get(FormEnum.TextParametersForm);
if (parameter == null) {
parameter=new TextParameter();
}
form=new TextParametersForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case DataThresholdsForm:
parameter=paramMap.get(FormEnum.DataThresholdsForm);
if (parameter == null) {
parameter=new DataThresholdsParameter();
}
form=new DataThresholdsForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case TimeSlicesForm:
parameter=paramMap.get(FormEnum.TimeSlicesForm);
if (parameter == null) {
parameter=new TimeSlicesParameter();
}
form=new TimeSlicesForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case FreqBinsDesignerForm:
parameter=paramMap.get(FormEnum.BinsDesignerForm);
if (parameter == null) {
parameter=new BinsDesignerParameter();
}
form=new FreqBinsDesignerForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case FreqTextParametersForm:
parameter=paramMap.get(FormEnum.TextParametersForm);
if (parameter == null) {
parameter=new TextParameter();
}
form=new FreqTextParametersForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case FreqTimeSliceForm:
parameter=paramMap.get(FormEnum.TimeSlicesForm);
if (parameter == null) {
parameter=new TimeSlicesParameter();
}
form=new FreqTimeSliceForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case IndicatorThresholdsForm:
parameter=paramMap.get(FormEnum.IndicatorThresholdsForm);
if (parameter == null) {
parameter=new IndicatorThresholdsParameter();
}
form=new IndicatorThresholdsForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case NumbericNominalForm:
parameter=paramMap.get(FormEnum.NumbericNominalForm);
if (parameter == null) {
parameter=new NumbericNominalParameter();
}
form=new NumbericNominalForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
case ExpectedValueForm:
parameter=paramMap.get(FormEnum.ExpectedValueForm);
if (parameter == null) {
parameter=new ExpectedValueParameter();
}
form=new ExpectedValueForm(parent,SWT.NONE,parameter);
form.setListener(listener);
list.add(form);
break;
default :
}
}
return list.toArray(new AbstractIndicatorForm[list.size()]);
}

Fixed version (ground truth):
public static AbstractIndicatorForm[] createForm(Composite parent,ICheckListener listener,FormEnum[] formTypes,Map<FormEnum,AbstractIndicatorParameter> paramMap){
  List<AbstractIndicatorForm> list=new ArrayList<AbstractIndicatorForm>();
  AbstractIndicatorForm form=null;
  AbstractIndicatorParameter parameter=null;
  for (  FormEnum oneType : formTypes) {
switch (oneType) {
case BinsDesignerForm:
      parameter=paramMap.get(FormEnum.BinsDesignerForm);
    if (parameter == null) {
      parameter=new BinsDesignerParameter();
    }
  form=new BinsDesignerForm(parent,SWT.NONE,parameter);
break;
case TextLengthForm:
parameter=paramMap.get(FormEnum.TextLengthForm);
if (parameter == null) {
parameter=new TextLengthParameter();
}
form=new TextLengthForm(parent,SWT.NONE,parameter);
break;
case TextParametersForm:
parameter=paramMap.get(FormEnum.TextParametersForm);
if (parameter == null) {
parameter=new TextParameter();
}
form=new TextParametersForm(parent,SWT.NONE,parameter);
break;
case DataThresholdsForm:
parameter=paramMap.get(FormEnum.DataThresholdsForm);
if (parameter == null) {
parameter=new DataThresholdsParameter();
}
form=new DataThresholdsForm(parent,SWT.NONE,parameter);
break;
case TimeSlicesForm:
parameter=paramMap.get(FormEnum.TimeSlicesForm);
if (parameter == null) {
parameter=new TimeSlicesParameter();
}
form=new TimeSlicesForm(parent,SWT.NONE,parameter);
break;
case FreqBinsDesignerForm:
parameter=paramMap.get(FormEnum.BinsDesignerForm);
if (parameter == null) {
parameter=new BinsDesignerParameter();
}
form=new FreqBinsDesignerForm(parent,SWT.NONE,parameter);
break;
case FreqTextParametersForm:
parameter=paramMap.get(FormEnum.TextParametersForm);
if (parameter == null) {
parameter=new TextParameter();
}
form=new FreqTextParametersForm(parent,SWT.NONE,parameter);
break;
case FreqTimeSliceForm:
parameter=paramMap.get(FormEnum.TimeSlicesForm);
if (parameter == null) {
parameter=new TimeSlicesParameter();
}
form=new FreqTimeSliceForm(parent,SWT.NONE,parameter);
break;
case IndicatorThresholdsForm:
parameter=paramMap.get(FormEnum.IndicatorThresholdsForm);
if (parameter == null) {
parameter=new IndicatorThresholdsParameter();
}
form=new IndicatorThresholdsForm(parent,SWT.NONE,parameter);
break;
case NumbericNominalForm:
parameter=paramMap.get(FormEnum.NumbericNominalForm);
if (parameter == null) {
parameter=new NumbericNominalParameter();
}
form=new NumbericNominalForm(parent,SWT.NONE,parameter);
break;
case ExpectedValueForm:
parameter=paramMap.get(FormEnum.ExpectedValueForm);
if (parameter == null) {
parameter=new ExpectedValueParameter();
}
form=new ExpectedValueForm(parent,SWT.NONE,parameter);
break;
default :
}
form.setListener(listener);
list.add(form);
}
return list.toArray(new AbstractIndicatorForm[list.size()]);
}