<commit_before>#!/usr/bin/python2
import sys
from bs4 import BeautifulSoup

class method:
    __slots__ = ("comments", "return_type", "method_name")

    def __init__(self):
        self.comments = ""
        self.return_type = ""
        self.method_name = ""

    def get_method_text(self):
        #Returns the text of the method
        return self.comments + "\n\tpublic " + self.return_type + " " + self.method_name + " {" + "\n\t\t" + "//Body" + "\n\t" + "}"

    def __str__(self):
        return self.get_method_text()

class static_field:
    __slots__ = ("instance_type","name")
 
    def __init__(self):
        self.instance_type = ""
        self.name = ""

    def __str__(self):
        return "\t" + self.instance_type + " " + self.name + "\n";

class constructor:
    

class written_class:
    __slots__ = ("head_text", "methods", "fields")

    def __init__(self):
        self.head_text = ""
        self.methods = list()
        self.fields = list()
<commit_msg>Added class for comments. Started documenting more<commit_after>#!/usr/bin/python2
import sys
from bs4 import BeautifulSoup

class comment:
    """
        comment stores a comment for later printing
        
        slots:
            comment_type - The type of comment. Either "line" or "block"
            comment_lines - The lines of the comment. If comment_type==line then comment_lines should only have one index
    """
    __slots__ = ("comment_type", "comment_lines")

    def __init__(self):
        self.comment_type = ""
        self.comment_lines = list()

    def __str__(self):
        if (self.comment_type == "block"):
            new_str = "\t/**\n"
            for comment_line in comment_lines:
                new_str += "\t * " + comment_line + "\n"
            new_str += "\t */\n"

class method:
    """
        Method stores information about a particular method for later printing

        slots:
            comments - the comments from the javadoc about the method
            return_type - the type it returns
            method_name - the name of the method
    """
    __slots__ = ("comments", "return_type", "method_name")

    def __init__(self):
        self.comments = ""
        self.return_type = ""
        self.method_name = ""

    def get_method_text(self):
        """
            Returns the method text in this format:
            /**
             * self.comments
             */
             public self.return_type self.method_name {
                //Body
            }
        """
        return self.comments + "\n\tpublic " + self.return_type + " " + self.method_name + " {" + "\n\t\t" + "//Body" + "\n\t" + "}"

    def __str__(self):
        return self.get_method_text()

class static_field:
    """
        Stores a single static field of a class for later printing
        
        slots:
            comment - the comments from the javadoc about the method
            instance_type - the type of the static variable
            name - the name of the variable
    """
    __slots__ = ("comment","instance_type","name")
 
    def __init__(self):
        self.instance_type = ""
        self.name = ""

    def __str__(self):
        """
            Returns the field in this format:
            //comment
            self.instance_type self.name
        """
        return "\t" + self.instance_type + " " + self.name + "\n";

class written_class:
    __slots__ = ("head_text", "methods", "fields")

    def __init__(self):
        self.head_text = ""
        self.methods = list()
        self.fields = list()

{'fraction_non_alphanumeric': 0.11971830985915492, 'fraction_numerical': 0.0011267605633802818, 'mean_word_length': 1.9591666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5164377', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1020, 'n_words': 280}