Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 3 | 0.964 | method_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 11 | 1077 | E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java |
2 | 11 | 1159 | E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java |
| |||||
/** * Returns a tree iterator over the content trees * recursively defined by * {@link ResourceSet#getResources()}, * {@link Resource#getContents()}, * and {@link EObject#eContents()}, * skipping over any child object that's in a different resource from its parent. * It uses a special iterator for ResourceSet.getResources * that is tolerant of growth in the underlying collection * which result from demand loaded resources; * the iterator will walk these additional resources. * Contained proxies are resolved or not as specified. * @param emfObjects the collection of objects to iterate over. * @param resolve whether proxies should be resolved. * @return a tree iterator over the objects and their contents. * @see ContentTreeIterator */ public static <T>TreeIterator<T> getAllProperContents(Collection<? > emfObjects, boolean resolve) { return new ContentTreeIterator<T>(emfObjects, resolve) { private static final long serialVersionUID = 1L; @Override public Iterator<EObject> getEObjectChildren(EObject eObject) { return new ProperContentIterator<EObject>(eObject, isResolveProxies()); } }; } |
| |||||
/** * Returns a tree iterator that iterates over all the {@link ResourceSet#getResources direct resources} in the resource set * and over the content {@link Resource#getAllContents tree} of each, * skipping over any child object that's in a different resource from its parent. * @param resourceSet the resource set to iterate over. * @param resolve whether proxies should be resolved. * @return a tree iterator that iterates over all contents. * @see EObject#eAllContents * @see Resource#getAllContents * @see org.eclipse.emf.ecore.util.EcoreUtil#getAllContents(ResourceSet, boolean) */ public static <T>TreeIterator<T> getAllProperContents(ResourceSet resourceSet, boolean resolve) { return new ContentTreeIterator<T>(resourceSet, resolve) { private static final long serialVersionUID = 1L; @Override public Iterator<EObject> getEObjectChildren(EObject eObject) { return new ProperContentIterator<EObject>(eObject, isResolveProxies()); } }; } |
| |||
/** * Returns a tree iterator that iterates over all the {@link ResourceSet#getResources direct resources} in the resource set * and over the content {@link Resource#getAllContents tree} of each, * skipping over any child object that's in a different resource from its parent. * @param resourceSet the resource set to iterate over. * @param resolve whether proxies should be resolved. * @return a tree iterator that iterates over all contents. * @see EObject#eAllContents * @see Resource#getAllContents * @see org.eclipse.emf.ecore.util.EcoreUtil#getAllContents(ResourceSet, boolean) */ /** * Returns a tree iterator over the content trees * recursively defined by * {@link ResourceSet#getResources()}, * {@link Resource#getContents()}, * and {@link EObject#eContents()}, * skipping over any child object that's in a different resource from its parent. * It uses a special iterator for ResourceSet.getResources * that is tolerant of growth in the underlying collection * which result from demand loaded resources; * the iterator will walk these additional resources. * Contained proxies are resolved or not as specified. * @param emfObjects the collection of objects to iterate over. * @param resolve whether proxies should be resolved. * @return a tree iterator over the objects and their contents. * @see ContentTreeIterator */ public static <T>TreeIterator<T> getAllProperContents( [[#variable17279060]] [[#variable17278fe0]] [[#variable17278f60]], boolean resolve) { return new ContentTreeIterator<T>( [[#variable17278f60]], resolve) { private static final long serialVersionUID = 1L; @Override public Iterator<EObject> getEObjectChildren(EObject eObject) { return new ProperContentIterator<EObject>(eObject, isResolveProxies()); } }; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#17279060]] | Collection |
1 | 2 | [[#17279060]] | ResourceSet |
2 | 1 | [[#17278fe0]] | <? > |
2 | 2 | [[#17278fe0]] | |
3 | 1 | [[#17278f60]] | emfObjects |
3 | 2 | [[#17278f60]] | resourceSet |