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 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 1.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 77 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (propertiesAlreadyLoaded == false) | 1 | if (propertiesAlreadyLoaded == false) | |||||||||||||||||
2 | _readBlobs = false; |
| 2 | useJavaDefaultFormat = true; | ||||||||||||||||
3 | String readBlobsString = DTProperties.get(thisClassName, "readBlobs"); |
| 3 | String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat"); | ||||||||||||||||
4 | if (readBlobsString != null && readBlobsString.equals("true")) |
| 4 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false")) | ||||||||||||||||
5 | _readBlobs = true; |
| 5 | useJavaDefaultFormat = false; | ||||||||||||||||
6 | _readCompleteBlobs = false; |
| 10 | lenient = true; | ||||||||||||||||
7 | String readCompleteBlobsString = DTProperties.get(thisClassName, "readCompleteBlobs"); |
| 11 | String lenientString = DTProperties.get(thisClassName, "lenient"); | ||||||||||||||||
8 | if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true")) |
| 12 | if (lenientString != null && lenientString.equals("false")) | ||||||||||||||||
9 | _readCompleteBlobs = true; |
| 13 | lenient = false; | ||||||||||||||||
10 | _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; |
| 6 | localeFormat = DateFormat.SHORT; | ||||||||||||||||
11 | String readBlobsSizeString = DTProperties.get(thisClassName, "readBlobsSize"); |
| 7 | String localeFormatString = DTProperties.get(thisClassName, "localeFormat"); | ||||||||||||||||
12 | if (readBlobsSizeString != null) |
| 8 | if (localeFormatString != null) | ||||||||||||||||
13 | _readBlobsSize = Integer.parseInt(readBlobsSizeString); |
| 9 | localeFormat = Integer.parseInt(localeFormatString); | ||||||||||||||||
14 | propertiesAlreadyLoaded = true; |
| |
Row | Violation |
---|---|
1 | Unmatched statement propertiesAlreadyLoaded=true; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |