CloneSet1838


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16230.990class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11633
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/CopyResourceChange.java
21932
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/MoveResourceChange.java
Clone Instance
1
Line Count
16
Source Line
33
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/CopyResourceChange.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()
                                     } );
        }


Clone Instance
2
Line Count
19
Source Line
32
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/MoveResourceChange.java

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


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b8babcc0]]
NONE 
12[[#b8babcc0]]
DIRTY 
21[[#543db3c0]]
copy 
22[[#543db3c0]]
move 
31[[#8fb933c0]]
CopyResourceString_copy 
32[[#8fb933c0]]
MoveResourceChange_move