+ }
+
+ private void computeReadSharedDescriptorSet_analyzeMethod(FlatMethod fm,
+ boolean onlyVisitSSJavaLoop) {
+
+ Set<FlatNode> flatNodesToVisit = new HashSet<FlatNode>();
+ Set<FlatNode> visited = new HashSet<FlatNode>();
+
+ if (onlyVisitSSJavaLoop) {
+ flatNodesToVisit.add(ssjavaLoopEntrance);
+ } else {
+ flatNodesToVisit.add(fm);
+ }
+
+ while (!flatNodesToVisit.isEmpty()) {
+ FlatNode fn = flatNodesToVisit.iterator().next();
+ flatNodesToVisit.remove(fn);
+ visited.add(fn);
+
+ computeReadSharedDescriptorSet_nodeActions(fn, onlyVisitSSJavaLoop);
+
+ for (int i = 0; i < fn.numNext(); i++) {
+ FlatNode nn = fn.getNext(i);
+ if (!visited.contains(nn)) {
+ if (!onlyVisitSSJavaLoop || (onlyVisitSSJavaLoop && loopIncElements.contains(nn))) {
+ flatNodesToVisit.add(nn);
+ }
+ }
+ }
+
+ }
+
+ }
+
+ private void computeReadSharedDescriptorSet_nodeActions(FlatNode fn, boolean isSSJavaLoop) {
+
+ TempDescriptor lhs;
+ TempDescriptor rhs;
+ FieldDescriptor fld;
+
+ switch (fn.kind()) {
+ case FKind.FlatOpNode: {
+ FlatOpNode fon = (FlatOpNode) fn;
+ lhs = fon.getDest();
+ rhs = fon.getLeft();
+
+ if (fon.getOp().getOp() == Operation.ASSIGN) {
+ if (rhs.getType().isImmutable() && isSSJavaLoop && (!rhs.getSymbol().startsWith("srctmp"))) {
+ // in ssjavaloop, we need to take care about reading local variables!
+ NTuple<Descriptor> rhsHeapPath = new NTuple<Descriptor>();
+ NTuple<Descriptor> lhsHeapPath = new NTuple<Descriptor>();
+ rhsHeapPath.add(LOCAL);
+ addReadDescriptor(rhsHeapPath, rhs);
+ }
+ }
+
+ }
+ break;
+
+ case FKind.FlatFieldNode:
+ case FKind.FlatElementNode: {
+
+ FlatFieldNode ffn = (FlatFieldNode) fn;
+ lhs = ffn.getDst();
+ rhs = ffn.getSrc();
+ fld = ffn.getField();
+
+ // read field
+ NTuple<Descriptor> srcHeapPath = mapHeapPath.get(rhs);
+ NTuple<Descriptor> fldHeapPath = new NTuple<Descriptor>(srcHeapPath.getList());
+ // fldHeapPath.add(fld);
+
+ if (fld.getType().isImmutable()) {
+ addReadDescriptor(fldHeapPath, fld);
+ }
+
+ // propagate rhs's heap path to the lhs
+ mapHeapPath.put(lhs, fldHeapPath);
+
+ }
+ break;
+
+ case FKind.FlatSetFieldNode:
+ case FKind.FlatSetElementNode: {
+
+ FlatSetFieldNode fsfn = (FlatSetFieldNode) fn;
+ lhs = fsfn.getDst();
+ fld = fsfn.getField();
+
+ // write(field)
+ NTuple<Descriptor> lhsHeapPath = computePath(lhs);
+ NTuple<Descriptor> fldHeapPath = new NTuple<Descriptor>(lhsHeapPath.getList());
+ // writeLocation(curr, fldHeapPath, fld, getLocation(fld));
+
+ }
+ break;
+
+ }
+ }
+
+ private boolean hasReadingEffectOnSharedLocation(NTuple<Descriptor> hp, Location loc, Descriptor d) {
+ if (!mapSharedLocation2DescriptorSet.containsKey(loc)) {
+ return false;
+ } else {
+ return mapSharedLocation2DescriptorSet.get(loc).contains(d);
+ }
+ }
+
+ private void addReadDescriptor(NTuple<Descriptor> hp, Descriptor d) {
+
+ Location loc = getLocation(d);
+
+ if (loc != null && ssjava.isSharedLocation(loc)) {
+
+ Set<Descriptor> set = mapSharedLocation2DescriptorSet.get(loc);
+ if (set == null) {
+ set = new HashSet<Descriptor>();
+ mapSharedLocation2DescriptorSet.put(loc, set);
+ }
+ set.add(d);
+ }
+
+ }
+
+ private Location getLocation(Descriptor d) {
+
+ if (d instanceof FieldDescriptor) {
+ return (Location) ((FieldDescriptor) d).getType().getExtension();
+ } else {
+ assert d instanceof TempDescriptor;
+ CompositeLocation comp = (CompositeLocation) ((TempDescriptor) d).getType().getExtension();
+ if (comp == null) {
+ return null;
+ } else {
+ return comp.get(comp.getSize() - 1);
+ }
+ }
+
+ }
+
+ private void writeLocation(ClearingSummary curr, NTuple<Descriptor> hp, Descriptor d) {
+ Location loc = getLocation(d);
+ if (loc != null && hasReadingEffectOnSharedLocation(hp, loc, d)) {
+
+ // 1. add field x to the clearing set
+ SharedStatus state = getState(curr, hp);
+ state.addVar(loc, d);
+
+ // 3. if the set v contains all of variables belonging to the shared
+ // location, set flag to true
+ Set<Descriptor> sharedVarSet = mapSharedLocation2DescriptorSet.get(loc);
+ if (state.getVarSet(loc).containsAll(sharedVarSet)) {
+ state.updateFlag(loc, true);
+ }
+ }
+ }
+
+ private void readLocation(ClearingSummary curr, NTuple<Descriptor> hp, Descriptor d) {
+ // remove reading var x from written set
+ Location loc = getLocation(d);
+ if (loc != null && hasReadingEffectOnSharedLocation(hp, loc, d)) {
+ SharedStatus state = getState(curr, hp);
+ state.removeVar(loc, d);
+ }
+ }
+
+ private SharedStatus getState(ClearingSummary curr, NTuple<Descriptor> hp) {
+ SharedStatus state = curr.get(hp);
+ if (state == null) {
+ state = new SharedStatus();
+ curr.put(hp, state);
+ }
+ return state;
+ }
+
+ private void writtenAnalyis() {
+ // perform second stage analysis: intraprocedural analysis ensure that
+ // all
+ // variables are definitely written in-between the same read
+
+ // First, identify ssjava loop entrace
+ FlatMethod fm = state.getMethodFlat(methodContainingSSJavaLoop);
+ Set<FlatNode> flatNodesToVisit = new HashSet<FlatNode>();
+ flatNodesToVisit.add(fm);
+
+ LoopFinder loopFinder = new LoopFinder(fm);
+
+ while (!flatNodesToVisit.isEmpty()) {
+ FlatNode fn = flatNodesToVisit.iterator().next();
+ flatNodesToVisit.remove(fn);
+
+ String label = (String) state.fn2labelMap.get(fn);
+ if (label != null) {
+
+ if (label.equals(ssjava.SSJAVA)) {
+ ssjavaLoopEntrance = fn;
+ break;
+ }
+ }
+
+ for (int i = 0; i < fn.numNext(); i++) {
+ FlatNode nn = fn.getNext(i);
+ flatNodesToVisit.add(nn);
+ }
+ }
+
+ assert ssjavaLoopEntrance != null;
+
+ // assume that ssjava loop is top-level loop in method, not nested loop
+ Set nestedLoop = loopFinder.nestedLoops();
+ for (Iterator loopIter = nestedLoop.iterator(); loopIter.hasNext();) {
+ LoopFinder lf = (LoopFinder) loopIter.next();
+ if (lf.loopEntrances().iterator().next().equals(ssjavaLoopEntrance)) {
+ ssjavaLoop = lf;
+ }
+ }
+
+ assert ssjavaLoop != null;
+
+ writtenAnalysis_analyzeLoop();
+
+ }
+
+ private void writtenAnalysis_analyzeLoop() {
+
+ Set<FlatNode> flatNodesToVisit = new HashSet<FlatNode>();
+ flatNodesToVisit.add(ssjavaLoopEntrance);
+
+ loopIncElements = (Set<FlatNode>) ssjavaLoop.loopIncElements();
+
+ while (!flatNodesToVisit.isEmpty()) {
+ FlatNode fn = (FlatNode) flatNodesToVisit.iterator().next();
+ flatNodesToVisit.remove(fn);
+
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> prev =
+ definitelyWrittenResults.get(fn);
+
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> curr =
+ new Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>>();
+ for (int i = 0; i < fn.numPrev(); i++) {
+ FlatNode nn = fn.getPrev(i);
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> dwIn =
+ definitelyWrittenResults.get(nn);
+ if (dwIn != null) {
+ merge(curr, dwIn);
+ }
+ }
+
+ writtenAnalysis_nodeAction(fn, curr, ssjavaLoopEntrance);
+
+ // if a new result, schedule forward nodes for analysis
+ if (!curr.equals(prev)) {
+ definitelyWrittenResults.put(fn, curr);
+
+ for (int i = 0; i < fn.numNext(); i++) {
+ FlatNode nn = fn.getNext(i);
+ if (loopIncElements.contains(nn)) {
+ flatNodesToVisit.add(nn);
+ }
+
+ }
+ }
+ }
+ }
+
+ private void writtenAnalysis_nodeAction(FlatNode fn,
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> curr, FlatNode loopEntrance) {
+
+ if (fn.equals(loopEntrance)) {
+ // it reaches loop entrance: changes all flag to true
+ Set<NTuple<Descriptor>> keySet = curr.keySet();
+ for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> key = (NTuple<Descriptor>) iterator.next();
+ Hashtable<FlatNode, Boolean> pair = curr.get(key);
+ if (pair != null) {
+ Set<FlatNode> pairKeySet = pair.keySet();
+ for (Iterator iterator2 = pairKeySet.iterator(); iterator2.hasNext();) {
+ FlatNode pairKey = (FlatNode) iterator2.next();
+ pair.put(pairKey, Boolean.TRUE);
+ }
+ }
+ }
+ } else {
+ TempDescriptor lhs;
+ TempDescriptor rhs;
+ FieldDescriptor fld;
+
+ switch (fn.kind()) {
+ case FKind.FlatOpNode: {
+ FlatOpNode fon = (FlatOpNode) fn;
+ lhs = fon.getDest();
+ rhs = fon.getLeft();
+
+ NTuple<Descriptor> rhsHeapPath = computePath(rhs);
+ if (!rhs.getType().isImmutable()) {
+ mapHeapPath.put(lhs, rhsHeapPath);
+ } else {
+ if (fon.getOp().getOp() == Operation.ASSIGN) {
+ // read(rhs)
+ readValue(fn, rhsHeapPath, curr);
+ }
+ // write(lhs)
+ NTuple<Descriptor> lhsHeapPath = computePath(lhs);
+ removeHeapPath(curr, lhsHeapPath);
+ }
+ }
+ break;
+
+ case FKind.FlatLiteralNode: {
+ FlatLiteralNode fln = (FlatLiteralNode) fn;
+ lhs = fln.getDst();
+
+ // write(lhs)
+ NTuple<Descriptor> lhsHeapPath = computePath(lhs);
+ removeHeapPath(curr, lhsHeapPath);
+
+ }
+ break;
+
+ case FKind.FlatFieldNode:
+ case FKind.FlatElementNode: {
+
+ if (fn.kind() == FKind.FlatFieldNode) {
+ FlatFieldNode ffn = (FlatFieldNode) fn;
+ lhs = ffn.getDst();
+ rhs = ffn.getSrc();
+ fld = ffn.getField();
+ } else {
+ FlatElementNode fen = (FlatElementNode) fn;
+ lhs = fen.getDst();
+ rhs = fen.getSrc();
+ TypeDescriptor td = rhs.getType().dereference();
+ fld = getArrayField(td);
+ }
+
+ if (fld.isFinal() /* && fld.isStatic() */) {
+ // if field is final and static, no need to check
+ break;
+ }
+
+ // read field
+ NTuple<Descriptor> srcHeapPath = mapHeapPath.get(rhs);
+ NTuple<Descriptor> fldHeapPath = new NTuple<Descriptor>(srcHeapPath.getList());
+ fldHeapPath.add(fld);
+
+ if (fld.getType().isImmutable()) {
+ readValue(fn, fldHeapPath, curr);
+ }
+
+ // propagate rhs's heap path to the lhs
+ mapHeapPath.put(lhs, fldHeapPath);
+
+ }
+ break;
+
+ case FKind.FlatSetFieldNode:
+ case FKind.FlatSetElementNode: {
+
+ if (fn.kind() == FKind.FlatSetFieldNode) {
+ FlatSetFieldNode fsfn = (FlatSetFieldNode) fn;
+ lhs = fsfn.getDst();
+ fld = fsfn.getField();
+ } else {
+ FlatSetElementNode fsen = (FlatSetElementNode) fn;
+ lhs = fsen.getDst();
+ rhs = fsen.getSrc();
+ TypeDescriptor td = lhs.getType().dereference();
+ fld = getArrayField(td);
+ }
+
+ // write(field)
+ NTuple<Descriptor> lhsHeapPath = computePath(lhs);
+ NTuple<Descriptor> fldHeapPath = new NTuple<Descriptor>(lhsHeapPath.getList());
+ fldHeapPath.add(fld);
+ removeHeapPath(curr, fldHeapPath);
+
+ }
+ break;
+
+ case FKind.FlatCall: {
+ FlatCall fc = (FlatCall) fn;
+ bindHeapPathCallerArgWithCaleeParam(fc);
+ // add <hp,statement,false> in which hp is an element of
+ // READ_bound set
+ // of callee: callee has 'read' requirement!
+
+
+ for (Iterator iterator = calleeUnionBoundReadSet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> read = (NTuple<Descriptor>) iterator.next();
+ Hashtable<FlatNode, Boolean> gen = curr.get(read);
+ if (gen == null) {
+ gen = new Hashtable<FlatNode, Boolean>();
+ curr.put(read, gen);
+ }
+ Boolean currentStatus = gen.get(fn);
+ if (currentStatus == null) {
+ gen.put(fn, Boolean.FALSE);
+ } else {
+ checkFlag(currentStatus.booleanValue(), fn, read);
+ }
+ }
+
+ // removes <hp,statement,flag> if hp is an element of
+ // OVERWRITE_bound
+ // set of callee. it means that callee will overwrite it
+ for (Iterator iterator = calleeIntersectBoundOverWriteSet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> write = (NTuple<Descriptor>) iterator.next();
+ removeHeapPath(curr, write);
+ }
+ }
+ break;
+
+ }
+ }
+
+ }
+
+ private void readValue(FlatNode fn, NTuple<Descriptor> hp,
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> curr) {
+ Hashtable<FlatNode, Boolean> gen = curr.get(hp);
+ if (gen == null) {
+ gen = new Hashtable<FlatNode, Boolean>();
+ curr.put(hp, gen);
+ }
+ Boolean currentStatus = gen.get(fn);
+ if (currentStatus == null) {
+ gen.put(fn, Boolean.FALSE);
+ } else {
+ checkFlag(currentStatus.booleanValue(), fn, hp);
+ }
+
+ }
+
+ private void removeHeapPath(Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> curr,
+ NTuple<Descriptor> hp) {
+
+ // removes all of heap path that starts with prefix 'hp'
+ // since any reference overwrite along heap path gives overwriting side
+ // effects on the value
+
+ Set<NTuple<Descriptor>> keySet = curr.keySet();
+ for (Iterator<NTuple<Descriptor>> iter = keySet.iterator(); iter.hasNext();) {
+ NTuple<Descriptor> key = iter.next();
+ if (key.startsWith(hp)) {
+ curr.put(key, new Hashtable<FlatNode, Boolean>());
+ }
+ }
+
+ }
+
+ private void bindHeapPathCallerArgWithCaleeParam(FlatCall fc) {
+ // compute all possible callee set
+ // transform all READ/OVERWRITE set from the any possible
+ // callees to the
+ // caller
+ calleeUnionBoundReadSet.clear();
+ calleeIntersectBoundOverWriteSet.clear();
+
+ MethodDescriptor mdCallee = fc.getMethod();
+ FlatMethod fmCallee = state.getMethodFlat(mdCallee);
+ Set<MethodDescriptor> setPossibleCallees = new HashSet<MethodDescriptor>();
+ TypeDescriptor typeDesc = fc.getThis().getType();
+ setPossibleCallees.addAll(callGraph.getMethods(mdCallee, typeDesc));
+
+ // create mapping from arg idx to its heap paths
+ Hashtable<Integer, NTuple<Descriptor>> mapArgIdx2CallerArgHeapPath =
+ new Hashtable<Integer, NTuple<Descriptor>>();
+
+ // arg idx is starting from 'this' arg
+ NTuple<Descriptor> thisHeapPath = mapHeapPath.get(fc.getThis());
+ if (thisHeapPath == null) {
+ // method is called without creating new flat node representing 'this'
+ thisHeapPath = new NTuple<Descriptor>();
+ thisHeapPath.add(fc.getThis());
+ }
+
+ mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(0), thisHeapPath);
+
+ for (int i = 0; i < fc.numArgs(); i++) {
+ TempDescriptor arg = fc.getArg(i);
+ NTuple<Descriptor> argHeapPath = computePath(arg);
+ mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(i + 1), argHeapPath);
+ }
+
+ for (Iterator iterator = setPossibleCallees.iterator(); iterator.hasNext();) {
+ MethodDescriptor callee = (MethodDescriptor) iterator.next();
+ FlatMethod calleeFlatMethod = state.getMethodFlat(callee);
+
+ // binding caller's args and callee's params
+
+ Set<NTuple<Descriptor>> calleeReadSet = mapFlatMethodToRead.get(calleeFlatMethod);
+ if (calleeReadSet == null) {
+ calleeReadSet = new HashSet<NTuple<Descriptor>>();
+ mapFlatMethodToRead.put(calleeFlatMethod, calleeReadSet);
+ }
+ Set<NTuple<Descriptor>> calleeOverWriteSet = mapFlatMethodToOverWrite.get(calleeFlatMethod);
+ if (calleeOverWriteSet == null) {
+ calleeOverWriteSet = new HashSet<NTuple<Descriptor>>();
+ mapFlatMethodToOverWrite.put(calleeFlatMethod, calleeOverWriteSet);
+ }
+
+ Hashtable<Integer, TempDescriptor> mapParamIdx2ParamTempDesc =
+ new Hashtable<Integer, TempDescriptor>();
+ for (int i = 0; i < calleeFlatMethod.numParameters(); i++) {
+ TempDescriptor param = calleeFlatMethod.getParameter(i);
+ mapParamIdx2ParamTempDesc.put(Integer.valueOf(i), param);
+ }
+
+ Set<NTuple<Descriptor>> calleeBoundReadSet =
+ bindSet(calleeReadSet, mapParamIdx2ParamTempDesc, mapArgIdx2CallerArgHeapPath);
+ // union of the current read set and the current callee's
+ // read set
+ calleeUnionBoundReadSet.addAll(calleeBoundReadSet);
+ Set<NTuple<Descriptor>> calleeBoundWriteSet =
+ bindSet(calleeOverWriteSet, mapParamIdx2ParamTempDesc, mapArgIdx2CallerArgHeapPath);
+ // intersection of the current overwrite set and the current
+ // callee's
+ // overwrite set
+ merge(calleeIntersectBoundOverWriteSet, calleeBoundWriteSet);
+ }
+
+ }
+
+ private void checkFlag(boolean booleanValue, FlatNode fn, NTuple<Descriptor> hp) {
+ if (booleanValue) {
+ throw new Error(
+ "There is a variable, which is reachable through references "
+ + hp
+ + ", who comes back to the same read statement without being overwritten at the out-most iteration at "
+ + methodContainingSSJavaLoop.getClassDesc().getSourceFileName() + "::"
+ + fn.getNumLine());
+ }
+ }
+
+ private void merge(Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> curr,
+ Hashtable<NTuple<Descriptor>, Hashtable<FlatNode, Boolean>> in) {
+
+ Set<NTuple<Descriptor>> inKeySet = in.keySet();
+ for (Iterator iterator = inKeySet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> inKey = (NTuple<Descriptor>) iterator.next();
+ Hashtable<FlatNode, Boolean> inPair = in.get(inKey);
+
+ Set<FlatNode> pairKeySet = inPair.keySet();
+ for (Iterator iterator2 = pairKeySet.iterator(); iterator2.hasNext();) {
+ FlatNode pairKey = (FlatNode) iterator2.next();
+ Boolean inFlag = inPair.get(pairKey);
+
+ Hashtable<FlatNode, Boolean> currPair = curr.get(inKey);
+ if (currPair == null) {
+ currPair = new Hashtable<FlatNode, Boolean>();
+ curr.put(inKey, currPair);
+ }
+
+ Boolean currFlag = currPair.get(pairKey);
+ // by default, flag is set by false
+ if (currFlag == null) {
+ currFlag = Boolean.FALSE;
+ }
+ currFlag = Boolean.valueOf(inFlag.booleanValue() | currFlag.booleanValue());
+ currPair.put(pairKey, currFlag);
+ }
+
+ }
+
+ }
+
+ private void methodReadOverWriteAnalysis() {
+ // perform method READ/OVERWRITE analysis
+ Set<MethodDescriptor> methodDescriptorsToAnalyze = new HashSet<MethodDescriptor>();
+ methodDescriptorsToAnalyze.addAll(ssjava.getAnnotationRequireSet());
+
+ sortedDescriptors = topologicalSort(methodDescriptorsToAnalyze);
+
+ LinkedList<MethodDescriptor> descriptorListToAnalyze =
+ (LinkedList<MethodDescriptor>) sortedDescriptors.clone();
+
+ // no need to analyze method having ssjava loop
+ // methodContainingSSJavaLoop = descriptorListToAnalyze.removeFirst();
+ methodContainingSSJavaLoop = ssjava.getMethodContainingSSJavaLoop();
+
+ // current descriptors to visit in fixed-point interprocedural analysis,
+ // prioritized by
+ // dependency in the call graph
+ methodDescriptorsToVisitStack.clear();
+
+ Set<MethodDescriptor> methodDescriptorToVistSet = new HashSet<MethodDescriptor>();
+ methodDescriptorToVistSet.addAll(descriptorListToAnalyze);
+
+ while (!descriptorListToAnalyze.isEmpty()) {
+ MethodDescriptor md = descriptorListToAnalyze.removeFirst();
+ methodDescriptorsToVisitStack.add(md);
+ }
+
+ // analyze scheduled methods until there are no more to visit
+ while (!methodDescriptorsToVisitStack.isEmpty()) {
+ // start to analyze leaf node
+ MethodDescriptor md = methodDescriptorsToVisitStack.pop();
+ FlatMethod fm = state.getMethodFlat(md);
+
+ Set<NTuple<Descriptor>> readSet = new HashSet<NTuple<Descriptor>>();
+ Set<NTuple<Descriptor>> overWriteSet = new HashSet<NTuple<Descriptor>>();
+
+ methodReadOverWrite_analyzeMethod(fm, readSet, overWriteSet);
+
+ Set<NTuple<Descriptor>> prevRead = mapFlatMethodToRead.get(fm);
+ Set<NTuple<Descriptor>> prevOverWrite = mapFlatMethodToOverWrite.get(fm);
+
+ if (!(readSet.equals(prevRead) && overWriteSet.equals(prevOverWrite))) {
+ mapFlatMethodToRead.put(fm, readSet);
+ mapFlatMethodToOverWrite.put(fm, overWriteSet);
+
+ // results for callee changed, so enqueue dependents caller for
+ // further
+ // analysis
+ Iterator<MethodDescriptor> depsItr = getDependents(md).iterator();
+ while (depsItr.hasNext()) {
+ MethodDescriptor methodNext = depsItr.next();
+ if (!methodDescriptorsToVisitStack.contains(methodNext)
+ && methodDescriptorToVistSet.contains(methodNext)) {
+ methodDescriptorsToVisitStack.add(methodNext);
+ }
+
+ }
+
+ }