com.puresoltechnologies.purifinity.server.metrics.sloc.SLOCEvaluatorParameter Maven / Gradle / Ivy
package com.puresoltechnologies.purifinity.server.metrics.sloc;
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 SLOCEvaluatorParameter {
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 PHY_LOC = new MetricParameter(
"phyLOC", "", LevelOfMeasurement.RATIO,
"Number pf physical lines of code.", Integer.class);
public static final MetricParameter PRO_LOC = new MetricParameter(
"proLOC", "", LevelOfMeasurement.RATIO,
"Number of productive lines of code.", Integer.class);
public static final MetricParameter COM_LOC = new MetricParameter(
"comLOC", "", LevelOfMeasurement.RATIO,
"Number of comments lines of code.", Integer.class);
public static final MetricParameter BL_LOC = new MetricParameter(
"blLOC", "", LevelOfMeasurement.RATIO,
"Number of blank lines of code.", Integer.class);
public static final MetricParameter MIN = new MetricParameter(
"minLineLength", "", LevelOfMeasurement.RATIO,
"Minimal source code line length.", Integer.class);
public static final MetricParameter MAX = new MetricParameter(
"maxLineLength", "", LevelOfMeasurement.RATIO,
"Maximal source code line length.", Integer.class);
public static final MetricParameter AVG = new MetricParameter(
"avgLineLength", "", LevelOfMeasurement.RATIO,
"Average of source code line lengths.", Double.class);
public static final MetricParameter MEDIAN = new MetricParameter(
"medLineLength", "", LevelOfMeasurement.RATIO,
"Median of source code line lengths.", Double.class);
public static final MetricParameter STD_DEV = new MetricParameter(
"stdDevLineLength", "", LevelOfMeasurement.RATIO,
"Standard deviation of source code line length.", 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(PHY_LOC);
ALL.add(PRO_LOC);
ALL.add(COM_LOC);
ALL.add(BL_LOC);
ALL.add(MIN);
ALL.add(MAX);
ALL.add(AVG);
ALL.add(MEDIAN);
ALL.add(STD_DEV);
}
/**
* Private constructor to avoid instantiation.
*/
private SLOCEvaluatorParameter() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy