void testReplace2() {
assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));
}
public void testReplace3() {
assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));
}
public void testReplace4() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz"));
}
public void testReplace5() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
}
public void testReplace6() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
}
public void testReplace7() {
assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));
}
public void testReplace8() {
assertEquals("img src=xyz ", JOrphanUtils.replaceFirst("img src=xyz alt=\"\" ", "alt=\"\" ", ""));
void testReplace1() {
assertEquals("xyzdef", JOrphanUtils.replaceFirst("abcdef", "abc", "xyz"));
}
public void testReplace2() {
assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));
}
public void testReplace3() {
assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));
}
public void testReplace4() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz"));
}
public void testReplace5() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
}
public void testReplace6() {
assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
}
public void testReplace7() {
assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/util/TestJorphanUtils.java
|
|
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/util/TestJorphanUtils.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
| | | 1 | void testReplace1() {↵
|
| | | 2 | assertEquals("xyzdef", JOrphanUtils.replaceFirst("abcdef", "abc", "xyz"));↵
|
| | | 3 | }↵
|
|
1 | void testReplace2() {↵ | | 4 | public void testReplace2() {↵
|
2 | assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));↵ | | 5 | assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));↵
|
3 | }↵ | | 6 | }↵
|
|
4 | public void testReplace3() {↵ | | 7 | public void testReplace3() {↵
|
5 | assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));↵ | | 8 | assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));↵
|
6 | }↵ | | 9 | }↵
|
|
7 | public void testReplace4() {↵ | | 10 | public void testReplace4() {↵
|
8 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz"));↵ | | 11 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz"));↵
|
9 | }↵ | | 12 | }↵
|
|
10 | public void testReplace5() {↵ | | 13 | public void testReplace5() {↵
|
11 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));↵ | | 14 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));↵
|
12 | }↵ | | 15 | }↵
|
|
13 | public void testReplace6() {↵ | | 16 | public void testReplace6() {↵
|
14 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));↵ | | 17 | assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));↵
|
15 | }↵ | | 18 | }↵
|
|
16 | public void testReplace7() {↵ | | 19 | public void testReplace7() {↵
|
17 | assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));↵ | | 20 | assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));↵
|
18 | }↵ | | 21 |
|
|
19 | public void testReplace8() {↵ | | | |
20 | assertEquals("img src=xyz ", JOrphanUtils.replaceFirst("img src=xyz alt=\"\" ", "alt=\"\" ", ""));↵ | | | |
21 | | | | |
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 |