Program: 25212
Project: 25212
Buggy source:
public boolean onOptionsItemSelected(MenuItem item){
  final int PU_STAT_OK=0;
  final int PU_STAT_ERR=1;
  final int PU_STAT_MOVED=2;
  final int PU_STAT_NOT_FOUND=3;
switch (item.getItemId()) {
case M_ADDNEWTITLE:
{
      Helper.showTitleInputBox(this,"String_Node_Str",new InputDialogSetHandler(){
        @Override public void onInputContentGet(        final String s,        final boolean validate){
          if (!Helper.netIsAvailable(getBaseContext()) && validate) {
            Toast.makeText(getBaseContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
            return;
          }
 else           if (validate) {
            progressDlg=new ProgressDialog(instance);
            progressDlg.setTitle("String_Node_Str");
            progressDlg.setMessage("String_Node_Str");
            progressDlg.show();
          }
          AsyncTask<Void,Void,ResultContainer> task=new AsyncTask<Void,Void,ResultContainer>(){
            @Override protected ResultContainer doInBackground(            Void... params){
              DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",validate);
              if (validate) {
                String url="String_Node_Str" + URLEncoder.encode(s);
                HttpRequester request=new HttpRequester(url);
                DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",url);
                if (request.make(true)) {
                  if (request.getStatusCode() == 302) {
                    int movedTitleStart, movedTitleEnd;
                    String moveUrl=request.getHeader("String_Node_Str");
                    String movedTitle;
                    movedTitleStart=moveUrl.indexOf("String_Node_Str");
                    movedTitleEnd=moveUrl.indexOf("String_Node_Str");
                    DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",moveUrl);
                    if (movedTitleStart > 0) {
                      movedTitleStart+=2;
                      movedTitle=URLDecoder.decode(moveUrl.substring(movedTitleStart,movedTitleEnd));
                      DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",movedTitle);
                      addTitleToList(movedTitle);
                      return new ResultContainer(PU_STAT_MOVED,s,movedTitle);
                    }
                  }
 else                   if (request.getStatusCode() == 200) {
                    if (request.bodyContaint("String_Node_Str")) {
                      return new ResultContainer(PU_STAT_NOT_FOUND,s);
                    }
                  }
                }
              }
 else {
                addTitleToList(s);
                return new ResultContainer(PU_STAT_OK,s);
              }
              return new ResultContainer(PU_STAT_ERR);
            }
            @Override protected void onPostExecute(            ResultContainer result){
              String toastText=null;
              progressDlg.dismiss();
switch (result.getMessage()) {
case PU_STAT_OK:
                toastText=String.format("String_Node_Str",result.getExtra());
              break;
case PU_STAT_ERR:
{
              toastText="String_Node_Str";
              break;
            }
case PU_STAT_MOVED:
{
            toastText=String.format("String_Node_Str",result.getExtra(),result.getExtra2(),result.getExtra2());
            break;
          }
case PU_STAT_NOT_FOUND:
{
          toastText=String.format("String_Node_Str",result.getExtra());
          break;
        }
    }
    if (toastText != null) {
      Toast.makeText(getBaseContext(),toastText,Toast.LENGTH_LONG).show();
    }
  }
}
;
task.execute();
}
}
);
break;
}
case M_REMOVEFROMLIST:
{
removeSelectedTitles();
break;
}
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
public boolean onOptionsItemSelected(MenuItem item){
  final int PU_STAT_OK=0;
  final int PU_STAT_ERR=1;
  final int PU_STAT_MOVED=2;
  final int PU_STAT_NOT_FOUND=3;
switch (item.getItemId()) {
case M_ADDNEWTITLE:
{
      Helper.showTitleInputBox(this,"String_Node_Str",new InputDialogSetHandler(){
        @Override public void onInputContentGet(        final String s,        final boolean validate){
          if (!Helper.netIsAvailable(getBaseContext()) && validate) {
            Toast.makeText(getBaseContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
            return;
          }
 else           if (validate) {
            progressDlg=new ProgressDialog(instance);
            progressDlg.setTitle("String_Node_Str");
            progressDlg.setMessage("String_Node_Str");
            progressDlg.show();
          }
          AsyncTask<Void,Void,ResultContainer> task=new AsyncTask<Void,Void,ResultContainer>(){
            @Override protected ResultContainer doInBackground(            Void... params){
              DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",validate);
              if (validate) {
                String url="String_Node_Str" + URLEncoder.encode(s);
                HttpRequester request=new HttpRequester(url);
                DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",url);
                if (request.make(true)) {
                  if (request.getStatusCode() == 302) {
                    int movedTitleStart, movedTitleEnd;
                    String moveUrl=request.getHeader("String_Node_Str");
                    String movedTitle;
                    movedTitleStart=moveUrl.indexOf("String_Node_Str");
                    movedTitleEnd=moveUrl.indexOf("String_Node_Str");
                    DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",moveUrl);
                    if (movedTitleStart > 0) {
                      movedTitleStart+=2;
                      movedTitle=URLDecoder.decode(moveUrl.substring(movedTitleStart,movedTitleEnd));
                      DebugLog.writeGeneral(DebugType.DT_DEBUG,"String_Node_Str",movedTitle);
                      addTitleToList(movedTitle);
                      return new ResultContainer(PU_STAT_MOVED,s,movedTitle);
                    }
                  }
 else                   if (request.getStatusCode() == 200) {
                    if (request.bodyContaint("String_Node_Str")) {
                      return new ResultContainer(PU_STAT_NOT_FOUND,s);
                    }
                  }
                }
              }
 else {
                addTitleToList(s);
                return new ResultContainer(PU_STAT_OK,s);
              }
              return new ResultContainer(PU_STAT_ERR);
            }
            @Override protected void onPostExecute(            ResultContainer result){
              String toastText=null;
              if (progressDlg != null)               progressDlg.dismiss();
switch (result.getMessage()) {
case PU_STAT_OK:
                toastText=String.format("String_Node_Str",result.getExtra());
              break;
case PU_STAT_ERR:
{
              toastText="String_Node_Str";
              break;
            }
case PU_STAT_MOVED:
{
            toastText=String.format("String_Node_Str",result.getExtra(),result.getExtra2(),result.getExtra2());
            break;
          }
case PU_STAT_NOT_FOUND:
{
          toastText=String.format("String_Node_Str",result.getExtra());
          break;
        }
    }
    if (toastText != null) {
      Toast.makeText(getBaseContext(),toastText,Toast.LENGTH_LONG).show();
    }
  }
}
;
task.execute();
}
}
);
break;
}
case M_REMOVEFROMLIST:
{
removeSelectedTitles();
break;
}
}
return super.onOptionsItemSelected(item);
}