<commit_before>package jadx.cli;

import java.io.File;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import com.beust.jcommander.IStringConverter;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterDescription;
import com.beust.jcommander.ParameterException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jadx.api.IJadxArgs;
import jadx.api.JadxDecompiler;
import jadx.core.utils.exceptions.JadxException;

public class JadxCLIArgs implements IJadxArgs {

	protected static final int DEFAULT_THREADS_COUNT = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);

	@Parameter(description = "<input file> (.dex, .apk, .jar or .class)")
	protected List<String> files;

	@Parameter(names = {"-d", "--output-dir"}, description = "output directory")
	protected String outDirName;

	@Parameter(names = {"-j", "--threads-count"}, description = "processing threads count")
	protected int threadsCount = DEFAULT_THREADS_COUNT;

	@Parameter(names = {"-r", "--no-res"}, description = "do not decode resources")
	protected boolean skipResources = false;

	@Parameter(names = {"-s", "--no-src"}, description = "do not decompile source code")
	protected boolean skipSources = false;

	@Parameter(names = {"-e", "--export-gradle"}, description = "save as android gradle project")
	protected boolean exportAsGradleProject = false;

	@Parameter(names = {"--show-bad-code"}, description = "show inconsistent code (incorrectly decompiled)")
	protected boolean showInconsistentCode = false;

	@Parameter(names = {"--no-imports"}, converter = InvertedBooleanConverter.class,
			description = "disables use of imports, always writes entire package name")
	protected boolean useImports = true;

	@Parameter(names = "--no-replace-consts", converter = InvertedBooleanConverter.class,
			description = "don't replace constant value with matching constant field")
	protected boolean replaceConsts = true;

	@Parameter(names = {"--escape-unicode"}, description = "escape non latin characters in strings (with \\u)")
	protected boolean escapeUnicode = false;

	@Parameter(names = {"--deobf"}, description = "activate deobfuscation")<commit_msg>Update JadxCLIArgs.java<commit_after>package jadx.cli;

import java.io.File;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import com.beust.jcommander.IStringConverter;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterDescription;
import com.beust.jcommander.ParameterException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jadx.api.IJadxArgs;
import jadx.api.JadxDecompiler;
import jadx.core.utils.exceptions.JadxException;

public class JadxCLIArgs implements IJadxArgs {

	protected static final int DEFAULT_THREADS_COUNT = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);

	@Parameter(description = "<input file> (.dex, .apk, .jar or .class)")
	protected List<String> files;

	@Parameter(names = {"-d", "--output-dir"}, description = "output directory")
	protected String outDirName;

	@Parameter(names = {"-j", "--threads-count"}, description = "processing threads count")
	protected int threadsCount = DEFAULT_THREADS_COUNT;

	@Parameter(names = {"-r", "--no-res"}, description = "do not decode resources")
	protected boolean skipResources = false;

	@Parameter(names = {"-s", "--no-src"}, description = "do not decompile source code")
	protected boolean skipSources = false;

	@Parameter(names = {"-e", "--export-gradle"}, description = "save as android gradle project")
	protected boolean exportAsGradleProject = false;

	@Parameter(names = {"--show-bad-code"}, description = "show inconsistent code (incorrectly decompiled)")
	protected boolean showInconsistentCode = false;

	@Parameter(names = {"--no-imports"}, converter = InvertedBooleanConverter.class,
			description = "disable use of imports, always write entire package name")
	protected boolean useImports = true;

	@Parameter(names = "--no-replace-consts", converter = InvertedBooleanConverter.class,
			description = "don't replace constant value with matching constant field")
	protected boolean replaceConsts = true;

	@Parameter(names = {"--escape-unicode"}, description = "escape non latin characters in strings (with \\u)")
	protected boolean escapeUnicode = false;

	@Parameter(names = {"--deobf"}, description = "activate deobfuscation")
{'fraction_non_alphanumeric': 0.1277432712215321, 'fraction_numerical': 0.0016563146997929607, 'mean_word_length': 5.572789115646258, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6533540', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1423, 'n_words': 378}