if (c == '$') {
subst.append('\\');
subst.append('$');
} else if (c == '\\') {
if (++i < argument.length()) {
c = argument.charAt(i);
int value = Character.digit(c, 10);
if (value > -1) {
subst.append("$").append(value);
} else {
subst.append(c);
}
} else {
// XXX - should throw an exception instead?
subst.append('\\');
}
} else {
subst.append(c);
if (c == '$') {
subst.append('\\');
subst.append('$');
} else if (c == '\\') {
if (++i < argument.length()) {
c = argument.charAt(i);
int value = Character.digit(c, 10);
if (value > -1) {
subst.append("$").append(value);
} else {
subst.append(c);
}
} else {
// XXX - should throw an exception instead?
subst.append('\\');
}
} else {
subst.append(c);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | if (c == '$') {↵ | | 1 | if (c == '$') {↵
|
2 | subst.append('\\');↵ | | 2 | subst.append('\\');↵
|
3 | subst.append('$');↵ | | 3 | subst.append('$');↵
|
4 | } else if (c == '\\') {↵ | | 4 | } else if (c == '\\') {↵
|
5 | if (++i < argument.length()) {↵ | | 5 | if (++i < argument.length()) {↵
|
6 | c = argument.charAt(i);↵ | | 6 | c = argument.charAt(i);↵
|
7 | int value = Character.digit(c, 10);↵ | | 7 | int value = Character.digit(c, 10);↵
|
8 | if (value > -1) {↵ | | 8 | if (value > -1) {↵
|
9 | subst.append("$").append(value);↵ | | 9 | subst.append("$").append(value);↵
|
10 | } else {↵ | | 10 | } else {↵
|
11 | subst.append(c);↵ | | 11 | subst.append(c);↵
|
12 | }↵ | | 12 | }↵
|
13 | } else {↵ | | 13 | } else {↵
|
14 | // XXX - should throw an exception instead?↵ | | 14 | // XXX - should throw an exception instead?↵
|
15 | subst.append('\\');↵ | | 15 | subst.append('\\');↵
|
16 | }↵ | | 16 | }↵
|
17 | } else {↵ | | 17 | } else {↵
|
18 | subst.append(c);↵ | | 18 | subst.append(c);↵
|
19 | | | 19 |
|
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.0 |
Clones location | |
Number of node comparisons | 0 |