Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 2 | 4 | 0.985 | switch_group |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 935 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java |
2 | 26 | 962 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java |
| ||||
case IJavaElement.FIELD: { final IField fieldReferenced = (IField) referenced; final ICompilationUnit referencedUnit = fieldReferenced.getCompilationUnit(); switch (referencingType) { case IJavaElement.COMPILATION_UNIT: { final ICompilationUnit unit = (ICompilationUnit) referencing; if (referencedUnit != null && referencedUnit.equals(unit)) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.getParent().equals(unit.getParent())) keyword = null; break; } case IJavaElement.TYPE: { keyword = thresholdTypeToField((IType) referencing, fieldReferenced, monitor); break; } case IJavaElement.PACKAGE_FRAGMENT: { final IPackageFragment fragment = (IPackageFragment) referencing; if (fieldReferenced.getDeclaringType().getPackageFragment().equals(fragment)) keyword = null; break; } default: Assert.isTrue(false); } break; } |
| ||||
case IJavaElement.METHOD: { final IMethod methodReferenced = (IMethod) referenced; final ICompilationUnit referencedUnit = methodReferenced.getCompilationUnit(); switch (referencingType) { case IJavaElement.COMPILATION_UNIT: { final ICompilationUnit unit = (ICompilationUnit) referencing; if (referencedUnit != null && referencedUnit.equals(unit)) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.getParent().equals(unit.getParent())) keyword = null; break; } case IJavaElement.TYPE: { keyword = thresholdTypeToMethod((IType) referencing, methodReferenced, monitor); break; } case IJavaElement.PACKAGE_FRAGMENT: { final IPackageFragment fragment = (IPackageFragment) referencing; if (methodReferenced.getDeclaringType().getPackageFragment().equals(fragment)) keyword = null; break; } default: Assert.isTrue(false); } break; } |
| |||
case IJavaElement. [[#variablea4e09ca0]]: { final [[#variablea4e09c40]] [[#variablea4e09bc0]]= ( [[#variablea4e09c40]]) referenced; final ICompilationUnit referencedUnit = [[#variablea4e09bc0]].getCompilationUnit(); switch (referencingType) { case IJavaElement.COMPILATION_UNIT: { final ICompilationUnit unit = (ICompilationUnit) referencing; if (referencedUnit != null && referencedUnit.equals(unit)) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.getParent().equals(unit.getParent())) keyword = null; break; } case IJavaElement.TYPE: { keyword = [[#variablea4e09b20]]((IType) referencing, [[#variablea4e09bc0]], monitor); break; } case IJavaElement.PACKAGE_FRAGMENT: { final IPackageFragment fragment = (IPackageFragment) referencing; if ( [[#variablea4e09bc0]].getDeclaringType().getPackageFragment().equals(fragment)) keyword = null; break; } default: Assert.isTrue(false); } break; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#a4e09ca0]] | FIELD |
1 | 2 | [[#a4e09ca0]] | METHOD |
2 | 1 | [[#a4e09c40]] | IField |
2 | 2 | [[#a4e09c40]] | IMethod |
3 | 1 | [[#a4e09bc0]] | fieldReferenced |
3 | 2 | [[#a4e09bc0]] | methodReferenced |
4 | 1 | [[#a4e09b20]] | thresholdTypeToField |
4 | 2 | [[#a4e09b20]] | thresholdTypeToMethod |