<commit_before>/**
 *  Copyright 2009-2015 Université Paris Ouest and Sorbonne Universités,
 * 							Univ. Paris 06 - CNRS UMR
 * 							7606 (LIP6)
 *
 *  All rights reserved.   This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Project leader / Initial Contributor:
 *    <NAME> - <<EMAIL>>
 *
 *  Contributors:
 *    <NAME> - <$oemails}>
 *
 *  Mailing list:
 *    <EMAIL>
 */
package fr.lip6.move.pnml.validation;

import java.io.IOException;
import java.util.List;

import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import ch.qos.logback.classic.LoggerContext;
import fr.lip6.move.pnml.framework.general.PnmlExport;
import fr.lip6.move.pnml.framework.hlapi.HLAPIRootClass;
import fr.lip6.move.pnml.framework.utils.exception.BadFileFormatException;
import fr.lip6.move.pnml.framework.utils.exception.OCLValidationFailed;
import fr.lip6.move.pnml.framework.utils.exception.OtherException;
import fr.lip6.move.pnml.framework.utils.exception.UnhandledNetType;
import fr.lip6.move.pnml.framework.utils.exception.ValidationFailedException;
import fr.lip6.move.pnml.framework.utils.logging.LogMaster;
import fr.lip6.move.pnml.validation.exceptions.ExitException;
import fr.lip6.move.pnml.validation.exceptions.InternalException;
import fr.lip6.move.pnml.validation.exceptions.InvalidFileException;
import fr.lip6.move.pnml.validation.exceptions.InvalidFileTypeException;
import fr.lip6.move.pnml.validation.exceptions.ValidationException;
import fr.lip6.move.pnml.validation.impl.CheckPnmlFileImpl;
import fr.lip6.move.pnml.validation.impl.PnmlNormalizerImpl;
import fr.lip6.move.pnml.validation.stats.CLOptions;
import fr.lip6.move.pnml.validation.stats.HTTPStatusCodes;
import fr.lip6.move.pnml.validation.stats.MessageUtility;
import fr.lip6.move.pnml.validation.util.impl.PNMLValidationUtilsImpl;

/**
 * Entry point for validation service.
 * 
 * @author lom
 */
public class ValidationMain {
	/**
	 * No standalone, help and server exec modes at the same time.
	 */
	private static final String NOT_AHS = "Help, standalone and server execution modes are exclusive options.";
	/**
	 * No standalone and server exec modes at the same time.
	 */
	private static final String NOT_AS = "Standalone and server execution modes are exclusive options.";
	/**
	 * No help and standalone at the same time.
	 */
	private static final String NOT_HA = "Help, and standalone execution mode are exclusive options.";
	/**
	 * No help and server at the same time.
	 */
	private static final String NOT_SH = "Help, and server execution mode are exclusive options.";
	/**
	 * Files to validate are needed.
	 */
	private static final String NO_ARG = "You must specify the paths to the files to validate."
			+ " Standalone execution mode (default).";
	/**
	 * No help and check normalization option at the same time.
	 */
	private static final String NOT_HCNMZ = "Help, and check normalization issues (or direct normalization) are exclusive options.";
	/**
	 * No check normalization issues, and normalizing options at the same time.
	 */
	private static final String NOT_CNMZ = "Check normalization issues, and direct normalization are exclusive options.";
	/**
	 * No help and remove graphical info at the same time.
	 */
	private static final String NOT_HRMG = "Help, and removal of graphical information are exclusive options.";
	/**
	 * Usage.
	 */
	private static final String USAGE = "java -jar myprogram.jar [options...] [pnmlFile1 pnmlFile2 ...]";

	private static final String PNML_EXT = ".pnml";
	/**
	 * Parser printing space width.
	 */
	private static final int PARSER_WIDTH = 80;
	/**
	 * Logger
	 */
	private static final Logger JOURNAL = LogMaster.getLogger(ValidationMain.class.getCanonicalName());
	/**
	 * Version of this tool.
	 */
	private static final String VERSION = "1.0.7";

	/**
	 * The command-line parser.
	 */
	private static CmdLineParser parser;
	/**
	 * Command-line options.
	 */
	private static CLOptions cloptions;

	/**
	 * Hidden constructor.
	 */
	protected ValidationMain() {
		super();
	}

	/**
	 * @param args
	 *            arguments
	 * @throws ExitException
	 *             exits with trouble
	 */
	public static void main(String[] args) throws ExitException {
		try {
			long startTime = System.nanoTime();<commit_msg>set version to upcoming 1.0.8<commit_after>/**
 *  Copyright 2009-2015 Université Paris Ouest and Sorbonne Universités,
 * 							Univ. Paris 06 - CNRS UMR
 * 							7606 (LIP6)
 *
 *  All rights reserved.   This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Project leader / Initial Contributor:
 *    <NAME> - <<EMAIL>>
 *
 *  Contributors:
 *    <NAME> - <$oemails}>
 *
 *  Mailing list:
 *    <EMAIL>
 */
package fr.lip6.move.pnml.validation;

import java.io.IOException;
import java.util.List;

import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import ch.qos.logback.classic.LoggerContext;
import fr.lip6.move.pnml.framework.general.PnmlExport;
import fr.lip6.move.pnml.framework.hlapi.HLAPIRootClass;
import fr.lip6.move.pnml.framework.utils.exception.BadFileFormatException;
import fr.lip6.move.pnml.framework.utils.exception.OCLValidationFailed;
import fr.lip6.move.pnml.framework.utils.exception.OtherException;
import fr.lip6.move.pnml.framework.utils.exception.UnhandledNetType;
import fr.lip6.move.pnml.framework.utils.exception.ValidationFailedException;
import fr.lip6.move.pnml.framework.utils.logging.LogMaster;
import fr.lip6.move.pnml.validation.exceptions.ExitException;
import fr.lip6.move.pnml.validation.exceptions.InternalException;
import fr.lip6.move.pnml.validation.exceptions.InvalidFileException;
import fr.lip6.move.pnml.validation.exceptions.InvalidFileTypeException;
import fr.lip6.move.pnml.validation.exceptions.ValidationException;
import fr.lip6.move.pnml.validation.impl.CheckPnmlFileImpl;
import fr.lip6.move.pnml.validation.impl.PnmlNormalizerImpl;
import fr.lip6.move.pnml.validation.stats.CLOptions;
import fr.lip6.move.pnml.validation.stats.HTTPStatusCodes;
import fr.lip6.move.pnml.validation.stats.MessageUtility;
import fr.lip6.move.pnml.validation.util.impl.PNMLValidationUtilsImpl;

/**
 * Entry point for validation service.
 * 
 * @author lom
 */
public class ValidationMain {
	/**
	 * No standalone, help and server exec modes at the same time.
	 */
	private static final String NOT_AHS = "Help, standalone and server execution modes are exclusive options.";
	/**
	 * No standalone and server exec modes at the same time.
	 */
	private static final String NOT_AS = "Standalone and server execution modes are exclusive options.";
	/**
	 * No help and standalone at the same time.
	 */
	private static final String NOT_HA = "Help, and standalone execution mode are exclusive options.";
	/**
	 * No help and server at the same time.
	 */
	private static final String NOT_SH = "Help, and server execution mode are exclusive options.";
	/**
	 * Files to validate are needed.
	 */
	private static final String NO_ARG = "You must specify the paths to the files to validate."
			+ " Standalone execution mode (default).";
	/**
	 * No help and check normalization option at the same time.
	 */
	private static final String NOT_HCNMZ = "Help, and check normalization issues (or direct normalization) are exclusive options.";
	/**
	 * No check normalization issues, and normalizing options at the same time.
	 */
	private static final String NOT_CNMZ = "Check normalization issues, and direct normalization are exclusive options.";
	/**
	 * No help and remove graphical info at the same time.
	 */
	private static final String NOT_HRMG = "Help, and removal of graphical information are exclusive options.";
	/**
	 * Usage.
	 */
	private static final String USAGE = "java -jar myprogram.jar [options...] [pnmlFile1 pnmlFile2 ...]";

	private static final String PNML_EXT = ".pnml";
	/**
	 * Parser printing space width.
	 */
	private static final int PARSER_WIDTH = 80;
	/**
	 * Logger
	 */
	private static final Logger JOURNAL = LogMaster.getLogger(ValidationMain.class.getCanonicalName());
	/**
	 * Version of this tool.
	 */
	private static final String VERSION = "1.0.8";

	/**
	 * The command-line parser.
	 */
	private static CmdLineParser parser;
	/**
	 * Command-line options.
	 */
	private static CLOptions cloptions;

	/**
	 * Hidden constructor.
	 */
	protected ValidationMain() {
		super();
	}

	/**
	 * @param args
	 *            arguments
	 * @throws ExitException
	 *             exits with trouble
	 */
	public static void main(String[] args) throws ExitException {
		try {
			long startTime = System.nanoTime();
{'fraction_non_alphanumeric': 0.10505407194879718, 'fraction_numerical': 0.011366144338998014, 'mean_word_length': 3.8595174262734586, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4334562', 'n_tokens_mistral': 2906, 'n_tokens_neox': 2682, 'n_words': 789}