CloneSet2653


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24220.969class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11855
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/ElementValidator.java
22493
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/ElementValidator.java
Clone Instance
1
Line Count
18
Source Line
55
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/ElementValidator.java

        /**
         * Checks if the given element is in sync with the underlying file system.
         * 
         * @param element the element to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * element is not in sync
         * @param title a dialog's title used to present a dialog to the user if the
         * element is not in sync
         * @return boolean <code>true</code> if the element is in sync with the file
         * system. Otherwise <code>false</code> is returned
         */
        public static boolean checkInSync(IAdaptable element, Shell parent,String title) {
                return checkInSync(new IAdaptable[] {
                                                     element
                                                    },         parent, title);
        }

        /**
         * Checks if the given array of elements is in sync with the underlying file
         * system.
         * 
         * @param elements the array of elements to be checked
         * @param parent a parent shell used to present a dialog to the user if
         * one of the elements is not in sync
         * @param title a dialog's title used to present a dialog to the user if
         * one of the elements is not in sync
         * @return boolean <code>true</code> if the all elements are in sync with
         * the file system. Otherwise <code>false</code> is returned
         */
        public static boolean checkInSync(IAdaptable[] elements, Shell parent, String title) {
                return checkInSync(getResources(elements), parent, title);
        }


Clone Instance
2
Line Count
24
Source Line
93
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/ElementValidator.java

        /**
         * Checks if the given element is read-only and if so the methods tries
         * to make the element writable by calling validate edit. If
         * <code>validateEdit</code> was able to make the file writable the method
         * additionally checks if the file has been changed by calling
         * <code>validateEdit</code>.
         * 
         * @param element the element to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * check fails
         * @param title a dialog's title used to present a dialog to the user if the
         * check fails
         * @return boolean <code>true</code> if the element is writable and its
         * content didn't change by calling <code>validateEdit</code>. Otherwise
         * <code>false</code> is returned
         * 
         * @see org.eclipse.core.resources.IWorkspace#validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
         */
        public static boolean checkValidateEdit(IJavaElement element, Shell parent, String title) {
                return checkValidateEdit(new IJavaElement[] {
                                                             element
                                                            },         parent, title);
        }

        /**
         * Checks if the given elements are read-only and if so the methods tries to
         * make the element writable by calling <code>validateEdit</code>. If
         * <code>validateEdit</code> was able to make the file writable the method
         * additionally checks if the file has been changed by calling
         * <code>validateEdit</code>.
         * 
         * @param elements the elements to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * check fails
         * @param title a dialog's title used to present a dialog to the user if the
         * check fails
         * @return boolean <code>true</code> if all elements are writable and their
         * content didn't change by calling <code>validateEdit</code>. Otherwise
         * <code>false</code> is returned
         * 
         * @see org.eclipse.core.resources.IWorkspace#validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
         */
        public static boolean checkValidateEdit(IJavaElement[] elements, Shell parent, String title) {
                return checkValidateEdit(getResources(elements), parent, title);
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Checks if the given element is read-only and if so the methods tries
         * to make the element writable by calling validate edit. If
         * <code>validateEdit</code> was able to make the file writable the method
         * additionally checks if the file has been changed by calling
         * <code>validateEdit</code>.
         * 
         * @param element the element to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * check fails
         * @param title a dialog's title used to present a dialog to the user if the
         * check fails
         * @return boolean <code>true</code> if the element is writable and its
         * content didn't change by calling <code>validateEdit</code>. Otherwise
         * <code>false</code> is returned
         * 
         * @see org.eclipse.core.resources.IWorkspace#validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
         */
/**
         * Checks if the given element is in sync with the underlying file system.
         * 
         * @param element the element to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * element is not in sync
         * @param title a dialog's title used to present a dialog to the user if the
         * element is not in sync
         * @return boolean <code>true</code> if the element is in sync with the file
         * system. Otherwise <code>false</code> is returned
         */
public static boolean  [[#variableb67f2080]]( [[#variable580740e0]] element, Shell parent, String title) {
  return [[#variableb67f2080]](new [[#variable580740e0]][] {
                                                             element
                                                           }, parent, title);
}

/**
         * Checks if the given elements are read-only and if so the methods tries to
         * make the element writable by calling <code>validateEdit</code>. If
         * <code>validateEdit</code> was able to make the file writable the method
         * additionally checks if the file has been changed by calling
         * <code>validateEdit</code>.
         * 
         * @param elements the elements to be checked
         * @param parent a parent shell used to present a dialog to the user if the
         * check fails
         * @param title a dialog's title used to present a dialog to the user if the
         * check fails
         * @return boolean <code>true</code> if all elements are writable and their
         * content didn't change by calling <code>validateEdit</code>. Otherwise
         * <code>false</code> is returned
         * 
         * @see org.eclipse.core.resources.IWorkspace#validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
         */
/**
         * Checks if the given array of elements is in sync with the underlying file
         * system.
         * 
         * @param elements the array of elements to be checked
         * @param parent a parent shell used to present a dialog to the user if
         * one of the elements is not in sync
         * @param title a dialog's title used to present a dialog to the user if
         * one of the elements is not in sync
         * @return boolean <code>true</code> if the all elements are in sync with
         * the file system. Otherwise <code>false</code> is returned
         */
public static boolean  [[#variableb67f2080]]( [[#variable580740e0]][] elements, Shell parent, String title) {
  return [[#variableb67f2080]](getResources(elements), parent, title);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b67f2080]]
checkValidateEdit 
12[[#b67f2080]]
checkInSync 
21[[#580740e0]]
IJavaElement 
22[[#580740e0]]
IAdaptable