File path: /jruby-1.4.0/src/org/jruby/JRubyApplet.java | File path: /jruby-1.4.0/src/org/jruby/JRubyApplet.java | |||
Method name: IRubyObject on_paint(IRubyObject, Block)
|
Method name: IRubyObject on_destroy(IRubyObject, Block)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | JRubyApplet applet = (JRubyApplet) JavaEmbedUtils.rubyToJava(recv);↵ | 1 | JRubyApplet applet = (JRubyApplet) JavaEmbedUtils.rubyToJava(recv);↵ | |
2 | synchronized (applet) {↵ | 2 | synchronized (applet) {↵ | |
3 | applet.paintProc = blockToProc(applet.runtime, block);↵ | 3 | applet.destroyProc = blockToProc(applet.runtime, block);↵ | |
4 | applet.repaint();↵ | |||
5 | }↵ | 4 | }↵ | |
6 | return recv; | 5 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JRubyApplet applet = (JRubyApplet)JavaEmbedUtils.rubyToJava(recv); | 1 | JRubyApplet applet = (JRubyApplet)JavaEmbedUtils.rubyToJava(recv); | |||||||||||||
2 | synchronized (applet) | 2 | synchronized (applet) | |||||||||||||
3 | applet.paintProc = blockToProc(applet.runtime, block); |
| 3 | applet.destroyProc = blockToProc(applet.runtime, block); | ||||||||||||
4 | applet.repaint(); | | ||||||||||||||
5 | return recv; | 4 | return recv; |
Row | Violation |
---|---|
1 | Expression applet.paintProc cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression applet.destroyProc cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables applet , while Clone fragment #2 returns variables |