diff --git a/src/org/ntlab/deltaViewer/CollaborationViewer.java b/src/org/ntlab/deltaViewer/CollaborationViewer.java index c47b7e7..ed2b958 100644 --- a/src/org/ntlab/deltaViewer/CollaborationViewer.java +++ b/src/org/ntlab/deltaViewer/CollaborationViewer.java @@ -138,6 +138,32 @@ // Make ObjectEdge and reset position of vertexObject, remove vertexMethodExecution. Statement statement = relatedPoint.getStatement(); MethodExecution prevMethodExec = prevAlias.getMethodExecution(); + if (relatedPoint.isMethodEntry()) { + if (prevAlias.getAliasType() == Alias.AliasType.FORMAL_PARAMETER) { + // this to another (parameter) + MethodExecution calledMethodExec = relatedPoint.getMethodExecution(); + String srcClassName = calledMethodExec.getThisClassName(); + String srcObjId = calledMethodExec.getThisObjId(); + String tgtObjId = prevAlias.getObjectId(); + ObjectVertex tgtObjectVertex = objectToVertexMap.get(tgtObjId); + + createObjectRefrence(srcClassName, srcObjId, tgtObjId); + if (methodExecToVertexMap.containsKey(prevMethodExec)) { + if (methodExecToVertexMap.get(prevMethodExec).getLocals().contains(tgtObjectVertex)) { + methodExecToVertexMap.get(prevMethodExec).getLocals().remove(tgtObjectVertex); + System.out.println(methodExecToVertexMap.get(prevMethodExec).getLabel() + " :removeLocal: " + tgtObjectVertex.getLabel()); + } else if (methodExecToVertexMap.get(prevMethodExec).getArguments().contains(tgtObjectVertex)) { + methodExecToVertexMap.get(prevMethodExec).getArguments().remove(tgtObjectVertex); + System.out.println(methodExecToVertexMap.get(prevMethodExec).getLabel() + " :removeArgument: " + tgtObjectVertex.getLabel()); + } + } + if (nextAlias == null || (nextAlias != null && !calledMethodExec.getSignature().equals(nextAlias.getMethodSignature()))) { + removeCalledMethodExecutionVertex(objectToVertexMap.get(srcObjId), prevMethodExec, calledMethodExec); + updateObjectVertices(); + } + return; + } + } if(statement instanceof FieldUpdate) { // Format fieldName. FieldUpdate fieldUpdateStatement = (FieldUpdate) statement;