use of de.dagere.peass.analysis.guessing.Guess in project peass by DaGeRe.
the class GuessClassificationsByRules method guessVersion.
private void guessVersion(final Classification manual, final Entry<String, ChangeProperties> version) throws IOException {
File versionFolder = new File(methodFileFolder, version.getKey());
for (Entry<String, List<ChangeProperty>> testcase : version.getValue().getProperties().entrySet()) {
GuessDecider guesser = new GuessDecider(versionFolder);
for (ChangeProperty property : testcase.getValue()) {
all++;
if (version.getKey().equals("4ed6e923cb2033272fcb993978d69e325990a5aa")) {
System.err.println();
}
Guess guess = guesser.guess(property.getAffectedMethods());
testStructuralChanges(guesser, property, guess);
if (guess != null) {
VersionClass versionClass = manual.getVersions().get(version.getKey());
if (versionClass != null) {
ChangedEntity entity = new ChangedEntity(testcase.getKey(), "", property.getMethod());
TestcaseClass testcaseClass = versionClass.getTestcases().get(entity);
if (testcaseClass != null) {
checkCorrectness(guess, testcaseClass, version.getKey(), entity);
} else {
LOG.error("In version {}, Testcase {} is missing - changes not consistent with properties!", version.getKey(), testcase);
}
} else {
LOG.error("Version {} is missing - changes not consistent with properties!", version.getKey());
}
}
}
}
}
Aggregations