try { printJob.print(); } catch (Exception ex) { throw new RuntimeException(ex); }
try { return getProcessesFromCache(session); } catch (Exception e) { throw new RuntimeException(e); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/ZoomPrintController.java File path: /sql12/plugins/cache/src/de/ixdb/squirrel_sql/plugins/cache/ShowProcessesCommand.java
Method name: void onPrint() Method name: ProcessData[] onRefreshRequested(ISession)
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
         {
2
      {
3
            printJob.print();
3
         return getProcessesFromCache(session);
4
         }
4
      }
5
         catch (Exception ex)
5
      catch (Exception e)
6
         {
6
      {
7
            throw new RuntimeException(ex);
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.1
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
    5
    try
    5
    try
    1
    try
    Differences
    Expression1Expression2Difference
    exeVARIABLE_NAME_MISMATCH
    exeVARIABLE_NAME_MISMATCH
    1
    try
                                                                                      
    2
    return getProcessesFromCache(session);
    Preondition Violations
    Unmatched statement return getProcessesFromCache(session); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement return getProcessesFromCache(session); 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 getProcessesFromCache(session);
    2
    return getProcessesFromCache(session);
    6
    printJob.print();
    6
    printJob.print();
    Preondition Violations
    Unmatched statement printJob.print(); 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 getProcessesFromCache(session); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement return getProcessesFromCache(session); 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
    3Unmatched return getProcessesFromCache(session);
    4Unmatched statement printJob.print(); 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