File path: /jruby-1.4.0/src/org/jruby/RubyStringScanner.java | File path: /jruby-1.4.0/src/org/jruby/RubyStringScanner.java | |||
Method name: IRubyObject matchedsize(ThreadContext)
|
Method name: RubyFixnum restsize(ThreadContext)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Ruby runtime = context.getRuntime();↵ | 1 | Ruby runtime = context.getRuntime();↵ | |
2 | if (runtime.isVerbose()) {↵ | 2 | if (runtime.isVerbose()) {↵ | |
3 | runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#matchedsize is obsolete; use #matched_size instead", ↵ | 3 | runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#restsize is obsolete; use #rest_size instead", ↵ | |
4 | "StringScanner#matchedize", "#matched_size");↵ | 4 | "StringScanner#restsize", "#rest_size");↵ | |
5 | }↵ | 5 | }↵ | |
6 | return matched_size(); | 6 | return rest_size(); | |
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 | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Ruby runtime = context.getRuntime(); | 1 | Ruby runtime = context.getRuntime(); | |||||||||||||||||
2 | if (runtime.isVerbose()) | 2 | if (runtime.isVerbose()) | |||||||||||||||||
3 | runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#matchedsize is obsolete; use #matched_size instead", "StringScanner#matchedize", "#matched_size"); |
| 3 | runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#restsize is obsolete; use #rest_size instead", "StringScanner#restsize", "#rest_size"); | ||||||||||||||||
|
| 4 | return rest_size(); | |||||||||||||||||
4 | return matched_size(); |
| |
Row | Violation |
---|---|
1 | Unmatched return rest_size(); |
2 | Unmatched return matched_size(); |