Program: 78619
Project: 78619
Buggy source:
private IContentEmitter createContentEmitter(ReportExecutor executor) throws EngineException {
  EngineEmitterServices services=new EngineEmitterServices(this);
  EngineConfig config=engine.getConfig();
  if (config != null) {
    services.setEmitterConfig(config.getEmitterConfigs());
  }
  services.setRenderOption(renderOptions);
  services.setExecutor(executor);
  services.setRenderContext(appContext);
  services.setReportRunnable(runnable);
  String format=executionContext.getOutputFormat();
  if (format == null) {
    format="String_Node_Str";
  }
  ExtensionManager extManager=ExtensionManager.getInstance();
  if (!extManager.getSupportedFormat().contains(format)) {
    log.log(Level.SEVERE,MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION,format);
    throw new EngineException(MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION,format);
  }
  IContentEmitter emitter=extManager.createEmitter(format,emitterID);
  if (emitter == null) {
    log.log(Level.SEVERE,"String_Node_Str",format);
    throw new EngineException(MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION);
  }
  emitter=new LocalizedEmitter(executionContext,emitter);
  if (format.equalsIgnoreCase("String_Node_Str")) {
    boolean paginate=true;
    if (renderOptions instanceof HTMLRenderOption) {
      HTMLRenderOption htmlOption=(HTMLRenderOption)renderOptions;
      paginate=htmlOption.getHtmlPagination();
    }
    if (paginate) {
      emitter=new HTMLPaginationEmitter(executor,null,emitter);
    }
  }
 else   if (format.equalsIgnoreCase("String_Node_Str") || format.equalsIgnoreCase("String_Node_Str")) {
    emitter=new DefaultPaginationEmitter(executor,null,emitter);
  }
  emitter.initialize(services);
  return emitter;
}

Fixed version (ground truth):
private IContentEmitter createContentEmitter(ReportExecutor executor) throws EngineException {
  EngineEmitterServices services=new EngineEmitterServices(this);
  EngineConfig config=engine.getConfig();
  if (config != null) {
    services.setEmitterConfig(config.getEmitterConfigs());
  }
  services.setRenderOption(renderOptions);
  services.setExecutor(executor);
  services.setRenderContext(appContext);
  services.setReportRunnable(runnable);
  String format=executionContext.getOutputFormat();
  if (format == null) {
    format="String_Node_Str";
  }
  ExtensionManager extManager=ExtensionManager.getInstance();
  if (!extManager.getSupportedFormat().contains(format)) {
    log.log(Level.SEVERE,MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION,format);
    throw new EngineException(MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION,format);
  }
  IContentEmitter emitter=null;
  try {
    emitter=extManager.createEmitter(format,emitterID);
  }
 catch (  Throwable t) {
    log.log(Level.SEVERE,"String_Node_Str",format);
    throw new EngineException(MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION,t);
  }
  if (emitter == null) {
    log.log(Level.SEVERE,"String_Node_Str",format);
    throw new EngineException(MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION);
  }
  emitter=new LocalizedEmitter(executionContext,emitter);
  if (format.equalsIgnoreCase("String_Node_Str")) {
    boolean paginate=true;
    if (renderOptions instanceof HTMLRenderOption) {
      HTMLRenderOption htmlOption=(HTMLRenderOption)renderOptions;
      paginate=htmlOption.getHtmlPagination();
    }
    if (paginate) {
      emitter=new HTMLPaginationEmitter(executor,null,emitter);
    }
  }
 else   if (format.equalsIgnoreCase("String_Node_Str") || format.equalsIgnoreCase("String_Node_Str")) {
    emitter=new DefaultPaginationEmitter(executor,null,emitter);
  }
  emitter.initialize(services);
  return emitter;
}