Program: 24353
Project: 24353
Buggy source:
private void show_add_dialog(){
  LayoutInflater inflater=LayoutInflater.from(this);
  final View add_rss_dialog=inflater.inflate(R.layout.add_rss_dialog,null);
  check_for_no_groups();
  String[] array_spinner=read_file_to_array("String_Node_Str");
  Spinner group_spinner=(Spinner)add_rss_dialog.findViewById(R.id.group_spinner);
  ArrayAdapter adapter=new ArrayAdapter(this,R.layout.group_spinner_text,array_spinner);
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  group_spinner.setAdapter(adapter);
  final AlertDialog alertDialog=new AlertDialog.Builder(this,2).setTitle("String_Node_Str").setView(add_rss_dialog).setCancelable(true).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
    }
  }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
    }
  }
).create();
  alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){
    @Override public void onShow(    DialogInterface dialog){
      Button b=alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
      b.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          String new_group=((EditText)add_rss_dialog.findViewById(R.id.group_edit)).getText().toString().trim().toLowerCase();
          if (new_group.length() > 0) {
            String[] groups=read_file_to_array("String_Node_Str");
            boolean found=false;
            for (int i=0; i < groups.length; i++) {
              if ((groups[i].toLowerCase()).equals(new_group))               found=true;
            }
            String[] words=new_group.split("String_Node_Str");
            new_group="String_Node_Str";
            for (int i=0; i < words.length; i++) {
              char cap=Character.toUpperCase(words[i].charAt(0));
              new_group+="String_Node_Str" + cap + words[i].substring(1,words[i].length());
            }
            if (!found)             add_group(new_group);
          }
 else           new_group=((Spinner)add_rss_dialog.findViewById(R.id.group_spinner)).getSelectedItem().toString();
          Boolean rss=false;
          String URL_check=((EditText)add_rss_dialog.findViewById(R.id.URL_edit)).getText().toString().trim();
          String feed_name=((EditText)add_rss_dialog.findViewById(R.id.name_edit)).getText().toString().trim();
          File in=new File(get_filepath("String_Node_Str"));
          download_finished=0;
          new adownload_file().execute(URL_check,"String_Node_Str");
          while (download_finished == 0) {
            try {
              Thread.sleep(20);
            }
 catch (            Exception e) {
            }
          }
          if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
            try {
              BufferedReader reader=new BufferedReader(new FileReader(in));
              try {
                reader.readLine();
                String line=reader.readLine();
                if (line.contains("String_Node_Str"))                 rss=true;
 else                 if ((line.contains("String_Node_Str")) || (line.contains("String_Node_Str")))                 rss=true;
              }
 catch (              Exception e) {
                rss=false;
              }
            }
 catch (            Exception e) {
              rss=false;
            }
          }
          if (rss != null && !rss)           toast_message("String_Node_Str",0);
 else {
            if (feed_name.equals("String_Node_Str")) {
              new parsered(get_filepath("String_Node_Str"));
              String[] title=read_file_to_array("String_Node_Str");
              feed_name=title[0];
              File temp=new File(get_filepath("String_Node_Str"));
              temp.delete();
              temp=new File(get_filepath("String_Node_Str"));
              temp.delete();
            }
            add_feed(feed_name,URL_check,new_group);
            alertDialog.dismiss();
          }
          in.delete();
        }
      }
);
    }
  }
);
  alertDialog.show();
}

Fixed version (ground truth):
private void show_add_dialog(){
  LayoutInflater inflater=LayoutInflater.from(this);
  final View add_rss_dialog=inflater.inflate(R.layout.add_rss_dialog,null);
  check_for_no_groups();
  String[] array_spinner=read_file_to_array("String_Node_Str");
  Spinner group_spinner=(Spinner)add_rss_dialog.findViewById(R.id.group_spinner);
  ArrayAdapter adapter=new ArrayAdapter(this,R.layout.group_spinner_text,array_spinner);
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  group_spinner.setAdapter(adapter);
  final AlertDialog alertDialog=new AlertDialog.Builder(this,2).setTitle("String_Node_Str").setView(add_rss_dialog).setCancelable(true).setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
    }
  }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int id){
    }
  }
).create();
  alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){
    @Override public void onShow(    DialogInterface dialog){
      Button b=alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
      b.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          String new_group=((EditText)add_rss_dialog.findViewById(R.id.group_edit)).getText().toString().trim().toLowerCase();
          if (new_group.length() > 0) {
            String[] groups=read_file_to_array("String_Node_Str");
            boolean found=false;
            for (int i=0; i < groups.length; i++) {
              if ((groups[i].toLowerCase()).equals(new_group))               found=true;
            }
            String[] words=new_group.split("String_Node_Str");
            new_group="String_Node_Str";
            if (words.length == 1) {
              char cap=Character.toUpperCase(words[0].charAt(0));
              new_group+=cap + words[i].substring(1,words[0].length());
            }
 else {
              for (int i=0; i < words.length - 1; i++) {
                char cap=Character.toUpperCase(words[i].charAt(0));
                new_group+=cap + words[i].substring(1,words[i].length()) + "String_Node_Str";
              }
              new_group+=cap + words[i].substring(1,words[i].length());
            }
            if (!found)             add_group(new_group);
          }
 else           new_group=((Spinner)add_rss_dialog.findViewById(R.id.group_spinner)).getSelectedItem().toString();
          Boolean rss=false;
          String URL_check=((EditText)add_rss_dialog.findViewById(R.id.URL_edit)).getText().toString().trim();
          String feed_name=((EditText)add_rss_dialog.findViewById(R.id.name_edit)).getText().toString().trim();
          File in=new File(get_filepath("String_Node_Str"));
          download_finished=0;
          new adownload_file().execute(URL_check,"String_Node_Str");
          while (download_finished == 0) {
            try {
              Thread.sleep(20);
            }
 catch (            Exception e) {
            }
          }
          if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
            try {
              BufferedReader reader=new BufferedReader(new FileReader(in));
              try {
                reader.readLine();
                String line=reader.readLine();
                if (line.contains("String_Node_Str"))                 rss=true;
 else                 if ((line.contains("String_Node_Str")) || (line.contains("String_Node_Str")))                 rss=true;
              }
 catch (              Exception e) {
                rss=false;
              }
            }
 catch (            Exception e) {
              rss=false;
            }
          }
          if (rss != null && !rss)           toast_message("String_Node_Str",0);
 else {
            if (feed_name.equals("String_Node_Str")) {
              new parsered(get_filepath("String_Node_Str"));
              String[] title=read_file_to_array("String_Node_Str");
              feed_name=title[0];
              File temp=new File(get_filepath("String_Node_Str"));
              temp.delete();
              temp=new File(get_filepath("String_Node_Str"));
              temp.delete();
            }
            add_feed(feed_name,URL_check,new_group);
            alertDialog.dismiss();
          }
          in.delete();
        }
      }
);
    }
  }
);
  alertDialog.show();
}