CloneSet1093


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14230.978class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
114273
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java
214292
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java
Clone Instance
1
Line Count
14
Source Line
273
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java

        //-- getter/setter --------------------------------------------------
        /**
         * @return Error message or <code>null</code> if getter can be renamed.
         */
        public String canEnableGetterRenaming() throws CoreException {
                if (fField.getDeclaringType().isInterface())
                        return getGetter() == null ? "": null; //$NON-NLS-1$

                IMethod getter = getGetter();
                if (getter == null)
                        return ""; //$NON-NLS-1$
                final NullProgressMonitor monitor = new NullProgressMonitor();
                if (MethodChecks.isVirtual(getter)) {
                        final ITypeHierarchy hierarchy = getter.getDeclaringType().newTypeHierarchy(monitor);
                        if (MethodChecks.isDeclaredInInterface(getter, hierarchy, monitor) != null || MethodChecks.overridesAnotherMethod(getter, hierarchy) != null)
                                return RefactoringCoreMessages.RenameFieldRefactoring_declared_in_supertype;
                }
                return null;
        }


Clone Instance
2
Line Count
14
Source Line
292
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java

        /**
         * @return Error message or <code>null</code> if setter can be renamed.
         */
        public String canEnableSetterRenaming() throws CoreException {
                if (fField.getDeclaringType().isInterface())
                        return getSetter() == null ? "": null; //$NON-NLS-1$

                IMethod setter = getSetter();
                if (setter == null)
                        return "";       //$NON-NLS-1$
                final NullProgressMonitor monitor = new NullProgressMonitor();
                if (MethodChecks.isVirtual(setter)) {
                        final ITypeHierarchy hierarchy = setter.getDeclaringType().newTypeHierarchy(monitor);
                        if (MethodChecks.isDeclaredInInterface(setter, hierarchy, monitor) != null || MethodChecks.overridesAnotherMethod(setter, hierarchy) != null)
                                return RefactoringCoreMessages.RenameFieldRefactoring_declared_in_supertype;
                }
                return null;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

//-- getter/setter --------------------------------------------------
/**
         * @return Error message or <code>null</code> if getter can be renamed.
         */
/**
         * @return Error message or <code>null</code> if setter can be renamed.
         */
public String  [[#variable9cea2100]]() throws CoreException {
  if (fField.getDeclaringType().isInterface())
    return [[#variableb4b01fe0]]() == null ? "": null; //$NON-NLS-1$
  IMethod  [[#variable9cea2040]]= [[#variableb4b01fe0]]();
  if ( [[#variable9cea2040]]== null)
    return ""; //$NON-NLS-1$
  final NullProgressMonitor monitor = new NullProgressMonitor();
  if (MethodChecks.isVirtual( [[#variable9cea2040]])) {
    final ITypeHierarchy hierarchy = [[#variable9cea2040]].getDeclaringType().newTypeHierarchy(monitor);
    if (MethodChecks.isDeclaredInInterface( [[#variable9cea2040]], hierarchy, monitor) != null || MethodChecks.overridesAnotherMethod( [[#variable9cea2040]], hierarchy) != null)
      return RefactoringCoreMessages.RenameFieldRefactoring_declared_in_supertype;
  }
  return null;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9cea2100]]
canEnableGetterRenaming 
12[[#9cea2100]]
canEnableSetterRenaming 
21[[#b4b01fe0]]
getGetter 
22[[#b4b01fe0]]
getSetter 
31[[#9cea2040]]
getter 
32[[#9cea2040]]
setter