| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 21 | 2 | 1 | 0.998 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 21 | 143 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/CreateStepFilterDialog.java |
| 2 | 21 | 366 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.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;
}
|
| ||||
/**
* 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;
}
|
| |||
/**
* 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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b944b040]] | validateEditorInput |
| 1 | 2 | [[#b944b040]] | validateInput |