method StateVertexImpl.getUsedEventables() does not return correct set of used eventables #350

Closed
mehdimir opened this Issue Oct 24, 2013 · 1 comment

Projects

None yet

2 participants

@mehdimir

Method returns an empty list in any situation no matter the state fired some of the eventables or not.
to reproduce this: just run crawljax with postcrawling plugin and get the states of stateflow graph:

    public void postCrawling(CrawlSession session, ExitStatus exitStatus) {
        InMemoryStateFlowGraph sfg = (InMemoryStateFlowGraph) session.getStateFlowGraph();
        for (StateVertex stateVertex : sfg.getAllStates()) {
            System.out.println("vertexname: " + stateVertex.getName());
            ImmutableList<Eventable> usedEventables = stateVertex.getUsedEventables();
            System.out.println(usedEventables.size());

        }
    }

the size is zero all the times. Did I miss something?

@alexnederlof
Member

Nope, you're right. The used eventables aren't filled in. It's a bug.

@alexnederlof alexnederlof added a commit that referenced this issue Nov 7, 2013
@alexnederlof alexnederlof Candidate elements are now set in the state vertex.
Candidate elements are set in the state vertex once the
CandidateElementExtractor has parsed the DOM. This way, you can see
which elements were fired once the crawl is down.

These elemets are CandidateElements not Eventables because if they are
not fired, they are not an Eventable (meaning a link between vertexes).
For that reason, the method `getUsedEventables()` was removed from
StateVertex. To be able to figure out which eventables were fired and
which weren't, you can retreived the edged going out of a state.

Fixes #350
cdffc4b
@amesbah amesbah closed this in #356 Nov 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment