<commit_before>package BlueTurtle.warnings;

import lombok.Getter;
import lombok.Setter;

/**
 * This class is used to represent a PMD warning.
 * 
 * @author BlueTurtle.
 *
 */
public class PMDWarning extends Warning {

	@Getter @Setter private int line;
	@Getter @Setter private String method;
	@Getter @Setter private String packageName;
	
	/**
	 * Constructor.
	 * 
	 * @param filePath
	 *            the path to the file where the warning is located.
	 * @param filename
	 *            the name of the file where the warning is located.
	 * @param line
	 *            the line number where the warning is located.
	 * @param packageName
	 *            the package of the warning.
	 * @param ruleName
	 *            the rule name of the warning.
	 * @param message
	 *            the ruleSet/message of the warning.
	 * @param method
	 *            the method of the warning.
	 * @param classification
	 *            of the violated rule of the warning.
	 */
	public PMDWarning(String filePath, String filename, int line, String packageName, String message, String method,  String ruleName, String classification) {
		super(filePath, filename, "PMD", ruleName, message, classification);
		setLine(line);
		setPackageName(packageName);
		setMethod(method);
	}

	/**
	 * Check whether two PMD warnings are the same.
	 * 
	 * @param other
	 *            the other warning.
	 * @return a boolean
	 */
	@Override
	public boolean equals(Object other) {

		if (!(other instanceof PMDWarning)) {
			return false;
		}

		PMDWarning that = (PMDWarning) other;

		return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
				&& classification.equals(that.classification) && packageName.equals(that.packageName) && type.equals(that.type) 
				&& message.equals(that.message) && method.equals(that.method) && ruleName.equals(that.ruleName));
	}
	
	/**
	 * HashCode for the CheckStyle Warning.
	 */
	@Override
	public int hashCode() {
		return java.util.Objects.hash(filePath, fileName, type, line, packageName, message, method, ruleName, classification);
	}

	/**
	 * toString method for PMDWarning.
	 */
	@Override
	public String toString() {
		return "PMDWarning [line=" + line + ", method=" + method + ", packageName=" + packageName + ", classification="
				+ classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
				+ ", ruleName=" + ruleName + ", message=" + message + "]";
	}
	
}<commit_msg>PMDWarning, change message back to RuleSet<commit_after>package BlueTurtle.warnings;

import lombok.Getter;
import lombok.Setter;

/**
 * This class is used to represent a PMD warning.
 * 
 * @author BlueTurtle.
 *
 */
public class PMDWarning extends Warning {

	@Getter @Setter private int line;
	@Getter @Setter private String method;
	@Getter @Setter private String packageName;
	@Getter @Setter private String ruleSet;

	
	/**
	 * Constructor.
	 * 
	 * @param filePath
	 *            the path to the file where the warning is located.
	 * @param filename
	 *            the name of the file where the warning is located.
	 * @param line
	 *            the line number where the warning is located.
	 * @param packageName
	 *            the package of the warning.
	 * @param ruleName
	 *            the rule name of the warning.
	 * @param ruleSet
	 *            the ruleSet of the warning.
	 * @param method
	 *            the method of the warning.
	 * @param classification
	 *            of the violated rule of the warning.
	 */
	public PMDWarning(String filePath, String filename, int line, String packageName, String message, String ruleSet,  String ruleName, String classification) {
		super(filePath, filename, "PMD", ruleName, message, classification);
		setLine(line);
		setRuleSet(ruleSet);
		setPackageName(packageName);
		setMethod(method);
	}

	/**
	 * Check whether two PMD warnings are the same.
	 * 
	 * @param other
	 *            the other warning.
	 * @return a boolean
	 */
	@Override
	public boolean equals(Object other) {

		if (!(other instanceof PMDWarning)) {
			return false;
		}

		PMDWarning that = (PMDWarning) other;

		return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
				&& classification.equals(that.classification) && packageName.equals(that.packageName) && type.equals(that.type) 
				&& ruleSet.equals(that.ruleSet) && method.equals(that.method) && ruleName.equals(that.ruleName));
	}
	
	/**
	 * HashCode for the CheckStyle Warning.
	 */
	@Override
	public int hashCode() {
		return java.util.Objects.hash(filePath, fileName, type, line, packageName, ruleSet, method, ruleName, classification);
	}

	/**
	 * toString method for PMDWarning.
	 */
	@Override
	public String toString() {
		return "PMDWarning [line=" + line + ", method=" + method + ", packageName=" + packageName + ", classification="
				+ classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
				+ ", ruleName=" + ruleName + ", ruleSet=" + ruleSet + "]";
	}
	
}
{'fraction_non_alphanumeric': 0.11459373128368935, 'fraction_numerical': 0.0, 'mean_word_length': 3.1302555647155814, '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': '3625395', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1411, 'n_words': 461}