Program: 64791
Project: 64791
Buggy source:
/** 
 * update data into database
 * @return true if update data successful 
 */
private boolean updateData(){
  if (validateData() == false) {
    return false;
  }
  ContentValues values=new ContentValues();
  values.put(TableCheckingAccount.ACCOUNTID,mAccountId);
  if (mTransCode.equals("String_Node_Str")) {
    values.put(TableCheckingAccount.TOACCOUNTID,mToAccountId);
    values.put(TableCheckingAccount.PAYEEID,-1);
  }
 else {
    values.put(TableCheckingAccount.PAYEEID,mPayeeId);
  }
  values.put(TableCheckingAccount.TRANSCODE,mTransCode);
  if (TextUtils.isEmpty(edtAmount.getText().toString()) == false) {
    values.put(TableCheckingAccount.TRANSAMOUNT,Float.valueOf(edtAmount.getText().toString()));
  }
 else {
    values.put(TableCheckingAccount.TRANSAMOUNT,Float.valueOf(edtTotAmount.getText().toString()));
  }
  values.put(TableCheckingAccount.STATUS,mStatus);
  values.put(TableCheckingAccount.CATEGID,mCategoryId);
  values.put(TableCheckingAccount.SUBCATEGID,mSubCategoryId);
  values.put(TableCheckingAccount.TRANSDATE,this.getDate());
  values.put(TableCheckingAccount.FOLLOWUPID,-1);
  values.put(TableCheckingAccount.TOTRANSAMOUNT,Float.valueOf(edtTotAmount.getText().toString()));
  values.put(TableCheckingAccount.NOTES,edtNotes.getText().toString());
  if (mIntentAction.equals(INTENT_ACTION_INSERT)) {
    if (getContentResolver().insert(mCheckingAccount.getUri(),values) == null) {
      Toast.makeText(this,R.string.db_checking_insert_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str");
      return false;
    }
  }
 else {
    if (getContentResolver().update(mCheckingAccount.getUri(),values,TableCheckingAccount.TRANSID + "String_Node_Str",new String[]{Integer.toString(mTransId)}) <= 0) {
      Toast.makeText(this,R.string.db_checking_update_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str");
      return false;
    }
  }
  if (mPayeeId > 0) {
    values.clear();
    values.put(TablePayee.CATEGID,mCategoryId);
    values.put(TablePayee.SUBCATEGID,mSubCategoryId);
    TablePayee payee=new TablePayee();
    if (getContentResolver().update(payee.getUri(),values,TablePayee.PAYEEID + "String_Node_Str" + Integer.toString(mPayeeId),null) <= 0) {
      Toast.makeText(this,R.string.db_payee_update_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str" + Integer.toString(mPayeeId) + "String_Node_Str");
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * update data into database
 * @return true if update data successful 
 */
private boolean updateData(){
  if (validateData() == false) {
    return false;
  }
  ContentValues values=new ContentValues();
  values.put(TableCheckingAccount.ACCOUNTID,mAccountId);
  if (mTransCode.equals("String_Node_Str")) {
    values.put(TableCheckingAccount.TOACCOUNTID,mToAccountId);
    values.put(TableCheckingAccount.PAYEEID,-1);
  }
 else {
    values.put(TableCheckingAccount.PAYEEID,mPayeeId);
  }
  values.put(TableCheckingAccount.TRANSCODE,mTransCode);
  if (TextUtils.isEmpty(edtAmount.getText().toString()) || (!(mTransCode.equalsIgnoreCase("String_Node_Str")))) {
    values.put(TableCheckingAccount.TRANSAMOUNT,Float.valueOf(edtTotAmount.getText().toString()));
  }
 else {
    values.put(TableCheckingAccount.TRANSAMOUNT,Float.valueOf(edtAmount.getText().toString()));
  }
  values.put(TableCheckingAccount.STATUS,mStatus);
  values.put(TableCheckingAccount.CATEGID,mCategoryId);
  values.put(TableCheckingAccount.SUBCATEGID,mSubCategoryId);
  values.put(TableCheckingAccount.TRANSDATE,this.getDate());
  values.put(TableCheckingAccount.FOLLOWUPID,-1);
  values.put(TableCheckingAccount.TOTRANSAMOUNT,Float.valueOf(edtTotAmount.getText().toString()));
  values.put(TableCheckingAccount.NOTES,edtNotes.getText().toString());
  if (mIntentAction.equals(INTENT_ACTION_INSERT)) {
    if (getContentResolver().insert(mCheckingAccount.getUri(),values) == null) {
      Toast.makeText(this,R.string.db_checking_insert_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str");
      return false;
    }
  }
 else {
    if (getContentResolver().update(mCheckingAccount.getUri(),values,TableCheckingAccount.TRANSID + "String_Node_Str",new String[]{Integer.toString(mTransId)}) <= 0) {
      Toast.makeText(this,R.string.db_checking_update_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str");
      return false;
    }
  }
  if ((!(mTransCode.equalsIgnoreCase("String_Node_Str"))) && (mPayeeId > 0)) {
    values.clear();
    values.put(TablePayee.CATEGID,mCategoryId);
    values.put(TablePayee.SUBCATEGID,mSubCategoryId);
    TablePayee payee=new TablePayee();
    if (getContentResolver().update(payee.getUri(),values,TablePayee.PAYEEID + "String_Node_Str" + Integer.toString(mPayeeId),null) <= 0) {
      Toast.makeText(this,R.string.db_payee_update_failed,Toast.LENGTH_SHORT).show();
      Log.w(LOGCAT,"String_Node_Str" + Integer.toString(mPayeeId) + "String_Node_Str");
    }
  }
  return true;
}