Commit 8e55ee20 authored by Joachim Müssig's avatar Joachim Müssig

Fix bug for disproven summary edges after switching the selected violation

parent 422412e8
......@@ -492,18 +492,16 @@ public class DisproHandler implements ViolationsWrapperListener, SettingsObserve
listViewSummaryEdges.getItems()
.add(edge + " : " + summaryEdge);
}
for (SDGEdge disprovenEdge : violationsWrapper.getChopAndCorrespondingDisprovenSummaryEdges()
.keySet()) {
if (violationsWrapper.getChopAndCorrespondingDisprovenSummaryEdges().get(disprovenEdge)
.equals(this.currentSelectedViolation)) {
// TODO: use data structure to save which su already disproven !
String summaryEdge = allSummaryEdgesAndCorresJavaMethodsCopy.get(e).toString();
listViewSummaryEdges.getItems().add("CLOSED " + edge + " : " + summaryEdge);
}
}
for (SDGEdge disprovenEdge : violationsWrapper.getChopAndCorrespondingDisprovenSummaryEdges().keySet()) {
if (violationsWrapper.getChopAndCorrespondingDisprovenSummaryEdges().get(disprovenEdge)
.equals(this.currentSelectedViolation)) {
String summaryEdge = allSummaryEdgesAndCorresJavaMethodsCopy.get(disprovenEdge).toString();
listViewSummaryEdges.getItems().add("CLOSED " + disprovenEdge + " : " + summaryEdge);
}
}
if (firstSU != null) {
int newIndex = getSUIndex(firstSU);
if(newIndex == -1) {
......
......@@ -519,7 +519,9 @@ public class ViolationsWrapper {
summaryEdgesAndContainingChops.get(e).forEach((vc) -> {
disprovenSummaryEdgesAndCorresChop.put(e, vc);
if (!disprovenSummaryEdgesAndCorresChop.containsKey(e)) {
disprovenSummaryEdgesAndCorresChop.put(e, vc);
}
vc.findSummaryEdges(sdg);
//vc is empty if no path exists between source and sink -> remove violation
if (vc.isEmpty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment