<commit_before>/*
ClassFile class for ClassLoader.

Copyright 2015 <NAME>

Released under the MIT/X11 License.
Please see LICENSE file.
*/
#include <string>
#include <vector>
using std::string;
using std::vector;

class ClassFile {

	unsigned int magic;
	int minor_version;
	int major_version;
	int constant_pool_count;
	vector<vector<string>> constant_pool;
	int cp_size;
	int access_flags;
	int this_class;
	int super_class;
	int interfaces_count;
	vector<string> interfaces;
	int fields_count;
	vector<string> fields;
	int methods_count;
	vector<string> methods;
	int attributes_count;
	vector<string> attributes;
	vector<string> tags;

public:

	ClassFile() { // Constructor for ClassFile.
		magic = 0;
		minor_version = 0;
		major_version = 0;
		constant_pool_count = 0;
		//constant_pool();
		cp_size = 0;
		access_flags = 0;
		this_class = 0;
		super_class = 0;
		interfaces_count = 0;
		//interfaces();
		fields_count = 0;
		//fields();
		methods_count = 0;
		//methods();
		attributes_count = 0;
		//attributes();
		tags = { "", "Utf8", "", "Integer", "Float", "Long", "Double", "Class", "String", "Fieldref", \
		"Methodref", "InterfaceMethodref", "NameAndType" };
	}
	void setMagicNumber(long magicNum) {
		magic = magicNum;
	}
	long getMagicNumber() {
		return magic;
	}
	bool checkMagicNumber() {
		bool isMagic = false;
		if(magic == 0xCAFEBABE) isMagic = true;
		return isMagic;
	}
	void setMinorVersion(int minorVer) {
		minor_version = minorVer;
	}
	void setMajorVersion(int majorVer) {
		major_version = majorVer;
	}
	void setConstantPoolCount(int cpCount) {
		constant_pool_count = cpCount;
	}
	int getCPCOUNT() {
		return constant_pool_count;
	}
	void pushToConstantPool(vector<string> constValPair) {
		constant_pool.push_back(constValPair); // Possibly make this a String[2] array.
	}
	void setCPSIZE(int cpSize) {
		cp_size = cpSize;
	}
	int getCPSIZE() {
		return cp_size;
	}
	void setAccessFlags(int accessFlags) {
		access_flags = accessFlags;
	}
	int getAccessFlags() {
		return access_flags;
	}
	void setThisClass(int thisClass) {
		this_class = thisClass;
	}
	int getThisClass() {
		return this_class;
	}
	void setSuperClass(int superClass) {
		super_class = superClass;
	}
	int getSuperClass() {
		return super_class;
	}
	void setInterfacesCount(int interfacesCount) {
		interfaces_count = interfacesCount;
	}
	int getInterfacesCount() {
		return interfaces_count;
	}
	void pushInterface(string interface) {
		interfaces.push_back(interface);
	}
	void setFieldsCount(int fieldsCount) {
		fields_count = fieldsCount;
	}
	int getFieldsCount() {
		return fields_count;
	}
	void pushField(string field) {
		fields.push_back(field);
	}
	void setMethodsCount(int methodsCount) {
		methods_count = methodsCount;
	}
	int getMethodsCount() {
		return methods_count;
	}
	void pushMethod(string method) {
		methods.push_back(method);
	}
	void setAttributesCount(int attribCount) {
		attributes_count = attribCount;
	}
	int getAttributesCount() {
		return attributes_count;
	}
	void pushAttribute(string attribute) {
		attributes.push_back(attribute);
	}
	string getTag(int index) {
		string rtag = "Invalid tag index";
		if(index != 0 || index != 2) rtag = tags[index];
		return rtag;
	}
};
<commit_msg>Update classfile.h<commit_after>/*
ClassFile class for ClassLoader.

Copyright 2015 <NAME>

Released under the MIT/X11 License.
Please see LICENSE file.
*/
#include <string>
#include <vector>
using std::string;
using std::vector;

class ClassFile {

	int magic;
	int minor_version;
	int major_version;
	int constant_pool_count;
	vector<vector<string>> constant_pool;
	int cp_size;
	int access_flags;
	int this_class;
	int super_class;
	int interfaces_count;
	vector<string> interfaces;
	int fields_count;
	vector<string> fields;
	int methods_count;
	vector<string> methods;
	int attributes_count;
	vector<string> attributes;
	vector<string> tags;

public:

	ClassFile() { // Constructor for ClassFile.
		magic = 0;
		minor_version = 0;
		major_version = 0;
		constant_pool_count = 0;
		//constant_pool();
		cp_size = 0;
		access_flags = 0;
		this_class = 0;
		super_class = 0;
		interfaces_count = 0;
		//interfaces();
		fields_count = 0;
		//fields();
		methods_count = 0;
		//methods();
		attributes_count = 0;
		//attributes();
		tags = { "", "Utf8", "", "Integer", "Float", "Long", "Double", "Class", "String", "Fieldref", \
		"Methodref", "InterfaceMethodref", "NameAndType" };
	}
	void setMagicNumber(long magicNum) {
		magic = magicNum;
	}
	long getMagicNumber() {
		return magic;
	}
	bool checkMagicNumber() {
		bool isMagic = false;
		if(magic == 0xCAFEBABE) isMagic = true;
		return isMagic;
	}
	void setMinorVersion(int minorVer) {
		minor_version = minorVer;
	}
	void setMajorVersion(int majorVer) {
		major_version = majorVer;
	}
	void setConstantPoolCount(int cpCount) {
		constant_pool_count = cpCount;
	}
	int getCPCOUNT() {
		return constant_pool_count;
	}
	void pushToConstantPool(vector<string> constValPair) {
		constant_pool.push_back(constValPair); // Possibly make this a String[2] array.
	}
	void setCPSIZE(int cpSize) {
		cp_size = cpSize;
	}
	int getCPSIZE() {
		return cp_size;
	}
	void setAccessFlags(int accessFlags) {
		access_flags = accessFlags;
	}
	int getAccessFlags() {
		return access_flags;
	}
	void setThisClass(int thisClass) {
		this_class = thisClass;
	}
	int getThisClass() {
		return this_class;
	}
	void setSuperClass(int superClass) {
		super_class = superClass;
	}
	int getSuperClass() {
		return super_class;
	}
	void setInterfacesCount(int interfacesCount) {
		interfaces_count = interfacesCount;
	}
	int getInterfacesCount() {
		return interfaces_count;
	}
	void pushInterface(string interface) {
		interfaces.push_back(interface);
	}
	void setFieldsCount(int fieldsCount) {
		fields_count = fieldsCount;
	}
	int getFieldsCount() {
		return fields_count;
	}
	void pushField(string field) {
		fields.push_back(field);
	}
	void setMethodsCount(int methodsCount) {
		methods_count = methodsCount;
	}
	int getMethodsCount() {
		return methods_count;
	}
	void pushMethod(string method) {
		methods.push_back(method);
	}
	void setAttributesCount(int attribCount) {
		attributes_count = attribCount;
	}
	int getAttributesCount() {
		return attributes_count;
	}
	void pushAttribute(string attribute) {
		attributes.push_back(attribute);
	}
	string getTag(int index) {
		string rtag = "Invalid tag index";
		if(index != 0 || index != 2) rtag = tags[index];
		return rtag;
	}
};

{'fraction_non_alphanumeric': 0.11288819875776397, 'fraction_numerical': 0.007142857142857143, 'mean_word_length': 4.52401372212693, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7186518', 'n_tokens_mistral': 2422, 'n_tokens_neox': 2245, 'n_words': 526}