Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 0 | 1.000 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 11 | 2605 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java |
2 | 11 | 408 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/InternalNamingConventions.java |
| ||||
/** * Answers true if the given name starts with the given prefix, false otherwise. * The comparison is case sensitive. * <br> * <br> * For example: * <ol> * <li><pre> * prefix = { 'a' , 'b' } * name = { 'a' , 'b', 'b', 'a', 'b', 'a' } * result => true * </pre> * </li> * <li><pre> * prefix = { 'a' , 'c' } * name = { 'a' , 'b', 'b', 'a', 'b', 'a' } * result => false * </pre> * </li> * </ol> * * @param prefix the given prefix * @param name the given name * @return true if the given name starts with the given prefix, false otherwise * @throws NullPointerException if the given name is null or if the given prefix is null */ public static final boolean prefixEquals(char[] prefix, char[] name) { int max = prefix.length; if (name.length < max) return false; for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name if (prefix[i] != name[i]) return false; return true; } |
| ||||
public static final boolean prefixEquals(char[] prefix, char[] name) { int max = prefix.length; if (name.length < max) return false; for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name if (prefix[i] != name[i]) return false; return true; } |
| |||
/** * Answers true if the given name starts with the given prefix, false otherwise. * The comparison is case sensitive. * <br> * <br> * For example: * <ol> * <li><pre> * prefix = { 'a' , 'b' } * name = { 'a' , 'b', 'b', 'a', 'b', 'a' } * result => true * </pre> * </li> * <li><pre> * prefix = { 'a' , 'c' } * name = { 'a' , 'b', 'b', 'a', 'b', 'a' } * result => false * </pre> * </li> * </ol> * * @param prefix the given prefix * @param name the given name * @return true if the given name starts with the given prefix, false otherwise * @throws NullPointerException if the given name is null or if the given prefix is null */ public static final boolean prefixEquals(char[] prefix, char[] name) { int max = prefix.length; if (name.length < max) return false; for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name if (prefix[i] != name[i]) return false; return true; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |