CloneSet187


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
42240.990class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
142163
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameModifications.java
242131
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveModifications.java
Clone Instance
1
Line Count
42
Source Line
163
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameModifications.java

        public void buildDelta(IResourceChangeDescriptionFactory builder) {
                for (int i = 0; i < fRename.size(); i++) {
                        Object element = fRename.get(i);
                        if (element instanceof IResource) {
                                ResourceModifications.buildMoveDelta(builder, (IResource) element, (RenameArguments) fRenameArguments.get(i));
                        }
                }
                getResourceModifications().buildDelta(builder);
        }

        public void buildValidateEdits(ValidateEditChecker checker) {
                for (Iterator iter = fRename.iterator(); iter.hasNext();) {
                        Object element = iter.next();
                        if (element instanceof ICompilationUnit) {
                                ICompilationUnit unit = (ICompilationUnit) element;
                                IResource resource = unit.getResource();
                                if (resource != null && resource.getType() == IResource.FILE) {
                                        checker.addFile((IFile) resource);
                                }
                        }
                }
        }

        public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
                List result = new ArrayList();
                for (int i = 0; i < fRename.size(); i++) {
                        result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, 
                                owner                                                         , fRename.get(i), 
                                (RenameArguments) fRenameArguments.get(i)                     , 
                                (IParticipantDescriptorFilter) fParticipantDescriptorFilter.get(i), 
                                natures                                                       , shared)));
                }
                result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
                return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
        }

        private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) {
                Assert.isNotNull(element);
                Assert.isNotNull(args);
                fRename.add(element);
                fRenameArguments.add(args);
                fParticipantDescriptorFilter.add(filter);
        }


Clone Instance
2
Line Count
42
Source Line
131
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveModifications.java

        public void buildDelta(IResourceChangeDescriptionFactory builder) {
                for (int i = 0; i < fMoves.size(); i++) {
                        Object element = fMoves.get(i);
                        if (element instanceof IResource) {
                                ResourceModifications.buildMoveDelta(builder, (IResource) element, (MoveArguments) fMoveArguments.get(i));
                        }
                }
                getResourceModifications().buildDelta(builder);
        }

        public void buildValidateEdits(ValidateEditChecker checker) {
                for (Iterator iter = fMoves.iterator(); iter.hasNext();) {
                        Object element = iter.next();
                        if (element instanceof ICompilationUnit) {
                                ICompilationUnit unit = (ICompilationUnit) element;
                                IResource resource = unit.getResource();
                                if (resource != null && resource.getType() == IResource.FILE) {
                                        checker.addFile((IFile) resource);
                                }
                        }
                }
        }

        public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
                List result = new ArrayList();
                for (int i = 0; i < fMoves.size(); i++) {
                        result.addAll(Arrays.asList(ParticipantManager.loadMoveParticipants(status, 
                                owner                                                       , fMoves.get(i), 
                                (MoveArguments) fMoveArguments.get(i)                       , 
                                (IParticipantDescriptorFilter) fParticipantDescriptorFilter.get(i), 
                                natures                                                     , shared)));
                }
                result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
                return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
        }

        private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) {
                Assert.isNotNull(element);
                Assert.isNotNull(args);
                fMoves.add(element);
                fMoveArguments.add(args);
                fParticipantDescriptorFilter.add(filter);
        }


Clone AbstractionParameter Count: 4Parameter Bindings

public void buildDelta(IResourceChangeDescriptionFactory builder) {
  for (int i = 0; i <  [[#variable90bc0f00]].size(); i++) {
    Object element = [[#variable90bc0f00]].get(i);
    if (element instanceof IResource) {
      ResourceModifications.buildMoveDelta(builder, (IResource) element, ( [[#variable90bc0e80]])  [[#variable90bc0de0]].get(i));
    }
  }
  getResourceModifications().buildDelta(builder);
}

public void buildValidateEdits(ValidateEditChecker checker) {
  for (Iterator iter = [[#variable90bc0f00]].iterator(); iter.hasNext();) {
    Object element = iter.next();
    if (element instanceof ICompilationUnit) {
      ICompilationUnit unit = (ICompilationUnit) element;
      IResource resource = unit.getResource();
      if (resource != null && resource.getType() == IResource.FILE) {
        checker.addFile((IFile) resource);
      }
    }
  }
}

public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
  List result = new ArrayList();
  for (int i = 0; i <  [[#variable90bc0f00]].size(); i++) {
    result.addAll(Arrays.asList(ParticipantManager. [[#variable90bc0dc0]](status, owner,  [[#variable90bc0f00]].get(i), ( [[#variable90bc0e80]])  [[#variable90bc0de0]].get(i), (IParticipantDescriptorFilter) fParticipantDescriptorFilter.get(i), natures, shared)));
  }
  result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
  return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
}

private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) {
  Assert.isNotNull(element);
  Assert.isNotNull(args);
   [[#variable90bc0f00]].add(element);
   [[#variable90bc0de0]].add(args);
  fParticipantDescriptorFilter.add(filter);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#90bc0f00]]
fRename 
12[[#90bc0f00]]
fMoves 
21[[#90bc0e80]]
RenameArguments 
22[[#90bc0e80]]
MoveArguments 
31[[#90bc0de0]]
fRenameArguments 
32[[#90bc0de0]]
fMoveArguments 
41[[#90bc0dc0]]
loadRenameParticipants 
42[[#90bc0dc0]]
loadMoveParticipants