CloneSet1023


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
120141
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
220179
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java
Clone Instance
1
Line Count
20
Source Line
141
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java

        private IJavaElement getJavaElement() {
                IAdaptable adaptable = getElement();
                IJavaElement elem = (IJavaElement) adaptable.getAdapter(IJavaElement.class );
                if (elem == null) {

                        IResource resource = (IResource) adaptable.getAdapter(IResource.class );
                        //special case when the .jar is a file
                        try {
                                if (resource instanceof IFile && ArchiveFileFilter.isArchivePath(resource.getFullPath())) {
                                        IProject proj = resource.getProject();
                                        if (proj.hasNature(JavaCore.NATURE_ID)) {
                                                IJavaProject jproject = JavaCore.create(proj);
                                                elem = jproject.getPackageFragmentRoot(resource); // create a handle
                                        }
                                }
                        } catch (CoreException e) {
                                JavaPlugin.log(e);
                          }
                }
                return elem;
        }


Clone Instance
2
Line Count
20
Source Line
179
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java

        private IJavaElement getJavaElement() {
                IAdaptable adaptable = getElement();
                IJavaElement elem = (IJavaElement) adaptable.getAdapter(IJavaElement.class );
                if (elem == null) {

                        IResource resource = (IResource) adaptable.getAdapter(IResource.class );
                        //special case when the .jar is a file
                        try {
                                if (resource instanceof IFile && ArchiveFileFilter.isArchivePath(resource.getFullPath())) {
                                        IProject proj = resource.getProject();
                                        if (proj.hasNature(JavaCore.NATURE_ID)) {
                                                IJavaProject jproject = JavaCore.create(proj);
                                                elem = jproject.getPackageFragmentRoot(resource); // create a handle
                                        }
                                }
                        } catch (CoreException e) {
                                JavaPlugin.log(e);
                          }
                }
                return elem;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

private IJavaElement getJavaElement() {
  IAdaptable adaptable = getElement();
  IJavaElement elem = (IJavaElement) adaptable.getAdapter(IJavaElement.class );
  if (elem == null) {
    IResource resource = (IResource) adaptable.getAdapter(IResource.class );
    //special case when the .jar is a file
    try {
      if (resource instanceof IFile && ArchiveFileFilter.isArchivePath(resource.getFullPath())) {
        IProject proj = resource.getProject();
        if (proj.hasNature(JavaCore.NATURE_ID)) {
          IJavaProject jproject = JavaCore.create(proj);
          elem = jproject.getPackageFragmentRoot(resource); // create a handle
        }
      }
    }
    catch (CoreException e) {
      JavaPlugin.log(e);
    }
  }
  return elem;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None