Configuration c = builder.buildFromFile(cfg); Context ctx = new DefaultContext(); manager.contextualize(ctx); manager.configure(c);
DefaultTreeCellRenderer rend = new ReportCellRenderer(); rend.setFont(new Font("Dialog", Font.PLAIN, 11)); return rend;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/logging/LoggingManager.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java
Method name: void setConfig(Properties) Method name: TreeCellRenderer getCellRenderer()
Number of AST nodes: 4 Number of AST nodes: 3
1
Configuration c = builder.buildFromFile(cfg);
2
			Context ctx = new DefaultContext();
3
			manager.contextualize(ctx);
4
			manager.configure(c)
1
DefaultTreeCellRenderer rend = new ReportCellRenderer();
2
        rend.setFont(new Font("Dialog", Font.PLAIN, 11));
5
;
3
        return rend;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    8
    Configuration c = builder.buildFromFile(cfg);
    8
    Configuration c = builder.buildFromFile(cfg);
    1
    DefaultTreeCellRenderer rend = new ReportCellRenderer();
    Differences
    Expression1Expression2Difference
    org.apache.avalon.framework.configuration.Configurationjavax.swing.tree.DefaultTreeCellRendererSUBCLASS_TYPE_MISMATCH
    crendVARIABLE_NAME_MISMATCH
    org.apache.avalon.framework.configuration.Configurationjavax.swing.tree.DefaultTreeCellRendererSUBCLASS_TYPE_MISMATCH
    builder.buildFromFile(cfg)new ReportCellRenderer()TYPE_COMPATIBLE_REPLACEMENT
    1
    DefaultTreeCellRenderer rend = new ReportCellRenderer();
                                                                                                        
    2
    rend.setFont(new Font("Dialog", Font.PLAIN, 11));
                                  
    3
    return rend;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variable c with type org.apache.avalon.framework.configuration.Configuration , while Clone fragment #2 returns variable rend with type javax.swing.tree.DefaultTreeCellRenderer