diff --git a/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractorJSON.java b/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractorJSON.java index 16be00d..4b1b293 100644 --- a/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractorJSON.java +++ b/org.ntlab.traceAnalyzer/src/org/ntlab/deltaExtractor/DeltaExtractorJSON.java @@ -592,24 +592,50 @@ Reference r; if (methodExecution.isCollectionType()) { if (objectId != null) { - // �R���N�V�����^�̏ꍇ�A�����ŌX�̗v�f�𒼐ڕێ����Ă���Ɖ��肷�� - if (objectId.equals(srcObject.getId())) { - r = new Reference(thisObj, srcObject); - r.setCollection(true); - eStructure.addSrcSide(r); - srcObject = thisObj; - aliasCollector.changeTrackingObject(objectId, thisObjectId, true); - aliasCollector.addAlias(new Alias(Alias.AliasType.THIS, 0, thisObjectId, tracePoint.duplicate())); - } else if(objectId.equals(dstObject.getId())) { - r = new Reference(thisObj, dstObject); - r.setCollection(true); - eStructure.addDstSide(r); - dstObject =thisObj; - aliasCollector.changeTrackingObject(objectId, thisObjectId, false); - aliasCollector.addAlias(new Alias(Alias.AliasType.THIS, 0, thisObjectId, tracePoint.duplicate())); + if (methodExecution.getSignature().contains("Collections.unmodifiable") + || methodExecution.getSignature().startsWith("Collections.checked") + || methodExecution.getSignature().startsWith("Collections.synchronized") + || methodExecution.getSignature().startsWith("Arrays.asList") + || methodExecution.getSignature().startsWith("Arrays.copyOf")) { + // �z���R���N�V�����̊Ԃ̕ϊ��̏ꍇ�A�ϊ����̑������Ɉˑ����� + if (arguments.size() > 0) { + if (objectId.equals(srcObject.getId())) { + r = new Reference(arguments.get(0), srcObject); + r.setCollection(true); + eStructure.addSrcSide(r); + srcObject = arguments.get(0); + aliasCollector.changeTrackingObject(objectId, arguments.get(0).getId(), true); + aliasCollector.addAlias(new Alias(Alias.AliasType.FORMAL_PARAMETER, 0, arguments.get(0).getId(), tracePoint.duplicate())); + } else if(objectId.equals(dstObject.getId())) { + r = new Reference(arguments.get(0), dstObject); + r.setCollection(true); + eStructure.addDstSide(r); + dstObject =arguments.get(0); + aliasCollector.changeTrackingObject(objectId, arguments.get(0).getId(), false); + aliasCollector.addAlias(new Alias(Alias.AliasType.FORMAL_PARAMETER, 0, arguments.get(0).getId(), tracePoint.duplicate())); + } + } + objList.set(index, arguments.get(0).getId()); + } else { + // �R���N�V�����^�̏ꍇ�A�����ŌX�̗v�f�𒼐ڕێ����Ă���Ɖ��肷�� + if (objectId.equals(srcObject.getId())) { + r = new Reference(thisObj, srcObject); + r.setCollection(true); + eStructure.addSrcSide(r); + srcObject = thisObj; + aliasCollector.changeTrackingObject(objectId, thisObjectId, true); + aliasCollector.addAlias(new Alias(Alias.AliasType.THIS, 0, thisObjectId, tracePoint.duplicate())); + } else if(objectId.equals(dstObject.getId())) { + r = new Reference(thisObj, dstObject); + r.setCollection(true); + eStructure.addDstSide(r); + dstObject =thisObj; + aliasCollector.changeTrackingObject(objectId, thisObjectId, false); + aliasCollector.addAlias(new Alias(Alias.AliasType.THIS, 0, thisObjectId, tracePoint.duplicate())); + } + objList.set(index, methodExecution.getThisObjId()); } } - objList.set(index, methodExecution.getThisObjId()); isResolved = true; // �K�v�Ȃ̂ł�? }