use of org.iobserve.analysis.userbehavior.data.CallElement in project iobserve-analysis by research-iobserve.
the class BranchModelCreator method setBranchSequence.
/**
* Sets the passed events as branch sequence of the passed branch. The sequenceStartIndex
* defines at which position of the passed events the branch sequence starts
*
* @param examinedBranch
* for that the branchSequence will be set
* @param events
* represent the sequence to set
* @param sequenceStartIndex
* states at which position of the passed events the branch sequence starts
*/
private void setBranchSequence(final Branch examinedBranch, final List<EntryCallEvent> events, final int sequenceStartIndex) {
final List<ISequenceElement> branchSequence = new ArrayList<>();
for (int j = sequenceStartIndex; j < events.size(); j++) {
final EntryCallEvent callEvent = events.get(j);
final CallElement callElement = new CallElement(callEvent.getClassSignature(), callEvent.getOperationSignature());
callElement.setAbsoluteCount(1);
branchSequence.add(callElement);
}
final ExitElement exitElement = new ExitElement();
exitElement.setAbsoluteCount(1);
branchSequence.add(exitElement);
examinedBranch.setBranchSequence(branchSequence);
}
Aggregations