Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
28 | 2 | 6 | 0.970 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 28 | 328 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java |
2 | 28 | 580 | plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java |
| ||||
private void validateChangeAndCleanup() { String trimmedValue = fEditorText.getText().trim(); // if the new value is blank, remove the filter if (trimmedValue.length() < 1) { removeNewFilter(); } // if it's invalid, beep and leave sitting in the editor else if ( !validateEditorInput(trimmedValue)) { fInvalidEditorText = trimmedValue; fEditorText.setText(PropertyPageMessages.ExceptionFilterEditor_14); fEditorText.getDisplay().beep(); return; // otherwise, commit the new value if not a duplicate } else { Object[] filters = fFilterContentProvider.getElements(null); for (int i = 0; i < filters.length; i++) { Filter filter = (Filter) filters[i]; if (filter.getName().equals(trimmedValue)) { removeNewFilter(); cleanupEditor(); return; } } fNewTableItem.setText(trimmedValue); fNewFilter.setName(trimmedValue); fFilterViewer.refresh(); } cleanupEditor(); } |
| ||||
private void validateChangeAndCleanup() { String trimmedValue = fEditorText.getText().trim(); // if the new value is blank, remove the filter if (trimmedValue.length() < 1) removeNewFilter(); // if it's invalid, beep and leave sitting in the editor else if ( !validateEditorInput(trimmedValue)) { fInvalidEditorText = trimmedValue; fEditorText.setText(JUnitMessages.JUnitPreferencePage_invalidstepfilterreturnescape); getShell().getDisplay().beep(); return; // otherwise, commit the new value if not a duplicate } else { Object[] filters = fStackFilterContentProvider.getElements(null); for (int i = 0; i < filters.length; i++) { Filter filter = (Filter) filters[i]; if (filter.getName().equals(trimmedValue)) { removeNewFilter(); cleanupEditor(); return; } } fNewTableItem.setText(trimmedValue); fNewStackFilter.setName(trimmedValue); fFilterViewer.refresh(); } cleanupEditor(); } |
| |||
private void validateChangeAndCleanup() { String trimmedValue = fEditorText.getText().trim(); // if the new value is blank, remove the filter if (trimmedValue.length() < 1) [[#variableba97d600]] // if it's invalid, beep and leave sitting in the editor else if ( !validateEditorInput(trimmedValue)) { fInvalidEditorText = trimmedValue; fEditorText.setText( [[#variableba97d5a0]]. [[#variableba97d520]]); [[#variableba97d480]].getDisplay().beep(); return; // otherwise, commit the new value if not a duplicate } else { Object[] filters = [[#variableba97d3c0]].getElements(null); for (int i = 0; i < filters.length; i++) { Filter filter = (Filter) filters[i]; if (filter.getName().equals(trimmedValue)) { removeNewFilter(); cleanupEditor(); return; } } fNewTableItem.setText(trimmedValue); [[#variableba97d2e0]].setName(trimmedValue); fFilterViewer.refresh(); } cleanupEditor(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#ba97d600]] | removeNewFilter(); |
1 | 2 | [[#ba97d600]] | { removeNewFilter(); } |
2 | 1 | [[#ba97d5a0]] | JUnitMessages |
2 | 2 | [[#ba97d5a0]] | PropertyPageMessages |
3 | 1 | [[#ba97d520]] | JUnitPreferencePage_invalidstepfilterreturnescape |
3 | 2 | [[#ba97d520]] | ExceptionFilterEditor_14 |
4 | 1 | [[#ba97d480]] | getShell() |
4 | 2 | [[#ba97d480]] | fEditorText |
5 | 1 | [[#ba97d3c0]] | fStackFilterContentProvider |
5 | 2 | [[#ba97d3c0]] | fFilterContentProvider |
6 | 1 | [[#ba97d2e0]] | fNewStackFilter |
6 | 2 | [[#ba97d2e0]] | fNewFilter |