for (int i = 0; i < string.length(); i++) {
if (!Character.isDigit(string.charAt(i))) {
return false;
}
}
for (int i = 0; i < l; i++) {
if ((int) s.charAt(i) > 0177) { // non-ascii
return false;
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/config/ProxyConfigurationDialog.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java
|
Method name: boolean ensureDigits(String)
|
|
Method name: boolean isAscii(String)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | for (int i = 0; i < string.length(); i++) {↵ | | 1 | for (int i = 0; i < ↵
|
2 | if (!Character.isDigit(string.charAt(i))) {↵ | | |
|
3 | return false;↵ | | |
|
4 | }↵ | | |
|
5 | ↵ | | 2 | l; i++) {↵
|
| | | 3 | if ((int) s.charAt(i) > 0177) { // non-ascii↵
|
|
| | | 4 | return false;↵
|
| | | 5 | }↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |