| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 24 | 2 | 2 | 0.969 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 18 | 55 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/ElementValidator.java |
| 2 | 24 | 93 | 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);
}
|
| ||||
/**
* 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);
}
|
| |||
/**
* 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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b67f2080]] | checkValidateEdit |
| 1 | 2 | [[#b67f2080]] | checkInSync |
| 2 | 1 | [[#580740e0]] | IJavaElement |
| 2 | 2 | [[#580740e0]] | IAdaptable |