Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
35 | 2 | 0 | 1.000 | statement_sequence[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 35 | 732 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SelectionRequestor.java |
2 | 35 | 812 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SelectionRequestor.java |
| ||||
if (type == null) { IPackageFragment[] pkgs = this.nameLookup.findPackageFragments( (packageName == null || packageName.length == 0) ? IPackageFragment.DEFAULT_PACKAGE_NAME: new String(packageName), false ); // iterate type lookup in each package fragment for (int i = 0, length = pkgs == null ? 0: pkgs.length; i < length; i++) { type = this.nameLookup.findType(new String(typeName), pkgs[i], false, acceptFlags, true /*consider secondary types*/ ); if (type != null) break; } if (type == null) { String pName = IPackageFragment.DEFAULT_PACKAGE_NAME; if (packageName != null) { pName = new String(packageName); } if (this.openable != null && this.openable.getParent().getElementName().equals(pName)) { // look inside the type in which we are resolving in String tName = new String(typeName); tName = tName.replace('.', '$'); IType[] allTypes = null; try { ArrayList list = this.openable.getChildrenOfType(IJavaElement.TYPE); allTypes = new IType[list.size()]; list.toArray(allTypes); } catch (JavaModelException e) { return null; } for (int i = 0; i < allTypes.length; i++) { if (allTypes[i].getTypeQualifiedName().equals(tName)) { return allTypes[i]; } } } } } return type; |
| ||||
if (type == null) { IPackageFragment[] pkgs = this.nameLookup.findPackageFragments( (packageName == null || packageName.length == 0) ? IPackageFragment.DEFAULT_PACKAGE_NAME: new String(packageName), false ); // iterate type lookup in each package fragment for (int i = 0, length = pkgs == null ? 0: pkgs.length; i < length; i++) { type = this.nameLookup.findType(new String(typeName), pkgs[i], false, acceptFlags, true /*consider secondary types*/ ); if (type != null) break; } if (type == null) { String pName = IPackageFragment.DEFAULT_PACKAGE_NAME; if (packageName != null) { pName = new String(packageName); } if (this.openable != null && this.openable.getParent().getElementName().equals(pName)) { // look inside the type in which we are resolving in String tName = new String(typeName); tName = tName.replace('.', '$'); IType[] allTypes = null; try { ArrayList list = this.openable.getChildrenOfType(IJavaElement.TYPE); allTypes = new IType[list.size()]; list.toArray(allTypes); } catch (JavaModelException e) { return null; } for (int i = 0; i < allTypes.length; i++) { if (allTypes[i].getTypeQualifiedName().equals(tName)) { return allTypes[i]; } } } } } return type; |
| |||
if (type == null) { IPackageFragment[] pkgs = this.nameLookup.findPackageFragments((packageName == null || packageName.length == 0) ? IPackageFragment.DEFAULT_PACKAGE_NAME: new String(packageName), false); // iterate type lookup in each package fragment for (int i = 0, length = pkgs == null ? 0: pkgs.length; i < length; i++) { type = this.nameLookup.findType(new String(typeName), pkgs[i], false, acceptFlags, true /*consider secondary types*/ ); if (type != null) break; } if (type == null) { String pName = IPackageFragment.DEFAULT_PACKAGE_NAME; if (packageName != null) { pName = new String(packageName); } if (this.openable != null && this.openable.getParent().getElementName().equals(pName)) { // look inside the type in which we are resolving in String tName = new String(typeName); tName = tName.replace('.', '$'); IType[] allTypes = null; try { ArrayList list = this.openable.getChildrenOfType(IJavaElement.TYPE); allTypes = new IType[list.size()]; list.toArray(allTypes); } catch (JavaModelException e) { return null; } for (int i = 0; i < allTypes.length; i++) { if (allTypes[i].getTypeQualifiedName().equals(tName)) { return allTypes[i]; } } } } } return type; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |