if (session == null) { throw new IllegalArgumentException("Null ISession passed"); } _app = session.getApplication(); _sessionId = session.getIdentifier();
if (session == null) { throw new IllegalArgumentException("Null ISession passed"); } _props = session.getProperties(); _myPanel.loadData(_props);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/BaseObjectTab.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionSQLPropertiesPanel.java
Method name: void setSession(ISession) Method name: void initialize(IApplication, ISession)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (session == null)
1
if (session == null)
2
		{
2
		{
3
			throw new IllegalArgumentException("Null ISession passed");
3
			throw new IllegalArgumentException("Null ISession passed");
4
		}
4
		}
5
		_app = session.getApplication();
5
		_props = session.get
6
		_sessionId = session.getIdentifier(
6
Properties();
7
);
7
		_myPanel.loadData(_props);
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.1
Clones locationClones are in different classes
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)14.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (session == null)
    1
    if (session == null)
    2
    throw new IllegalArgumentException("Null ISession passed");
    2
    throw new IllegalArgumentException("Null ISession passed");
                                                                        
    3
    _props = session.getProperties();
    Preondition Violations
    Unmatched statement _props=session.getProperties(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _props = session.getProperties();
    3
    _app = session.getApplication();
    3
    _app = session.getApplication();
    Preondition Violations
    Unmatched statement _app=session.getApplication(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                      
                                                              
    4
    _myPanel.loadData(_props);
    Preondition Violations
    Unmatched statement _myPanel.loadData(_props); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4
    _myPanel.loadData(_props);
    4
    _sessionId = session.getIdentifier();
    4
    _sessionId = session.getIdentifier();
    Preondition Violations
    Unmatched statement _sessionId=session.getIdentifier(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                
    Precondition Violations (5)
    Row Violation
    1Unmatched statement _props=session.getProperties(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement _app=session.getApplication(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement _myPanel.loadData(_props); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement _sessionId=session.getIdentifier(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseObjectTab and net.sourceforge.squirrel_sql.client.session.properties.SessionSQLPropertiesPanel do not have a common superclass