Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
54 | 2 | 2 | 0.990 | class_body_declarations[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 54 | 690 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java |
2 | 53 | 631 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TreeListDialogField.java |
| ||||
/** * Removes an element from the list. */ public void removeElement(Object element) throws IllegalArgumentException { if (fElements.remove(element)) { if (isOkToUse(fTableControl)) { fTable.remove(element); } dialogFieldChanged(); } else { throw new IllegalArgumentException(); } } /** * Removes elements from the list. */ public void removeElements(List elements) { if (elements.size() > 0) { fElements.removeAll(elements); if (isOkToUse(fTableControl)) { fTable.remove(elements.toArray()); } dialogFieldChanged(); } } /** * Gets the number of elements */ public int getSize() { return fElements.size(); } public void selectElements(ISelection selection) { fSelectionWhenEnabled = selection; if (isOkToUse(fTableControl)) { fTable.setSelection(selection, true); } } public void selectFirstElement() { Object element = null; if (fViewerSorter != null) { Object[] arr = fElements.toArray(); fViewerSorter.sort(fTable, arr); if (arr.length > 0) { element = arr[0]; } } else { if (fElements.size() > 0) { element = fElements.get(0); } } if (element != null) { selectElements(new StructuredSelection(element)); } } |
| ||||
/** * Removes an element from the list. */ public void removeElement(Object element) throws IllegalArgumentException { if (fElements.remove(element)) { if (isOkToUse(fTreeControl)) { fTree.remove(element); } dialogFieldChanged(); } else { throw new IllegalArgumentException(); } } /** * Removes elements from the list. */ public void removeElements(List elements) { if (elements.size() > 0) { fElements.removeAll(elements); if (isOkToUse(fTreeControl)) { fTree.remove(elements.toArray()); } dialogFieldChanged(); } } /** * Gets the number of elements */ public int getSize() { return fElements.size(); } public void selectElements(ISelection selection) { fSelectionWhenEnabled = selection; if (isOkToUse(fTreeControl)) { fTree.setSelection(selection, true); } } public void selectFirstElement() { Object element = null; if (fViewerSorter != null) { Object[] arr = fElements.toArray(); fViewerSorter.sort(fTree, arr); if (arr.length > 0) { element = arr[0]; } } else { if (fElements.size() > 0) { element = fElements.get(0); } } if (element != null) { selectElements(new StructuredSelection(element)); } } |
| |||
/** * Removes an element from the list. */ /** * Removes an element from the list. */ public void removeElement(Object element) throws IllegalArgumentException { if (fElements.remove(element)) { if (isOkToUse( [[#variableb7adc780]])) { [[#variableb7adc760]].remove(element); } dialogFieldChanged(); } else { throw new IllegalArgumentException(); } } /** * Removes elements from the list. */ /** * Removes elements from the list. */ public void removeElements(List elements) { if (elements.size() > 0) { fElements.removeAll(elements); if (isOkToUse( [[#variableb7adc780]])) { [[#variableb7adc760]].remove(elements.toArray()); } dialogFieldChanged(); } } /** * Gets the number of elements */ /** * Gets the number of elements */ public int getSize() { return fElements.size(); } public void selectElements(ISelection selection) { fSelectionWhenEnabled = selection; if (isOkToUse( [[#variableb7adc780]])) { [[#variableb7adc760]].setSelection(selection, true); } } public void selectFirstElement() { Object element = null; if (fViewerSorter != null) { Object[] arr = fElements.toArray(); fViewerSorter.sort( [[#variableb7adc760]], arr); if (arr.length > 0) { element = arr[0]; } } else { if (fElements.size() > 0) { element = fElements.get(0); } } if (element != null) { selectElements(new StructuredSelection(element)); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b7adc780]] | fTableControl |
1 | 2 | [[#b7adc780]] | fTreeControl |
2 | 1 | [[#b7adc760]] | fTable |
2 | 2 | [[#b7adc760]] | fTree |