CloneSet1775


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
12201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
112389
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewHierarchicalContentProvider.java
212278
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
Clone Instance
1
Line Count
12
Source Line
389
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewHierarchicalContentProvider.java

        private Object findNextLevelParentByElementName(IPackageFragment child) {
                String name = child.getElementName();

                int index = name.lastIndexOf('.');
                if (index != -1) {
                        String realParentName = name.substring(0, index);
                        IPackageFragment element = ((IPackageFragmentRoot) child.getParent()).getPackageFragment(realParentName);
                        if (element.exists()) {
                                return element;
                        }
                }
                return child.getParent();
        }


Clone Instance
2
Line Count
12
Source Line
278
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java

        private Object findNextLevelParentByElementName(IPackageFragment child) {
                String name = child.getElementName();

                int index = name.lastIndexOf('.');
                if (index != -1) {
                        String realParentName = name.substring(0, index);
                        IPackageFragment element = ((IPackageFragmentRoot) child.getParent()).getPackageFragment(realParentName);
                        if (element.exists()) {
                                return element;
                        }
                }
                return child.getParent();
        }


Clone AbstractionParameter Count: 0Parameter Bindings

private Object findNextLevelParentByElementName(IPackageFragment child) {
  String name = child.getElementName();
  int index = name.lastIndexOf('.');
  if (index != -1) {
    String realParentName = name.substring(0, index);
    IPackageFragment element = ((IPackageFragmentRoot) child.getParent()).getPackageFragment(realParentName);
    if (element.exists()) {
      return element;
    }
  }
  return child.getParent();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None