Program: 24349
Project: 24349
Buggy source:
private static void edit_feed(String old_feed_name,String feed_name,String feed_url,String old_group,String feed_group){
  List<String> feeds=read_file_to_list_static("String_Node_Str",0);
  (new File(storage + "String_Node_Str")).delete();
  for (int i=0; i < feeds.size(); i++) {
    if (feeds.get(i).contains(old_feed_name))     append_string_to_file_static("String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str"+ feed_group+ "String_Node_Str");
 else     append_string_to_file_static("String_Node_Str",feeds.get(i) + "String_Node_Str");
  }
  if (!old_feed_name.equals(feed_name)) {
    (new File(storage + "String_Node_Str" + old_feed_name+ "String_Node_Str")).renameTo((new File(storage + "String_Node_Str" + feed_name+ "String_Node_Str")));
  }
  File group_file=new File(storage + "String_Node_Str" + feed_group+ "String_Node_Str");
  if (group_file.exists()) {
    (new File(storage + "String_Node_Str" + feed_group+ "String_Node_Str")).delete();
    feeds=read_file_to_list_static("String_Node_Str" + feed_group + "String_Node_Str",0);
    group_file.delete();
    for (int i=0; i < feeds.size(); i++) {
      if (feeds.get(i).contains(old_feed_name))       append_string_to_file_static("String_Node_Str" + feed_group + "String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str");
 else       append_string_to_file_static("String_Node_Str" + feed_group + "String_Node_Str",feeds.get(i) + "String_Node_Str");
    }
  }
 else {
    append_string_to_file_static("String_Node_Str" + feed_group + "String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str");
    feeds=read_file_to_list_static("String_Node_Str" + old_group + "String_Node_Str",0);
    group_file=new File(storage + "String_Node_Str" + old_group+ "String_Node_Str");
    group_file.delete();
    Boolean append=false;
    for (int i=0; i < feeds.size(); i++) {
      if (!feeds.get(i).contains(old_feed_name)) {
        append_string_to_file_static("String_Node_Str" + old_group + "String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str");
        append=true;
      }
    }
    if (append == false) {
      feeds=read_file_to_list_static("String_Node_Str",0);
      group_file=new File(storage + "String_Node_Str");
      group_file.delete();
      for (int i=0; i < feeds.size(); i++) {
        if (!feeds.get(i).contains(old_group))         append_string_to_file_static("String_Node_Str",feeds.get(i) + "String_Node_Str");
      }
    }
  }
  (new File(storage + "String_Node_Str")).delete();
  feed_adapter temp=feed_manage.return_feed_adapter();
  temp.clear_list();
  update_feeds_list();
  for (int i=0; i < feed_titles.size(); i++) {
    temp.add_list(feed_titles.get(i),feed_urls.get(i) + "String_Node_Str" + feed_groups.get(i));
    temp.notifyDataSetChanged();
  }
  update_groups();
  if (!old_group.equals(feed_group)) {
    (new File(storage + "String_Node_Str" + old_group+ "String_Node_Str")).delete();
  }
}

Fixed version (ground truth):
private static void edit_feed(int pos,String old_feed_name,String feed_name,String feed_url,String old_group,String feed_group){
  List<String> feeds=read_file_to_list_static("String_Node_Str",0);
  (new File(storage + "String_Node_Str")).delete();
  for (int i=0; i < feeds.size(); i++) {
    if (feeds.get(i).contains(old_feed_name))     append_string_to_file_static("String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str"+ feed_group+ "String_Node_Str");
 else     append_string_to_file_static("String_Node_Str",feeds.get(i) + "String_Node_Str");
  }
  if (!old_feed_name.equals(feed_name)) {
    (new File(storage + "String_Node_Str" + old_feed_name+ "String_Node_Str")).renameTo((new File(storage + "String_Node_Str" + feed_name+ "String_Node_Str")));
  }
  if (!old_group.equals(feed_group)) {
    File group_file=new File(storage + "String_Node_Str" + feed_group+ "String_Node_Str");
    append_string_to_file_static("String_Node_Str" + feed_group + "String_Node_Str","String_Node_Str" + feed_name + "String_Node_Str"+ feed_url+ "String_Node_Str");
    feeds=read_file_to_list_static("String_Node_Str" + old_group + "String_Node_Str",0);
    group_file=new File(storage + "String_Node_Str" + old_group+ "String_Node_Str");
    group_file.delete();
    Boolean append=false;
    for (int i=0; i < feeds.size(); i++) {
      if (!feeds.get(i).contains(old_feed_name)) {
        append_string_to_file_static("String_Node_Str" + old_group + "String_Node_Str",feeds.get(i) + "String_Node_Str");
        append=true;
      }
    }
    if (append == false) {
      feeds=read_file_to_list_static("String_Node_Str",0);
      group_file=new File(storage + "String_Node_Str");
      group_file.delete();
      for (int i=0; i < feeds.size(); i++) {
        if (!feeds.get(i).contains(old_group))         append_string_to_file_static("String_Node_Str",feeds.get(i) + "String_Node_Str");
      }
    }
    (new File(storage + "String_Node_Str" + old_group+ "String_Node_Str")).delete();
  }
  (new File(storage + "String_Node_Str")).delete();
  feed_adapter temp=feed_manage.return_feed_adapter();
  update_feeds_list();
  temp.remove_item(poser);
  temp.add_list_pos(poser,feed_name,feed_url + "String_Node_Str" + feed_group+ "String_Node_Str"+ Integer.toString(count_lines("String_Node_Str" + feed_name + "String_Node_Str") - 1)+ "String_Node_Str");
  temp.notifyDataSetChanged();
  update_groups();
}