Program: 76824
Project: 76824
Buggy source:
public void startup(PlatformConfig config) throws BirtException {
  IPlatformContext context=config.getPlatformContext();
  if (context == null) {
    throw new BirtException(PluginId,"String_Node_Str",new Object[]{"String_Node_Str"});
  }
  String root=context.getPlatform();
  platformDirectory=new File(root);
  if (!platformDirectory.exists() || !platformDirectory.isDirectory()) {
    throw new BirtException(PluginId,"String_Node_Str" + root,root);
  }
  if (frameworkClassLoader != null) {
    logger.log(Level.WARNING,"String_Node_Str");
    return;
  }
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str",platformDirectory.getAbsolutePath());
  File configurationDirectory=new File(platformDirectory,"String_Node_Str");
  if (!configurationDirectory.exists()) {
    configurationDirectory.mkdirs();
  }
  System.setProperty("String_Node_Str",configurationDirectory.getAbsolutePath());
  File workspaceDirectory=new File(platformDirectory,"String_Node_Str");
  if (!workspaceDirectory.exists()) {
    workspaceDirectory.mkdirs();
  }
  System.setProperty("String_Node_Str",workspaceDirectory.getAbsolutePath());
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  String path=new File(platformDirectory,"String_Node_Str").toString();
  path=searchFor("String_Node_Str",path);
  if (path == null) {
    throw new BirtException(PluginId,"String_Node_Str",new Object[]{"String_Node_Str"});
  }
  final String framework=new File(path).getAbsolutePath();
  String[] args=config.getOSGiArguments();
  if (args == null) {
    args=new String[]{"String_Node_Str"};
  }
  ClassLoader original=Thread.currentThread().getContextClassLoader();
  try {
    URL frameworkUrl=new File(framework).toURL();
    System.setProperty("String_Node_Str",frameworkUrl.toExternalForm());
    ClassLoader loader=this.getClass().getClassLoader();
    frameworkClassLoader=new URLClassLoader(new URL[]{frameworkUrl},loader);
    try {
      loader.loadClass("String_Node_Str");
      loader.loadClass("String_Node_Str");
      loader.loadClass("String_Node_Str");
    }
 catch (    Exception ex) {
    }
    Class clazz=frameworkClassLoader.loadClass(ECLIPSE_STARTER);
    System.setProperty("String_Node_Str","String_Node_Str");
    Method runMethod=clazz.getMethod("String_Node_Str",new Class[]{String[].class,Runnable.class});
    bundleContext=runMethod.invoke(null,new Object[]{args,null});
    frameworkContextClassLoader=Thread.currentThread().getContextClassLoader();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return;
  }
 finally {
    Thread.currentThread().setContextClassLoader(original);
  }
}

Fixed version (ground truth):
public void startup(PlatformConfig config) throws BirtException {
  IPlatformContext context=config.getPlatformContext();
  HashMap properties=new HashMap();
  Properties systemProperties=System.getProperties();
  if (systemProperties != null) {
    for (Iterator it=systemProperties.entrySet().iterator(); it.hasNext(); ) {
      Map.Entry entry=(Map.Entry)it.next();
      String key=(String)entry.getKey();
      Object value=entry.getValue();
      if (!key.startsWith("String_Node_Str") && !key.startsWith("String_Node_Str") && !key.startsWith("String_Node_Str")) {
        properties.put(key,value);
      }
 else {
        properties.put(key,null);
      }
    }
  }
  Map osgiConfig=config.getOSGiConfig();
  if (osgiConfig != null) {
    Iterator iter=osgiConfig.entrySet().iterator();
    while (iter.hasNext()) {
      Map.Entry entry=(Map.Entry)iter.next();
      Object key=(String)entry.getKey();
      Object value=(String)entry.getValue();
      if (key instanceof String && value instanceof String) {
        properties.put(key,value);
      }
    }
  }
  if (context == null) {
    throw new BirtException(PluginId,"String_Node_Str",new Object[]{"String_Node_Str"});
  }
  String root=context.getPlatform();
  platformDirectory=new File(root);
  if (!platformDirectory.exists() || !platformDirectory.isDirectory()) {
    throw new BirtException(PluginId,"String_Node_Str" + root,root);
  }
  if (frameworkClassLoader != null) {
    logger.log(Level.WARNING,"String_Node_Str");
    return;
  }
  String parentClassLoader=getProperty(properties,"String_Node_Str");
  if (parentClassLoader == null) {
    properties.put("String_Node_Str","String_Node_Str");
  }
  properties.put("String_Node_Str",platformDirectory.getAbsolutePath());
  String configArea=getProperty(properties,"String_Node_Str");
  if (configArea == null) {
    File configurationDirectory=new File(platformDirectory,"String_Node_Str");
    if (!configurationDirectory.exists()) {
      configurationDirectory.mkdirs();
    }
    properties.put("String_Node_Str",configurationDirectory.getAbsolutePath());
  }
  String instanceArea=getProperty(properties,"String_Node_Str");
  if (instanceArea == null) {
    File workspaceDirectory=new File(platformDirectory,"String_Node_Str");
    if (!workspaceDirectory.exists()) {
      workspaceDirectory.mkdirs();
    }
    properties.put("String_Node_Str",workspaceDirectory.getAbsolutePath());
  }
  properties.put("String_Node_Str","String_Node_Str");
  properties.put("String_Node_Str","String_Node_Str");
  String path=new File(platformDirectory,"String_Node_Str").toString();
  path=searchFor("String_Node_Str",path);
  if (path == null) {
    throw new BirtException(PluginId,"String_Node_Str",new Object[]{"String_Node_Str"});
  }
  final String framework=new File(path).getAbsolutePath();
  String[] args=config.getOSGiArguments();
  if (args == null) {
    args=new String[]{"String_Node_Str"};
  }
  ClassLoader original=Thread.currentThread().getContextClassLoader();
  try {
    URL frameworkUrl=new File(framework).toURL();
    properties.put("String_Node_Str",frameworkUrl.toExternalForm());
    ClassLoader loader=this.getClass().getClassLoader();
    frameworkClassLoader=new URLClassLoader(new URL[]{frameworkUrl},loader);
    try {
      loader.loadClass("String_Node_Str");
      loader.loadClass("String_Node_Str");
      loader.loadClass("String_Node_Str");
    }
 catch (    Exception ex) {
    }
    Class clazz=frameworkClassLoader.loadClass(ECLIPSE_STARTER);
    Method initPropertiesMethod=clazz.getMethod("String_Node_Str",new Class[]{Map.class});
    if (initPropertiesMethod != null) {
      System.setProperty("String_Node_Str","String_Node_Str");
      properties.put("String_Node_Str","String_Node_Str");
      initPropertiesMethod.invoke(null,new Object[]{properties});
    }
 else {
      Iterator iter=properties.entrySet().iterator();
      while (iter.hasNext()) {
        Map.Entry entry=(Map.Entry)iter.next();
        String key=(String)entry.getKey();
        String value=(String)entry.getValue();
        System.setProperty(key,value);
      }
      System.setProperty("String_Node_Str","String_Node_Str");
    }
    Method runMethod=clazz.getMethod("String_Node_Str",new Class[]{String[].class,Runnable.class});
    bundleContext=runMethod.invoke(null,new Object[]{args,null});
    frameworkContextClassLoader=Thread.currentThread().getContextClassLoader();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return;
  }
 finally {
    Thread.currentThread().setContextClassLoader(original);
  }
}