Program: 63781
Project: 63781
Buggy source:
/** 
 * Validate relation record for the record. And if relation record not created on server. It will be created on server before syncing original record
 * @param model
 * @param row
 * @return updatedRow
 */
public boolean validateRelationRecords(OModel model,ODataRow row){
  Log.d(TAG,"String_Node_Str");
  for (  OColumn column : model.getRelationColumns()) {
    OModel relModel=model.createInstance(column.getType());
switch (column.getRelationType()) {
case ManyToOne:
      if (!row.getString(column.getName()).equals("String_Node_Str")) {
        ODataRow m2oRec=row.getM2ORecord(column.getName()).browse();
        if (m2oRec.getInt("String_Node_Str") == 0) {
          int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,m2oRec));
          updateRecordServerId(relModel,m2oRec.getInt(OColumn.ROW_ID),new_id);
        }
      }
    break;
case ManyToMany:
  List<ODataRow> m2mRecs=row.getM2MRecord(column.getName()).browseEach();
if (!m2mRecs.isEmpty()) {
  for (  ODataRow m2mRec : m2mRecs) {
    if (m2mRec.getInt("String_Node_Str") == 0) {
      int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,m2mRec));
      updateRecordServerId(relModel,m2mRec.getInt(OColumn.ROW_ID),new_id);
    }
  }
}
break;
case OneToMany:
List<ODataRow> o2mRecs=row.getM2MRecord(column.getName()).browseEach();
if (!o2mRecs.isEmpty()) {
for (ODataRow o2mRec : o2mRecs) {
if (o2mRec.getInt("String_Node_Str") == 0) {
int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,o2mRec));
updateRecordServerId(relModel,o2mRec.getInt(OColumn.ROW_ID),new_id);
}
}
}
break;
}
}
return true;
}

Fixed version (ground truth):
/** 
 * Validate relation record for the record. And if relation record not created on server. It will be created on server before syncing original record
 * @param model
 * @param row
 * @return updatedRow
 */
public boolean validateRelationRecords(OModel model,ODataRow row){
  Log.d(TAG,"String_Node_Str");
  for (  OColumn column : model.getRelationColumns()) {
    OModel relModel=model.createInstance(column.getType());
switch (column.getRelationType()) {
case ManyToOne:
      if (!row.getString(column.getName()).equals("String_Node_Str")) {
        ODataRow m2oRec=row.getM2ORecord(column.getName()).browse();
        if (m2oRec.getInt("String_Node_Str") == 0) {
          int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,m2oRec));
          updateRecordServerId(relModel,m2oRec.getInt(OColumn.ROW_ID),new_id);
        }
      }
    break;
case ManyToMany:
  List<ODataRow> m2mRecs=row.getM2MRecord(column.getName()).browseEach();
if (!m2mRecs.isEmpty()) {
  for (  ODataRow m2mRec : m2mRecs) {
    if (m2mRec.getInt("String_Node_Str") == 0) {
      int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,m2mRec));
      updateRecordServerId(relModel,m2mRec.getInt(OColumn.ROW_ID),new_id);
    }
  }
}
break;
case OneToMany:
List<ODataRow> o2mRecs=row.getO2MRecord(column.getName()).browseEach();
if (!o2mRecs.isEmpty()) {
for (ODataRow o2mRec : o2mRecs) {
if (o2mRec.getInt("String_Node_Str") == 0) {
int new_id=relModel.getServerDataHelper().createOnServer(OdooRecordUtils.createRecordValues(relModel,o2mRec));
updateRecordServerId(relModel,o2mRec.getInt(OColumn.ROW_ID),new_id);
}
}
}
break;
}
}
return true;
}