if (s_log.isDebugEnabled()) { s_log.debug(i18n.LOADING_CATALOGS_MSG); start = System.currentTimeMillis(); } int beginProgress = getLoadMethodProgress(progress++); setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress); privateLoadCatalogs(); if (s_log.isDebugEnabled()) { finish = System.currentTimeMillis(); s_log.debug("Catalogs loaded in " + (finish - start) + " ms"); }
if (s_log.isDebugEnabled()) { s_log.debug(i18n.LOADING_FUNCTIONS_MSG); start = System.currentTimeMillis(); } int beginProgress = getLoadMethodProgress(progress++); setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress); loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress); if (s_log.isDebugEnabled()) { finish = System.currentTimeMillis(); s_log.debug("Functions loaded in " + (finish - start) + " ms"); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java
Method name: int loadCatalogs(int) Method name: void privateLoadAll()
Number of AST nodes: 9 Number of AST nodes: 9
1
if (s_log.isDebugEnabled()) {
1
if (s_log.isDebugEnabled()) {
2
             s_log.debug(i18n.LOADING_CATALOGS_MSG);
2
                s_log.debug(i18n.LOADING_FUNCTIONS_MSG);
3
             start = System.currentTimeMillis();
3
                start = System.currentTimeMillis();
4
         }
4
            }
5
            
5
         int beginProgress = getLoadMethodProgress(progress++);
6
            int beginProgress = getLoadMethodProgress(progress++);
6
         setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress);
7
            setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
7
         privateLoadCatalogs();
8
            loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
8
         if (s_log.isDebugEnabled()) {
9
            if (s_log.isDebugEnabled()) {
9
             finish = System.currentTimeMillis();
10
                finish = System.currentTimeMillis();
10
             s_log.debug("Catalogs loaded in " + (finish - start) + " ms");
11
                s_log.debug("Functions loaded in " + (finish - start) + " ms");
11
         }
12
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are declared in the same class
Number of node comparisons38
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)8.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (s_log.isDebugEnabled())
    41
    if (s_log.isDebugEnabled())
    4
    s_log.debug(i18n.LOADING_CATALOGS_MSG);
    4
    s_log.debug(i18n.LOADING_CATALOGS_MSG);
    42
    s_log.debug(i18n.LOADING_FUNCTIONS_MSG);
    Differences
    Expression1Expression2Difference
    LOADING_CATALOGS_MSGLOADING_FUNCTIONS_MSGVARIABLE_NAME_MISMATCH
    42
    s_log.debug(i18n.LOADING_FUNCTIONS_MSG);
    5
    start = System.currentTimeMillis();
    43
    start = System.currentTimeMillis();
    6
    int beginProgress = getLoadMethodProgress(progress++);
    44
    int beginProgress = getLoadMethodProgress(progress++);
    7
    setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress);
    7
    setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress);
    45
    setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    LOADING_CATALOGS_MSGLOADING_FUNCTIONS_MSGVARIABLE_NAME_MISMATCH
    45
    setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    8
    privateLoadCatalogs();
    8
    privateLoadCatalogs();
    46
    loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    privateLoadCatalogsloadGlobalFunctionsMETHOD_INVOCATION_NAME_MISMATCH
    privateLoadCatalogs()loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method loadGlobalFunctions
    Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method loadGlobalFunctions
    Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    46
    loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    9
    if (s_log.isDebugEnabled())
    47
    if (s_log.isDebugEnabled())
    10
    finish = System.currentTimeMillis();
    48
    finish = System.currentTimeMillis();
    11
    s_log.debug("Catalogs loaded in " + (finish - start) + " ms");
    11
    s_log.debug("Catalogs loaded in " + (finish - start) + " ms");
    49
    s_log.debug("Functions loaded in " + (finish - start) + " ms");
    Differences
    Expression1Expression2Difference
    "Catalogs loaded in ""Functions loaded in "LITERAL_VALUE_MISMATCH
    49
    s_log.debug("Functions loaded in " + (finish - start) + " ms");
    Precondition Violations (6)
    Row Violation
    1Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    3Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    4Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    6Expression loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized