_readClobs = false; // set to the default String readClobsString = DTProperties.get(thisClassName, "readClobs"); if (readClobsString != null && readClobsString.equals("true")) _readClobs = true; _readCompleteClobs = false; // set to the default String readCompleteClobsString = DTProperties.get(thisClassName, "readCompleteClobs"); if (readCompleteClobsString != null && readCompleteClobsString.equals("true")) _readCompleteClobs = true; _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; // set to default String readClobsSizeString = DTProperties.get(thisClassName, "readClobsSize"); if (readClobsSizeString != null) _readClobsSize = Integer.parseInt(readClobsSizeString); _makeNewlinesVisibleInCell = true; // set to the default String makeNewlinesVisibleString = DTProperties.get(thisClassName, "makeNewlinesVisibleInCell"); if (makeNewlinesVisibleString != null && makeNewlinesVisibleString.equals("false")) _makeNewlinesVisibleInCell = false; propertiesAlreadyLoaded = true;
if (propertiesAlreadyLoaded == false) { // get parameters previously set by user, or set default values useJavaDefaultFormat =true; // set to use the Java default String useJavaDefaultFormatString = DTProperties.get( thisClassName, "useJavaDefaultFormat"); if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false")) useJavaDefaultFormat =false; // get which locale-dependent format to use localeFormat =DateFormat.SHORT; // set to use the Java default String localeFormatString = DTProperties.get( thisClassName, "localeFormat"); if (localeFormatString != null) localeFormat = Integer.parseInt(localeFormatString); // use lenient input or force user to enter exact format lenient = true; // set to allow less stringent input String lenientString = DTProperties.get( thisClassName, "lenient"); if (lenientString != null && lenientString.equals("false")) lenient =false; // how to use Timestamp in WHERE clauses whereClauseUsage = USE_JDBC_ESCAPE_FORMAT; // default to SQL standard String whereClauseUsageString = DTProperties.get( thisClassName, "whereClauseUsage"); if (whereClauseUsageString != null) whereClauseUsage = Integer.parseInt(whereClauseUsageString); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java
Method name: void loadProperties() Method name: void loadProperties()
Number of AST nodes: 17 Number of AST nodes: 17
1
_readClobs = false;	// set to the default
2
			String readClobs
1
if (propertiesAlreadyLoaded == false) {
2
         // get parameters previously set by user, or set default values
3
         useJavaDefaultFormat =true;	// set to use the Java default
3
String = DTProperties.get(
4
         String useJavaDefaultFormatString = DTProperties.get(
4
thisClassName, "readClobs");
5
            thisClassName, "
5
			if (readClobsString != null && readClobs
6
useJavaDefaultFormat");
6
String.equals("true"))
7
         if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
7
				_readClobs = true;
8
			_readCompleteClobs = false;	// set to the default
9
			String readCompleteClobs
8
            useJavaDefaultFormat =false;
9
         // get which locale-dependent format to use
10
         localeFormat =DateFormat.SHORT;	// set to use the Java default
10
String = DTProperties.get(
11
         String localeFormatString = DTProperties.get(
11
thisClassName, "readCompleteClobs");
12
            thisClassName, "
12
			if (readCompleteClobsString != null && readCompleteClobsString.equals("true"))
13
				_readCompleteClobs = true;
14
            
15
			_readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;	// set to default
16
			String readClobsSize
13
localeFormat");
14
         if (localeFormatString != null)
15
            localeFormat = Integer.parseInt(localeFormatString);
16
         // use lenient input or force user to enter exact format
17
         lenient = true;	// set to allow less stringent input
17
String = DTProperties.get(
18
         String lenientString = DTProperties.get(
18
thisClassName, "readClobsSize");
19
            thisClassName, "
19
			if (readClobsSizeString != null)
20
				_readClobsSize = Integer.parseInt(readClobsSizeString);
21
			_makeNewlinesVisibleInCell = true;	// set to the default
22
			String makeNewlinesVisibl
20
lenient");
21
         if (lenientString != null && lenientString.equals("false"))
22
            lenient =false;
23
         // how to use Timestamp in WHERE clauses
24
         whereClauseUsage = USE_JDBC_ESCAPE_FORMAT;	// default to SQL standard
23
eString = DTProperties.get(
25
         String whereClauseUsageString = DTProperties.get(
24
thisClassName, "makeNewlinesVisibleInCell");
26
            thisClassName, "
25
			if (makeNewlinesVisibleString != null && makeNewlinesVisibleString.equals("false"))
26
				_makeNewlinesVisibleInCell = false;
27
			propertiesAlreadyLoaded = true;
27
whereClauseUsage");
28
         if (whereClauseUsageString != null)
29
            whereClauseUsage = Integer.parseInt(whereClauseUsageString);
30
      }
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)1.5
Clones locationClones are in different classes having the same super class
Number of node comparisons44
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    _readClobs = false;
    2
    _readClobs = false;
    2
    useJavaDefaultFormat = true;
    Differences
    Expression1Expression2Difference
    _readClobsuseJavaDefaultFormatVARIABLE_NAME_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    2
    useJavaDefaultFormat = true;
    3
    String readClobsString = DTProperties.get(thisClassName, "readClobs");
    3
    String readClobsString = DTProperties.get(thisClassName, "readClobs");
    3
    String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat");
    Differences
    Expression1Expression2Difference
    readClobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    "readClobs""useJavaDefaultFormat"LITERAL_VALUE_MISMATCH
    3
    String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat");
    4
    if (readClobsString != null && readClobsString.equals("true"))
    4
    if (readClobsString != null && readClobsString.equals("true"))
    4
    if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
    Differences
    Expression1Expression2Difference
    readClobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    "true""false"LITERAL_VALUE_MISMATCH
    readClobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    4
    if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
    5
    _readClobs = true;
    5
    _readClobs = true;
    5
    useJavaDefaultFormat = false;
    Differences
    Expression1Expression2Difference
    _readClobsuseJavaDefaultFormatVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    5
    useJavaDefaultFormat = false;
    6
    _readCompleteClobs = false;
    6
    _readCompleteClobs = false;
    10
    lenient = true;
    Differences
    Expression1Expression2Difference
    _readCompleteClobslenientVARIABLE_NAME_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    10
    lenient = true;
    7
    String readCompleteClobsString = DTProperties.get(thisClassName, "readCompleteClobs");
    7
    String readCompleteClobsString = DTProperties.get(thisClassName, "readCompleteClobs");
    11
    String lenientString = DTProperties.get(thisClassName, "lenient");
    Differences
    Expression1Expression2Difference
    readCompleteClobsStringlenientStringVARIABLE_NAME_MISMATCH
    "readCompleteClobs""lenient"LITERAL_VALUE_MISMATCH
    11
    String lenientString = DTProperties.get(thisClassName, "lenient");
    8
    if (readCompleteClobsString != null && readCompleteClobsString.equals("true"))
    8
    if (readCompleteClobsString != null && readCompleteClobsString.equals("true"))
    12
    if (lenientString != null && lenientString.equals("false"))
    Differences
    Expression1Expression2Difference
    readCompleteClobsStringlenientStringVARIABLE_NAME_MISMATCH
    "true""false"LITERAL_VALUE_MISMATCH
    readCompleteClobsStringlenientStringVARIABLE_NAME_MISMATCH
    12
    if (lenientString != null && lenientString.equals("false"))
    9
    _readCompleteClobs = true;
    9
    _readCompleteClobs = true;
    13
    lenient = false;
    Differences
    Expression1Expression2Difference
    _readCompleteClobslenientVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    13
    lenient = false;
    10
    _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;
    10
    _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;
    6
    localeFormat = DateFormat.SHORT;
    Differences
    Expression1Expression2Difference
    _readClobsSizelocaleFormatVARIABLE_NAME_MISMATCH
    LARGE_COLUMN_DEFAULT_READ_LENGTHDateFormat.SHORTTYPE_COMPATIBLE_REPLACEMENT
    6
    localeFormat = DateFormat.SHORT;
    11
    String readClobsSizeString = DTProperties.get(thisClassName, "readClobsSize");
    11
    String readClobsSizeString = DTProperties.get(thisClassName, "readClobsSize");
    7
    String localeFormatString = DTProperties.get(thisClassName, "localeFormat");
    Differences
    Expression1Expression2Difference
    readClobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    "readClobsSize""localeFormat"LITERAL_VALUE_MISMATCH
    7
    String localeFormatString = DTProperties.get(thisClassName, "localeFormat");
    12
    if (readClobsSizeString != null)
    12
    if (readClobsSizeString != null)
    8
    if (localeFormatString != null)
    Differences
    Expression1Expression2Difference
    readClobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    8
    if (localeFormatString != null)
    13
    _readClobsSize = Integer.parseInt(readClobsSizeString);
    13
    _readClobsSize = Integer.parseInt(readClobsSizeString);
    9
    localeFormat = Integer.parseInt(localeFormatString);
    Differences
    Expression1Expression2Difference
    _readClobsSizelocaleFormatVARIABLE_NAME_MISMATCH
    readClobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    9
    localeFormat = Integer.parseInt(localeFormatString);
    Precondition Violations (0)
    Row Violation