Program: 143946
Project: 143946
Buggy source:
/** 
 * Read all parameters from the applet configuration and do initializations for the plugins and the applet.
 */
public void init(){
  if (pluginLoader == null) {
    try {
      options.load(getClass().getResourceAsStream("String_Node_Str"));
    }
 catch (    Exception e) {
      try {
        URL url=new URL(getCodeBase() + "String_Node_Str");
        options.load(url.openStream());
      }
 catch (      Exception e1) {
        System.err.println("String_Node_Str");
        System.err.println("String_Node_Str");
        System.err.println("String_Node_Str" + getCodeBase() + "String_Node_Str");
      }
    }
    String value;
    if ((value=getParameter("String_Node_Str")) != null) {
      Properties appletParams=new Properties();
      try {
        appletParams.load((new URL(getCodeBase() + value)).openStream());
        Enumeration ape=appletParams.keys();
        while (ape.hasMoreElements()) {
          String key=(String)ape.nextElement();
          options.put(key,appletParams.getProperty(key));
        }
      }
 catch (      Exception e) {
        System.err.println("String_Node_Str" + e);
      }
    }
    options.put("String_Node_Str","String_Node_Str");
    pluginLoader=new Common(options);
    host=options.getProperty("String_Node_Str");
    if (host == null)     host=getCodeBase().getHost();
    port=options.getProperty("String_Node_Str");
    if (port == null)     port="String_Node_Str";
    final java.awt.Container appletFrame;
    if (options.getProperty("String_Node_Str") != null)     appletFrame=new Frame("String_Node_Str" + host + (port.equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str" + port));
 else     appletFrame=this;
    appletFrame.setLayout(new BorderLayout());
    Hashtable componentList=pluginLoader.getComponents();
    Enumeration names=componentList.keys();
    while (names.hasMoreElements()) {
      String name=(String)names.nextElement();
      Component c=(Component)componentList.get(name);
      if ((value=options.getProperty("String_Node_Str" + name)) != null) {
        appletFrame.add(value,c);
      }
 else {
        System.err.println("String_Node_Str" + name + "String_Node_Str");
        System.err.println("String_Node_Str" + name + "String_Node_Str");
      }
    }
    if (appletFrame != this) {
      ((Frame)appletFrame).addWindowListener(new WindowAdapter(){
        public void windowClosing(        WindowEvent evt){
          Applet.this.stop();
          ((Frame)appletFrame).dispose();
        }
      }
);
      ((Frame)appletFrame).pack();
      ((Frame)appletFrame).show();
    }
  }
}

Fixed version (ground truth):
/** 
 * Read all parameters from the applet configuration and do initializations for the plugins and the applet.
 */
public void init(){
  if (pluginLoader == null) {
    try {
      options.load(getClass().getResourceAsStream("String_Node_Str"));
    }
 catch (    Exception e) {
      try {
        URL url=new URL(getCodeBase() + "String_Node_Str");
        options.load(url.openStream());
      }
 catch (      Exception e1) {
        System.err.println("String_Node_Str");
        System.err.println("String_Node_Str");
        System.err.println("String_Node_Str" + getCodeBase() + "String_Node_Str");
      }
    }
    String value;
    if ((value=getParameter("String_Node_Str")) != null) {
      Properties appletParams=new Properties();
      URL url=null;
      try {
        url=new URL(value);
      }
 catch (      Exception e) {
        try {
          url=new URL(getCodeBase() + value);
        }
 catch (        Exception ce) {
          System.err.println("String_Node_Str" + ce);
        }
      }
      if (url != null) {
        try {
          appletParams.load(url.openStream());
          Enumeration ape=appletParams.keys();
          while (ape.hasMoreElements()) {
            String key=(String)ape.nextElement();
            options.put(key,appletParams.getProperty(key));
          }
        }
 catch (        Exception e) {
          System.err.println("String_Node_Str" + e);
        }
      }
    }
    options.put("String_Node_Str","String_Node_Str");
    pluginLoader=new Common(options);
    host=options.getProperty("String_Node_Str");
    if (host == null && (host=getParameter("String_Node_Str")) == null)     host=getCodeBase().getHost();
    port=options.getProperty("String_Node_Str");
    if (port == null && (port=getParameter("String_Node_Str")) == null)     port="String_Node_Str";
    final java.awt.Container appletFrame;
    if (options.getProperty("String_Node_Str") != null)     appletFrame=new Frame("String_Node_Str" + host + (port.equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str" + port));
 else     appletFrame=this;
    appletFrame.setLayout(new BorderLayout());
    Hashtable componentList=pluginLoader.getComponents();
    Enumeration names=componentList.keys();
    while (names.hasMoreElements()) {
      String name=(String)names.nextElement();
      Component c=(Component)componentList.get(name);
      if ((value=options.getProperty("String_Node_Str" + name)) != null) {
        appletFrame.add(value,c);
      }
 else {
        System.err.println("String_Node_Str" + name + "String_Node_Str");
        System.err.println("String_Node_Str" + name + "String_Node_Str");
      }
    }
    if (appletFrame != this) {
      ((Frame)appletFrame).addWindowListener(new WindowAdapter(){
        public void windowClosing(        WindowEvent evt){
          Applet.this.stop();
          ((Frame)appletFrame).dispose();
        }
      }
);
      ((Frame)appletFrame).pack();
      ((Frame)appletFrame).show();
    }
  }
}