FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory(); if (!squirrelLibDir.isDirectory()) { s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath() + " doesn't appear to be a directory"); } return squirrelLibDir;
FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir(); if (!squirrelHomeDir.isDirectory()) { s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath() + " doesn't appear to be a directory"); } return squirrelHomeDir;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/UpdateUtilImpl.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/UpdateUtilImpl.java
Method name: FileWrapper getSquirrelLibraryDir() Method name: FileWrapper getSquirrelHomeDir()
Number of AST nodes: 4 Number of AST nodes: 4
1
FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory();
1
FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir();
2
		if (!squirrelLibDir.isDirectory())
2
		if (!squirrelHomeDir.isDirectory())
3
		{
3
		{
4
			s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath()
4
			s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath()
5
				+ " doesn't appear to be a directory");
5
				+ " doesn't appear to be a directory");
6
		}
6
		}
7
		return squirrelLibDir;
7
		return squirrelHomeDir;
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.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)17.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory();
    1
    FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory();
    1
    FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir();
    Differences
    Expression1Expression2Difference
    squirrelLibDirsquirrelHomeDirVARIABLE_NAME_MISMATCH
    getLibraryDirectorygetSquirrelHomeDirMETHOD_INVOCATION_NAME_MISMATCH
    1
    FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir();
    2
    if (!squirrelLibDir.isDirectory())
    2
    if (!squirrelLibDir.isDirectory())
    2
    if (!squirrelHomeDir.isDirectory())
    Differences
    Expression1Expression2Difference
    squirrelLibDirsquirrelHomeDirVARIABLE_NAME_MISMATCH
    2
    if (!squirrelHomeDir.isDirectory())
    3
    s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath() + " doesn't appear to be a directory");
    3
    s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath() + " doesn't appear to be a directory");
    3
    s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath() + " doesn't appear to be a directory");
    Differences
    Expression1Expression2Difference
    "SQuirreL Library Directory (""SQuirreL Home Directory ("LITERAL_VALUE_MISMATCH
    squirrelLibDirsquirrelHomeDirVARIABLE_NAME_MISMATCH
    3
    s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath() + " doesn't appear to be a directory");
    4
    return squirrelLibDir;
    4
    return squirrelLibDir;
    4
    return squirrelHomeDir;
    Differences
    Expression1Expression2Difference
    squirrelLibDirsquirrelHomeDirVARIABLE_NAME_MISMATCH
    4
    return squirrelHomeDir;
    Precondition Violations (0)
    Row Violation