Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 2 | 6 | 0.951 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 1345 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java |
2 | 26 | 862 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java |
| ||||
public IMember[] getAdditionalRequiredMembersToPullUp( final IProgressMonitor monitor) throws JavaModelException { final IMember[] members = getCreatedDestinationMembers(); monitor.beginTask(RefactoringCoreMessages.PullUpRefactoring_calculating_required, members.length); // not final List queue = new ArrayList(members.length); queue.addAll(Arrays.asList(members)); if (queue.isEmpty()) return new IMember[0]; int i = 0; IMember current; do { current = (IMember) queue.get(i); addAllRequiredPullableMembers(queue, current, new SubProgressMonitor(monitor, 1)); i++; if (queue.size() == i) current = null; } while ( current != null); queue.removeAll(Arrays.asList(members)); // report only additional return (IMember[]) queue.toArray(new IMember[queue.size()]); } |
| ||||
public IMember[] getAdditionalRequiredMembers(IProgressMonitor monitor) throws JavaModelException { IMember[] members = MemberActionInfo.getMembers(getInfosForMembersToBeCreatedInSubclassesOfDeclaringClass()); monitor.beginTask(RefactoringCoreMessages.PushDownRefactoring_calculating_required, members.length); // not // true, // but // not // easy // to // give // anything // better List queue = new ArrayList(members.length); queue.addAll(Arrays.asList(members)); if (queue.isEmpty()) return new IMember[0]; int i = 0; IMember current; do { current = (IMember) queue.get(i); addAllRequiredPushableMembers(queue, current, new SubProgressMonitor(monitor, 1)); i++; if (queue.size() == i) current = null; } while ( current != null); queue.removeAll(Arrays.asList(members)); // report only additional return (IMember[]) queue.toArray(new IMember[queue.size()]); } |
| |||
public IMember[] [[#variablea0e70dc0]]( [[#variablea0e70d40]]) throws JavaModelException { [[#variablea0e70c80]]IMember[] members = [[#variablea0e70c20]]; monitor.beginTask(RefactoringCoreMessages. [[#variablea0e70bc0]], members.length); // not [[#variablea0e70c80]] // true, // but // not // easy // to // give // anything // better List queue = new ArrayList(members.length); queue.addAll(Arrays.asList(members)); if (queue.isEmpty()) return new IMember[0]; int i = 0; IMember current; do { current = (IMember) queue.get(i); [[#variablea0e709e0]](queue, current, new SubProgressMonitor(monitor, 1)); i++; if (queue.size() == i) current = null; } while (current != null); queue.removeAll(Arrays.asList(members)); // report only additional return (IMember[]) queue.toArray(new IMember[queue.size()]); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#a0e70dc0]] | getAdditionalRequiredMembers |
1 | 2 | [[#a0e70dc0]] | getAdditionalRequiredMembersToPullUp |
2 | 1 | [[#a0e70d40]] | IProgressMonitor monitor |
2 | 2 | [[#a0e70d40]] | final IProgressMonitor monitor |
3 | 1 | [[#a0e70c80]] | |
3 | 2 | [[#a0e70c80]] | final |
4 | 1 | [[#a0e70c20]] | MemberActionInfo.getMembers(getInfosForMembersToBeCreatedInSubclassesOfDeclaringClass()) |
4 | 2 | [[#a0e70c20]] | getCreatedDestinationMembers() |
5 | 1 | [[#a0e70bc0]] | PushDownRefactoring_calculating_required |
5 | 2 | [[#a0e70bc0]] | PullUpRefactoring_calculating_required |
6 | 1 | [[#a0e709e0]] | addAllRequiredPushableMembers |
6 | 2 | [[#a0e709e0]] | addAllRequiredPullableMembers |