} else if (ProcessImpl_handle != null) {
// just windows
pg = new PidGetter() {
public long getPid(Process process) {
try {
if (ProcessImpl.isInstance(process)) {
return (Long)ProcessImpl_handle.get(process);
}
} catch (Exception e) {
// ignore and use hashcode
}
return process.hashCode();
}
};
} else
} else {
// just unix
pg = new PidGetter() {
public long getPid(Process process) {
try {
if (UNIXProcess.isInstance(process)) {
return (Integer)UNIXProcess_pid.get(process);
}
} catch (Exception e) {
// ignore and use hashcode
}
return process.hashCode();
}
};
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/ShellLauncher.java
|
|
File path: /jruby-1.4.0/src/org/jruby/util/ShellLauncher.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | } else if (ProcessImpl_handle != null) {↵ | | 1 | } else ↵
|
| | | 2 | {↵
|
2 | // just windows↵ | | 3 | // just ↵
|
| | | 4 | unix↵
|
3 | pg = new PidGetter() {↵ | | 5 | pg = new PidGetter() {↵
|
4 | public long getPid(Process process) {↵ | | 6 | public long getPid(Process process) {↵
|
5 | try {↵ | | 7 | try {↵
|
6 | if (ProcessImpl.isInstance(process)) {↵ | | 8 | if (UNIXProcess.isInstance(process)) {↵
|
7 | return (Long)ProcessImpl_handle.get(process);↵ | | 9 | return (Integer)UNIXProcess_pid.get(process);↵
|
8 | }↵ | | 10 | }↵
|
9 | } catch (Exception e) {↵ | | 11 | } catch (Exception e) {↵
|
10 | // ignore and use hashcode↵ | | 12 | // ignore and use hashcode↵
|
11 | }↵ | | 13 | ↵
|
| | | 14 | }↵
|
12 | return process.hashCode();↵ | | 15 | return process.hashCode();↵
|
13 | }↵ | | 16 | ↵
|
| | | 17 | }↵
|
14 | };↵ | | 18 | };↵
|
15 | } else | | 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 |