Skip to content

Commit

Permalink
Fix for missing data
Browse files Browse the repository at this point in the history
  • Loading branch information
DaGeRe committed Jan 30, 2025
1 parent 18b78f7 commit 5f8b037
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Stack;

public class SjswCctConverter {
private static final Logger log = LoggerFactory.getLogger(SjswCctConverter.class);
private static final Logger LOG = LoggerFactory.getLogger(SjswCctConverter.class);

public static CallTreeNode convertCallContextTreeToCallTree(StackTraceTreeNode currentBAT, StackTraceTreeNode predecessorBAT, CallTreeNode ctn, String commit, String predecessor, int vms) {
if (commit == null && predecessor == null) {
Expand All @@ -31,7 +31,7 @@ public static CallTreeNode convertCallContextTreeToCallTree(StackTraceTreeNode c
methodNameWithNew,
mConfig);
} else {
createPeassNode(currentBAT, ctn, commit, predecessor, vms, false);
createPeassNode(currentBAT, ctn, commit, vms, false);
ctn = ctn.getChildByKiekerPattern(methodNameWithNew);
}

Expand All @@ -44,7 +44,7 @@ public static CallTreeNode convertCallContextTreeToCallTree(StackTraceTreeNode c

List<StackTraceTreeNode> children = currentBAT.getChildren();
if (children.isEmpty()) {
createPeassNode(currentBAT, ctn, commit, predecessor, vms, true);
createPeassNode(currentBAT, ctn, commit, vms, true);
}
for (StackTraceTreeNode child : children) {
convertCallContextTreeToCallTree(child, predecessorBAT, ctn, commit, predecessor, vms);
Expand Down Expand Up @@ -120,7 +120,7 @@ public static StackTraceTreeNode search(StackTraceTreeNode searchable, StackTrac
}

private static void createPeassNode(StackTraceTreeNode node, CallTreeNode peassNode, String commit,
String oldCommit, int vms, boolean lastNode) {
int vms, boolean lastNode) {
peassNode.initCommitData();

addMeasurements(commit, node, peassNode, vms);
Expand Down Expand Up @@ -202,18 +202,24 @@ public static CallTreeNode createOtherNodeRecursive(StackTraceTreeNode otherNode
methodNameWithNew,
mConfig);
} else {
createPeassNode(otherNode, otherCallTreeNode, predecessor, commit, vms, false);
createPeassNode(otherNode, otherCallTreeNode, predecessor, vms, false);
otherCallTreeNode = otherCallTreeNode.getChildByKiekerPattern(methodNameWithNew);
}

List<StackTraceTreeNode> children = otherNode.getChildren();
if (children.isEmpty()) {
createPeassNode(otherNode, otherCallTreeNode, predecessor, commit, vms, true);
}
for (StackTraceTreeNode child : children) {
createOtherNodeRecursive(child, otherCallTreeNode , vms, predecessor, commit);

if (otherCallTreeNode != null) {
List<StackTraceTreeNode> children = otherNode.getChildren();
if (children.isEmpty()) {
createPeassNode(otherNode, otherCallTreeNode, predecessor, vms, true);
}
for (StackTraceTreeNode child : children) {
createOtherNodeRecursive(child, otherCallTreeNode , vms, predecessor, commit);
}
} else {
LOG.warn("Didn't find other call tree node for " + methodNameWithNew + " (Call: " + call + ")");
}



return otherCallTreeNode;
}
}

0 comments on commit 5f8b037

Please sign in to comment.