1409-1-2

Collection<EStructuralFeature.Setting> find(EObject eObjectOfInterest, Resource resource) { return new UsageCrossReferencer(resource).findUsage(eObjectOfInterest); } /** * Returns a collection of usage references from the specified content tree. * @param eObjectOfInterest the usage target. * @param resourceSet a resource set whose content tree should be considered. * @return a collection of cross references. */ public static Collection<EStructuralFeature.Setting> find(EObject eObjectOfInterest, ResourceSet resourceSet) { return new UsageCrossReferencer(resourceSet).findUsage(eObjectOfInterest); } /** * Returns a collection of usage references from the combined content trees of the specified collection of objects. * @param eObjectOfInterest the usage target. * @param emfObjectsToSearch a collection of objects whose combined content trees should be considered. * @return a collection of cross references. */ public static Collection<EStructuralFeature.Setting> find(EObject eObjectOfInterest, Collection<?> emfObjectsToSearch) { return new UsageCrossReferencer(emfObjectsToSearch).findUsage(eObjectOfInterest); }
Map<EObject, Collection<EStructuralFeature.Setting>> findAll (Collection<?> eObjectsOfInterest, EObject eObject) { return new UsageCrossReferencer(eObject).findAllUsage(eObjectsOfInterest); } /** * Returns a map of usage references from the specified content tree. * @param eObjectsOfInterest a collection of usage targets. * @param resource a resource whose content tree should be considered. * @return a map of cross references. */ public static Map<EObject, Collection<EStructuralFeature.Setting>> findAll (Collection<?> eObjectsOfInterest, Resource resource) { return new UsageCrossReferencer(resource).findAllUsage(eObjectsOfInterest); } /** * Returns a map of usage references from the specified content tree. * @param eObjectsOfInterest a collection of usage targets. * @param resourceSet a resource set whose content tree should be considered. * @return a map of cross references. */ public static Map<EObject, Collection<EStructuralFeature.Setting>> findAll (Collection<?> eObjectsOfInterest, ResourceSet resourceSet) { return new UsageCrossReferencer(resourceSet).findAllUsage(eObjectsOfInterest); }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    Collection<EStructuralFeature.Setting> find(EObject↵

1

    Map<EObject, Collection<EStructuralFeature.Setting>> findAll↵

2

     eObjectOfInterest, Resource resource)↵

2

          (Collection<?> eObjectsOfInterest, EObject eObject)↵

3

        {↵

3

        {↵

4

          return new UsageCrossReferencer(resource).findUsage(eObjectOfInterest);↵

4

          return new UsageCrossReferencer(eObject).findAllUsage(eObjectsOfInterest);↵

5

        }↵

5

        }↵

6

        /**↵

6

        /**↵

7

         * Returns a collection of usage references from the specified content tree.↵

7

         * Returns a map of usage references from the specified content tree.↵

8

         * @param eObjectOfInterest the usage target.↵

8

         * @param eObjectsOfInterest a collection of usage targets.↵

9

         * @param resourceSet a resource set whose content tree should be considered.↵

9

         * @param resource a resource whose content tree should be considered.↵

10

         * @return a collection of cross references.↵

10

         * @return a map of cross references.↵

11

         */↵

11

         */↵

12

        public static Collection<EStructuralFeature.Setting> find(EObject↵

12

        public static Map<EObject, Collection<EStructuralFeature.Setting>> findAll↵

13

     eObjectOfInterest, ResourceSet resourceSet)↵

13

          (Collection<?>  eObjectsOfInterest, Resource resource)↵

14

        {↵

14

        {↵

15

          return new UsageCrossReferencer(resourceSet).findUsage(eObjectOfInterest);↵

15

          return new UsageCrossReferencer(resource).findAllUsage(eObjectsOfInterest);↵

16

        }↵

16

        }↵

17

        /**↵

17

        /**↵

18

         * Returns a collection of usage references from the combined content trees of the specified collection of objects.↵

18

         * Returns a map of usage references from the specified content tree.↵

19

         * @param eObjectOfInterest the usage target.↵

19

         * @param eObjectsOfInterest a collection of usage targets.↵

20

         * @param emfObjectsToSearch a collection of objects whose combined content trees should be considered.↵

20

         * @param resourceSet a resource set whose content tree should be considered.↵

21

         * @return a collection of cross references.↵

21

         * @return a map of cross references.↵

22

         */↵

22

         */↵

23

        public static Collection<EStructuralFeature.Setting> find(EObject eObjectOfInterest, ↵

23

        public static Map<EObject, Collection<EStructuralFeature.Setting>> findAll↵

24

    Collection<?> emfObjectsToSearch)↵

24

          (Collection<?>  eObjectsOfInterest, ResourceSet resourceSet)↵

25

        {↵

25

        {↵

26

          return new UsageCrossReferencer(emfObjectsToSearch).findUsage(eObjectOfInterest);↵

26

          return new UsageCrossReferencer(resourceSet).findAllUsage(eObjectsOfInterest);↵

27

        }

27

        }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0