CloneSet668


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26260.951class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1181345
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java
226862
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java
Clone Instance
1
Line Count
18
Source Line
1345
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.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()]);
        }


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

        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()]);
        }


Clone AbstractionParameter Count: 6Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a0e70dc0]]
getAdditionalRequiredMembers 
12[[#a0e70dc0]]
getAdditionalRequiredMembersToPullUp 
21[[#a0e70d40]]
IProgressMonitor monitor 
22[[#a0e70d40]]
final IProgressMonitor monitor 
31[[#a0e70c80]]
32[[#a0e70c80]]
final 
41[[#a0e70c20]]
MemberActionInfo.getMembers(getInfosForMembersToBeCreatedInSubclassesOfDeclaringClass()) 
42[[#a0e70c20]]
getCreatedDestinationMembers() 
51[[#a0e70bc0]]
PushDownRefactoring_calculating_required 
52[[#a0e70bc0]]
PullUpRefactoring_calculating_required 
61[[#a0e709e0]]
addAllRequiredPushableMembers 
62[[#a0e709e0]]
addAllRequiredPullableMembers