Program: 60699
Project: 60699
Buggy source:
private FieldPanel getFieldPanel(final SchemaTO schemaTO,final Form form,final AttributeTO attributeTO){
  final FieldPanel panel;
  final boolean required=templateMode ? false : schemaTO.getMandatoryCondition().equalsIgnoreCase("String_Node_Str");
  final boolean readOnly=templateMode ? false : schemaTO.isReadonly();
  final SchemaType type=templateMode ? SchemaType.String : schemaTO.getType();
switch (type) {
case Boolean:
    panel=new AjaxCheckBoxPanel("String_Node_Str",schemaTO.getName(),new Model(),true);
  panel.setRequired(required);
break;
case Date:
if (!schemaTO.getConversionPattern().contains("String_Node_Str")) {
panel=new DateTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true,schemaTO.getConversionPattern());
if (required) {
  panel.addRequiredLabel();
}
}
 else {
panel=new DateTimeFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true);
if (required) {
  panel.addRequiredLabel();
  ((DateTimeFieldPanel)panel).setFormValidator(form);
}
panel.setStyleShet("String_Node_Str");
}
break;
case Enum:
panel=new AjaxDropDownChoicePanel<String>("String_Node_Str",schemaTO.getName(),new Model(),true);
((AjaxDropDownChoicePanel)panel).setChoices(Arrays.asList(schemaTO.getEnumerationValues().split(Schema.enumValuesSeparator)));
if (required) {
panel.addRequiredLabel();
}
break;
default :
panel=new AjaxTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true);
if (required) {
panel.addRequiredLabel();
}
}
panel.setReadOnly(readOnly);
panel.setNewModel(attributeTO.getValues());
return panel;
}

Fixed version (ground truth):
private FieldPanel getFieldPanel(final SchemaTO schemaTO,final Form form,final AttributeTO attributeTO){
  final FieldPanel panel;
  final boolean required=templateMode ? false : schemaTO.getMandatoryCondition().equalsIgnoreCase("String_Node_Str");
  final boolean readOnly=templateMode ? false : schemaTO.isReadonly();
  final SchemaType type=templateMode ? SchemaType.String : schemaTO.getType();
switch (type) {
case Boolean:
    panel=new AjaxCheckBoxPanel("String_Node_Str",schemaTO.getName(),new Model(),true);
  panel.setRequired(required);
break;
case Date:
if (!schemaTO.getConversionPattern().contains("String_Node_Str")) {
panel=new DateTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true,schemaTO.getConversionPattern());
if (required) {
  panel.addRequiredLabel();
}
}
 else {
panel=new DateTimeFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true,schemaTO.getConversionPattern());
if (required) {
  panel.addRequiredLabel();
  ((DateTimeFieldPanel)panel).setFormValidator(form);
}
panel.setStyleShet("String_Node_Str");
}
break;
case Enum:
panel=new AjaxDropDownChoicePanel<String>("String_Node_Str",schemaTO.getName(),new Model(),true);
((AjaxDropDownChoicePanel)panel).setChoices(Arrays.asList(schemaTO.getEnumerationValues().split(Schema.enumValuesSeparator)));
if (required) {
panel.addRequiredLabel();
}
break;
default :
panel=new AjaxTextFieldPanel("String_Node_Str",schemaTO.getName(),new Model(),true);
if (required) {
panel.addRequiredLabel();
}
}
panel.setReadOnly(readOnly);
panel.setNewModel(attributeTO.getValues());
return panel;
}