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_KEYWORDS_MSG); start = System.currentTimeMillis(); } int beginProgress = getLoadMethodProgress(progress++); setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress); loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress); if (s_log.isDebugEnabled()) { finish = System.currentTimeMillis(); s_log.debug("Keywords 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_KEYWORDS_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_KEYWORDS_MSG, beginProgress);
7
         privateLoadCatalogs();
8
            loadKeywords(i18n.LOADING_KEYWORDS_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("Keywords loaded in " + (finish - start) + " ms");
11
         }
12
            }
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.4
Clones locationClones are declared in the same class
Number of node comparisons38
  1. {Non-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)166.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (s_log.isDebugEnabled())
    21
    if (s_log.isDebugEnabled())
    4
    s_log.debug(i18n.LOADING_CATALOGS_MSG);
    4
    s_log.debug(i18n.LOADING_CATALOGS_MSG);
    22
    s_log.debug(i18n.LOADING_KEYWORDS_MSG);
    Differences
    Expression1Expression2Difference
    LOADING_CATALOGS_MSGLOADING_KEYWORDS_MSGVARIABLE_NAME_MISMATCH
    22
    s_log.debug(i18n.LOADING_KEYWORDS_MSG);
    5
    start = System.currentTimeMillis();
    23
    start = System.currentTimeMillis();
    6
    int beginProgress = getLoadMethodProgress(progress++);
    24
    int beginProgress = getLoadMethodProgress(progress++);
    7
    setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress);
    7
    setProgress(i18n.LOADING_CATALOGS_MSG, beginProgress);
    25
    setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    LOADING_CATALOGS_MSGLOADING_KEYWORDS_MSGVARIABLE_NAME_MISMATCH
    25
    setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    8
    privateLoadCatalogs();
    8
    privateLoadCatalogs();
    26
    loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    privateLoadCatalogsloadKeywordsMETHOD_INVOCATION_NAME_MISMATCH
    privateLoadCatalogs()loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method loadKeywords
    Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    Expression loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    Expression loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method loadKeywords
    Expression privateLoadCatalogs() is a void method call, and thus it cannot be parameterized
    Expression loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    26
    loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    9
    if (s_log.isDebugEnabled())
    27
    if (s_log.isDebugEnabled())
    10
    finish = System.currentTimeMillis();
    28
    finish = System.currentTimeMillis();
    11
    s_log.debug("Catalogs loaded in " + (finish - start) + " ms");
    11
    s_log.debug("Catalogs loaded in " + (finish - start) + " ms");
    29
    s_log.debug("Keywords loaded in " + (finish - start) + " ms");
    Differences
    Expression1Expression2Difference
    "Catalogs loaded in ""Keywords loaded in "LITERAL_VALUE_MISMATCH
    29
    s_log.debug("Keywords loaded in " + (finish - start) + " ms");
    Precondition Violations (7)
    Row Violation
    1Expression loadKeywords(i18n.LOADING_KEYWORDS_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 loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    4Expression loadKeywords(i18n.LOADING_KEYWORDS_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 loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) is a void method call, and thus it cannot be parameterized
    7Clone fragment #1 returns variables progress , while Clone fragment #2 returns variables progress, start