Program: 187779
Project: 187779
Buggy source:
protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (debug)   Log.d(TAG,"String_Node_Str" + requestCode + "String_Node_Str"+ resultCode);
switch (requestCode) {
case REQUEST_CODE_ENCRYPT_OR_UNENCRYPT:
    if (resultCode == RESULT_OK && data != null) {
      String[] textArray=data.getStringArrayExtra(CryptoIntents.EXTRA_TEXT_ARRAY);
      String text=textArray[0];
      String title=textArray[1];
      String tags=textArray[2];
      String action=data.getAction();
      String uristring=data.getStringExtra(PrivateNotePadIntents.EXTRA_URI);
      Uri uri=null;
      if (uristring != null) {
        uri=Uri.parse(uristring);
      }
 else {
        Log.e(TAG,"String_Node_Str");
        Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        return;
      }
      if (debug)       Log.d(TAG,"String_Node_Str" + uri + "String_Node_Str"+ text+ "String_Node_Str"+ tags);
      ContentValues values=new ContentValues();
      values.put(Notes.MODIFIED_DATE,System.currentTimeMillis());
      if (title != null) {
        values.put(Notes.TITLE,title);
      }
      if (text != null) {
        values.put(Notes.NOTE,text);
      }
      if (tags != null) {
        values.put(Notes.TAGS,tags);
      }
      if (action.equals(CryptoIntents.ACTION_ENCRYPT)) {
        values.put(Notes.ENCRYPTED,1);
      }
 else       if (action.equals(CryptoIntents.ACTION_DECRYPT)) {
        values.put(Notes.ENCRYPTED,0);
      }
 else {
        Log.e(TAG,"String_Node_Str");
        Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        return;
      }
      getContentResolver().update(uri,values,null,null);
      setResult(RESULT_OK);
      finish();
    }
 else {
      Toast.makeText(this,R.string.encryption_failed,Toast.LENGTH_SHORT).show();
      Log.e(TAG,"String_Node_Str");
      finish();
    }
  break;
}
}

Fixed version (ground truth):
protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (debug)   Log.d(TAG,"String_Node_Str" + requestCode + "String_Node_Str"+ resultCode);
switch (requestCode) {
case REQUEST_CODE_ENCRYPT_OR_UNENCRYPT:
    if (resultCode == RESULT_OK && data != null) {
      String[] textArray=data.getStringArrayExtra(CryptoIntents.EXTRA_TEXT_ARRAY);
      String text=textArray[0];
      String title=textArray[1];
      String tags=textArray[2];
      String action=data.getAction();
      String uristring=data.getStringExtra(PrivateNotePadIntents.EXTRA_URI);
      Uri uri=null;
      if (uristring != null) {
        uri=Uri.parse(uristring);
      }
 else {
        Log.e(TAG,"String_Node_Str");
        Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        return;
      }
      if (debug)       Log.d(TAG,"String_Node_Str" + uri + "String_Node_Str"+ text+ "String_Node_Str"+ tags);
      ContentValues values=new ContentValues();
      values.put(Notes.MODIFIED_DATE,System.currentTimeMillis());
      if (title != null) {
        values.put(Notes.TITLE,title);
      }
      if (text != null) {
        values.put(Notes.NOTE,text);
      }
      if (tags != null) {
        values.put(Notes.TAGS,tags);
      }
      if (action.equals(CryptoIntents.ACTION_ENCRYPT)) {
        values.put(Notes.ENCRYPTED,1);
      }
 else       if (action.equals(CryptoIntents.ACTION_DECRYPT)) {
        values.put(Notes.ENCRYPTED,0);
      }
 else {
        Log.e(TAG,"String_Node_Str");
        Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
        return;
      }
      getContentResolver().update(uri,values,null,null);
      getContentResolver().notifyChange(uri,null);
      setResult(RESULT_OK);
      finish();
    }
 else {
      Toast.makeText(this,R.string.encryption_failed,Toast.LENGTH_SHORT).show();
      Log.e(TAG,"String_Node_Str");
      finish();
    }
  break;
}
}