Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.978 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 273 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java |
2 | 14 | 292 | 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; } |
| ||||
/** * @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; } |
| |||
//-- 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9cea2100]] | canEnableGetterRenaming |
1 | 2 | [[#9cea2100]] | canEnableSetterRenaming |
2 | 1 | [[#b4b01fe0]] | getGetter |
2 | 2 | [[#b4b01fe0]] | getSetter |
3 | 1 | [[#9cea2040]] | getter |
3 | 2 | [[#9cea2040]] | setter |