private static class SQLJavaObjectOkJPanel extends OkJPanel { private static final long serialVersionUID = 1353928067985854545L; /* * GUI components - need to be here because they need to be * accessible from the event handlers to alter each other's state. */ // check box for whether to read contents during table load or not private JCheckBox _showSQLJavaObjectChk = new JCheckBox( // i18n[dataTypeJavaObject.readContentsWhenLoaded=Read contents when table is first loaded and display as string] s_stringMgr.getString("dataTypeJavaObject.readContentsWhenLoaded")); public SQLJavaObjectOkJPanel() { /* set up the controls */ // checkbox for read/not-read on table load _showSQLJavaObjectChk.setSelected(_readSQLJavaObject); /* * Create the panel and add the GUI items to it */ // i18n[dataTypeJavaObject.sqlJavaObjectType=SQL JavaObject (SQL type 2000)] setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("dataTypeJavaObject.sqlJavaObjectType"))); add(_showSQLJavaObjectChk); } // end of constructor for inner class /** * User has clicked OK in the surrounding JPanel, * so save the current state of all variables */ public void ok() { // get the values from the controls and set them in the static properties _readSQLJavaObject = _showSQLJavaObjectChk.isSelected(); DTProperties.put( thisClassName, "readSQLJavaObject", Boolean.valueOf(_readSQLJavaObject).toString())
private static class UnknownOkJPanel extends OkJPanel { private static final long serialVersionUID = 1L; /* * GUI components - need to be here because they need to be * accessible from the event handlers to alter each other's state. */ // check box for whether to read contents during table load or not private JCheckBox _showUnknownChk = new JCheckBox( // i18n[dataTypeUnknown.readContentsOnLoad=Read contents when table is first loaded and display as string] s_stringMgr.getString("dataTypeUnknown.readContentsOnLoad")); public UnknownOkJPanel() { /* set up the controls */ // checkbox for read/not-read on table load _showUnknownChk.setSelected(_readUnknown); /* * Create the panel and add the GUI items to it */ setBorder(BorderFactory.createTitledBorder( // i18n[dataTypeUnknown.unknownTypes=Unknown DataTypes (non-standard SQL type codes)] s_stringMgr.getString("dataTypeUnknown.unknownTypes"))); add(_showUnknownChk); } // end of constructor for inner class /** * User has clicked OK in the surrounding JPanel, * so save the current state of all variables */ public void ok() { // get the values from the controls and set them in the static properties _readUnknown = _showUnknownChk.isSelected(); DTProperties.put( thisClassName, "readUnknown", Boolean.valueOf(_readUnknown).toString())
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeJavaObject.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeUnknown.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private static class SQLJavaObjectOkJPanel extends OkJPanel {
1
private static class UnknownOkJPanel extends OkJPanel {
2
	    private static final long serialVersionUID = 1353928067985854545L;
2
        private static final long serialVersionUID = 1L;
3
        /*
3
        /*
4
		 * GUI components - need to be here because they need to be
4
		 * GUI components - need to be here because they need to be
5
		 * accessible from the event handlers to alter each other's state.
5
		 * accessible from the event handlers to alter each other's state.
6
		 */
6
		 */
7
		// check box for whether to read contents during table load or not
7
		// check box for whether to read contents during table load or not
8
		private JCheckBox _showSQLJavaObjectChk = new JCheckBox(
8
		private JCheckBox _showUnknownChk = new JCheckBox(
9
			// i18n[dataTypeJavaObject.readContentsWhenLoaded=Read contents when table is first loaded and display as string]
9
			// i18n[dataTypeUnknown.readContentsOnLoad=Read contents when table is first loaded and display as string]
10
			s_stringMgr.getString("dataTypeJavaObject.readContentsWhenLoaded"));
10
			s_stringMgr.getString("dataTypeUnknown.readContentsOnLoad"));
11
		public SQLJavaObjectOkJPanel() {
11
		public UnknownOkJPanel() {
12
		 	 
12
			/* set up the controls */
13
			/* set up the controls */
13
			// checkbox for read/not-read on table load
14
			// checkbox for read/not-read on table load
14
			_showSQLJavaObjectChk.setSelected(_readSQLJavaObject);
15
			_showUnknownChk.setSelected(_readUnknown);
15
			/*
16
			/*
16
			 * Create the panel and add the GUI items to it
17
			 * Create the panel and add the GUI items to it
17
			 */
18
			 */
19
 		
18
			// i18n[dataTypeJavaObject.sqlJavaObjectType=SQL JavaObject   (
20
			setBorder(BorderFactory.createTitledBorder(
19
SQL type 2000)]
21
				// i18n[dataTypeUnknown.unknownTypes=Unknown DataTypes   (non-standard SQL type codes)]
20
			setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("dataTypeJavaObject.sqlJavaObjectType")));
22
				s_stringMgr.getString("dataTypeUnknown.unknownTypes")));
21
			add(_showSQLJavaObjectChk);
23
			add(_showUnknownChk);
22
		} // end of constructor for inner class
24
		} // end of constructor for inner class
25
	 
26
	 
23
		/**
27
		/**
24
		 * User has clicked OK in the surrounding JPanel,
28
		 * User has clicked OK in the surrounding JPanel,
25
		 * so save the current state of all variables
29
		 * so save the current state of all variables
26
		 */
30
		 */
27
		public void ok() {
31
		public void ok() {
28
			// get the values from the controls and set them in the static properties
32
			// get the values from the controls and set them in the static properties
29
			_readSQLJavaObject = _showSQLJavaObjectChk.isSelected();
33
			_readUnknown = _showUnknownChk.isSelected();
30
			DTProperties.put(
34
			DTProperties.put(
31
				thisClassName,
35
				thisClassName,
32
				"readSQLJavaObject", Boolean.valueOf(_readSQLJavaObject).toString())
36
				"readUnknown", Boolean.valueOf(_readUnknown).toString())
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0