CloneSet119


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
66210.995compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1664
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/test/adhoc/HSQLBigDecimalTest.java
2664
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/test/adhoc/MySQLDecimalTest.java
Next
Last
Clone Instance
1
Line Count
66
Source Line
4
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/test/adhoc/HSQLBigDecimalTest.java

/*
 * Copyright (C) CollabraSpace Inc. All rights reserved.
 */
package adhoc;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class HSQLBigDecimalTest {
  String jdbcUrl = "jdbc:hsqldb:file:/tools/hsqldb-1_8_0_2/data/dbcopydest";

  String user = "sa";

  String pass = "";

  Connection con = null;

  String testSQL = "select nr from test";

  public HSQLBigDecimalTest() throws Exception {
    init();
  }

  public void init() throws Exception {
    Class.forName("org.hsqldb.jdbcDriver");
    con = DriverManager.getConnection(jdbcUrl, user, pass);
  }

  /**
   * This fails with a Connection failure - java.io.EOFException
   * @throws SQLException
   */
  public void doTest() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(testSQL);
    if (rs.next()) {
      BigDecimal d = rs.getBigDecimal(1);
      System.out.println("d=" + d);
    }
    stmt.close();
  }

  public void shutdown() throws SQLException {
    con.close();
  }

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    PointbaseBLOBTest test = new PointbaseBLOBTest();
    test.doTest();
    test.shutdown();
  }
}




First
Previous
Clone Instance
2
Line Count
66
Source Line
4
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/dbcopy/test/adhoc/MySQLDecimalTest.java

/*
 * Copyright (C) CollabraSpace Inc. All rights reserved.
 */
package adhoc;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class MySQLDecimalTest {
  String jdbcUrl = "jdbc:hsqldb:file:/tools/hsqldb-1_8_0_2/data/dbcopydest";

  String user = "sa";

  String pass = "";

  Connection con = null;

  String testSQL = "select nr from test";

  public MySQLDecimalTest() throws Exception {
    init();
  }

  public void init() throws Exception {
    Class.forName("org.hsqldb.jdbcDriver");
    con = DriverManager.getConnection(jdbcUrl, user, pass);
  }

  /**
   * This fails with a Connection failure - java.io.EOFException
   * @throws SQLException
   */
  public void doTest() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(testSQL);
    if (rs.next()) {
      BigDecimal d = rs.getBigDecimal(1);
      System.out.println("d=" + d);
    }
    stmt.close();
  }

  public void shutdown() throws SQLException {
    con.close();
  }

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    PointbaseBLOBTest test = new PointbaseBLOBTest();
    test.doTest();
    test.shutdown();
  }
}




Clone AbstractionParameter Count: 1Parameter Bindings

/*
 * Copyright (C) CollabraSpace Inc. All rights reserved.
 */
package adhoc;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class [[#variable1af53140]]{
  String jdbcUrl = "jdbc:hsqldb:file:/tools/hsqldb-1_8_0_2/data/dbcopydest";

  String user = "sa";

  String pass = "";

  Connection con = null;

  String testSQL = "select nr from test";

  public [[#variable1af53140]]() throws Exception {
    init();
  }

  public void init() throws Exception {
    Class.forName("org.hsqldb.jdbcDriver");
    con = DriverManager.getConnection(jdbcUrl, user, pass);
  }

  /**
       * This fails with a Connection failure - java.io.EOFException
       * @throws SQLException
       */
  public void doTest() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(testSQL);
    if (rs.next()) {
      BigDecimal d = rs.getBigDecimal(1);
      System.out.println("d=" + d);
    }
    stmt.close();
  }

  public void shutdown() throws SQLException {
    con.close();
  }

  /**
       * @param args
       */
  public static void main(String[] args) throws Exception {
    PointbaseBLOBTest test = new PointbaseBLOBTest();
    test.doTest();
    test.shutdown();
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1af53140]]
HSQLBigDecimalTest 
12[[#1af53140]]
MySQLDecimalTest