public void exportObject(FileOutputStream outStream, String text) throws IOException { OutputStreamWriter outWriter = new OutputStreamWriter(outStream); // check that the text is a valid representation StringBuffer messageBuffer = new StringBuffer(); validateAndConvertInPopup(text, null, messageBuffer); if (messageBuffer.length() > 0) { // there was an error in the conversion throw new IOException(new String(messageBuffer)); } // just send the text to the output file outWriter.write(text); outWriter.flush(); outWriter.close();
public void exportObject(FileOutputStream outStream, String text) throws IOException { OutputStreamWriter outWriter = new OutputStreamWriter(outStream); // check that the text is a valid representation StringBuffer messageBuffer = new StringBuffer(); validateAndConvertInPopup(text, null, messageBuffer); if (messageBuffer.length() > 0) { // there was an error in the conversion throw new IOException(new String(messageBuffer)); } // just send the text to the output file outWriter.write(text); outWriter.flush(); outWriter.close();
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void exportObject(FileOutputStream outStream, String text)
1
public void exportObject(FileOutputStream outStream, String text)
2
       throws IOException {
2
       throws IOException {
3
       OutputStreamWriter outWriter = new OutputStreamWriter(outStream);
3
       OutputStreamWriter outWriter = new OutputStreamWriter(outStream);
4
       // check that the text is a valid representation
4
       // check that the text is a valid representation
5
       StringBuffer messageBuffer = new StringBuffer();
5
       StringBuffer messageBuffer = new StringBuffer();
6
       validateAndConvertInPopup(text, null, messageBuffer);
6
       validateAndConvertInPopup(text, null, messageBuffer);
7
       if (messageBuffer.length() > 0) {
7
       if (messageBuffer.length() > 0) {
8
          // there was an error in the conversion
8
          // there was an error in the conversion
9
          throw new IOException(new String(messageBuffer));
9
          throw new IOException(new String(messageBuffer));
10
       }
10
       }
11
       // just send the text to the output file
11
       // just send the text to the output file
12
      outWriter.write(text);
12
      outWriter.write(text);
13
      outWriter.flush();
13
      outWriter.flush();
14
      outWriter.close();
14
      outWriter.close();
15
    
15
    
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