if ((c==KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) { // delete when null => original value DataTypeTimestamp.this._textComponent.restoreText(); e.consume(); } else { // non-delete when null => clear field and add text DataTypeTimestamp.this._textComponent.updateText(""); // fall through to normal processing of this key stroke }
if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) { // delete when null => original value DerbyClobDataTypeComponent.this._textComponent.restoreText(); e.consume(); } else { // non-delete when null => clear field and add text DerbyClobDataTypeComponent.this._textComponent.updateText(""); // fall through to normal processing of this key stroke }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java File path: /sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if ((c==KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {
1
if ((c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)) {
2
                     // delete when null => original value
2
                  // delete when null => original value
3
                     DataTypeTimestamp.this._textComponent.restoreText();
3
                  DerbyClobDataTypeComponent.this._textComponent.restoreText();
4
                     e.consume();
4
                  e.consume();
5
                  }
5
               
6
                  else {
6
} else {
7
                     // non-delete when null => clear field and add text
7
                  // non-delete when null => clear field and add text
8
                     DataTypeTimestamp.this._textComponent.updateText("");
8
                  DerbyClobDataTypeComponent.this._textComponent.updateText("");
9
                     // fall through to normal processing of this key stroke
9
                  // fall through to normal processing of this key stroke
10
                  }
10
               }
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