Program: 78378
Project: 78378
Buggy source:
/** 
 * Init the bean.
 * @param request
 * @throws Exception
 */
public void init(HttpServletRequest request){
  String servletPath=request.getServletPath();
  if (servletPath.indexOf("String_Node_Str") != -1) {
    this.category="String_Node_Str";
  }
  if (ParameterAccessor.isGetImageOperator(request)) {
    return;
  }
  this.masterPageContent=ParameterAccessor.isMasterPageContent(request);
  this.isDesigner=ParameterAccessor.isDesigner(request);
  this.reportDocumentName=ParameterAccessor.getReportDocument(request);
  File reportDocFile=new File(this.reportDocumentName);
  String reportDesignName=ParameterAccessor.getReport(request);
  File reportDesignDocFile=new File(reportDesignName);
  if (reportDesignDocFile != null && reportDesignDocFile.exists() && reportDesignDocFile.isFile() && reportDocFile != null && reportDocFile.exists() && reportDocFile.isFile() && "String_Node_Str".equalsIgnoreCase(request.getMethod())) {
    if (reportDesignDocFile.lastModified() > reportDocFile.lastModified() || ParameterAccessor.isOverwrite(request)) {
      reportDocFile.delete();
    }
  }
  if (reportDocFile.exists() && reportDocFile.isFile()) {
    this.reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDocumentName);
    if (this.reportDocumentInstance == null) {
      this.exception=new Exception("String_Node_Str" + ParameterAccessor.getReportDocument(request));
      return;
    }
    this.reportRunnable=this.reportDocumentInstance.getReportRunnable();
  }
 else {
    try {
      this.reportRunnable=ReportEngineService.getInstance().openReportDesign(ParameterAccessor.getReport(request));
    }
 catch (    EngineException e) {
      this.exception=e;
      return;
    }
  }
  if (this.reportRunnable == null) {
    this.exception=new Exception("String_Node_Str");
    return;
  }
  this.locale=ParameterAccessor.getLocale(request);
  this.reportPage=String.valueOf(ParameterAccessor.getPage(request));
  String title=null;
  if (this.reportRunnable != null) {
    title=(String)this.reportRunnable.getProperty("String_Node_Str");
  }
  if (title == null || title.trim().length() <= 0) {
    title=BirtResources.getString("String_Node_Str");
  }
  this.reportTitle=ParameterAccessor.htmlEncode(title);
  this.bookmark=ParameterAccessor.getBookmark(request);
  this.parameterTask=ReportEngineService.getInstance().createGetParameterDefinitionTask(this.reportRunnable);
  if (this.parameterTask != null) {
    this.parameterTask.setLocale(this.locale);
  }
  this.parameters=ReportEngineService.getInstance().parseParameters(request,this.parameterTask,this.reportRunnable.getTestConfig(),this.locale);
  this.missingParameter=ReportEngineService.getInstance().validateParameters(this.parameterTask,this.parameters);
}

Fixed version (ground truth):
/** 
 * Init the bean.
 * @param request
 * @throws Exception
 */
public void init(HttpServletRequest request){
  String servletPath=request.getServletPath();
  if (servletPath.indexOf("String_Node_Str") != -1) {
    this.category="String_Node_Str";
  }
  if (ParameterAccessor.isGetImageOperator(request)) {
    return;
  }
  this.masterPageContent=ParameterAccessor.isMasterPageContent(request);
  this.isDesigner=ParameterAccessor.isDesigner(request);
  this.reportDocumentName=ParameterAccessor.getReportDocument(request);
  File reportDocFile=new File(this.reportDocumentName);
  String reportDesignName=ParameterAccessor.getReport(request);
  File reportDesignDocFile=new File(reportDesignName);
  if (reportDesignDocFile != null && reportDesignDocFile.exists() && reportDesignDocFile.isFile() && reportDocFile != null && reportDocFile.exists() && reportDocFile.isFile() && "String_Node_Str".equalsIgnoreCase(request.getMethod())) {
    if (reportDesignDocFile.lastModified() > reportDocFile.lastModified() || ParameterAccessor.isOverwrite(request)) {
      reportDocFile.delete();
    }
  }
  if (reportDocFile.exists() && reportDocFile.isFile()) {
    this.reportDocumentInstance=ReportEngineService.getInstance().openReportDocument(this.reportDocumentName);
    if (this.reportDocumentInstance == null) {
      this.exception=new Exception("String_Node_Str" + ParameterAccessor.getReportDocument(request));
      return;
    }
    this.reportRunnable=this.reportDocumentInstance.getReportRunnable();
  }
 else {
    if (ViewerServlet.SERVLET_PATH_FRAMESET.equalsIgnoreCase(request.getServletPath()) || ViewerServlet.SERVLET_PATH_PREVIEW.equalsIgnoreCase(request.getServletPath()) || ViewerServlet.SERVLET_PATH_PARAMETER.equalsIgnoreCase(request.getServletPath())) {
      this.exception=new EngineException(MessageUtility.format(BirtResources.getString(MessageConstants.REPORT_DOCUMENT_NOT_FOUND_EXCEPTION),reportDocumentName));
      return;
    }
    try {
      this.reportRunnable=ReportEngineService.getInstance().openReportDesign(ParameterAccessor.getReport(request));
    }
 catch (    EngineException e) {
      this.exception=e;
      return;
    }
  }
  if (this.reportRunnable == null) {
    this.exception=new Exception("String_Node_Str");
    return;
  }
  this.locale=ParameterAccessor.getLocale(request);
  this.reportPage=String.valueOf(ParameterAccessor.getPage(request));
  String title=null;
  if (this.reportRunnable != null) {
    title=(String)this.reportRunnable.getProperty("String_Node_Str");
  }
  if (title == null || title.trim().length() <= 0) {
    title=BirtResources.getString("String_Node_Str");
  }
  this.reportTitle=ParameterAccessor.htmlEncode(title);
  this.bookmark=ParameterAccessor.getBookmark(request);
  this.parameterTask=ReportEngineService.getInstance().createGetParameterDefinitionTask(this.reportRunnable);
  if (this.parameterTask != null) {
    this.parameterTask.setLocale(this.locale);
  }
  this.parameters=ReportEngineService.getInstance().parseParameters(request,this.parameterTask,this.reportRunnable.getTestConfig(),this.locale);
  this.missingParameter=ReportEngineService.getInstance().validateParameters(this.parameterTask,this.parameters);
}