if (includeDescendants) { for (RubyClass i: mySubclasses) { mine.addAll(i.subclasses(includeDescendants)); } }
for (String n : names) { builtinClass.setConstant(n.toUpperCase(), new Builtin(runtime, builtinClass, nativeType, n.toLowerCase())); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyClass.java File path: /jruby-1.4.0/src/org/jruby/ext/ffi/Type.java
Method name: Collection subclasses(boolean) Method name: void defineBuiltinType(Ruby, RubyClass, NativeType, String[])
Number of AST nodes: 3 Number of AST nodes: 2
1
if (includeDescendants) {
2
                for (RubyClass i: mySubclasses) {
3
                    mine.addAll(i.subclasses(includeDescendants
1
for (String n : names) {
2
                    builtinClass.setConstant(n.toUpperCase(),
4
));
3
                            new Builtin(runtime, builtinClass, nativeType, n.toLowerCase()));
5
                }
4
    
6
            }
5
            }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1