CloneSet925


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21210.998class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121143
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/CreateStepFilterDialog.java
221366
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java
Clone Instance
1
Line Count
21
Source Line
143
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/CreateStepFilterDialog.java

        /**
         * A valid step filter is simply one that is a valid Java identifier.
         * and, as defined in the JDI spec, the regular expressions used for
         * step filtering must be limited to exact matches or patterns that
         * begin with '*' or end with '*'. Beyond this, a string cannot be validated
         * as corresponding to an existing type or package (and this is probably not
         * even desirable).  
         */
        private boolean validateInput(String trimmedValue) {
                char firstChar = trimmedValue.charAt(0);
                if ( !Character.isJavaIdentifierStart(firstChar)) {
                        if ( !(firstChar == '*')) {
                                return false;
                        }
                }
                int length = trimmedValue.length();
                for (int i = 1; i < length; i++) {
                        char c = trimmedValue.charAt(i);
                        if ( !Character.isJavaIdentifierPart(c)) {
                                if (c == '.' && i != (length - 1)) {
                                        continue ;
                                }
                                if (c == '*' && i == (length - 1)) {
                                        continue ;
                                }
                                return false;
                        }
                }
                return true;
        }


Clone Instance
2
Line Count
21
Source Line
366
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java

        /**
         * A valid filter is simply one that is a valid Java identifier.
         * and, as defined in the JDI spec, the regular expressions used for
         * scoping must be limited to exact matches or patterns that
         * begin with '*' or end with '*'. Beyond this, a string cannot be validated
         * as corresponding to an existing type or package (and this is probably not
         * even desirable).  
         */
        private boolean validateEditorInput(String trimmedValue) {
                char firstChar = trimmedValue.charAt(0);
                if ( !Character.isJavaIdentifierStart(firstChar)) {
                        if ( !(firstChar == '*')) {
                                return false;
                        }
                }
                int length = trimmedValue.length();
                for (int i = 1; i < length; i++) {
                        char c = trimmedValue.charAt(i);
                        if ( !Character.isJavaIdentifierPart(c)) {
                                if (c == '.' && i != (length - 1)) {
                                        continue ;
                                }
                                if (c == '*' && i == (length - 1)) {
                                        continue ;
                                }
                                return false;
                        }
                }
                return true;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * A valid filter is simply one that is a valid Java identifier.
         * and, as defined in the JDI spec, the regular expressions used for
         * scoping must be limited to exact matches or patterns that
         * begin with '*' or end with '*'. Beyond this, a string cannot be validated
         * as corresponding to an existing type or package (and this is probably not
         * even desirable).  
         */
/**
         * A valid step filter is simply one that is a valid Java identifier.
         * and, as defined in the JDI spec, the regular expressions used for
         * step filtering must be limited to exact matches or patterns that
         * begin with '*' or end with '*'. Beyond this, a string cannot be validated
         * as corresponding to an existing type or package (and this is probably not
         * even desirable).  
         */
private boolean  [[#variableb944b040]](String trimmedValue) {
  char firstChar = trimmedValue.charAt(0);
  if ( !Character.isJavaIdentifierStart(firstChar)) {
    if ( !(firstChar == '*')) {
      return false;
    }
  }
  int length = trimmedValue.length();
  for (int i = 1; i < length; i++) {
    char c = trimmedValue.charAt(i);
    if ( !Character.isJavaIdentifierPart(c)) {
      if (c == '.' && i != (length - 1)) {
        continue ;
      }
      if (c == '*' && i == (length - 1)) {
        continue ;
      }
      return false;
    }
  }
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b944b040]]
validateEditorInput 
12[[#b944b040]]
validateInput