try { _detailPanel.tblDetails.show(new EmptyDataSet()); } catch (DataSetException e) { throw new RuntimeException(e); }
try { return new ReflectionCaller(cl.loadClass(className)); } catch (ClassNotFoundException e) { throw new RuntimeException(e); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/mapping/DetailPanelController.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/ReflectionCaller.java
Method name: void clearDetail() Method name: ReflectionCaller getClass(String, ClassLoader)
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
      {
2
      {
3
         _detailPanel.tblDetails.show(new EmptyDataSet());
3
         return new ReflectionCaller(cl.loadClass(className));
4
      }
4
      }
5
      catch (DataSetException e)
5
      catch (ClassNotFoundException e)
6
      {
6
      {
7
         throw new RuntimeException(e);
7
         throw new RuntimeException(e);
8
      }
8
      }
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.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetExceptionjava.lang.ClassNotFoundExceptionSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetExceptionjava.lang.ClassNotFoundExceptionSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetExceptionjava.lang.ClassNotFoundExceptionSUBCLASS_TYPE_MISMATCH
    1
    try
                                                                                                                    
    2
    return new ReflectionCaller(cl.loadClass(className));
    Preondition Violations
    Unmatched statement return new ReflectionCaller(cl.loadClass(className)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    Unmatched return new ReflectionCaller(cl.loadClass(className));
    2
    return new ReflectionCaller(cl.loadClass(className));
    2
    _detailPanel.tblDetails.show(new EmptyDataSet());
    2
    _detailPanel.tblDetails.show(new EmptyDataSet());
    Preondition Violations
    Unmatched statement _detailPanel.tblDetails.show(new EmptyDataSet()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement _detailPanel.tblDetails.show(new EmptyDataSet()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                            
    Precondition Violations (4)
    Row Violation
    1Unmatched statement return new ReflectionCaller(cl.loadClass(className)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched return new ReflectionCaller(cl.loadClass(className));
    3Unmatched statement _detailPanel.tblDetails.show(new EmptyDataSet()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement _detailPanel.tblDetails.show(new EmptyDataSet()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted