use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.
the class GetGraphs method main.
public static void main(final String[] args) throws JsonParseException, JsonMappingException, IOException {
File file = new File(args[0]);
CauseSearchData data = Constants.OBJECTMAPPER.readValue(file, CauseSearchData.class);
MeasuredValues values = data.getNodes().getValues();
printValues(data, values);
}
use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.
the class TestVersionPair method getChangedNodes.
public List<MeasuredNode> getChangedNodes() {
final MeasuredNode[] nodes = new MeasuredNode[datas.size()];
int i = 0;
for (final CauseSearchData data : datas) {
nodes[i++] = data.getNodes();
}
final List<MeasuredNode> changed = getChangedNodes(nodes);
return changed;
}
use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.
the class TreeAnalysis method getAllTreeData.
private static void getAllTreeData(final File treesFolder, final TestVersionPairManager manager) throws IOException, JsonParseException, JsonMappingException {
for (final File resultFolder : treesFolder.listFiles()) {
File treeFolder = new File(resultFolder, "peass" + File.separator + "rca" + File.separator + "tree");
final File treeFolder2 = new File(resultFolder, File.separator + "rca" + File.separator + "tree");
if (treeFolder2.isDirectory()) {
treeFolder = treeFolder2;
}
if (treeFolder.isDirectory()) {
final File versionFolder = treeFolder.listFiles()[0];
if (versionFolder.getName().startsWith("4ed")) {
final File testcaseFolder = versionFolder.listFiles()[0];
for (final File treeJson : testcaseFolder.listFiles((FileFilter) new WildcardFileFilter("*.json"))) {
if (treeJson.getName().contains("testFoldedHeaders")) {
System.out.println("Folder: " + treeJson.getAbsolutePath());
final CauseSearchData data = Constants.OBJECTMAPPER.readValue(treeJson, CauseSearchData.class);
manager.addData(data);
}
}
}
} else {
System.out.println("Not analyzable: " + treeFolder.getAbsolutePath());
}
}
}
use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.
the class VisualizeRegularMeasurement method createEmptyData.
private CauseSearchData createEmptyData(final List<String> versions, final TestCase testcase) {
CauseSearchData data2 = new CauseSearchData();
data2.setCauseConfig(new CauseSearcherConfig(testcase, false, 1.0, false, false, null, 1));
data2.setConfig(new MeasurementConfig(2, versions.get(0), versions.get(1)));
return data2;
}
use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.
the class VisualizeRegularMeasurement method visualizeNode.
private void visualizeNode(final List<String> versions, final TestCase testcase, final GraphNode node) throws IOException, JsonProcessingException, FileNotFoundException, JAXBException {
File destFolder = new File(resultFolder, versions.get(0));
GraphNode emptyNode = new GraphNode(testcase.getExecutable(), "void " + testcase.getExecutable().replace("#", ".") + "()", CauseSearchData.ADDED);
emptyNode.setName(testcase.getExecutable());
CauseSearchData data2 = createEmptyData(versions, testcase);
HTMLWriter htmlWriter = new HTMLWriter(emptyNode, data2, destFolder, null, node);
htmlWriter.writeHTML();
}
Aggregations