Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
42 | 2 | 4 | 0.990 | class_body_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 42 | 163 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameModifications.java |
2 | 42 | 131 | 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 < 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); } |
| ||||
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); } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#90bc0f00]] | fRename |
1 | 2 | [[#90bc0f00]] | fMoves |
2 | 1 | [[#90bc0e80]] | RenameArguments |
2 | 2 | [[#90bc0e80]] | MoveArguments |
3 | 1 | [[#90bc0de0]] | fRenameArguments |
3 | 2 | [[#90bc0de0]] | fMoveArguments |
4 | 1 | [[#90bc0dc0]] | loadRenameParticipants |
4 | 2 | [[#90bc0dc0]] | loadMoveParticipants |