Program: 40373
Project: 40373
Buggy source:
@Override public void onClick(View v){
  int position=(Integer)v.getTag();
  boolean error=false;
  StorjNode selectedNode=mItems.get(position);
  TextView textView_nodeId=(TextView)v.getRootView().findViewById(R.id.textView_edit_nodeID);
  TextView textView_simpleName=(TextView)v.getRootView().findViewById(R.id.textView_edit_simpleName);
  if (textView_nodeId.getText().toString().matches("String_Node_Str")) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_missing_nodeID),Toast.LENGTH_SHORT).show();
    error=true;
  }
 else   if (textView_simpleName.getText().toString().matches("String_Node_Str")) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_missing_SimpleName),Toast.LENGTH_SHORT).show();
    error=true;
  }
 else   if (textView_nodeId.getText().length() != 40) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_wrong_character_count),Toast.LENGTH_SHORT).show();
    error=true;
  }
  DatabaseManager databaseManager=DatabaseManager.getInstance(mContext);
  Cursor cursor=databaseManager.getNode(textView_nodeId.getText().toString());
  if (cursor.getCount() >= 1 && !(textView_nodeId.getText().toString().equals(selectedNode.getNodeID().getValue()))) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_node_exists),Toast.LENGTH_SHORT).show();
    error=true;
  }
  if (!error) {
    StorjNode updatedNode=new StorjNode(textView_nodeId.getText().toString());
    updatedNode.setSimpleName(textView_simpleName.getText().toString());
    updateNode(selectedNode,updatedNode);
    pullSotrjNodeStats(mContext);
  }
  alertDialog.cancel();
}

Fixed version (ground truth):
@Override public void onClick(View v){
  int position=(Integer)v.getTag();
  boolean error=false;
  StorjNode selectedNode=mItems.get(position);
  TextView textView_nodeId=(TextView)v.getRootView().findViewById(R.id.textView_edit_nodeID);
  TextView textView_simpleName=(TextView)v.getRootView().findViewById(R.id.textView_edit_simpleName);
  if (textView_nodeId.getText().toString().matches("String_Node_Str")) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_missing_nodeID),Toast.LENGTH_SHORT).show();
    error=true;
  }
 else   if (textView_simpleName.getText().toString().matches("String_Node_Str")) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_missing_SimpleName),Toast.LENGTH_SHORT).show();
    error=true;
  }
 else   if (textView_nodeId.getText().length() != 40) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_wrong_character_count),Toast.LENGTH_SHORT).show();
    error=true;
  }
  DatabaseManager databaseManager=DatabaseManager.getInstance(mContext);
  Cursor cursor=databaseManager.getNode(textView_nodeId.getText().toString());
  if (cursor.getCount() >= 1 && !(textView_nodeId.getText().toString().equals(selectedNode.getNodeID().getValue()))) {
    Toast.makeText(mContext,mContext.getString(R.string.add_error_node_exists),Toast.LENGTH_SHORT).show();
    error=true;
  }
  if (!error) {
    StorjNode updatedNode=new StorjNode(textView_nodeId.getText().toString());
    updatedNode.setSimpleName(textView_simpleName.getText().toString());
    updateNode(selectedNode,updatedNode);
    if (!AlarmReceiver.mRunning) {
      pullSotrjNodeStats(mContext);
    }
 else {
      AlarmReceiver.mRetrigger=true;
    }
  }
  alertDialog.cancel();
}