CloneSet437


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26230.989class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126303
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
226377
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
Clone Instance
1
Line Count
26
Source Line
303
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java

        /**
         * Returns true iff str.toLowerCase().endsWith(".class")
         * implementation is not creating extra strings.
         */
        public final static boolean isClassFileName(char[] name) {
                int nameLength = name == null ? 0:  name.length;
                int suffixLength = SUFFIX_CLASS.length;
                if (nameLength < suffixLength) return false;

                for (int i = 0, offset = nameLength - suffixLength; i < suffixLength; i++) {
                        char c = name[offset + i];
                        if (c != SUFFIX_class[i] && c != SUFFIX_CLASS[i]) return false;
                }
                return true;
        }

        /**
         * Returns true iff str.toLowerCase().endsWith(".class")
         * implementation is not creating extra strings.
         */
        public final static boolean isClassFileName(String name) {
                int nameLength = name == null ? 0:  name.length();
                int suffixLength = SUFFIX_CLASS.length;
                if (nameLength < suffixLength) return false;

                for (int i = 0; i < suffixLength; i++) {
                        char c = name.charAt(nameLength - i - 1);
                        int suffixIndex = suffixLength - i - 1;
                        if (c != SUFFIX_class[suffixIndex] && c != SUFFIX_CLASS[suffixIndex]) return false;
                }
                return true;
        }


Clone Instance
2
Line Count
26
Source Line
377
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java

        /**
         * Returns true iff str.toLowerCase().endsWith(".java")
         * implementation is not creating extra strings.
         */
        public final static boolean isJavaFileName(char[] name) {
                int nameLength = name == null ? 0:  name.length;
                int suffixLength = SUFFIX_JAVA.length;
                if (nameLength < suffixLength) return false;

                for (int i = 0, offset = nameLength - suffixLength; i < suffixLength; i++) {
                        char c = name[offset + i];
                        if (c != SUFFIX_java[i] && c != SUFFIX_JAVA[i]) return false;
                }
                return true;
        }

        /**
         * Returns true iff str.toLowerCase().endsWith(".java")
         * implementation is not creating extra strings.
         */
        public final static boolean isJavaFileName(String name) {
                int nameLength = name == null ? 0:  name.length();
                int suffixLength = SUFFIX_JAVA.length;
                if (nameLength < suffixLength) return false;

                for (int i = 0; i < suffixLength; i++) {
                        char c = name.charAt(nameLength - i - 1);
                        int suffixIndex = suffixLength - i - 1;
                        if (c != SUFFIX_java[suffixIndex] && c != SUFFIX_JAVA[suffixIndex]) return false;
                }
                return true;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Returns true iff str.toLowerCase().endsWith(".java")
         * implementation is not creating extra strings.
         */
/**
         * Returns true iff str.toLowerCase().endsWith(".class")
         * implementation is not creating extra strings.
         */
public final static boolean  [[#variableb36b2fa0]](char[] name) {
  int nameLength = name == null ? 0: name.length;
  int suffixLength = [[#variableb36b2e80]].length;
  if (nameLength < suffixLength)
    return false;
  for (int i = 0, offset = nameLength - suffixLength; i < suffixLength; i++) {
    char c = name[offset + i];
    if (c != [[#variableb36b2f00]][i] && c != [[#variableb36b2e80]][i])
      return false;
  }
  return true;
}

/**
         * Returns true iff str.toLowerCase().endsWith(".java")
         * implementation is not creating extra strings.
         */
/**
         * Returns true iff str.toLowerCase().endsWith(".class")
         * implementation is not creating extra strings.
         */
public final static boolean  [[#variableb36b2fa0]](String name) {
  int nameLength = name == null ? 0: name.length();
  int suffixLength = [[#variableb36b2e80]].length;
  if (nameLength < suffixLength)
    return false;
  for (int i = 0; i < suffixLength; i++) {
    char c = name.charAt(nameLength - i - 1);
    int suffixIndex = suffixLength - i - 1;
    if (c != [[#variableb36b2f00]][suffixIndex] && c != [[#variableb36b2e80]][suffixIndex])
      return false;
  }
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b36b2fa0]]
isJavaFileName 
12[[#b36b2fa0]]
isClassFileName 
21[[#b36b2e80]]
SUFFIX_JAVA 
22[[#b36b2e80]]
SUFFIX_CLASS 
31[[#b36b2f00]]
SUFFIX_java 
32[[#b36b2f00]]
SUFFIX_class