<commit_before>package beaform.gui;

import beaform.Ingredient;
import beaform.entities.Formula;

/**
 * This class represents a formula for use in a treeview
 *
 * @author steven
 *
 */
public class TreeViewFormula {
	private final Formula formula;
	private final String amount;

	public TreeViewFormula(final Formula formula) {
		this.formula = formula;
		this.amount = "";
	}

	public TreeViewFormula(final Ingredient ingredient) {
		this.formula = ingredient.getFormula();
		this.amount = ingredient.getAmount();
	}

	@Override
	public String toString() {
		return this.formula.getName();
	}

	public Formula getFormula() {
		return this.formula;
	}

	public String getAmount() {
		return this.amount;
	}

}
<commit_msg>Fix multiple PMD errors<commit_after>package beaform.gui;

import beaform.Ingredient;
import beaform.entities.Formula;

/**
 * This class represents a formula for use in a tree view.
 *
 * @author <NAME>
 *
 */
public class TreeViewFormula {

	/** The formula this object represents */
	private final Formula formula;

	/** The amount of this formula in the total view of the tree */
	private final String amount;

	/**
	 * Constructor.
	 *
	 * @param formula The formula this object needs to represent
	 */
	public TreeViewFormula(final Formula formula) {
		this.formula = formula;
		this.amount = "";
	}

	/**
	 * Constructor.
	 *
	 * @param ingredient The ingredient this object needs to represent
	 */
	public TreeViewFormula(final Ingredient ingredient) {
		this.formula = ingredient.getFormula();
		this.amount = ingredient.getAmount();
	}

	/**
	 * A toString implementation
	 *
	 * @return name of the formula this object represents
	 */
	@Override
	public String toString() {
		return this.formula.getName();
	}

	/**
	 * Getter for the formula that this object is representing.
	 *
	 * @return The formula this object is representing
	 */
	public Formula getFormula() {
		return this.formula;
	}

	/**
	 * Getter for the amount of this formula in the whole.
	 * @return the amount
	 */
	public String getAmount() {
		return this.amount;
	}

}

{'fraction_non_alphanumeric': 0.1006259027443428, 'fraction_numerical': 0.0, 'mean_word_length': 3.5770925110132157, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3129943', 'n_tokens_mistral': 667, 'n_tokens_neox': 610, 'n_words': 201}