diff --git a/src/org/ntlab/deltaExtractor/DeltaExtractor.java b/src/org/ntlab/deltaExtractor/DeltaExtractor.java index ac631ce..5082dd9 100644 --- a/src/org/ntlab/deltaExtractor/DeltaExtractor.java +++ b/src/org/ntlab/deltaExtractor/DeltaExtractor.java @@ -1,6 +1,7 @@ package org.ntlab.deltaExtractor; import java.util.ArrayList; +import java.util.List; import org.ntlab.trace.FieldAccess; import org.ntlab.trace.FieldUpdate; @@ -36,13 +37,18 @@ protected static final boolean DEBUG1 = true; protected static final boolean DEBUG2 = true; - protected final IAliasCollector defaultAliasCollector = new IAliasCollector() { + protected final IAliasTracker defaultAliasCollector = new IAliasTracker() { @Override public void changeTrackingObject(String from, String to, boolean isSrcSide) { } @Override public void addAlias(Alias alias) { } + @Override + public List getAliasList() { + // TODO Auto-generated method stub + return null; + } }; public DeltaExtractor(String traceFile) { @@ -103,7 +109,7 @@ * @return ���‚������R�[�f�B�l�[�^ * @throws TraceFileException */ - protected MethodExecution callerSearch(Trace trace, TracePoint tracePoint, ArrayList objList, MethodExecution childMethodExecution, IAliasCollector aliasCollector) { + protected MethodExecution callerSearch(Trace trace, TracePoint tracePoint, ArrayList objList, MethodExecution childMethodExecution, IAliasTracker aliasCollector) { MethodExecution methodExecution = tracePoint.getMethodExecution(); methodExecution.setAugmentation(new DeltaAugmentationInfo()); eStructure.createParent(methodExecution); @@ -510,7 +516,7 @@ * @param index�@objList���̂ǂ̃I�u�W�F�N�g��ǐՂ��Ă��̃��\�b�h���s�ɓ����Ă����̂� * @throws TraceFileException */ - protected void calleeSearch(Trace trace, TracePoint tracePoint, ArrayList objList, Boolean isStatic, int index, IAliasCollector aliasCollector) { + protected void calleeSearch(Trace trace, TracePoint tracePoint, ArrayList objList, Boolean isStatic, int index, IAliasTracker aliasCollector) { MethodExecution methodExecution = tracePoint.getMethodExecution(); Boolean isResolved = false; String objectId = objList.get(index); // calleeSearch() �ł͒ǐՑΏۂ̃I�u�W�F�N�g�͈�‚����A��objList��index�Ԗڂ̗v�f�ȊO�ύX���Ă͂����Ȃ� @@ -801,7 +807,7 @@ * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i * @return ���o���� */ - public ExtractedStructure extract(Reference targetRef, TracePoint before, IAliasCollector aliasCollector) { + public ExtractedStructure extract(Reference targetRef, TracePoint before, IAliasTracker aliasCollector) { TracePoint creationTracePoint; if (targetRef.isArray()) { // srcId �̔z��� dstId ���������Ă���”\�������郁�\�b�h���s���擾�i�z���p�̏����j @@ -845,7 +851,7 @@ * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i * @return ���o���� */ - public ExtractedStructure extract(TracePoint creationTracePoint, IAliasCollector aliasCollector) { + public ExtractedStructure extract(TracePoint creationTracePoint, IAliasTracker aliasCollector) { creationTracePoint = creationTracePoint.duplicate(); Statement statement = creationTracePoint.getStatement(); if (statement instanceof FieldUpdate) { @@ -856,7 +862,7 @@ } } - private ExtractedStructure extractSub(TracePoint creationTracePoint, Reference targetRef, IAliasCollector aliasCollector) { + private ExtractedStructure extractSub(TracePoint creationTracePoint, Reference targetRef, IAliasTracker aliasCollector) { eStructure = new ExtractedStructure(); eStructure.setRelatedTracePoint(creationTracePoint.duplicate()); ArrayList objList = new ArrayList(); @@ -893,7 +899,7 @@ * @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) { + public ExtractedStructure extract(MethodExecution calledMethodExecution, IAliasTracker aliasCollector) { ObjectReference callee = new ObjectReference(calledMethodExecution.getThisObjId(), calledMethodExecution.getThisClassName()); return extract(calledMethodExecution.getCallerTracePoint(), callee, aliasCollector); } @@ -915,7 +921,7 @@ * @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) { + public ExtractedStructure extract(TracePoint thisTracePoint, ObjectReference anotherObj, IAliasTracker aliasCollector) { eStructure = new ExtractedStructure(); eStructure.setRelatedTracePoint(thisTracePoint.duplicate()); MethodExecution methodExecution = thisTracePoint.getMethodExecution(); @@ -935,7 +941,7 @@ return extractSub2(thisTracePoint, objList, aliasCollector); } - private ExtractedStructure extractSub2(TracePoint tracePoint, ArrayList objList, IAliasCollector aliasCollector) { + private ExtractedStructure extractSub2(TracePoint tracePoint, ArrayList objList, IAliasTracker aliasCollector) { eStructure.setCreationMethodExecution(tracePoint.getMethodExecution()); MethodExecution coordinator = callerSearch(trace, tracePoint, objList, null, aliasCollector); eStructure.setCoordinator(coordinator); @@ -989,7 +995,7 @@ * @param aliasCollector �f���^���o���ɒǐՂ����I�u�W�F�N�g�̑S�G�C���A�X�����W���郊�X�i * @return�@���o���� */ - public ExtractedStructure extract(Object srcObj, Object dstObj, TracePoint before, IAliasCollector aliasCollector) { + public ExtractedStructure extract(Object srcObj, Object dstObj, TracePoint before, IAliasTracker aliasCollector) { Reference targetRef = new Reference(Integer.toString(System.identityHashCode(srcObj)), Integer.toString(System.identityHashCode(dstObj)), null, null); return extract(targetRef, before, aliasCollector); } @@ -1010,7 +1016,7 @@ * @param arg ��������ɂ���Q�Ɛ�I�u�W�F�N�g(���[�J���ϐ�������ɂ��Q�Ɛ�) * @return ���o���� */ - public ExtractedStructure extract(TracePoint tracePoint, Object arg, IAliasCollector aliasCollector) { + public ExtractedStructure extract(TracePoint tracePoint, Object arg, IAliasTracker aliasCollector) { ObjectReference argObj = new ObjectReference(Integer.toString(System.identityHashCode(arg))); return extract(tracePoint, argObj, aliasCollector); }