Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 0 | 1.000 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 364 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java |
2 | 16 | 192 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SpellingConfigurationBlock.java |
| ||||
/** * Validates that the specified number is positive. * * @param number * The number to validate * @return The status of the validation */ protected static IStatus validatePositiveNumber( final String number) { final StatusInfo status = new StatusInfo(); if (number.length() == 0) { status.setError(PreferencesMessages.SpellingPreferencePage_empty_threshold); } else { try { final int value = Integer.parseInt(number); if (value < 0) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } catch (NumberFormatException exception) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } return status; } |
| ||||
/** * Validates that the specified number is positive. * * @param number * The number to validate * @return The status of the validation */ protected static IStatus validatePositiveNumber( final String number) { final StatusInfo status = new StatusInfo(); if (number.length() == 0) { status.setError(PreferencesMessages.SpellingPreferencePage_empty_threshold); } else { try { final int value = Integer.parseInt(number); if (value < 0) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } catch (NumberFormatException exception) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } return status; } |
| |||
/** * Validates that the specified number is positive. * * @param number * The number to validate * @return The status of the validation */ protected static IStatus validatePositiveNumber( final String number) { final StatusInfo status = new StatusInfo(); if (number.length() == 0) { status.setError(PreferencesMessages.SpellingPreferencePage_empty_threshold); } else { try { final int value = Integer.parseInt(number); if (value < 0) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } catch (NumberFormatException exception) { status.setError(Messages.format(PreferencesMessages.SpellingPreferencePage_invalid_threshold, number)); } } return status; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |