Program: 58733
Project: 58733
Buggy source:
/** 
 * Method update PanelItems list with new item created from viewField.
 * @param fieldName Name of field
 * @param viewField Source field.
 * @param panelItems Destination list to update.
 */
private PanelField createField(ViewItem viewItem){
  PanelField field=new PanelField();
  field.setName(viewItem.getName());
  field.setOnChange(viewItem.getOnChange());
  field.setDomain(viewItem.getDomainCondition());
  field.setReadonlyIf(viewItem.getReadonlyIf());
  field.setHideIf(viewItem.getHideIf());
  field.setShowIf(viewItem.getShowIf());
  field.setRequiredIf(viewItem.getRequiredIf());
  field.setModuleToCheck(viewItem.getIfModule());
  field.setConditionToCheck(viewItem.getIfConfig());
  field.setFormView(viewItem.getFormView());
  field.setGridView(viewItem.getGridView());
  field.setColSpan(null);
  String selectWidget=viewItem.getWidget();
  String widget=null;
  MetaField metaField=viewItem.getMetaField();
  setEditor(field,viewItem);
  if (viewItem.getHidden()) {
    field.setHidden(true);
  }
 else {
    field.setHidden(null);
  }
  if (viewItem.getRequired()) {
    field.setRequired(true);
  }
 else {
    field.setRequired(null);
  }
  if (viewItem.getReadonly()) {
    field.setReadonly(true);
  }
 else {
    field.setReadonly(null);
  }
  if (viewItem.getProgressBar()) {
    widget="String_Node_Str";
  }
 else   if (viewItem.getHtmlWidget()) {
    field.setColSpan(12);
    widget="String_Node_Str";
  }
 else   if (selectWidget != null && !selectWidget.equals("String_Node_Str")) {
    widget=selectWidget;
  }
  if (metaField != null) {
    if (metaField.getIsDuration()) {
      widget="String_Node_Str";
    }
 else     if (metaField.getIsUrl()) {
      widget="String_Node_Str";
    }
 else     if (metaField.getLarge()) {
      field.setColSpan(12);
    }
    String relationship=metaField.getRelationship();
    if (autoCreate && relationship != null && "String_Node_Str".contains(relationship)) {
      field.setCanNew("String_Node_Str");
    }
  }
  if (viewItem.getColSpan() > 0) {
    field.setColSpan(viewItem.getColSpan());
  }
  field.setWidget(widget);
  MetaSelect metaSelect=viewItem.getMetaSelect();
  if (metaSelect != null) {
    field.setSelection(metaSelect.getName());
  }
 else {
    field.setSelection(null);
  }
  return field;
}

Fixed version (ground truth):
/** 
 * Method update PanelItems list with new item created from viewField.
 * @param fieldName Name of field
 * @param viewField Source field.
 * @param panelItems Destination list to update.
 */
private PanelField createField(ViewItem viewItem){
  PanelField field=new PanelField();
  field.setName(viewItem.getName());
  field.setOnChange(viewItem.getOnChange());
  field.setDomain(viewItem.getDomainCondition());
  field.setReadonlyIf(viewItem.getReadonlyIf());
  field.setHideIf(viewItem.getHideIf());
  field.setShowIf(viewItem.getShowIf());
  field.setRequiredIf(viewItem.getRequiredIf());
  field.setModuleToCheck(viewItem.getIfModule());
  field.setConditionToCheck(viewItem.getIfConfig());
  field.setFormView(viewItem.getFormView());
  field.setGridView(viewItem.getGridView());
  field.setColSpan(null);
  String selectWidget=viewItem.getWidget();
  String widget=null;
  MetaField metaField=viewItem.getMetaField();
  setEditor(field,viewItem);
  if (viewItem.getHidden()) {
    field.setHidden(true);
  }
 else {
    field.setHidden(null);
  }
  if (viewItem.getRequired()) {
    field.setRequired(true);
  }
 else {
    field.setRequired(null);
  }
  if (viewItem.getReadonly()) {
    field.setReadonly(true);
  }
 else {
    field.setReadonly(null);
  }
  if (viewItem.getProgressBar()) {
    widget="String_Node_Str";
  }
 else   if (viewItem.getHtmlWidget()) {
    field.setColSpan(12);
    widget="String_Node_Str";
  }
 else   if (selectWidget != null && !selectWidget.equals("String_Node_Str")) {
    widget=selectWidget;
  }
  if (metaField != null) {
    if (metaField.getIsDuration()) {
      widget="String_Node_Str";
    }
 else     if (metaField.getIsUrl()) {
      widget="String_Node_Str";
    }
 else     if (metaField.getLarge()) {
      field.setColSpan(12);
    }
    if (metaField.getMultiselect()) {
      widget="String_Node_Str";
    }
    String relationship=metaField.getRelationship();
    if (autoCreate && relationship != null && "String_Node_Str".contains(relationship)) {
      field.setCanNew("String_Node_Str");
    }
  }
 else {
    field.setTitle(viewItem.getTitle());
    field.setServerType(viewItem.getFieldType());
  }
  if (viewItem.getColSpan() > 0) {
    field.setColSpan(viewItem.getColSpan());
  }
  field.setWidget(widget);
  MetaSelect metaSelect=viewItem.getMetaSelect();
  if (metaSelect != null) {
    field.setSelection(metaSelect.getName());
  }
 else {
    field.setSelection(null);
  }
  return field;
}