Program: 24351
Project: 24351
Buggy source:
private void parse_local_xml(String file_name){
  try {
    final String[] start=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    final String[] end=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    String[] of_types=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    File in=new File(file_name);
    BufferedReader reader=new BufferedReader(new FileReader(in));
    int filesize=(int)(in.length() + 1);
    char[] current=new char[1];
    char[] buf=new char[filesize + 1];
    String end_tag="String_Node_Str";
    reader.mark(2);
    while (reader.read() != -1) {
      reader.reset();
      String buf_string=get_next_tag(reader,of_types,file_name);
      if ((buf_string.contains("String_Node_Str")) || (buf_string.contains("String_Node_Str")))       to_file(file_name + "String_Node_Str","String_Node_Str",true);
 else       if ((buf_string.contains("String_Node_Str")) || (buf_string.contains("String_Node_Str"))) {
        check_for_image(file_name);
        check_for_url(file_name);
      }
 else {
        for (int i=0; i < start.length; i++) {
          if (buf_string.equals(start[i])) {
            if (buf_string.equals("String_Node_Str"))             buf_string="String_Node_Str";
 else             if (buf_string.equals("String_Node_Str"))             buf_string="String_Node_Str";
            to_file(file_name + "String_Node_Str",buf_string.substring(1,buf_string.length() - 1) + "String_Node_Str",true);
            while (!(end_tag.equals(end[i]))) {
              int count=0;
              current=new char[1];
              buf=new char[filesize];
              while (current[0] != '<') {
                buf[count]=current[0];
                reader.read(current,0,1);
                count++;
              }
              String cont=(new String(buf)).trim().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
              if (cont.contains("String_Node_Str"))               to_file(file_name + "String_Node_Str",cont.substring(cont.indexOf("String_Node_Str") + 5,cont.indexOf("String_Node_Str",cont.indexOf("String_Node_Str") + 6)) + "String_Node_Str",false);
              cont=cont.replaceAll("String_Node_Str","String_Node_Str").trim();
              to_file(file_name + "String_Node_Str",cont,true);
              buf=new char[1024];
              count=0;
              while (current[0] != '>') {
                buf[count]=current[0];
                reader.read(current,0,1);
                count++;
              }
              buf[count]=current[0];
              end_tag=new String(buf);
              end_tag=end_tag.trim();
              if (!(end_tag.equals(end[i])))               to_file(file_name + "String_Node_Str",end_tag,true);
            }
            to_file(file_name + "String_Node_Str","String_Node_Str",true);
            break;
          }
        }
      }
      reader.mark(2);
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
private void parse_local_xml(String file_name){
  try {
    final String[] start=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    final String[] end=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    String[] of_types=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    File in=new File(file_name);
    BufferedReader reader=new BufferedReader(new FileReader(in));
    int filesize=(int)(in.length() + 1);
    char[] current=new char[1];
    char[] buf=new char[filesize + 1];
    String end_tag="String_Node_Str";
    reader.mark(2);
    while (reader.read() != -1) {
      reader.reset();
      String buf_string=get_next_tag(reader,of_types,file_name);
      if ((buf_string.contains("String_Node_Str")) || (buf_string.contains("String_Node_Str")))       to_file(file_name + "String_Node_Str","String_Node_Str",true);
 else       if ((buf_string.contains("String_Node_Str")) || (buf_string.contains("String_Node_Str"))) {
        check_for_image(file_name);
        check_for_url(file_name);
      }
 else {
        for (int i=0; i < start.length; i++) {
          if (buf_string.equals(start[i])) {
            if (buf_string.equals("String_Node_Str"))             buf_string="String_Node_Str";
 else             if (buf_string.equals("String_Node_Str"))             buf_string="String_Node_Str";
            to_file(file_name + "String_Node_Str",buf_string.substring(1,buf_string.length() - 1) + "String_Node_Str",true);
            while (!(end_tag.equals(end[i]))) {
              int count=0;
              current=new char[1];
              buf=new char[filesize];
              while (current[0] != '<') {
                buf[count]=current[0];
                reader.read(current,0,1);
                count++;
              }
              String cont=(new String(buf)).trim().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
              if (cont.contains("String_Node_Str"))               to_file(file_name + "String_Node_Str",cont.substring(cont.indexOf("String_Node_Str") + 5,cont.indexOf("String_Node_Str",cont.indexOf("String_Node_Str") + 6)) + "String_Node_Str",false);
              cont=cont.replaceAll("String_Node_Str","String_Node_Str").trim();
              to_file(file_name + "String_Node_Str",cont,true);
              buf=new char[1024];
              count=0;
              while (current[0] != '>') {
                buf[count]=current[0];
                reader.read(current,0,1);
                count++;
              }
              buf[count]=current[0];
              end_tag=new String(buf);
              end_tag=end_tag.trim();
              if (!(end_tag.equals(end[i])))               to_file(file_name + "String_Node_Str",end_tag,true);
            }
            to_file(file_name + "String_Node_Str","String_Node_Str",true);
            break;
          }
        }
      }
      reader.mark(2);
    }
  }
 catch (  Exception e) {
  }
}