Program: 60887
Project: 60887
Buggy source:
@Override protected void populateItem(ListItem<FieldWrapper> item){
  final FieldWrapper field=item.getModelObject();
  item.add(new Label("String_Node_Str",new ResourceModel(field.getName())));
  final AbstractFieldPanel component;
  Method classMethod;
  try {
    if (field.getType().equals(ConflictResolutionAction.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      component=new AjaxDropDownChoicePanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false);
      ((AjaxDropDownChoicePanel)component).setChoices(Arrays.asList(ConflictResolutionAction.values()));
      item.add(component);
      item.add(getActivationControl(component,(Enum)classMethod.invoke(policy,new Object[]{}) != null,ConflictResolutionAction.IGNORE,ConflictResolutionAction.IGNORE));
    }
 else     if (field.getType().equals(boolean.class) || field.getType().equals(Boolean.class)) {
      item.add(new AjaxCheckBoxPanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false));
      item.add(new Label("String_Node_Str",new Model(null)));
    }
 else     if (field.getType().equals(List.class) || field.getType().equals(Set.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      if (field.isSchemaList()) {
        component=new AjaxPalettePanel("String_Node_Str",new PropertyModel(policy,field.getName()),new ListModel<String>(schemas.getObject()));
        item.add(component);
        item.add(getActivationControl(component,!((List)classMethod.invoke(policy,new Object[]{})).isEmpty(),new ArrayList<String>(),new ArrayList<String>()));
      }
 else {
        final FieldPanel panel=new AjaxTextFieldPanel("String_Node_Str",field.getName(),new Model(null),true);
        panel.setRequired(true);
        component=new MultiValueSelectorPanel<String>("String_Node_Str",new PropertyModel(policy,field.getName()),String.class,panel);
        item.add(component);
        final List<String> reinitializedValue=new ArrayList<String>();
        reinitializedValue.add("String_Node_Str");
        item.add(getActivationControl(component,!((List<String>)classMethod.invoke(policy,new Object[]{})).isEmpty(),(Serializable)new ArrayList<String>(),(Serializable)reinitializedValue));
      }
    }
 else     if (field.getType().equals(int.class) || field.getType().equals(Integer.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      component=new AjaxTextFieldPanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false);
      item.add(component);
      item.add(getActivationControl(component,(Integer)classMethod.invoke(policy,new Object[]{}) > 0,0,0));
    }
 else {
      item.add(new AjaxCheckBoxPanel("String_Node_Str",field.getName(),new Model(),false));
      item.add(new Label("String_Node_Str",new Model(null)));
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override protected void populateItem(ListItem<FieldWrapper> item){
  final FieldWrapper field=item.getModelObject();
  item.add(new Label("String_Node_Str",new ResourceModel(field.getName())));
  final AbstractFieldPanel component;
  Method classMethod;
  try {
    if (field.getType().equals(ConflictResolutionAction.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      component=new AjaxDropDownChoicePanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false);
      ((AjaxDropDownChoicePanel)component).setChoices(Arrays.asList(ConflictResolutionAction.values()));
      item.add(component);
      item.add(getActivationControl(component,(Enum)classMethod.invoke(policy,new Object[]{}) != null,ConflictResolutionAction.IGNORE,ConflictResolutionAction.IGNORE));
    }
 else     if (field.getType().equals(boolean.class) || field.getType().equals(Boolean.class)) {
      item.add(new AjaxCheckBoxPanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false));
      item.add(new Label("String_Node_Str",new Model(null)));
    }
 else     if (field.getType().equals(List.class) || field.getType().equals(Set.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      if (field.getSchemaList() != null) {
        final List values=schemas.getObject();
        if (field.getSchemaList().extended()) {
          values.add("String_Node_Str");
          values.add("String_Node_Str");
        }
        component=new AjaxPalettePanel("String_Node_Str",new PropertyModel(policy,field.getName()),new ListModel<String>(values));
        item.add(component);
        item.add(getActivationControl(component,!((List)classMethod.invoke(policy,new Object[]{})).isEmpty(),new ArrayList<String>(),new ArrayList<String>()));
      }
 else {
        final FieldPanel panel=new AjaxTextFieldPanel("String_Node_Str",field.getName(),new Model(null),true);
        panel.setRequired(true);
        component=new MultiValueSelectorPanel<String>("String_Node_Str",new PropertyModel(policy,field.getName()),String.class,panel);
        item.add(component);
        final List<String> reinitializedValue=new ArrayList<String>();
        reinitializedValue.add("String_Node_Str");
        item.add(getActivationControl(component,!((List<String>)classMethod.invoke(policy,new Object[]{})).isEmpty(),(Serializable)new ArrayList<String>(),(Serializable)reinitializedValue));
      }
    }
 else     if (field.getType().equals(int.class) || field.getType().equals(Integer.class)) {
      classMethod=policy.getClass().getMethod("String_Node_Str" + StringUtils.capitalize(field.getName()),new Class[]{});
      component=new AjaxTextFieldPanel("String_Node_Str",field.getName(),new PropertyModel(policy,field.getName()),false);
      item.add(component);
      item.add(getActivationControl(component,(Integer)classMethod.invoke(policy,new Object[]{}) > 0,0,0));
    }
 else {
      item.add(new AjaxCheckBoxPanel("String_Node_Str",field.getName(),new Model(),false));
      item.add(new Label("String_Node_Str",new Model(null)));
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}