<commit_before>/*
 * Copyright 1999-2004 The Apache Software Foundation or its licensors,
 * as applicable.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.forrest.forrestdoc.js.doc;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;

/**
 *         Classe que monta um documento em HTML com a documentao
 *         do respectivo arquivo.
 */
public class GenerateHTMLDoc {

    private static FileInputStream fis;
    private static FileOutputStream fos;
    private static BufferedReader br;
    private static String LINE_SEPARATOR = String.valueOf((char) 13) + String.valueOf((char) 10);
    private static String stringReader;
    private static int functionCount = 0;
    private static String functionName = "";
    private static boolean parameterList = false;
    private static boolean useList = false;
    private boolean summary = true;
    private boolean description = true;

    public GenerateHTMLDoc(File fis, String destDir) {
        String nomeArquivo = fis.getName();
        try {
            fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm");
            br = new BufferedReader(new FileReader(fis));

        } catch (FileNotFoundException fnfe) {
            fnfe.printStackTrace();
        }

        try {
            fos.write(("<html>" + LINE_SEPARATOR).getBytes());
            fos.write(("<head>" + LINE_SEPARATOR).getBytes());
            fos.write(("<style type='text/css'>" + LINE_SEPARATOR).getBytes());
            fos.write((".TableHeadingColor     { background: #CCCCFF } /* Dark mauve */" + LINE_SEPARATOR).getBytes());<commit_msg>Gump Complains because it does not speak portuguesse :-) (warning: unmappable character for encoding ASCII)<commit_after>/*
 * Copyright 1999-2004 The Apache Software Foundation or its licensors,
 * as applicable.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.forrest.forrestdoc.js.doc;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;

/**
 *         Class that mounts a Document in HTML as document
 */
public class GenerateHTMLDoc {

    private static FileInputStream fis;
    private static FileOutputStream fos;
    private static BufferedReader br;
    private static String LINE_SEPARATOR = String.valueOf((char) 13) + String.valueOf((char) 10);
    private static String stringReader;
    private static int functionCount = 0;
    private static String functionName = "";
    private static boolean parameterList = false;
    private static boolean useList = false;
    private boolean summary = true;
    private boolean description = true;

    public GenerateHTMLDoc(File fis, String destDir) {
        String nomeArquivo = fis.getName();
        try {
            fos = new FileOutputStream(destDir + nomeArquivo.substring(0, nomeArquivo.indexOf(".")) + ".htm");
            br = new BufferedReader(new FileReader(fis));

        } catch (FileNotFoundException fnfe) {
            fnfe.printStackTrace();
        }

        try {
            fos.write(("<html>" + LINE_SEPARATOR).getBytes());
            fos.write(("<head>" + LINE_SEPARATOR).getBytes());
            fos.write(("<style type='text/css'>" + LINE_SEPARATOR).getBytes());
            fos.write((".TableHeadingColor     { background: #CCCCFF } /* Dark mauve */" + LINE_SEPARATOR).getBytes());
{'fraction_non_alphanumeric': 0.09773794280836534, 'fraction_numerical': 0.0076824583866837385, 'mean_word_length': 3.335800185013876, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1120825', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1229, 'n_words': 428}