if (propertiesAlreadyLoaded == false) { // get parameters previously set by user, or set default values _readBlobs = false; // set to the default String readBlobsString = DTProperties.get( thisClassName, "readBlobs"); if (readBlobsString != null && readBlobsString.equals("true")) _readBlobs = true; _readCompleteBlobs = false; // set to the default String readCompleteBlobsString = DTProperties.get( thisClassName, "readCompleteBlobs"); if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true")) _readCompleteBlobs = true; _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; // set to default String readBlobsSizeString = DTProperties.get( thisClassName, "readBlobsSize"); if (readBlobsSizeString != null) _readBlobsSize = Integer.parseInt(readBlobsSizeString); 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; }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBlob.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java
Method name: void loadProperties() Method name: void loadProperties()
Number of AST nodes: 14 Number of AST nodes: 13
1
if (propertiesAlreadyLoaded == false) {
1
if (propertiesAlreadyLoaded == false) {
2
			// get parameters previously set by user, or set default values
2
         // get parameters previously set by user, or set default values
3
			_readBlobs = false;	// set to the default
4
			String readBlobs
3
         useJavaDefaultFormat =true;	// set to use the Java default
5
String = DTProperties.get(
4
         String useJavaDefaultFormatString = DTProperties.get(
6
				thisClassName, "readBlobs");
5
            thisClassName, "
7
			if (readBlobsString != null && readBlobs
6
useJavaDefaultFormat");
8
String.equals("true"))
7
         if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
9
				_readBlobs = true;
10
			_readCompleteBlobs = false;	// set to the default
11
			String readCompleteBlobs
8
            useJavaDefaultFormat =false;
9
         // get which locale-dependent format to use
10
         localeFormat =DateFormat.SHORT;	// set to use the Java default
12
String = DTProperties.get(
11
         String localeFormatString = DTProperties.get(
13
				thisClassName, "readCompleteBlobs");
12
            thisClassName, "
14
			if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true"))
15
				_readCompleteBlobs = true;
16
			_readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;	// set to default
17
			String readBlobsSize
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
18
String = DTProperties.get(
18
         String lenientString = DTProperties.get(
19
				thisClassName, "readBlobsSize");
19
            thisClassName, "
20
			if (readBlobsSizeString != null)
21
				_readBlobsSize = Integer.parseInt(readBlobsSizeString);
22
			propertiesAlreadyLoaded = true;
23
		
20
lenient");
21
         if (lenientString != null && lenientString.equals("false"))
22
            lenient =false;
24
}
23
      }
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons77
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements13
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)7.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (propertiesAlreadyLoaded == false)
    1
    if (propertiesAlreadyLoaded == false)
    2
    _readBlobs = false;
    2
    _readBlobs = false;
    2
    useJavaDefaultFormat = true;
    Differences
    Expression1Expression2Difference
    _readBlobsuseJavaDefaultFormatVARIABLE_NAME_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    2
    useJavaDefaultFormat = true;
    3
    String readBlobsString = DTProperties.get(thisClassName, "readBlobs");
    3
    String readBlobsString = DTProperties.get(thisClassName, "readBlobs");
    3
    String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat");
    Differences
    Expression1Expression2Difference
    readBlobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    "readBlobs""useJavaDefaultFormat"LITERAL_VALUE_MISMATCH
    3
    String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat");
    4
    if (readBlobsString != null && readBlobsString.equals("true"))
    4
    if (readBlobsString != null && readBlobsString.equals("true"))
    4
    if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
    Differences
    Expression1Expression2Difference
    readBlobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    "true""false"LITERAL_VALUE_MISMATCH
    readBlobsStringuseJavaDefaultFormatStringVARIABLE_NAME_MISMATCH
    4
    if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))
    5
    _readBlobs = true;
    5
    _readBlobs = true;
    5
    useJavaDefaultFormat = false;
    Differences
    Expression1Expression2Difference
    _readBlobsuseJavaDefaultFormatVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    5
    useJavaDefaultFormat = false;
    6
    _readCompleteBlobs = false;
    6
    _readCompleteBlobs = false;
    10
    lenient = true;
    Differences
    Expression1Expression2Difference
    _readCompleteBlobslenientVARIABLE_NAME_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    10
    lenient = true;
    7
    String readCompleteBlobsString = DTProperties.get(thisClassName, "readCompleteBlobs");
    7
    String readCompleteBlobsString = DTProperties.get(thisClassName, "readCompleteBlobs");
    11
    String lenientString = DTProperties.get(thisClassName, "lenient");
    Differences
    Expression1Expression2Difference
    readCompleteBlobsStringlenientStringVARIABLE_NAME_MISMATCH
    "readCompleteBlobs""lenient"LITERAL_VALUE_MISMATCH
    11
    String lenientString = DTProperties.get(thisClassName, "lenient");
    8
    if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true"))
    8
    if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true"))
    12
    if (lenientString != null && lenientString.equals("false"))
    Differences
    Expression1Expression2Difference
    readCompleteBlobsStringlenientStringVARIABLE_NAME_MISMATCH
    "true""false"LITERAL_VALUE_MISMATCH
    readCompleteBlobsStringlenientStringVARIABLE_NAME_MISMATCH
    12
    if (lenientString != null && lenientString.equals("false"))
    9
    _readCompleteBlobs = true;
    9
    _readCompleteBlobs = true;
    13
    lenient = false;
    Differences
    Expression1Expression2Difference
    _readCompleteBlobslenientVARIABLE_NAME_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    13
    lenient = false;
    10
    _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;
    10
    _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH;
    6
    localeFormat = DateFormat.SHORT;
    Differences
    Expression1Expression2Difference
    _readBlobsSizelocaleFormatVARIABLE_NAME_MISMATCH
    LARGE_COLUMN_DEFAULT_READ_LENGTHDateFormat.SHORTTYPE_COMPATIBLE_REPLACEMENT
    6
    localeFormat = DateFormat.SHORT;
    11
    String readBlobsSizeString = DTProperties.get(thisClassName, "readBlobsSize");
    11
    String readBlobsSizeString = DTProperties.get(thisClassName, "readBlobsSize");
    7
    String localeFormatString = DTProperties.get(thisClassName, "localeFormat");
    Differences
    Expression1Expression2Difference
    readBlobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    "readBlobsSize""localeFormat"LITERAL_VALUE_MISMATCH
    7
    String localeFormatString = DTProperties.get(thisClassName, "localeFormat");
    12
    if (readBlobsSizeString != null)
    12
    if (readBlobsSizeString != null)
    8
    if (localeFormatString != null)
    Differences
    Expression1Expression2Difference
    readBlobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    8
    if (localeFormatString != null)
    13
    _readBlobsSize = Integer.parseInt(readBlobsSizeString);
    13
    _readBlobsSize = Integer.parseInt(readBlobsSizeString);
    9
    localeFormat = Integer.parseInt(localeFormatString);
    Differences
    Expression1Expression2Difference
    _readBlobsSizelocaleFormatVARIABLE_NAME_MISMATCH
    readBlobsSizeStringlocaleFormatStringVARIABLE_NAME_MISMATCH
    9
    localeFormat = Integer.parseInt(localeFormatString);
    14
    propertiesAlreadyLoaded = true;
    14
    propertiesAlreadyLoaded = true;
    Preondition Violations
    Unmatched statement propertiesAlreadyLoaded=true; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                      
    Precondition Violations (1)
    Row Violation
    1Unmatched statement propertiesAlreadyLoaded=true; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted