All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.puresoltechnologies.purifinity.server.metrics.halstead.HalsteadMetricEvaluatorParameter Maven / Gradle / Ivy

package com.puresoltechnologies.purifinity.server.metrics.halstead;

import java.util.HashSet;
import java.util.Set;

import com.puresoltechnologies.commons.domain.LevelOfMeasurement;
import com.puresoltechnologies.commons.domain.ParameterWithArbitraryUnit;
import com.puresoltechnologies.parsers.source.SourceCodeLocation;
import com.puresoltechnologies.purifinity.analysis.domain.CodeRangeType;
import com.puresoltechnologies.purifinity.evaluation.api.CodeRangeNameParameter;
import com.puresoltechnologies.purifinity.evaluation.api.CodeRangeTypeParameter;
import com.puresoltechnologies.purifinity.evaluation.api.QualityLevelParameter;
import com.puresoltechnologies.purifinity.evaluation.api.SourceCodeLocationParameter;
import com.puresoltechnologies.purifinity.evaluation.api.SourceCodeQualityParameter;
import com.puresoltechnologies.purifinity.evaluation.domain.QualityLevel;
import com.puresoltechnologies.purifinity.evaluation.domain.SourceCodeQuality;
import com.puresoltechnologies.purifinity.evaluation.domain.metrics.MetricParameter;

public class HalsteadMetricEvaluatorParameter {

	public static final ParameterWithArbitraryUnit SOURCE_CODE_LOCATION = SourceCodeLocationParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit CODE_RANGE_TYPE = CodeRangeTypeParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit CODE_RANGE_NAME = CodeRangeNameParameter
			.getInstance();
	public static final MetricParameter DIFFERENT_OPERATORS = new MetricParameter(
			"n1", "", LevelOfMeasurement.RATIO, "Number of unique operators",
			Integer.class);
	public static final MetricParameter DIFFERENT_OPERANDS = new MetricParameter(
			"n2", "", LevelOfMeasurement.RATIO, "Number of unique operands",
			Integer.class);
	public static final MetricParameter TOTAL_OPERATORS = new MetricParameter(
			"N1", "", LevelOfMeasurement.RATIO, "Total number of operators",
			Integer.class);
	public static final MetricParameter TOTAL_OPERANDS = new MetricParameter(
			"N2", "", LevelOfMeasurement.RATIO, "Total number of operands",
			Integer.class);
	public static final MetricParameter VOCABULARY_SIZE = new MetricParameter(
			"N", "", LevelOfMeasurement.RATIO, "Program length", Integer.class);
	public static final MetricParameter PROGRAM_LENGTH = new MetricParameter(
			"n", "", LevelOfMeasurement.RATIO, "Vocabulary Size", Integer.class);
	public static final MetricParameter HALSTEAD_LENGTH = new MetricParameter(
			"V", "", LevelOfMeasurement.RATIO, "Halstead volume", Double.class);
	public static final MetricParameter HALSTEAD_VOLUMNE = new MetricParameter(
			"Hl", "", LevelOfMeasurement.RATIO, "Halstead length", Double.class);
	public static final MetricParameter DIFFICULTY = new MetricParameter(
			"D", "", LevelOfMeasurement.RATIO, "Difficulty", Double.class);
	public static final MetricParameter PROGRAM_LEVEL = new MetricParameter(
			"L", "", LevelOfMeasurement.RATIO, "Program level", Double.class);
	public static final MetricParameter IMPLEMENTATION_EFFORT = new MetricParameter(
			"E", "", LevelOfMeasurement.RATIO, "Implementation effort",
			Double.class);
	public static final MetricParameter IMPLEMENTATION_TIME = new MetricParameter(
			"T", "Seconds", LevelOfMeasurement.RATIO, "Implementation time",
			Double.class);
	public static final MetricParameter ESTIMATED_BUGS = new MetricParameter(
			"B", "", LevelOfMeasurement.RATIO, "Number of delivered bugs",
			Double.class);
	public static final ParameterWithArbitraryUnit QUALITY = SourceCodeQualityParameter
			.getInstance();
	public static final ParameterWithArbitraryUnit QUALITY_LEVEL = QualityLevelParameter
			.getInstance();

	public static final Set> ALL = new HashSet<>();
	static {
		ALL.add(DIFFERENT_OPERATORS);
		ALL.add(DIFFERENT_OPERANDS);
		ALL.add(TOTAL_OPERATORS);
		ALL.add(TOTAL_OPERANDS);
		ALL.add(VOCABULARY_SIZE);
		ALL.add(PROGRAM_LENGTH);
		ALL.add(HALSTEAD_LENGTH);
		ALL.add(HALSTEAD_VOLUMNE);
		ALL.add(DIFFICULTY);
		ALL.add(PROGRAM_LEVEL);
		ALL.add(IMPLEMENTATION_EFFORT);
		ALL.add(IMPLEMENTATION_TIME);
		ALL.add(ESTIMATED_BUGS);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy