private static void CheckAnnotationConsistencyForAnnotator(int annotatorId) { var instancesGroupedBySmells = GetAnnotatedInstancesGroupedBySmells(annotatorId); var exporter = new AnnotationConsistencyByMetricsExporter("D:/ccadet/annotations/sanity_check/Output/"); var manovaTest = new ManovaTest.ManovaTest(); var enumerator = instancesGroupedBySmells.GetEnumerator(); while (enumerator.MoveNext()) { var codeSmellGroup = enumerator.Current; var codeSmell = codeSmellGroup.Key.Replace(" ", "_"); exporter.ExportAnnotationsFromAnnotator(annotatorId, codeSmellGroup.ToList(), "SanityCheck_" + codeSmell + "_Annotator_"); manovaTest.SetupTestArguments( "D:/ccadet/annotations/sanity_check/Output/SanityCheck_" + codeSmell + "_Annotator_" + annotatorId + ".xlsx", codeSmellGroup.First().MetricFeatures.Keys.ToList(), "Annotation"); manovaTest.RunTest(); } }
private static void CheckAnnotationConsistencyBetweenAnnotatorsForSeverity(int severity) { var dataGroupedBySmells = GetAnnotatedInstancesGroupedBySmells(annotatorId: null); var exporter = new AnnotationConsistencyByMetricsExporter("D:/ccadet/annotations/sanity_check/Output/"); var manovaTest = new ManovaTest.ManovaTest(); var enumerator = dataGroupedBySmells.GetEnumerator(); while (enumerator.MoveNext()) { var codeSmellGroup = enumerator.Current; var codeSmell = codeSmellGroup.Key.Replace(" ", "_"); exporter.ExportAnnotatorsForSeverity(severity, codeSmellGroup.ToList(), "SanityCheck_" + codeSmell + "_Severity_"); manovaTest.SetupTestArguments( "D:/ccadet/annotations/sanity_check/Output/SanityCheck_" + codeSmell + "_Severity_" + severity + ".xlsx", codeSmellGroup.First().MetricFeatures.Keys.ToList(), "Annotator"); manovaTest.RunTest(); } }