Program: 40370
Project: 40370
Buggy source:
private void showAddNewNodeDialog(){
  AlertDialog.Builder builder=new AlertDialog.Builder(this);
  builder.setTitle(R.string.add_node_popup_title);
  LayoutInflater inflater=this.getLayoutInflater();
  View dialogView=inflater.inflate(R.layout.activity_main_add_node,null);
  builder.setView(dialogView);
  final AppCompatEditText textViewSimpleName=(AppCompatEditText)dialogView.findViewById(R.id.textView_add_simpleName);
  final AppCompatEditText textViewNodeId=(AppCompatEditText)dialogView.findViewById(R.id.textView_add_nodeID);
  builder.setPositiveButton(getString(R.string.ok),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      boolean error=false;
      if (textViewNodeId.getText().toString().matches("String_Node_Str")) {
        Toast.makeText(mContext,getString(R.string.add_error_missing_nodeID),Toast.LENGTH_SHORT).show();
        error=true;
      }
 else       if (textViewSimpleName.getText().toString().matches("String_Node_Str")) {
        Toast.makeText(mContext,getString(R.string.add_error_missing_SimpleName),Toast.LENGTH_SHORT).show();
        error=true;
      }
 else       if (textViewNodeId.getText().length() != 40) {
        Toast.makeText(mContext,getString(R.string.add_error_wrong_character_count),Toast.LENGTH_SHORT).show();
        error=true;
      }
      DatabaseManager databaseManager=DatabaseManager.getInstance(mContext);
      Cursor cursor=databaseManager.getNode(textViewNodeId.getText().toString());
      if (cursor.getCount() >= 1) {
        Toast.makeText(mContext,getString(R.string.add_error_node_exists),Toast.LENGTH_SHORT).show();
        error=true;
      }
      if (!error) {
        StorjNode newNode=new StorjNode(textViewNodeId.getText().toString());
        newNode.setSimpleName(textViewSimpleName.getText().toString());
        databaseManager.insertNode(newNode);
        redrawList();
        pullSotrjNodeStats(mContext);
      }
    }
  }
);
  builder.setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.cancel();
    }
  }
);
  AlertDialog alertDialog=builder.create();
  alertDialog.show();
  alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(getResources().getColor(R.color.black));
  alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(getResources().getColor(R.color.black));
}

Fixed version (ground truth):
private void showAddNewNodeDialog(){
  AlertDialog.Builder builder=new AlertDialog.Builder(this);
  builder.setTitle(R.string.add_node_popup_title);
  LayoutInflater inflater=this.getLayoutInflater();
  View dialogView=inflater.inflate(R.layout.activity_main_add_node,null);
  builder.setView(dialogView);
  final AppCompatEditText textViewSimpleName=(AppCompatEditText)dialogView.findViewById(R.id.textView_add_simpleName);
  final AppCompatEditText textViewNodeId=(AppCompatEditText)dialogView.findViewById(R.id.textView_add_nodeID);
  builder.setPositiveButton(getString(R.string.ok),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      boolean error=false;
      if (textViewNodeId.getText().toString().matches("String_Node_Str")) {
        Toast.makeText(mContext,getString(R.string.add_error_missing_nodeID),Toast.LENGTH_SHORT).show();
        error=true;
      }
 else       if (textViewSimpleName.getText().toString().matches("String_Node_Str")) {
        Toast.makeText(mContext,getString(R.string.add_error_missing_SimpleName),Toast.LENGTH_SHORT).show();
        error=true;
      }
 else       if (textViewNodeId.getText().length() != 40) {
        Toast.makeText(mContext,getString(R.string.add_error_wrong_character_count),Toast.LENGTH_SHORT).show();
        error=true;
      }
      DatabaseManager databaseManager=DatabaseManager.getInstance(mContext);
      Cursor cursor=databaseManager.getNode(textViewNodeId.getText().toString());
      if (cursor.getCount() >= 1) {
        Toast.makeText(mContext,getString(R.string.add_error_node_exists),Toast.LENGTH_SHORT).show();
        error=true;
      }
      if (!error) {
        StorjNode newNode=new StorjNode(textViewNodeId.getText().toString());
        newNode.setSimpleName(textViewSimpleName.getText().toString());
        databaseManager.insertNode(newNode);
        redrawList();
        if (!AlarmReceiver.mRunning) {
          pullStorjNodeStats(mContext);
        }
 else {
          AlarmReceiver.mRetrigger=true;
        }
      }
    }
  }
);
  builder.setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.cancel();
    }
  }
);
  AlertDialog alertDialog=builder.create();
  alertDialog.show();
  alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(getResources().getColor(R.color.black));
  alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(getResources().getColor(R.color.black));
}