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"); }
if (s_log.isDebugEnabled()) { s_log.debug(i18n.LOADING_SCHEMAS_MSG); start = System.currentTimeMillis(); } int beginProgress = getLoadMethodProgress(progress++); setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress); privateLoadSchemas(); if (s_log.isDebugEnabled()) { finish = System.currentTimeMillis(); s_log.debug("Schemas 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: void privateLoadAll() Method name: int loadSchemas(int)
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_FUNCTIONS_MSG);
2
             s_log.debug(i18n.LOADING_SCHEMAS_MSG);
3
                start = System.currentTimeMillis();
3
             start = System.currentTimeMillis();
4
            }
4
         
5
            
6
   
5
}
7
         int beginProgress = getLoadMethodProgress(progress++);
6
         int beginProgress = getLoadMethodProgress(progress++);
8
            setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
7
         setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
9
            loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
8
         privateLoadSchemas();
10
            if (s_log.isDebugEnabled()) {
9
         if (s_log.isDebugEnabled()) {
11
                finish = System.currentTimeMillis();
10
             finish = System.currentTimeMillis();
12
                s_log.debug("Functions loaded in " + (finish - start) + " ms");
11
             s_log.debug("Schemas loaded in " + (finish - start) + " ms");
13
            }
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.4
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)179.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    41
    if (s_log.isDebugEnabled())
    3
    if (s_log.isDebugEnabled())
    42
    s_log.debug(i18n.LOADING_FUNCTIONS_MSG);
    42
    s_log.debug(i18n.LOADING_FUNCTIONS_MSG);
    4
    s_log.debug(i18n.LOADING_SCHEMAS_MSG);
    Differences
    Expression1Expression2Difference
    LOADING_FUNCTIONS_MSGLOADING_SCHEMAS_MSGVARIABLE_NAME_MISMATCH
    4
    s_log.debug(i18n.LOADING_SCHEMAS_MSG);
    43
    start = System.currentTimeMillis();
    5
    start = System.currentTimeMillis();
    44
    int beginProgress = getLoadMethodProgress(progress++);
    6
    int beginProgress = getLoadMethodProgress(progress++);
    45
    setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    45
    setProgress(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    7
    setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    LOADING_FUNCTIONS_MSGLOADING_SCHEMAS_MSGVARIABLE_NAME_MISMATCH
    7
    setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
    46
    loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    46
    loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG, beginProgress);
    8
    privateLoadSchemas();
    Differences
    Expression1Expression2Difference
    loadGlobalFunctionsprivateLoadSchemasMETHOD_INVOCATION_NAME_MISMATCH
    loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress)privateLoadSchemas()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 loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    Expression privateLoadSchemas() 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 loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    Expression privateLoadSchemas() is a void method call, and thus it cannot be parameterized
    8
    privateLoadSchemas();
    47
    if (s_log.isDebugEnabled())
    9
    if (s_log.isDebugEnabled())
    48
    finish = System.currentTimeMillis();
    10
    finish = System.currentTimeMillis();
    49
    s_log.debug("Functions loaded in " + (finish - start) + " ms");
    49
    s_log.debug("Functions loaded in " + (finish - start) + " ms");
    11
    s_log.debug("Schemas loaded in " + (finish - start) + " ms");
    Differences
    Expression1Expression2Difference
    "Functions loaded in ""Schemas loaded in "LITERAL_VALUE_MISMATCH
    11
    s_log.debug("Schemas 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 loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    3Expression privateLoadSchemas() 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 loadGlobalFunctions(i18n.LOADING_FUNCTIONS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    6Expression privateLoadSchemas() is a void method call, and thus it cannot be parameterized