Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
39 | 2 | 2 | 0.996 | statement_sequence[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 39 | 957 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java |
2 | 39 | 1771 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java |
| ||||
if (isSubUnit) currentRewrite = rewrite; else currentRewrite = new CompilationUnitRewrite(unit, node); final Collection collection = (Collection) fTypeOccurrences.get(unit); if (collection != null && !collection.isEmpty()) { final IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 100); try { subMonitor.beginTask("", collection.size() * 10); //$NON-NLS-1$ subMonitor.setTaskName(RefactoringCoreMessages.ExtractInterfaceProcessor_creating); TType estimate = null; ISourceConstraintVariable variable = null; ITypeConstraintVariable constraint = null; for ( final Iterator iterator = collection.iterator(); iterator.hasNext();) { variable = (ISourceConstraintVariable) iterator.next(); if (variable instanceof ITypeConstraintVariable) { constraint = (ITypeConstraintVariable) variable; estimate = (TType) constraint.getData(SuperTypeConstraintsSolver.DATA_TYPE_ESTIMATE); if (estimate != null) { final CompilationUnitRange range = constraint.getRange(); if (isSubUnit) rewriteTypeOccurrence(range, estimate, requestor, currentRewrite, node, replacements, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); else { final ASTNode result = NodeFinder.perform(node, range.getSourceRange()); if (result != null) rewriteTypeOccurrence(estimate, currentRewrite, result, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); } subMonitor.worked(10); } } } } finally { subMonitor.done(); } } if ( !isSubUnit) { final TextChange change = currentRewrite.createChange(); if (change != null) manager.manage(unit, change); } |
| ||||
if (isTouched) currentRewrite = existingRewrite; else currentRewrite = new CompilationUnitRewrite(unit, node); final Collection collection = (Collection) fTypeOccurrences.get(unit); if (collection != null && !collection.isEmpty()) { final IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 100); try { subMonitor.beginTask("", collection.size() * 10); //$NON-NLS-1$ subMonitor.setTaskName(RefactoringCoreMessages.ExtractInterfaceProcessor_creating); TType estimate = null; ISourceConstraintVariable variable = null; ITypeConstraintVariable constraint = null; for ( final Iterator iterator = collection.iterator(); iterator.hasNext();) { variable = (ISourceConstraintVariable) iterator.next(); if (variable instanceof ITypeConstraintVariable) { constraint = (ITypeConstraintVariable) variable; estimate = (TType) constraint.getData(SuperTypeConstraintsSolver.DATA_TYPE_ESTIMATE); if (estimate != null) { final CompilationUnitRange range = constraint.getRange(); if (isTouched) rewriteTypeOccurrence(range, estimate, requestor, currentRewrite, node, replacements, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); else { final ASTNode result = NodeFinder.perform(node, range.getSourceRange()); if (result != null) rewriteTypeOccurrence(estimate, currentRewrite, result, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); } subMonitor.worked(10); } } } } finally { subMonitor.done(); } } if ( !isTouched) { final TextChange change = currentRewrite.createChange(); if (change != null) manager.manage(unit, change); } |
| |||
if ( [[#variableb5819620]]) currentRewrite = [[#variableb58195e0]]; else currentRewrite = new CompilationUnitRewrite(unit, node); final Collection collection = (Collection) fTypeOccurrences.get(unit); if (collection != null && !collection.isEmpty()) { final IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 100); try { subMonitor.beginTask("", collection.size() * 10); //$NON-NLS-1$ subMonitor.setTaskName(RefactoringCoreMessages.ExtractInterfaceProcessor_creating); TType estimate = null; ISourceConstraintVariable variable = null; ITypeConstraintVariable constraint = null; for ( final Iterator iterator = collection.iterator(); iterator.hasNext();) { variable = (ISourceConstraintVariable) iterator.next(); if (variable instanceof ITypeConstraintVariable) { constraint = (ITypeConstraintVariable) variable; estimate = (TType) constraint.getData(SuperTypeConstraintsSolver.DATA_TYPE_ESTIMATE); if (estimate != null) { final CompilationUnitRange range = constraint.getRange(); if ( [[#variableb5819620]]) rewriteTypeOccurrence(range, estimate, requestor, currentRewrite, node, replacements, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); else { final ASTNode result = NodeFinder.perform(node, range.getSourceRange()); if (result != null) rewriteTypeOccurrence(estimate, currentRewrite, result, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); } subMonitor.worked(10); } } } } finally { subMonitor.done(); } } if ( ! [[#variableb5819620]]) { final TextChange change = currentRewrite.createChange(); if (change != null) manager.manage(unit, change); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b5819620]] | isSubUnit |
1 | 2 | [[#b5819620]] | isTouched |
2 | 1 | [[#b58195e0]] | rewrite |
2 | 2 | [[#b58195e0]] | existingRewrite |