diff --git a/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractor.java b/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractor.java index 54b2399..47cb66d 100644 --- a/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractor.java +++ b/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractor.java @@ -785,7 +785,7 @@ } /** - * �݌v�ύX��̃A���S���Y���̋N�����\�b�h(������) + * �Q�ƌ��I�u�W�F�N�g�ƎQ�Ɛ�I�u�W�F�N�g���֘A�t�����f���^���A�Q�Ƃ��w�肵�Ē��o���� * @param targetRef �ΏۂƂȂ�Q�� * @param before �T���J�n�g���[�X�|�C���g(������ȑO��T��) * @return ���o���� @@ -795,7 +795,7 @@ } /** - * �݌v�ύX��̃A���S���Y���̋N�����\�b�h(������) + * �Q�ƌ��I�u�W�F�N�g�ƎQ�Ɛ�I�u�W�F�N�g���֘A�t�����f���^���A�Q�Ƃ��w�肵�Ē��o���� * @param targetRef �ΏۂƂȂ�Q�� * @param before �T���J�n�g���[�X�|�C���g(������ȑO��T��) * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i @@ -824,7 +824,7 @@ } /** - * �݌v�ύX��̃A���S���Y���̋N�����\�b�h(������) + * �Q�ƌ��I�u�W�F�N�g�ƎQ�Ɛ�I�u�W�F�N�g���֘A�t�����f���^���A�I�u�W�F�N�g�ԎQ�Ƃ��������ꂽ�g���[�X�|�C���g���w�肵�Ē��o���� * @param creationTracePoint �I�u�W�F�N�g�ԎQ�Ɛ����g���[�X�|�C���g(�t�B�[���h�ւ̑��) * @return ���o���� */ @@ -840,7 +840,7 @@ } /** - * �݌v�ύX��̃A���S���Y���̋N�����\�b�h(������) + * �Q�ƌ��I�u�W�F�N�g�ƎQ�Ɛ�I�u�W�F�N�g���֘A�t�����f���^���A�I�u�W�F�N�g�ԎQ�Ƃ��������ꂽ�g���[�X�|�C���g���w�肵�Ē��o���� * @param creationTracePoint �I�u�W�F�N�g�ԎQ�Ɛ����g���[�X�|�C���g(�t�B�[���h�ւ̑��) * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i * @return ���o���� @@ -877,29 +877,65 @@ return extractSub2(creationTracePoint, objList, aliasCollector); } - public ExtractedStructure extract(TracePoint tracePoint, ObjectReference argObj) { - return extract(tracePoint, argObj, defaultAliasCollector); + /** + * �Ăяo�����I�u�W�F�N�g�ƌĂяo����I�u�W�F�N�g���֘A�t�����f���^���A�Ăяo���惁�\�b�h���s���w�肵�Ē��o���� + * @param calledMethodExecution �Ăяo���惁�\�b�h���s + * @return�@���o���� + */ + public ExtractedStructure extract(MethodExecution calledMethodExecution) { + return extract(calledMethodExecution, defaultAliasCollector); + } + + /** + * �Ăяo�����I�u�W�F�N�g�ƌĂяo����I�u�W�F�N�g���֘A�t�����f���^���A�Ăяo���惁�\�b�h���s���w�肵�Ē��o���� + * @param calledMethodExecution �Ăяo���惁�\�b�h���s + * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i + * @return�@���o���� + */ + public ExtractedStructure extract(MethodExecution calledMethodExecution, IAliasCollector aliasCollector) { + ObjectReference callee = new ObjectReference(calledMethodExecution.getThisObjId(), calledMethodExecution.getThisClassName()); + return extract(calledMethodExecution.getCallerTracePoint(), callee, aliasCollector); } - public ExtractedStructure extract(TracePoint tracePoint, ObjectReference argObj, IAliasCollector aliasCollector) { - MethodExecution methodExecution = tracePoint.getMethodExecution(); + /** + * �����ithis�I�u�W�F�N�g�j�Ǝ��������\�b�h���ŎQ�Ƃ����I�u�W�F�N�g���֘A�t�����f���^�𒊏o���� + * @param thisTracePoint �Q�Ƃ������������_ + * @param anotherObj �Q�Ƃ����I�u�W�F�N�g + * @return ���o���� + */ + public ExtractedStructure extract(TracePoint thisTracePoint, ObjectReference anotherObj) { + return extract(thisTracePoint, anotherObj, defaultAliasCollector); + } + + /** + * �����ithis�I�u�W�F�N�g�j�ƃ��\�b�h���ŎQ�Ƃ��ꂽ�I�u�W�F�N�g���֘A�t�����f���^�𒊏o���� + * @param thisTracePoint �Q�Ƃ������������_ + * @param anotherObj �Q�Ƃ����I�u�W�F�N�g + * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i + * @return ���o���� + */ + public ExtractedStructure extract(TracePoint thisTracePoint, ObjectReference anotherObj, IAliasCollector aliasCollector) { + MethodExecution methodExecution = thisTracePoint.getMethodExecution(); + if (!thisTracePoint.isMethodEntry()) { + thisTracePoint.stepNext(); + } eStructure = new ExtractedStructure(); ArrayList objList = new ArrayList(); String thisObjectId = methodExecution.getThisObjId(); objList.add(thisObjectId); - objList.add(argObj.getId()); + objList.add(anotherObj.getId()); srcObject = new ObjectReference(thisObjectId, methodExecution.getThisClassName(), Trace.getDeclaringType(methodExecution.getSignature(), methodExecution.isConstructor()), Trace.getDeclaringType(methodExecution.getCallerSideSignature(), methodExecution.isConstructor())); - dstObject = argObj; + dstObject = anotherObj; if (DEBUG1) { - System.out.println("extract delta of:" + methodExecution.getSignature() + " -> " + argObj.getActualType() + "(" + argObj.getId() + ")"); + System.out.println("extract delta of:" + methodExecution.getSignature() + " -> " + anotherObj.getActualType() + "(" + anotherObj.getId() + ")"); } - return extractSub2(tracePoint, objList, aliasCollector); + return extractSub2(thisTracePoint, objList, aliasCollector); } - private ExtractedStructure extractSub2(TracePoint creationTracePoint, ArrayList objList, IAliasCollector aliasCollector) { - eStructure.setCreationMethodExecution(creationTracePoint.getMethodExecution()); - MethodExecution coordinator = callerSearch(trace, creationTracePoint, objList, null, aliasCollector); + private ExtractedStructure extractSub2(TracePoint tracePoint, ArrayList objList, IAliasCollector aliasCollector) { + eStructure.setCreationMethodExecution(tracePoint.getMethodExecution()); + MethodExecution coordinator = callerSearch(trace, tracePoint, objList, null, aliasCollector); eStructure.setCoordinator(coordinator); if (DEBUG2) { if (((DeltaAugmentationInfo)coordinator.getAugmentation()).isCoodinator()) {