Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 3 | 0.990 | class_body_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 33 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/CopyResourceChange.java |
2 | 19 | 32 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/MoveResourceChange.java |
| ||||
public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { // Copy resource change isn't undoable and isn't used // as a redo/undo change right now. Furthermore the current // implementation allows copying dirty files. In this case only // the content on disk is copied. return super.isValid(pm, NONE); } protected Change doPerformReorg(IPath path, IProgressMonitor pm) throws CoreException { getResource().copy(path, getReorgFlags(), pm); return null; } public String getName() { return Messages.format(RefactoringCoreMessages.CopyResourceString_copy, new String[] { getResource().getFullPath().toString(), getDestination().getName() } ); } |
| ||||
public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { // We already present a dialog to the user if he // moves read-only resources. Since moving a resource // doesn't do a validate edit (it actually doesn't // change the content we can't check for READ only // here. return super.isValid(pm, DIRTY); } /* non java-doc * @see ResourceReorgChange#doPerform(IPath, IProgressMonitor) */ protected Change doPerformReorg(IPath path, IProgressMonitor pm) throws CoreException { getResource().move(path, getReorgFlags(), pm); return null; } public String getName() { return Messages.format(RefactoringCoreMessages.MoveResourceChange_move, new String[] { getResource().getFullPath().toString(), getDestination().getName() } ); } |
| |||
public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException { // Copy resource change isn't undoable and isn't used // as a redo/undo change right now. Furthermore the current // implementation allows copying dirty files. In this case only // the content on disk is copied. // We already present a dialog to the user if he // moves read-only resources. Since moving a resource // doesn't do a validate edit (it actually doesn't // change the content we can't check for READ only // here. return super.isValid(pm, [[#variableb8babcc0]]); } /* non java-doc * @see ResourceReorgChange#doPerform(IPath, IProgressMonitor) */ protected Change doPerformReorg(IPath path, IProgressMonitor pm) throws CoreException { getResource(). [[#variable543db3c0]](path, getReorgFlags(), pm); return null; } public String getName() { return Messages.format(RefactoringCoreMessages. [[#variable8fb933c0]], new String[] { getResource().getFullPath().toString(), getDestination().getName() } ); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b8babcc0]] | NONE |
1 | 2 | [[#b8babcc0]] | DIRTY |
2 | 1 | [[#543db3c0]] | copy |
2 | 2 | [[#543db3c0]] | move |
3 | 1 | [[#8fb933c0]] | CopyResourceString_copy |
3 | 2 | [[#8fb933c0]] | MoveResourceChange_move |