if (running[i] == null || running[i].isFinished()) {
running[i] = runnables[threadNumber++];
Thread thread = new Thread(group, running[i]);
thread.start();
// continue on outer while loop to get another
// available slot
continue outer;
}
for (int i = 0; i < maxRunning; ++i) {
running[i] = runnables[threadNumber++];
Thread thread = new Thread(group, running[i]);
thread.start();
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Parallel.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Parallel.java
|
Method name: void spinThreads()
|
|
Method name: void spinThreads()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | if (running[i] == null || running[i].isFinished()) {↵ | | |
|
2 | ↵ | | 1 | for (int i = 0; i < maxRunning; ++i) {↵
|
3 | running[i] = runnables[threadNumber++];↵ | | 2 | running[i] = runnables[threadNumber++];↵
|
4 | Thread thread = new Thread(group, running[i]);↵ | | 3 | Thread thread = new Thread(group, running[i]);↵
|
5 | thread.start();↵ | | 4 | thread.start();↵
|
6 | // continue on outer while loop to get another↵ | | |
|
7 | // available slot↵ | | |
|
8 | continue outer;↵ | | |
|
9 | } | | 5 | }
|
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 | Clones are in the same method |
Number of node comparisons | 1 |