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: 17 | Number of AST nodes: 17 | |||
1 | _readClobs = false; // set to the default↵ | |||
2 | String readClobs↵ | 1 | propertiesAlreadyLoaded = true;↵ | |
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 | ↵ | |
8 | _readCompleteClobs = false; // set to the↵ | 9 | useJavaDefaultFormat =false;↵ | |
10 | // get which locale-dependent format to use↵ | |||
9 | default↵ | 11 | localeFormat =DateFormat.SHORT; // set to use the Java default↵ | |
10 | String readCompleteClobsString = DTProperties.get(↵ | 12 | String localeFormatString = DTProperties.get(↵ | |
11 | thisClassName, "readCompleteClobs");↵ | 13 | 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↵ | 14 | localeFormat");↵ | |
15 | if (localeFormatString != null)↵ | |||
16 | localeFormat = Integer.parseInt(localeFormatString);↵ | |||
17 | // use lenient input or force user to enter exact format↵ | |||
18 | lenient = true; // set to allow less stringent input↵ | |||
17 | String = DTProperties.get(↵ | 19 | String lenientString = DTProperties.get(↵ | |
18 | thisClassName, "readClobsSize");↵ | 20 | thisClassName, "↵ | |
19 | if (readClobsSizeString != null)↵ | |||
20 | _readClobsSize = Integer.parseInt(readClobsSizeString);↵ | |||
21 | _makeNewlinesVisibleInCell = true; // set to the default↵ | |||
22 | String makeNewlinesVisibleString = DTProperties.get(thisClassName, "makeNewlinesVisibleInCell");↵ | |||
23 | if (makeNewlinesVisibleString != null && makeNewlinesVisible↵ | 21 | lenient");↵ | |
22 | if (lenientString != null && lenientString.equals("false"))↵ | |||
23 | lenient =false;↵ | |||
24 | ↵ | |||
25 | // Bug #1757076↵ | |||
26 | // always use false unless user specifies otherwise; this breaks↵ | |||
27 | // date editing in Derby (possibly DB2 as well)↵ | |||
28 | readDateAsTimestamp = false;↵ | |||
29 | String readDateAsTimestampString = ↵ | |||
30 | DTProperties.get(thisClassName, "readDateAsTimestamp");↵ | |||
31 | if (readDateAsTimestampString != null && ↵ | |||
24 | String.equals("false"))↵ | 32 | readDateAsTimestampString.equals("↵ | |
25 | _makeNewlinesVisibleInCell = false;↵ | |||
26 | propertiesAlreadyLoaded = true; | 33 | true")) ↵ | |
34 | {↵ | |||
35 | readDateAsTimestamp = true;↵ | |||
36 |
| |||
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 69 |
Number of mapped statements | 17 |
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) | 8.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
---|