Program: 63774
Project: 63774
Buggy source:
@Override public void setValue(Object value){
  mValue=value;
  if (mValue == null || mValue.toString().equals("String_Node_Str")) {
    mValue=-1;
  }
  ODataRow row=new ODataRow();
  if (isEditable()) {
    if (mWidget != null) {
switch (mWidget) {
case RadioGroup:
        if (mResourceArray != -1) {
          ((RadioButton)mRadioGroup.getChildAt(getPos())).setChecked(true);
          row=items.get(getPos());
        }
 else {
          Integer row_id=null;
          if (mValue instanceof OM2ORecord) {
            row=((OM2ORecord)mValue).browse();
            row_id=row.getInt(OColumn.ROW_ID);
          }
 else           row_id=(Integer)mValue;
          int index=0;
          for (int i=0; i < items.size(); i++) {
            if (items.get(i).getInt(OColumn.ROW_ID) == row_id) {
              index=i;
              break;
            }
          }
          row=items.get(index);
          ((RadioButton)mRadioGroup.getChildAt(index)).setChecked(true);
        }
      break;
case Searchable:
case SearchableLive:
case SelectionDialog:
    if (mResourceArray != -1) {
      row=items.get(getPos());
    }
 else {
      if (mValue instanceof OM2ORecord)       row=((OM2ORecord)mValue).browse();
 else       if (mValue instanceof Integer)       row=getRecordData((Integer)mValue);
    }
  txvView.setText(row.getString(mModel.getDefaultNameColumn()));
if (txvView.getTag() != null) {
  AlertDialog dialog=(AlertDialog)txvView.getTag();
  dialog.dismiss();
}
break;
default :
break;
}
}
 else {
if (mResourceArray != -1) {
mSpinner.setSelection(getPos());
row=items.get(getPos());
}
 else if (mCol.getType().isAssignableFrom(OSelection.class)) {
int pos=getPos();
mSpinner.setSelection(pos);
if (pos != -1) {
row=mAdapter.getItem(pos);
mValue=pos;
}
}
 else {
Integer row_id=null;
if (mValue instanceof OM2ORecord) {
row=((OM2ORecord)mValue).browse();
row_id=row.getInt(OColumn.ROW_ID);
}
 else if (mValue instanceof Integer) row_id=(Integer)mValue;
int index=0;
for (int i=0; i < items.size(); i++) {
if (items.get(i).getInt(OColumn.ROW_ID) == row_id) {
index=i;
break;
}
}
row=items.get(index);
mSpinner.setSelection(index);
}
}
}
 else {
if (mResourceArray != -1 || mCol.getType().isAssignableFrom(OSelection.class)) {
int position=getPos();
if (position != -1) row=items.get(position);
}
 else {
if (mValue instanceof OM2ORecord) {
row=((OM2ORecord)mValue).browse();
if (row == null) {
row=new ODataRow();
}
}
 else {
if (!(mValue instanceof Boolean) && mValue != null && !mValue.toString().equals("String_Node_Str")) {
int row_id=(Integer)mValue;
row=getRecordData(row_id);
}
 else {
row=new ODataRow();
row.put(mModel.getDefaultNameColumn(),"String_Node_Str" + mCol.getLabel() + "String_Node_Str");
}
}
}
if (!row.getString(mModel.getDefaultNameColumn()).equals("String_Node_Str")) txvView.setText(row.getString(mModel.getDefaultNameColumn()));
}
if (isEditable() && mValueUpdateListener != null && (mValue instanceof Integer && (int)mValue != -1)) {
mValueUpdateListener.onValueUpdate(row);
}
}

Fixed version (ground truth):
@Override public void setValue(Object value){
  mValue=value;
  if (mValue == null || mValue.toString().equals("String_Node_Str")) {
    mValue=-1;
  }
  ODataRow row=new ODataRow();
  if (isEditable()) {
    if (mWidget != null) {
switch (mWidget) {
case RadioGroup:
        if (mResourceArray != -1) {
          ((RadioButton)mRadioGroup.getChildAt(getPos())).setChecked(true);
          row=items.get(getPos());
        }
 else {
          Integer row_id=null;
          if (mValue instanceof OM2ORecord) {
            row=((OM2ORecord)mValue).browse();
            row_id=row.getInt(OColumn.ROW_ID);
          }
 else           row_id=(Integer)mValue;
          int index=0;
          for (int i=0; i < items.size(); i++) {
            if (items.get(i).getInt(OColumn.ROW_ID) == row_id) {
              index=i;
              break;
            }
          }
          row=items.get(index);
          ((RadioButton)mRadioGroup.getChildAt(index)).setChecked(true);
        }
      break;
case Searchable:
case SearchableLive:
case SelectionDialog:
    if (mResourceArray != -1) {
      row=items.get(getPos());
    }
 else {
      if (mValue instanceof OM2ORecord)       row=((OM2ORecord)mValue).browse();
 else       if (mValue instanceof Integer)       row=getRecordData((Integer)mValue);
    }
  txvView.setText(row.getString(mModel.getDefaultNameColumn()));
if (txvView.getTag() != null) {
  AlertDialog dialog=(AlertDialog)txvView.getTag();
  dialog.dismiss();
}
break;
default :
break;
}
}
 else {
if (mResourceArray != -1) {
mSpinner.setSelection(getPos());
row=items.get(getPos());
}
 else if (mCol.getType().isAssignableFrom(OSelection.class)) {
int pos=getPos();
mSpinner.setSelection(pos);
if (pos != -1) {
row=mAdapter.getItem(pos);
}
}
 else {
Integer row_id=null;
if (mValue instanceof OM2ORecord) {
row=((OM2ORecord)mValue).browse();
row_id=row.getInt(OColumn.ROW_ID);
}
 else if (mValue instanceof Integer) row_id=(Integer)mValue;
int index=0;
for (int i=0; i < items.size(); i++) {
if (items.get(i).getInt(OColumn.ROW_ID) == row_id) {
index=i;
break;
}
}
row=items.get(index);
mSpinner.setSelection(index);
}
}
}
 else {
if (mResourceArray != -1 || mCol.getType().isAssignableFrom(OSelection.class)) {
int position=getPos();
if (position != -1) row=items.get(position);
}
 else {
if (mValue instanceof OM2ORecord) {
row=((OM2ORecord)mValue).browse();
if (row == null) {
row=new ODataRow();
}
}
 else {
if (!(mValue instanceof Boolean) && mValue != null && !mValue.toString().equals("String_Node_Str")) {
int row_id=(Integer)mValue;
row=getRecordData(row_id);
}
 else {
row=new ODataRow();
row.put(mModel.getDefaultNameColumn(),"String_Node_Str" + mCol.getLabel() + "String_Node_Str");
}
}
}
if (!row.getString(mModel.getDefaultNameColumn()).equals("String_Node_Str")) txvView.setText(row.getString(mModel.getDefaultNameColumn()));
}
if (isEditable() && mValueUpdateListener != null) {
if (mValue instanceof Integer && (int)mValue == -1) return;
mValueUpdateListener.onValueUpdate(row);
}
}