Program: 21308
Project: 21308
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(String args[]){
  final StringBuffer log=new StringBuffer();
  UIManager.LookAndFeelInfo[] info=UIManager.getInstalledLookAndFeels();
  SubConfiguration guiConfig=SubConfiguration.getSubConfig("String_Node_Str");
  String paf=guiConfig.getStringProperty("String_Node_Str",null);
  boolean plafisSet=false;
  log.append("String_Node_Str");
  log.append(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  System.out.println(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  System.out.println(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  log.append(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  if (SubConfiguration.getSubConfig("String_Node_Str").getBooleanProperty("String_Node_Str",false)) {
    String host=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String port=new Integer(SubConfiguration.getSubConfig("String_Node_Str").getIntegerProperty("String_Node_Str",8080)).toString();
    String user=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String pass=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
 else {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
  if (SubConfiguration.getSubConfig("String_Node_Str").getBooleanProperty("String_Node_Str",false)) {
    String user=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String pass=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String host=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String port=new Integer(SubConfiguration.getSubConfig("String_Node_Str").getIntegerProperty("String_Node_Str",1080)).toString();
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
 else {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
  if (paf != null) {
    for (    LookAndFeelInfo element : info) {
      if (element.getName().equals(paf)) {
        try {
          UIManager.setLookAndFeel(element.getClassName());
          plafisSet=true;
          break;
        }
 catch (        UnsupportedLookAndFeelException e) {
        }
catch (        ClassNotFoundException e) {
        }
catch (        InstantiationException e) {
        }
catch (        IllegalAccessException e) {
        }
      }
    }
  }
 else {
    for (int i=0; i < info.length; i++) {
      if (!info[i].getName().matches("String_Node_Str")) {
        try {
          UIManager.setLookAndFeel(info[i].getClassName());
          plafisSet=true;
          break;
        }
 catch (        UnsupportedLookAndFeelException e) {
        }
catch (        ClassNotFoundException e) {
        }
catch (        InstantiationException e) {
        }
catch (        IllegalAccessException e) {
        }
      }
    }
  }
  if (!plafisSet) {
    try {
      UIManager.setLookAndFeel(new WindowsLookAndFeel());
    }
 catch (    UnsupportedLookAndFeelException e) {
    }
  }
  File file=new File("String_Node_Str");
  if (file.exists()) {
    file.deleteOnExit();
  }
  JFrame frame=new JFrame();
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.setTitle("String_Node_Str");
  frame.setLayout(new GridBagLayout());
  final JProgressBar progresslist=new JProgressBar();
  progresslist.setMaximum(100);
  progresslist.setStringPainted(true);
  final JProgressBar progressload=new JProgressBar();
  progressload.setMaximum(100);
  progressload.setStringPainted(true);
  final JTextArea logWindow=new JTextArea(30,120);
  JScrollPane scrollPane=new JScrollPane(logWindow);
  logWindow.setEditable(true);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REM,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REL,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,progresslist,REL,REL,REM,1,1,0,INSETS,BOTHRESIZE,NORTHWEST);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REL,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,progressload,REL,REL,REM,1,1,0,INSETS,BOTHRESIZE,NORTHWEST);
  Main.log(log,"String_Node_Str");
  logWindow.setText(log.toString());
  Main.addToGridBag(frame,scrollPane,REL,REL,REM,1,1,1,INSETS,BOTHRESIZE,NORTHWEST);
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception e1) {
    e1.printStackTrace();
  }
  int n=5;
  ((JComponent)frame.getContentPane()).setBorder(new EmptyBorder(n,n,n,n));
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
  boolean restart=false;
  int runtype=1;
  for (int i=0; i < args.length; i++) {
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      restart=true;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=0;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=1;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=2;
    }
    Main.log(log,"String_Node_Str" + i + "String_Node_Str"+ args[i]+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
    logWindow.setText(log.toString());
  }
  new Thread(){
    public void run(){
      while (true) {
        logWindow.setText(log.toString());
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
        }
      }
    }
  }
.start();
  WebUpdater updater=new WebUpdater(null);
  updater.setLogger(log);
  updater.setListProgress(progresslist);
  updater.setDownloadProgress(progressload);
  Main.trace("String_Node_Str");
  Vector<Vector<String>> files=updater.getAvailableFiles();
  if (files != null) {
    updater.filterAvailableUpdates(files);
    progresslist.setValue(100);
    updater.updateFiles(files);
  }
  SubConfiguration jdus=SubConfiguration.getSubConfig("String_Node_Str");
  ArrayList<PackageData> data=(ArrayList<PackageData>)jdus.getProperty("String_Node_Str",new ArrayList<PackageData>());
  for (  PackageData pa : data) {
    if (!pa.isDownloaded())     continue;
    File zip=new File(pa.getStringProperty("String_Node_Str"));
    Main.log(log,"String_Node_Str" + zip + System.getProperty("String_Node_Str")+ System.getProperty("String_Node_Str"));
    UnZip u=new UnZip(zip,new File("String_Node_Str"));
    File[] efiles;
    try {
      efiles=u.extract();
      if (files != null) {
        for (        File element : efiles) {
          Main.log(log,"String_Node_Str" + element + System.getProperty("String_Node_Str"));
          if (element.getAbsolutePath().endsWith("String_Node_Str")) {
            pa.setProperty("String_Node_Str",element.getAbsolutePath());
          }
        }
        pa.setInstalled(true);
        pa.setUpdating(false);
        pa.setDownloaded(false);
        pa.setInstalledVersion(Integer.parseInt(pa.getStringProperty("String_Node_Str")));
        Main.log(log,"String_Node_Str" + zip + System.getProperty("String_Node_Str"));
        zip.delete();
        zip.deleteOnExit();
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
      zip.delete();
      zip.deleteOnExit();
    }
  }
  jdus.save();
  Main.trace(updater.getLogger().toString());
  Main.trace("String_Node_Str");
  logWindow.setText(log.toString());
  Main.trace(new File("String_Node_Str").getAbsoluteFile());
  if (restart) {
    if (new File("String_Node_Str").exists()) {
      new File("String_Node_Str").delete();
    }
    Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
    if (runtype == 2) {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
 else     if (runtype == 1 && new File("String_Node_Str").exists()) {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
 else {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
  }
  logWindow.setText(log.toString());
  Main.writeLocalFile(new File("String_Node_Str"),log.toString());
  try {
    Thread.sleep(2000);
  }
 catch (  InterruptedException e) {
  }
  System.exit(0);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(String args[]){
  final StringBuffer log=new StringBuffer();
  UIManager.LookAndFeelInfo[] info=UIManager.getInstalledLookAndFeels();
  SubConfiguration guiConfig=SubConfiguration.getSubConfig("String_Node_Str");
  String paf=guiConfig.getStringProperty("String_Node_Str",null);
  boolean plafisSet=false;
  log.append("String_Node_Str");
  log.append(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  System.out.println(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  System.out.println(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  log.append(SubConfiguration.getSubConfig("String_Node_Str").getProperties() + "String_Node_Str");
  if (SubConfiguration.getSubConfig("String_Node_Str").getBooleanProperty("String_Node_Str",false)) {
    String host=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String port=new Integer(SubConfiguration.getSubConfig("String_Node_Str").getIntegerProperty("String_Node_Str",8080)).toString();
    String user=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String pass=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
 else {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
  if (SubConfiguration.getSubConfig("String_Node_Str").getBooleanProperty("String_Node_Str",false)) {
    String user=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String pass=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String host=SubConfiguration.getSubConfig("String_Node_Str").getStringProperty("String_Node_Str","String_Node_Str");
    String port=new Integer(SubConfiguration.getSubConfig("String_Node_Str").getIntegerProperty("String_Node_Str",1080)).toString();
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str",host);
    System.setProperty("String_Node_Str",port);
    System.setProperty("String_Node_Str",user);
    System.setProperty("String_Node_Str",pass);
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
 else {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    Main.log(log,"String_Node_Str" + System.getProperty("String_Node_Str"));
  }
  if (paf != null) {
    for (    LookAndFeelInfo element : info) {
      if (element.getName().equals(paf)) {
        try {
          UIManager.setLookAndFeel(element.getClassName());
          plafisSet=true;
          break;
        }
 catch (        UnsupportedLookAndFeelException e) {
        }
catch (        ClassNotFoundException e) {
        }
catch (        InstantiationException e) {
        }
catch (        IllegalAccessException e) {
        }
      }
    }
  }
 else {
    for (int i=0; i < info.length; i++) {
      if (!info[i].getName().matches("String_Node_Str")) {
        try {
          UIManager.setLookAndFeel(info[i].getClassName());
          plafisSet=true;
          break;
        }
 catch (        UnsupportedLookAndFeelException e) {
        }
catch (        ClassNotFoundException e) {
        }
catch (        InstantiationException e) {
        }
catch (        IllegalAccessException e) {
        }
      }
    }
  }
  if (!plafisSet) {
    try {
      UIManager.setLookAndFeel(new WindowsLookAndFeel());
    }
 catch (    UnsupportedLookAndFeelException e) {
    }
  }
  File file=new File("String_Node_Str");
  if (file.exists()) {
    file.deleteOnExit();
  }
  JFrame frame=new JFrame();
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.setTitle("String_Node_Str");
  frame.setLayout(new GridBagLayout());
  final JProgressBar progresslist=new JProgressBar();
  progresslist.setMaximum(100);
  progresslist.setStringPainted(true);
  final JProgressBar progressload=new JProgressBar();
  progressload.setMaximum(100);
  progressload.setStringPainted(true);
  final JTextArea logWindow=new JTextArea(30,120);
  JScrollPane scrollPane=new JScrollPane(logWindow);
  logWindow.setEditable(true);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REM,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REL,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,progresslist,REL,REL,REM,1,1,0,INSETS,BOTHRESIZE,NORTHWEST);
  Main.addToGridBag(frame,new JLabel("String_Node_Str"),REL,REL,REL,1,0,0,INSETS,NORESIZE,NORTHWEST);
  Main.addToGridBag(frame,progressload,REL,REL,REM,1,1,0,INSETS,BOTHRESIZE,NORTHWEST);
  Main.log(log,"String_Node_Str");
  logWindow.setText(log.toString());
  Main.addToGridBag(frame,scrollPane,REL,REL,REM,1,1,1,INSETS,BOTHRESIZE,NORTHWEST);
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception e1) {
    e1.printStackTrace();
  }
  int n=5;
  ((JComponent)frame.getContentPane()).setBorder(new EmptyBorder(n,n,n,n));
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
  boolean restart=false;
  int runtype=1;
  for (int i=0; i < args.length; i++) {
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      restart=true;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=0;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=1;
    }
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      runtype=2;
    }
    Main.log(log,"String_Node_Str" + i + "String_Node_Str"+ args[i]+ "String_Node_Str"+ System.getProperty("String_Node_Str"));
    logWindow.setText(log.toString());
  }
  new Thread(){
    public void run(){
      while (true) {
        logWindow.setText(log.toString());
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
        }
      }
    }
  }
.start();
  WebUpdater updater=new WebUpdater(null);
  updater.setLogger(log);
  updater.setListProgress(progresslist);
  updater.setDownloadProgress(progressload);
  Main.trace("String_Node_Str");
  Vector<Vector<String>> files=updater.getAvailableFiles();
  if (files != null) {
    updater.filterAvailableUpdates(files);
    progresslist.setValue(100);
    updater.updateFiles(files);
  }
  SubConfiguration jdus=SubConfiguration.getSubConfig("String_Node_Str");
  ArrayList<PackageData> data=(ArrayList<PackageData>)jdus.getProperty("String_Node_Str",new ArrayList<PackageData>());
  for (  PackageData pa : data) {
    if (!pa.isDownloaded())     continue;
    File zip=new File(pa.getStringProperty("String_Node_Str"));
    Main.log(log,"String_Node_Str" + zip + System.getProperty("String_Node_Str")+ System.getProperty("String_Node_Str"));
    UnZip u=new UnZip(zip,new File("String_Node_Str"));
    File[] efiles;
    try {
      efiles=u.extract();
      if (files != null) {
        for (        File element : efiles) {
          Main.log(log,"String_Node_Str" + element + System.getProperty("String_Node_Str"));
          if (element.getAbsolutePath().endsWith("String_Node_Str")) {
            pa.setProperty("String_Node_Str",element.getAbsolutePath());
          }
        }
        pa.setInstalled(true);
        pa.setUpdating(false);
        pa.setDownloaded(false);
        pa.setInstalledVersion(Integer.parseInt(pa.getStringProperty("String_Node_Str")));
        Main.log(log,"String_Node_Str" + zip + System.getProperty("String_Node_Str"));
        zip.delete();
        zip.deleteOnExit();
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
      StackTraceElement[] trace=e.getStackTrace();
      for (int i=0; i < trace.length; i++)       Main.log(log,"String_Node_Str" + trace[i] + "String_Node_Str");
      zip.delete();
      zip.deleteOnExit();
      pa.setInstalled(true);
      pa.setUpdating(false);
      pa.setDownloaded(false);
    }
  }
  jdus.save();
  Main.trace(updater.getLogger().toString());
  Main.trace("String_Node_Str");
  logWindow.setText(log.toString());
  Main.trace(new File("String_Node_Str").getAbsoluteFile());
  if (restart) {
    if (new File("String_Node_Str").exists()) {
      new File("String_Node_Str").delete();
    }
    Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
    if (runtype == 2) {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
 else     if (runtype == 1 && new File("String_Node_Str").exists()) {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
 else {
      Main.log(log,"String_Node_Str" + new File("String_Node_Str").getAbsolutePath());
      Main.runCommand("String_Node_Str",new String[]{"String_Node_Str"},new File("String_Node_Str").getAbsolutePath(),0);
    }
  }
  logWindow.setText(log.toString());
  Main.writeLocalFile(new File("String_Node_Str"),log.toString());
  try {
    Thread.sleep(2000);
  }
 catch (  InterruptedException e) {
  }
  System.exit(0);
}