<commit_before><%--L
  Copyright Northrop Grumman Information Technology.

  Distributed under the OSI-approved BSD 3-Clause License.
  See http://ncip.github.com/nci-report-writer/LICENSE.txt for details.
L--%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>


<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.bean.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.utils.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.service.*" %>
<%@ page import="gov.nih.nci.evs.utils.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.properties.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%!
  private static final String buildInfo = AppProperties.getInstance().
    getSpecialProperty(AppProperties.BUILD_INFO);
  private static final String application_version = AppProperties.getInstance().
    getSpecialProperty(AppProperties.APPLICATION_VERSION);
  private static final String anthill_build_tag_built = AppProperties.getInstance().
    getSpecialProperty(AppProperties.ANTHILL_BUILD_TAG_BUILT);
  private static final String evs_service_url = AppProperties.getInstance().
    getSpecialProperty(AppProperties.EVS_SERVICE_URL);
%>

<%


String download_dir = AppProperties.getInstance().getProperty(AppProperties.REPORT_DOWNLOAD_DIRECTORY);
System.out.println("(*) DOWNLOAD DIR: " + download_dir);
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");

boolean approvedOnly = true;

String hibernate_cfg_xml = request.getSession().getServletContext().getRealPath(JDBCUtil.HIBERNATE_CFG_PATH);//"/WEB-INF/classes/hibernate.cfg.xml");
System.out.println("hibernate_cfg_xml: " + hibernate_cfg_xml);
File file = new File(hibernate_cfg_xml);
if (file.exists()) {
    System.out.println("Note: hibernate_cfg_xml exists.");
    JDBCUtil util = new JDBCUtil(hibernate_cfg_xml);
    System.out.println("username: " + util.getUsername());
    System.out.println("password: " + util.getPassword());
    System.out.println("url: " + util.getUrl());
    System.out.println("driver: " + util.getDriver());
    System.out.println("configuration_file: " + util.getConfigurationFile());
    
} else {
    System.out.println("WARNING: Unable to access hibernate_cfg_xml -- file.exists() method failed.");
}
		
  
  String label = null;
  int templateId = -1;
  String templateId_str = null;
  String filename = null;
  String filesize = null;
  int formatId = -1;
  String format = null;
  String codingScheme = null;
  String version = null;
  String loginName = null;
  String date_str = null;
  String status = null;
  String pathName = null;
  String dataRowColor = null;
  String formatId_str = null;
  String labelUrl = null;

  Vector report_metadata_vec = (Vector) request.getSession().getAttribute("report_metadata_vec");
  if (report_metadata_vec == null) {
      System.out.println("(*) WARNING: report_metadata_vec is NULL???");
      System.out.println("(*) Trying to call util.getReportData() again...");
      report_metadata_vec = util.getReportData();
      if (report_metadata_vec == null) {
           System.out.println("(*) WARNING: report_metadata_vec is still NULL???");
      }
      
  } else { 
      System.out.println("(*) report_metadata_vec.size() = " + report_metadata_vec.size());
  }
  
  String imagesPath = FormUtils.getImagesPath(request);
  String title = "NCI Report Writer: Download";

   
%>
<!--
   Build info: <%=buildInfo%>
 Version info: <%=application_version%>
          Tag: <%=anthill_build_tag_built%>
   LexEVS URL: <%=evs_service_url%>          
  -->
<html xmlns:c="http://java.sun.com/jsp/jstl/core">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><commit_msg>Add debug statements.<commit_after><%--L
  Copyright Northrop Grumman Information Technology.

  Distributed under the OSI-approved BSD 3-Clause License.
  See http://ncip.github.com/nci-report-writer/LICENSE.txt for details.
L--%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>


<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.bean.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.utils.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.service.*" %>
<%@ page import="gov.nih.nci.evs.utils.*" %>
<%@ page import="gov.nih.nci.evs.reportwriter.properties.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%!
  private static final String buildInfo = AppProperties.getInstance().
    getSpecialProperty(AppProperties.BUILD_INFO);
  private static final String application_version = AppProperties.getInstance().
    getSpecialProperty(AppProperties.APPLICATION_VERSION);
  private static final String anthill_build_tag_built = AppProperties.getInstance().
    getSpecialProperty(AppProperties.ANTHILL_BUILD_TAG_BUILT);
  private static final String evs_service_url = AppProperties.getInstance().
    getSpecialProperty(AppProperties.EVS_SERVICE_URL);
%>

<%


String download_dir = AppProperties.getInstance().getProperty(AppProperties.REPORT_DOWNLOAD_DIRECTORY);
System.out.println("(*) DOWNLOAD DIR: " + download_dir);
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");

boolean approvedOnly = true;

String hibernate_cfg_xml = request.getSession().getServletContext().getRealPath(JDBCUtil.HIBERNATE_CFG_PATH);//"/WEB-INF/classes/hibernate.cfg.xml");
System.out.println("hibernate_cfg_xml: " + hibernate_cfg_xml);
File file = new File(hibernate_cfg_xml);
JDBCUtil util = null;
if (file.exists()) {
    System.out.println("Note: hibernate_cfg_xml exists.");
    util = new JDBCUtil(hibernate_cfg_xml);
    System.out.println("username: " + util.getUsername());
    System.out.println("password: " + <PASSWORD>());
    System.out.println("url: " + util.getUrl());
    System.out.println("driver: " + util.getDriver());
    System.out.println("configuration_file: " + util.getConfigurationFile());
    
} else {
    System.out.println("WARNING: Unable to access hibernate_cfg_xml -- file.exists() method failed.");
}
		
  
  String label = null;
  int templateId = -1;
  String templateId_str = null;
  String filename = null;
  String filesize = null;
  int formatId = -1;
  String format = null;
  String codingScheme = null;
  String version = null;
  String loginName = null;
  String date_str = null;
  String status = null;
  String pathName = null;
  String dataRowColor = null;
  String formatId_str = null;
  String labelUrl = null;

  Vector report_metadata_vec = (Vector) request.getSession().getAttribute("report_metadata_vec");
  if (report_metadata_vec == null) {
      System.out.println("(*) WARNING: report_metadata_vec is NULL???");
      
      if (util != null) {
              System.out.println("(*) Trying to call util.getReportData() again...");
	      report_metadata_vec = util.getReportData();
	      if (report_metadata_vec == null) {
		   System.out.println("(*) WARNING: report_metadata_vec is still NULL???");
	      }
      }
      
  } else { 
      System.out.println("(*) report_metadata_vec.size() = " + report_metadata_vec.size());
  }
  
  String imagesPath = FormUtils.getImagesPath(request);
  String title = "NCI Report Writer: Download";

   
%>
<!--
   Build info: <%=buildInfo%>
 Version info: <%=application_version%>
          Tag: <%=anthill_build_tag_built%>
   LexEVS URL: <%=evs_service_url%>          
  -->
<html xmlns:c="http://java.sun.com/jsp/jstl/core">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
{'fraction_non_alphanumeric': 0.15641761257328177, 'fraction_numerical': 0.005987277036297867, 'mean_word_length': 4.338215712383489, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3631290', 'n_tokens_mistral': 2724, 'n_tokens_neox': 2558, 'n_words': 486}