Program: 68968
Project: 68968
Buggy source:
public void initialize(IEmitterServices services) throws EngineException {
  this.services=services;
  this.out=EmitterUtil.getOuputStream(services,REPORT_FILE);
  Object emitterConfig=services.getEmitterConfig().get("String_Node_Str");
  if (emitterConfig != null && emitterConfig instanceof HTMLEmitterConfig) {
    imageHandler=((HTMLEmitterConfig)emitterConfig).getImageHandler();
    actionHandler=((HTMLEmitterConfig)emitterConfig).getActionHandler();
  }
  Object im=services.getOption(HTMLRenderOption.IMAGE_HANDLER);
  if (im != null && im instanceof IHTMLImageHandler) {
    imageHandler=(IHTMLImageHandler)im;
  }
  Object ac=services.getOption(HTMLRenderOption.ACTION_HANDLER);
  if (ac != null && ac instanceof IHTMLActionHandler) {
    actionHandler=(IHTMLActionHandler)ac;
  }
  reportContext=services.getReportContext();
  renderOption=services.getRenderOption();
  runnable=services.getReportRunnable();
  writer=creatWriter();
  if (renderOption != null) {
    HTMLRenderOption htmlOption=new HTMLRenderOption(renderOption);
    isEmbeddable=htmlOption.getEmbeddable();
    Map options=renderOption.getOutputSetting();
    if (options != null) {
      urlEncoding=(String)options.get(HTMLRenderOption.URL_ENCODING);
    }
    outputMasterPageContent=htmlOption.getMasterPageContent();
    IHTMLActionHandler actHandler=htmlOption.getActionHandle();
    if (ac != null) {
      actionHandler=actHandler;
    }
    pageFooterFloatFlag=htmlOption.getPageFooterFloatFlag();
    enableMetadata=htmlOption.getEnableMetadata();
    if (enableMetadata) {
      metadataFilter=htmlOption.getMetadataFilter();
      if (metadataFilter == null) {
        metadataFilter=new MetadataFilter();
      }
    }
    ouputInstanceIDs=htmlOption.getInstanceIDs();
    metadataEmitter=creatMetadataEmitter(writer,htmlOption);
    layoutPreference=htmlOption.getLayoutPreference();
    enableAgentStyleEngine=htmlOption.getEnableAgentStyleEngine();
    outputMasterPageMargins=htmlOption.getOutputMasterPageMargins();
    htmlIDNamespace=htmlOption.getHTMLIDNamespace();
    if (null != htmlIDNamespace) {
      if (htmlIDNamespace.length() > 0) {
        htmlIDNamespace+="String_Node_Str";
        metadataEmitter.setHTMLIDNamespace(htmlIDNamespace);
      }
 else {
        htmlIDNamespace=null;
      }
    }
    writer.setIndent(htmlOption.getHTMLIndent());
    if (isEmbeddable) {
      enableInlineStyle=htmlOption.getEnableInlineStyle();
    }
    browserVersion=HTMLEmitterUtil.getBrowserVersion(htmlOption.getUserAgent());
    if (browserVersion == HTMLEmitterUtil.BROWSER_IE5 || browserVersion == HTMLEmitterUtil.BROWSER_IE6) {
      needFixTransparentPNG=true;
    }
  }
}

Fixed version (ground truth):
public void initialize(IEmitterServices services) throws EngineException {
  this.services=services;
  this.out=EmitterUtil.getOuputStream(services,REPORT_FILE);
  Object emitterConfig=services.getEmitterConfig().get("String_Node_Str");
  if (emitterConfig != null && emitterConfig instanceof HTMLEmitterConfig) {
    imageHandler=((HTMLEmitterConfig)emitterConfig).getImageHandler();
    actionHandler=((HTMLEmitterConfig)emitterConfig).getActionHandler();
  }
  Object im=services.getOption(HTMLRenderOption.IMAGE_HANDLER);
  if (im != null && im instanceof IHTMLImageHandler) {
    imageHandler=(IHTMLImageHandler)im;
  }
  Object ac=services.getOption(HTMLRenderOption.ACTION_HANDLER);
  if (ac != null && ac instanceof IHTMLActionHandler) {
    actionHandler=(IHTMLActionHandler)ac;
  }
  reportContext=services.getReportContext();
  renderOption=services.getRenderOption();
  runnable=services.getReportRunnable();
  writer=creatWriter();
  if (renderOption != null) {
    HTMLRenderOption htmlOption=new HTMLRenderOption(renderOption);
    isEmbeddable=htmlOption.getEmbeddable();
    Map options=renderOption.getOutputSetting();
    if (options != null) {
      urlEncoding=(String)options.get(HTMLRenderOption.URL_ENCODING);
    }
    outputMasterPageContent=htmlOption.getMasterPageContent();
    IHTMLActionHandler actHandler=htmlOption.getActionHandle();
    if (ac != null) {
      actionHandler=actHandler;
    }
    pageFooterFloatFlag=htmlOption.getPageFooterFloatFlag();
    enableMetadata=htmlOption.getEnableMetadata();
    if (enableMetadata) {
      metadataFilter=htmlOption.getMetadataFilter();
      if (metadataFilter == null) {
        metadataFilter=new MetadataFilter();
      }
    }
    ouputInstanceIDs=htmlOption.getInstanceIDs();
    metadataEmitter=creatMetadataEmitter(writer,htmlOption);
    layoutPreference=htmlOption.getLayoutPreference();
    enableAgentStyleEngine=htmlOption.getEnableAgentStyleEngine();
    outputMasterPageMargins=htmlOption.getOutputMasterPageMargins();
    htmlIDNamespace=htmlOption.getHTMLIDNamespace();
    if (null != htmlIDNamespace) {
      if (htmlIDNamespace.length() > 0) {
        htmlIDNamespace+="String_Node_Str";
        metadataEmitter.setHTMLIDNamespace(htmlIDNamespace);
      }
 else {
        htmlIDNamespace=null;
      }
    }
    writer.setIndent(htmlOption.getHTMLIndent());
    if (isEmbeddable) {
      enableInlineStyle=htmlOption.getEnableInlineStyle();
    }
    browserVersion=HTMLEmitterUtil.getBrowserVersion(htmlOption.getUserAgent());
    if (browserVersion == HTMLEmitterUtil.BROWSER_IE5 || browserVersion == HTMLEmitterUtil.BROWSER_IE6) {
      needFixTransparentPNG=true;
      browserSupportsInlineBlock=false;
    }
 else     if (browserVersion == HTMLEmitterUtil.BROWSER_IE7 || browserVersion == HTMLEmitterUtil.BROWSER_FIREFOX1 || browserVersion == HTMLEmitterUtil.BROWSER_FIREFOX2) {
      browserSupportsInlineBlock=false;
    }
  }
}