Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
20 | 2 | 0 | 1.000 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 20 | 141 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java |
2 | 20 | 179 | 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; } |
| ||||
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; } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |