<commit_before>package net.ceos.project.poi.annotated.core;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;

import net.ceos.project.poi.annotated.definition.ExceptionMessage;
import net.ceos.project.poi.annotated.exception.CustomizedRulesException;

/**
 * This class manage the comment to apply to one cell.
 * 
 * @version 1.0
 * @author <NAME>
 */
class CellCommentHandler {

	private CellCommentHandler() {
		/* private constructor to hide the implicit public */
	}
	
	/**
	 * Apply the comment, if exists, to a cell.
	 * 
	 * @param configCriteria
	 *            the {@link ConfigCriteria}
	 * @param o
	 *            the object
	 * @param c
	 *            the {@link Cell}
	 * @throws CustomizedRulesException
	 */
	protected static void applyComment(final ConfigCriteria configCriteria, final Object o, final Cell c)
			throws CustomizedRulesException {
		if (StringUtils.isNotBlank(configCriteria.getElement().comment())) {
			// apply the comment
			try {
				CellStyleHandler.applyComment(configCriteria,
						(Boolean) applyCommentRules(o, configCriteria.getElement().commentRules()), c);
			} catch (Exception e) {
				throw new CustomizedRulesException(
						ExceptionMessage.CustomizedRulesException_NoSuchCommentMethod.getMessage(), e);
			}
		}
	}

	/**
	 * Apply a explicit formula value at the Cell.
	 * 
	 * @param o
	 *            the object
	 * @param f
	 *            the field
	 * @throws NoSuchMethodException
	 * @throws IllegalAccessException
	 * @throws InvocationTargetException
	 */<commit_msg>Upgrade ConfigCriteria<commit_after>package net.ceos.project.poi.annotated.core;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;

import net.ceos.project.poi.annotated.definition.ExceptionMessage;
import net.ceos.project.poi.annotated.exception.CustomizedRulesException;

/**
 * This class manage the comment to apply to one cell.
 * 
 * @version 1.0
 * @author <NAME>
 */
class CellCommentHandler {

	private CellCommentHandler() {
		/* private constructor to hide the implicit public */
	}
	
	/**
	 * Apply the comment, if exists, to a cell.
	 * 
	 * @param configCriteria
	 *            the {@link XConfigCriteria}
	 * @param o
	 *            the object
	 * @param c
	 *            the {@link Cell}
	 * @throws CustomizedRulesException
	 */
	protected static void applyComment(final XConfigCriteria configCriteria, final Object o, final Cell c)
			throws CustomizedRulesException {
		if (StringUtils.isNotBlank(configCriteria.getElement().comment())) {
			// apply the comment
			try {
				CellStyleHandler.applyComment(configCriteria,
						(Boolean) applyCommentRules(o, configCriteria.getElement().commentRules()), c);
			} catch (Exception e) {
				throw new CustomizedRulesException(
						ExceptionMessage.CustomizedRulesException_NoSuchCommentMethod.getMessage(), e);
			}
		}
	}

	/**
	 * Apply a explicit formula value at the Cell.
	 * 
	 * @param o
	 *            the object
	 * @param f
	 *            the field
	 * @throws NoSuchMethodException
	 * @throws IllegalAccessException
	 * @throws InvocationTargetException
	 */
{'fraction_non_alphanumeric': 0.09960760639903411, 'fraction_numerical': 0.0018110473890733474, 'mean_word_length': 3.454301075268817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7324030', 'n_tokens_mistral': 1024, 'n_tokens_neox': 909, 'n_words': 237}