Program: 15132
Project: 15132
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_category);
  Bundle extras=getIntent().getExtras();
  if (extras != null) {
    id=extras.getInt("String_Node_Str");
  }
  loadCategories();
  final Button cancelButton=(Button)findViewById(R.id.cancel);
  final Button okButton=(Button)findViewById(R.id.ok);
  okButton.setOnClickListener(new Button.OnClickListener(){
    public void onClick(    View v){
      EditText categoryNameET=(EditText)findViewById(R.id.category_name);
      String category_name=categoryNameET.getText().toString();
      EditText categorySlugET=(EditText)findViewById(R.id.category_slug);
      String category_slug=categorySlugET.getText().toString();
      EditText categoryDescET=(EditText)findViewById(R.id.category_desc);
      String category_desc=categoryDescET.getText().toString();
      Spinner sCategories=(Spinner)findViewById(R.id.parent_category);
      String parent_category="String_Node_Str";
      if (sCategories.getSelectedItem() != null)       parent_category=sCategories.getSelectedItem().toString();
      int parent_id=0;
      if (sCategories.getSelectedItemPosition() != 0) {
        parent_id=WordPress.wpDB.getCategoryId(id,parent_category);
      }
      if (category_name.replaceAll("String_Node_Str","String_Node_Str").equals("String_Node_Str")) {
        AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(AddCategoryActivity.this);
        dialogBuilder.setTitle(getResources().getText(R.string.required_field));
        dialogBuilder.setMessage(getResources().getText(R.string.cat_name_required));
        dialogBuilder.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
          public void onClick(          DialogInterface dialog,          int whichButton){
          }
        }
);
        dialogBuilder.setCancelable(true);
        dialogBuilder.create().show();
      }
 else {
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",category_name);
        bundle.putString("String_Node_Str",category_slug);
        bundle.putString("String_Node_Str",category_desc);
        bundle.putInt("String_Node_Str",parent_id);
        bundle.putString("String_Node_Str","String_Node_Str");
        Intent mIntent=new Intent();
        mIntent.putExtras(bundle);
        setResult(RESULT_OK,mIntent);
        finish();
      }
    }
  }
);
  cancelButton.setOnClickListener(new Button.OnClickListener(){
    public void onClick(    View v){
      Bundle bundle=new Bundle();
      bundle.putString("String_Node_Str","String_Node_Str");
      Intent mIntent=new Intent();
      mIntent.putExtras(bundle);
      setResult(RESULT_OK,mIntent);
      finish();
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.add_category);
  Bundle extras=getIntent().getExtras();
  if (extras != null) {
    id=extras.getInt("String_Node_Str");
  }
  loadCategories();
  final Button cancelButton=(Button)findViewById(R.id.cancel);
  final Button okButton=(Button)findViewById(R.id.ok);
  okButton.setOnClickListener(new Button.OnClickListener(){
    public void onClick(    View v){
      EditText categoryNameET=(EditText)findViewById(R.id.category_name);
      String category_name=categoryNameET.getText().toString();
      EditText categorySlugET=(EditText)findViewById(R.id.category_slug);
      String category_slug=categorySlugET.getText().toString();
      EditText categoryDescET=(EditText)findViewById(R.id.category_desc);
      String category_desc=categoryDescET.getText().toString();
      Spinner sCategories=(Spinner)findViewById(R.id.parent_category);
      String parent_category="String_Node_Str";
      if (sCategories.getSelectedItem() != null)       parent_category=sCategories.getSelectedItem().toString().trim();
      int parent_id=0;
      if (sCategories.getSelectedItemPosition() != 0) {
        parent_id=WordPress.wpDB.getCategoryId(id,parent_category);
      }
      if (category_name.replaceAll("String_Node_Str","String_Node_Str").equals("String_Node_Str")) {
        AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(AddCategoryActivity.this);
        dialogBuilder.setTitle(getResources().getText(R.string.required_field));
        dialogBuilder.setMessage(getResources().getText(R.string.cat_name_required));
        dialogBuilder.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
          public void onClick(          DialogInterface dialog,          int whichButton){
          }
        }
);
        dialogBuilder.setCancelable(true);
        dialogBuilder.create().show();
      }
 else {
        Bundle bundle=new Bundle();
        bundle.putString("String_Node_Str",category_name);
        bundle.putString("String_Node_Str",category_slug);
        bundle.putString("String_Node_Str",category_desc);
        bundle.putInt("String_Node_Str",parent_id);
        bundle.putString("String_Node_Str","String_Node_Str");
        Intent mIntent=new Intent();
        mIntent.putExtras(bundle);
        setResult(RESULT_OK,mIntent);
        finish();
      }
    }
  }
);
  cancelButton.setOnClickListener(new Button.OnClickListener(){
    public void onClick(    View v){
      Bundle bundle=new Bundle();
      bundle.putString("String_Node_Str","String_Node_Str");
      Intent mIntent=new Intent();
      mIntent.putExtras(bundle);
      setResult(RESULT_OK,mIntent);
      finish();
    }
  }
);
}