CloneSet1581


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116364
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
216192
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SpellingConfigurationBlock.java
Clone Instance
1
Line Count
16
Source Line
364
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.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;
        }


Clone Instance
2
Line Count
16
Source Line
192
Source File
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;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None