CloneSet730


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26240.985switch_group
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126935
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java
226962
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java
Clone Instance
1
Line Count
26
Source Line
935
Source File
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;
                                                         }


Clone Instance
2
Line Count
26
Source Line
962
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java

                                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;
                                                          }


Clone AbstractionParameter Count: 4Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a4e09ca0]]
FIELD 
12[[#a4e09ca0]]
METHOD 
21[[#a4e09c40]]
IField 
22[[#a4e09c40]]
IMethod 
31[[#a4e09bc0]]
fieldReferenced 
32[[#a4e09bc0]]
methodReferenced 
41[[#a4e09b20]]
thresholdTypeToField 
42[[#a4e09b20]]
thresholdTypeToMethod