AnalyzeFunctionMetricsCompositeCalibration

data class AnalyzeFunctionMetricsCompositeCalibration(val weightCognitiveComplexity: Double = 0.1, val weightBranches: Double = 0.55, val weightStatements: Double = 0.1, val weightLines: Double = 0.1, val weightParameters: Double = 0.1, val weightVariables: Double = 0.05, val scaleCognitiveComplexity: Double = defaultFunctionLowToMediumThreshold("cognitiveComplexity"), val scaleBranches: Double = defaultFunctionLowToMediumThreshold("branches"), val scaleStatements: Double = defaultFunctionLowToMediumThreshold("statements"), val scaleLines: Double = defaultFunctionLowToMediumThreshold("lines"), val scaleParameters: Double = defaultFunctionLowToMediumThreshold("parameters"), val scaleVariables: Double = defaultFunctionLowToMediumThreshold("variables"), val weightRecommendedTestsCognitiveComplexity: Double = 0.15, val weightRecommendedTestsBranches: Double = 0.7, val weightRecommendedTestsParameters: Double = 0.15, val scaleRecommendedTestsCognitiveComplexity: Double = 2.0, val scaleRecommendedTestsBranches: Double = 1.0, val scaleRecommendedTestsParameters: Double = 0.5, val scoreGain: Double = 1.0, val scoreOffset: Double = 0.0, val minimumRecommendedTests: Int = 1)

Calibration model used to derive per-function NEXY (Normalized Engineering compleXY).

weight* controls relative importance between metrics. scale* is the raw low-to-medium reference point for that metric at function scope. The default scale values match the function-level thresholds in ComplexityMetrics; in that default mode the default lognormal NEXY model is used (P25 -> NEXY 25, P75 -> NEXY 75, P98 -> NEXY 98). If a caller overrides a scale without providing a full threshold profile, that custom scale is used as the linear low-to-medium calibration point.

scoreGain and scoreOffset are currently ignored.

Constructors

constructor(weightCognitiveComplexity: Double = 0.1, weightBranches: Double = 0.55, weightStatements: Double = 0.1, weightLines: Double = 0.1, weightParameters: Double = 0.1, weightVariables: Double = 0.05, scaleCognitiveComplexity: Double = defaultFunctionLowToMediumThreshold("cognitiveComplexity"), scaleBranches: Double = defaultFunctionLowToMediumThreshold("branches"), scaleStatements: Double = defaultFunctionLowToMediumThreshold("statements"), scaleLines: Double = defaultFunctionLowToMediumThreshold("lines"), scaleParameters: Double = defaultFunctionLowToMediumThreshold("parameters"), scaleVariables: Double = defaultFunctionLowToMediumThreshold("variables"), weightRecommendedTestsCognitiveComplexity: Double = 0.15, weightRecommendedTestsBranches: Double = 0.7, weightRecommendedTestsParameters: Double = 0.15, scaleRecommendedTestsCognitiveComplexity: Double = 2.0, scaleRecommendedTestsBranches: Double = 1.0, scaleRecommendedTestsParameters: Double = 0.5, scoreGain: Double = 1.0, scoreOffset: Double = 0.0, minimumRecommendedTests: Int = 1)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Generated with STIG