Program: 51169
Project: 51169
Buggy source:
public void setValueAt(Object aValue,int rowIndex,int columnIndex){
  setErrorMsg(null);
  try {
    String pName=propertyNames[rowIndex];
    int i=-1;
    if ((i=pName.indexOf('|')) != -1) {
      Field f=target.getClass().getField(propertyNames[rowIndex].substring(0,i).trim());
      f.set(target,aValue);
      String[] pNames=pName.split("String_Node_Str",0);
      for (int j=1; j < pNames.length; j++) {
        String[] pNamesField=pNames[j].trim().split("String_Node_Str",0);
        Field f2=target.getClass().getField(pNamesField[0].trim());
        f2.set(target,null);
      }
    }
 else     if ((target instanceof MondrianGuiDef.Level) && (pName.equals("String_Node_Str"))) {
      ((MondrianGuiDef.Level)target).ordinalExp.expressions[0]=(MondrianGuiDef.SQL)aValue;
    }
 else     if ((target instanceof MondrianGuiDef.Table && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Hierarchy && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))) {
      if (aValue != null) {
        String[] aValues=((String)aValue).split("String_Node_Str");
        if (aValues.length == 2) {
          if (target instanceof MondrianGuiDef.Table) {
            ((MondrianGuiDef.Table)target).name=aValues[1];
            ((MondrianGuiDef.Table)target).schema=aValues[0];
            fireTableDataChanged();
          }
 else {
            Field f=target.getClass().getField(propertyNames[rowIndex]);
            f.set(target,aValues[1]);
          }
        }
 else {
          Field f=target.getClass().getField(propertyNames[rowIndex]);
          f.set(target,aValue);
        }
      }
    }
 else     if ((target instanceof MondrianGuiDef.Dimension && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.DimensionUsage && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Measure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Hierarchy && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Closure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Closure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Property && pName.equals("String_Node_Str"))) {
      if (aValue != null) {
        String[] aValues=((String)aValue).split("String_Node_Str");
        Field f=target.getClass().getField(propertyNames[rowIndex]);
        f.set(target,aValues[aValues.length - 1]);
      }
    }
 else {
      if (propertyNames[rowIndex].equals("String_Node_Str") && (!(target instanceof MondrianGuiDef.Table)) && (!aValue.equals(target.getClass().getField(propertyNames[rowIndex]).get(target)))&& duplicateName(aValue)) {
        setErrorMsg(workbench.getResourceConverter().getFormattedString("String_Node_Str","String_Node_Str",new String[]{aValue.toString()}));
      }
 else {
        Field f=target.getClass().getField(propertyNames[rowIndex]);
        f.set(target,aValue);
      }
    }
  }
 catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public void setValueAt(Object aValue,int rowIndex,int columnIndex){
  setErrorMsg(null);
  try {
    String pName=propertyNames[rowIndex];
    int i=-1;
    if ((i=pName.indexOf('|')) != -1) {
      Field f=target.getClass().getField(propertyNames[rowIndex].substring(0,i).trim());
      f.set(target,aValue);
      String[] pNames=pName.split("String_Node_Str",0);
      for (int j=1; j < pNames.length; j++) {
        String[] pNamesField=pNames[j].trim().split("String_Node_Str",0);
        Field f2=target.getClass().getField(pNamesField[0].trim());
        f2.set(target,null);
      }
    }
 else     if ((target instanceof MondrianGuiDef.Level) && (pName.equals("String_Node_Str"))) {
      ((MondrianGuiDef.Level)target).ordinalExp.expressions[0]=(MondrianGuiDef.SQL)aValue;
    }
 else     if ((target instanceof MondrianGuiDef.Table && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Hierarchy && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))) {
      if (aValue != null) {
        String[] aValues=((String)aValue).split("String_Node_Str");
        if (aValues.length == 2) {
          if (target instanceof MondrianGuiDef.Table) {
            ((MondrianGuiDef.Table)target).name=aValues[1];
            ((MondrianGuiDef.Table)target).schema=aValues[0];
            fireTableDataChanged();
          }
 else {
            Field f=target.getClass().getField(propertyNames[rowIndex]);
            f.set(target,aValues[1]);
          }
        }
 else {
          Field f=target.getClass().getField(propertyNames[rowIndex]);
          setFieldValue(f,aValue);
        }
      }
    }
 else     if ((target instanceof MondrianGuiDef.Dimension && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.DimensionUsage && pName.equals("String_Node_Str")) || (target instanceof MondrianGuiDef.Measure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Hierarchy && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Level && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Closure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Closure && pName.equals("String_Node_Str"))|| (target instanceof MondrianGuiDef.Property && pName.equals("String_Node_Str"))) {
      if (aValue != null) {
        String[] aValues=((String)aValue).split("String_Node_Str");
        Field f=target.getClass().getField(propertyNames[rowIndex]);
        aValue=aValues[aValues.length - 1];
        setFieldValue(f,aValue);
      }
    }
 else {
      if (propertyNames[rowIndex].equals("String_Node_Str") && (!(target instanceof MondrianGuiDef.Table)) && (!aValue.equals(target.getClass().getField(propertyNames[rowIndex]).get(target)))&& duplicateName(aValue)) {
        setErrorMsg(workbench.getResourceConverter().getFormattedString("String_Node_Str","String_Node_Str",new String[]{aValue.toString()}));
      }
 else {
        Field f=target.getClass().getField(propertyNames[rowIndex]);
        setFieldValue(f,aValue);
      }
    }
  }
 catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex);
  }
}