use of org.iobserve.analysis.behavior.karlsruhe.data.ExitElement in project iobserve-analysis by research-iobserve.
the class BranchModelCreator method setExitElement.
/**
* Adds an exit element to the end of the branch sequence of the passed branch.
*
* @param examinedBranch
* receives an exit element at the end of its branch sequence
*/
private void setExitElement(final Branch examinedBranch) {
final ExitElement exitElement = new ExitElement();
exitElement.setAbsoluteCount(1);
examinedBranch.getBranchSequence().add(exitElement);
}
use of org.iobserve.analysis.behavior.karlsruhe.data.ExitElement 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