final String dirPath = _userSettingsDir + File.separator + "logs"; final String logBaseName = "squirrel-sql.log"; if (needExecutionLogCleanup) { // first time through this method in program, so go cleanup // old log files deleteOldFiles(dirPath, logBaseName); needExecutionLogCleanup = false; } return new File(dirPath + File.separator + logBaseName);
final String dirPath = _userSettingsDir + File.separator + "logs"; final String logBaseName = "jdbcdebug.log"; if (needDebugLogCleanup) { // first time through this method in program, so go cleanup // old log files deleteOldFiles(dirPath, logBaseName); needDebugLogCleanup = false; } return new File(dirPath + File.separator + logBaseName);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/util/ApplicationFiles.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/util/ApplicationFiles.java
Method name: File getExecutionLogFile() Method name: File getJDBCDebugLogFile()
Number of AST nodes: 6 Number of AST nodes: 6
1
final String dirPath = _userSettingsDir + File.separator + "logs";
1
final String dirPath = _userSettingsDir + File.separator + "logs";
2
		final String logBaseName = "squirrel-sql.log";
2
		final String logBaseName = "jdbcdebug.log";
3
		if (needExecutionLogCleanup) {
3
		if (needDebugLogCleanup) {
4
			// first time through this method in program, so go cleanup
4
			// first time through this method in program, so go cleanup
5
			// old log files
5
			// old log files
6
			deleteOldFiles(dirPath, logBaseName);
6
			deleteOldFiles(dirPath, logBaseName);
7
			needExecutionLogCleanup = false;
7
			needDebugLogCleanup = false;
8
		}
8
		}
9
		return new File(dirPath	+ File.separator + logBaseName);
9
		return new File(dirPath	+ File.separator + logBaseName);
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.0
Clones locationClones are declared in the same class
Number of node comparisons18
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    final String dirPath = _userSettingsDir + File.separator + "logs";
    1
    final String dirPath = _userSettingsDir + File.separator + "logs";
    2
    final String logBaseName = "squirrel-sql.log";
    2
    final String logBaseName = "squirrel-sql.log";
    2
    final String logBaseName = "jdbcdebug.log";
    Differences
    Expression1Expression2Difference
    "squirrel-sql.log""jdbcdebug.log"LITERAL_VALUE_MISMATCH
    2
    final String logBaseName = "jdbcdebug.log";
    3
    if (needExecutionLogCleanup)
    3
    if (needExecutionLogCleanup)
    3
    if (needDebugLogCleanup)
    Differences
    Expression1Expression2Difference
    needExecutionLogCleanupneedDebugLogCleanupVARIABLE_NAME_MISMATCH
    3
    if (needDebugLogCleanup)
    4
    deleteOldFiles(dirPath, logBaseName);
    4
    deleteOldFiles(dirPath, logBaseName);
    5
    needExecutionLogCleanup = false;
    5
    needExecutionLogCleanup = false;
    5
    needDebugLogCleanup = false;
    Differences
    Expression1Expression2Difference
    needExecutionLogCleanupneedDebugLogCleanupVARIABLE_NAME_MISMATCH
    5
    needDebugLogCleanup = false;
    6
    return new File(dirPath + File.separator + logBaseName);
    6
    return new File(dirPath + File.separator + logBaseName);
    Precondition Violations (0)
    Row Violation