Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
29 | 3 | 5 | 0.959 | switch_group |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 29 | 790 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java |
2 | 29 | 820 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java |
3 | 29 | 850 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java |
| ||||
case IJavaElement.TYPE: { final IType typeReferenced = (IType) referenced; final ICompilationUnit referencedUnit = typeReferenced.getCompilationUnit(); switch (referencingType) { case IJavaElement.TYPE: { keyword = thresholdTypeToType((IType) referencing, typeReferenced, monitor); break; } case IJavaElement.FIELD: case IJavaElement.METHOD: { final IMember member = (IMember) referencing; if (typeReferenced.equals(member.getDeclaringType())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.equals(member.getCompilationUnit())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (typeReferenced.getPackageFragment().equals(member.getDeclaringType().getPackageFragment())) keyword = null; break; } case IJavaElement.PACKAGE_FRAGMENT: { final IPackageFragment fragment = (IPackageFragment) referencing; if (typeReferenced.getPackageFragment().equals(fragment)) keyword = null; break; } default: Assert.isTrue(false); } break; } |
| ||||
case IJavaElement.FIELD: { final IField fieldReferenced = (IField) referenced; final ICompilationUnit referencedUnit = fieldReferenced.getCompilationUnit(); switch (referencingType) { case IJavaElement.TYPE: { keyword = thresholdTypeToField((IType) referencing, fieldReferenced, monitor); break; } case IJavaElement.FIELD: case IJavaElement.METHOD: { final IMember member = (IMember) referencing; if (fieldReferenced.getDeclaringType().equals(member.getDeclaringType())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.equals(member.getCompilationUnit())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (fieldReferenced.getDeclaringType().getPackageFragment().equals(member.getDeclaringType().getPackageFragment())) keyword = null; 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.TYPE: { keyword = thresholdTypeToMethod((IType) referencing, methodReferenced, monitor); break; } case IJavaElement.FIELD: case IJavaElement.METHOD: { final IMember member = (IMember) referencing; if (methodReferenced.getDeclaringType().equals(member.getDeclaringType())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.equals(member.getCompilationUnit())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (methodReferenced.getDeclaringType().getPackageFragment().equals(member.getDeclaringType().getPackageFragment())) keyword = null; 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. [[#variable6212f820]]: { final [[#variable6212f720]] [[#variable6212f780]]= ( [[#variable6212f720]]) referenced; final ICompilationUnit referencedUnit = [[#variable6212f780]].getCompilationUnit(); switch (referencingType) { case IJavaElement.TYPE: { keyword = [[#variable6212f700]]((IType) referencing, [[#variable6212f780]], monitor); break; } case IJavaElement.FIELD: case IJavaElement.METHOD: { final IMember member = (IMember) referencing; if ( [[#variable6212f840]].equals(member.getDeclaringType())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if (referencedUnit != null && referencedUnit.equals(member.getCompilationUnit())) keyword = ModifierKeyword.PRIVATE_KEYWORD; else if ( [[#variable6212f840]].getPackageFragment().equals(member.getDeclaringType().getPackageFragment())) keyword = null; break; } case IJavaElement.PACKAGE_FRAGMENT: { final IPackageFragment fragment = (IPackageFragment) referencing; if ( [[#variable6212f840]].getPackageFragment().equals(fragment)) keyword = null; break; } default: Assert.isTrue(false); } break; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6212f820]] | TYPE |
1 | 2 | [[#6212f820]] | FIELD |
1 | 3 | [[#6212f820]] | METHOD |
2 | 1 | [[#6212f720]] | IType |
2 | 2 | [[#6212f720]] | IField |
2 | 3 | [[#6212f720]] | IMethod |
3 | 1 | [[#6212f780]] | typeReferenced |
3 | 2 | [[#6212f780]] | fieldReferenced |
3 | 3 | [[#6212f780]] | methodReferenced |
4 | 1 | [[#6212f700]] | thresholdTypeToType |
4 | 2 | [[#6212f700]] | thresholdTypeToField |
4 | 3 | [[#6212f700]] | thresholdTypeToMethod |
5 | 1 | [[#6212f840]] | typeReferenced |
5 | 2 | [[#6212f840]] | fieldReferenced.getDeclaringType() |
5 | 3 | [[#6212f840]] | methodReferenced.getDeclaringType() |