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/DataTypeDate.java | |||
Method name: void loadProperties()
|
Method name: void loadProperties()
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (propertiesAlreadyLoaded == false) {↵ | 1 | if (propertiesAlreadyLoaded == false) {↵ | |
2 | propertiesAlreadyLoaded = true;↵ | |||
2 | // get parameters previously set by user, or set default values↵ | 3 | // get parameters previously set by user, or set default values↵ | |
3 | _readClobs = false; // set to the default↵ | 4 | useJavaDefaultFormat =true; // set to use the Java default↵ | |
4 | String readClobsString = DTProperties.get(↵ | 5 | String useJavaDefaultFormatString = DTProperties.get(↵ | |
5 | thisClassName, "readClobs");↵ | 6 | thisClassName, "↵ | |
6 | if (readClobsString != null && readClobs↵ | 7 | useJavaDefaultFormat");↵ | |
7 | String.equals("true"))↵ | 8 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))↵ | |
8 | _readClobs = true;↵ | 9 | ↵ | |
9 | _readCompleteClobs = false; // set to the↵ | 10 | useJavaDefaultFormat =false;↵ | |
11 | // get which locale-dependent format to use↵ | |||
10 | default↵ | 12 | localeFormat =DateFormat.SHORT; // set to use the Java default↵ | |
11 | String readCompleteClobsString = DTProperties.get(↵ | 13 | String localeFormatString = DTProperties.get(↵ | |
12 | thisClassName, "readCompleteClobs");↵ | 14 | thisClassName, "↵ | |
13 | if (readCompleteClobsString != null && readCompleteClobsString.equals("true"))↵ | |||
14 | _readCompleteClobs = true;↵ | |||
15 | ↵ | |||
16 | _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; // set to default↵ | |||
17 | String readClobsSize↵ | 15 | localeFormat");↵ | |
16 | if (localeFormatString != null)↵ | |||
17 | localeFormat = Integer.parseInt(localeFormatString);↵ | |||
18 | // use lenient input or force user to enter exact format↵ | |||
19 | lenient = true; // set to allow less stringent input↵ | |||
18 | String = DTProperties.get(↵ | 20 | String lenientString = DTProperties.get(↵ | |
19 | thisClassName, "readClobsSize");↵ | 21 | thisClassName, "↵ | |
20 | if (readClobsSizeString != null)↵ | |||
21 | _readClobsSize = Integer.parseInt(readClobsSizeString);↵ | |||
22 | _makeNewlinesVisibleInCell = true; // set to the default↵ | |||
23 | String makeNewlinesVisibleString = DTProperties.get(thisClassName, "makeNewlinesVisibleInCell");↵ | |||
24 | if (makeNewlinesVisibleString != null && makeNewlinesVisible↵ | 22 | lenient");↵ | |
23 | if (lenientString != null && lenientString.equals("false"))↵ | |||
24 | lenient =false;↵ | |||
25 | ↵ | |||
26 | // Bug #1757076↵ | |||
27 | // always use false unless user specifies otherwise; this breaks↵ | |||
28 | // date editing in Derby (possibly DB2 as well)↵ | |||
29 | readDateAsTimestamp = false;↵ | |||
30 | String readDateAsTimestampString = ↵ | |||
31 | DTProperties.get(thisClassName, "readDateAsTimestamp");↵ | |||
32 | if (readDateAsTimestampString != null && ↵ | |||
25 | String.equals("false"))↵ | 33 | readDateAsTimestampString.equals("↵ | |
26 | _makeNewlinesVisibleInCell = false;↵ | |||
27 | propertiesAlreadyLoaded = true;↵ | 34 | true")) ↵ | |
35 | {↵ | |||
36 | readDateAsTimestamp = true;↵ | |||
37 | }↵ | |||
28 | } | 38 |
| |
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) | 2.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 137 |
Number of mapped statements | 18 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 22.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (propertiesAlreadyLoaded == false) | 1 | if (propertiesAlreadyLoaded == false) | |||||||||||||||||
2 | _readClobs = false; |
| 15 | readDateAsTimestamp = false; | ||||||||||||||||
3 | String readClobsString = DTProperties.get(thisClassName, "readClobs"); |
| 16 | String readDateAsTimestampString = DTProperties.get(thisClassName, "readDateAsTimestamp"); | ||||||||||||||||
4 | if (readClobsString != null && readClobsString.equals("true")) |
| 17 | if (readDateAsTimestampString != null && readDateAsTimestampString.equals("true")) | ||||||||||||||||
5 | _readClobs = true; |
| 18 | readDateAsTimestamp = true; | ||||||||||||||||
6 | _readCompleteClobs = false; |
| 11 | lenient = true; | ||||||||||||||||
7 | String readCompleteClobsString = DTProperties.get(thisClassName, "readCompleteClobs"); |
| 12 | String lenientString = DTProperties.get(thisClassName, "lenient"); | ||||||||||||||||
8 | if (readCompleteClobsString != null && readCompleteClobsString.equals("true")) |
| 13 | if (lenientString != null && lenientString.equals("false")) | ||||||||||||||||
9 | _readCompleteClobs = true; |
| 14 | lenient = false; | ||||||||||||||||
10 | _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; |
| 7 | localeFormat = DateFormat.SHORT; | ||||||||||||||||
11 | String readClobsSizeString = DTProperties.get(thisClassName, "readClobsSize"); |
| 8 | String localeFormatString = DTProperties.get(thisClassName, "localeFormat"); | ||||||||||||||||
12 | if (readClobsSizeString != null) |
| 9 | if (localeFormatString != null) | ||||||||||||||||
13 | _readClobsSize = Integer.parseInt(readClobsSizeString); |
| 10 | localeFormat = Integer.parseInt(localeFormatString); | ||||||||||||||||
14 | _makeNewlinesVisibleInCell = true; |
| 3 | useJavaDefaultFormat = true; | ||||||||||||||||
15 | String makeNewlinesVisibleString = DTProperties.get(thisClassName, "makeNewlinesVisibleInCell"); |
| 4 | String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat"); | ||||||||||||||||
16 | if (makeNewlinesVisibleString != null && makeNewlinesVisibleString.equals("false")) |
| 5 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false")) | ||||||||||||||||
17 | _makeNewlinesVisibleInCell = false; |
| 6 | useJavaDefaultFormat = false; | ||||||||||||||||
18 | propertiesAlreadyLoaded = true; | 2 | propertiesAlreadyLoaded = true; |
Row | Violation |
---|