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"); }
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_KEYWORDS_MSG);
2
             s_log.debug(i18n.LOADING_SCHEMAS_MSG);
3
                start = System.currentTimeMillis();
3
             start = System.currentTimeMillis();
4
            }            
4
         
5
  
5
}
6
          int beginProgress = getLoadMethodProgress(progress++);
6
         int beginProgress = getLoadMethodProgress(progress++);
7
            setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress);
7
         setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
8
            loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress);
8
         privateLoadSchemas();
9
            if (s_log.isDebugEnabled()) {
9
         if (s_log.isDebugEnabled()) {
10
                finish = System.currentTimeMillis();
10
             finish = System.currentTimeMillis();
11
                s_log.debug("Keywords loaded in " + (finish - start) + " ms");
11
             s_log.debug("Schemas loaded in " + (finish - start) + " ms");
12
            }
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)178.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    if (s_log.isDebugEnabled())
    3
    if (s_log.isDebugEnabled())
    22
    s_log.debug(i18n.LOADING_KEYWORDS_MSG);
    22
    s_log.debug(i18n.LOADING_KEYWORDS_MSG);
    4
    s_log.debug(i18n.LOADING_SCHEMAS_MSG);
    Differences
    Expression1Expression2Difference
    LOADING_KEYWORDS_MSGLOADING_SCHEMAS_MSGVARIABLE_NAME_MISMATCH
    4
    s_log.debug(i18n.LOADING_SCHEMAS_MSG);
    23
    start = System.currentTimeMillis();
    5
    start = System.currentTimeMillis();
    24
    int beginProgress = getLoadMethodProgress(progress++);
    6
    int beginProgress = getLoadMethodProgress(progress++);
    25
    setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    25
    setProgress(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    7
    setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
    Differences
    Expression1Expression2Difference
    LOADING_KEYWORDS_MSGLOADING_SCHEMAS_MSGVARIABLE_NAME_MISMATCH
    7
    setProgress(i18n.LOADING_SCHEMAS_MSG, beginProgress);
    26
    loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    26
    loadKeywords(i18n.LOADING_KEYWORDS_MSG, beginProgress);
    8
    privateLoadSchemas();
    Differences
    Expression1Expression2Difference
    loadKeywordsprivateLoadSchemasMETHOD_INVOCATION_NAME_MISMATCH
    loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress)privateLoadSchemas()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 loadKeywords(i18n.LOADING_KEYWORDS_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 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 loadKeywords(i18n.LOADING_KEYWORDS_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();
    27
    if (s_log.isDebugEnabled())
    9
    if (s_log.isDebugEnabled())
    28
    finish = System.currentTimeMillis();
    10
    finish = System.currentTimeMillis();
    29
    s_log.debug("Keywords loaded in " + (finish - start) + " ms");
    29
    s_log.debug("Keywords loaded in " + (finish - start) + " ms");
    11
    s_log.debug("Schemas loaded in " + (finish - start) + " ms");
    Differences
    Expression1Expression2Difference
    "Keywords loaded in ""Schemas loaded in "LITERAL_VALUE_MISMATCH
    11
    s_log.debug("Schemas 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 loadKeywords(i18n.LOADING_KEYWORDS_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 loadKeywords(i18n.LOADING_KEYWORDS_MSG,beginProgress) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression loadKeywords(i18n.LOADING_KEYWORDS_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
    7Clone fragment #1 returns variables progress, start , while Clone fragment #2 returns variables progress