Skip to content

Commit f58a917

Browse files
committed
Slight modifications for #103.
1 parent f377aca commit f58a917

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/StreamStateMachine.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,16 @@ public void start() throws IOException, CoreException, CallGraphBuilderCancelExc
276276
// get the supergraph for the instance result.
277277
ICFGSupergraph supergraph = instanceResult.getSupergraph();
278278

279-
// FIXME This doesn't make a whole lot of sense. Only looking at
280-
// the node of where the stream was declared: TODO: Can this be
281-
// somehow rewritten to get blocks corresponding to terminal
282-
// operations?
283-
Iterator<CGNode> cgNodes = this.getStream().getAnalysisEngine().getCallGraph().iterator();
284-
for (;cgNodes.hasNext();) {
285-
CGNode cgNode = cgNodes.next();
279+
// TODO: Can this be somehow rewritten to get blocks
280+
// corresponding to terminal operations?
281+
// for each call graph node in the call graph.
282+
for (CGNode cgNode : engine.getCallGraph()) {
283+
// for each call site in the call graph node.
286284
for (Iterator<CallSiteReference> callSites = cgNode.iterateCallSites(); callSites.hasNext();) {
285+
// get the call site reference.
287286
CallSiteReference callSiteReference = callSites.next();
287+
288+
// get the (declared) called method at the call site.
288289
MethodReference calledMethod = callSiteReference.getDeclaredTarget();
289290

290291
// is it a terminal operation? TODO: Should this be

0 commit comments

Comments
 (0)