CloneSet202


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
34201.000type_declarations
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13435
E:/TSE/Projects-CloneDR/sql12/plugins/h2/src/net/sourceforge/squirrel_sql/plugins/h2/tab/ViewSourceTab.java
23435
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/ViewSourceTab.java
Next
Last
Clone Instance
1
Line Count
34
Source Line
35
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/h2/src/net/sourceforge/squirrel_sql/plugins/h2/tab/ViewSourceTab.java

/**
 * This class will display the source for an H2 view.
 *
 * @author manningr
 */
public class ViewSourceTab extends FormattedSourceTab {
  /** SQL that retrieves the source of a stored procedure. */
  private static String SQL = "select view_definition " + "from information_schema.views " + "where table_schema = ? " + "and table_name = ? ";

  /** Logger for this class. */
  private final static ILogger s_log = LoggerController.createLogger(ViewSourceTab.class );

  public ViewSourceTab(String hint, String stmtSep) {
    super(hint);
    super.setCompressWhitespace(true);
    super.setupFormatter(stmtSep, null);
  }

  protected PreparedStatement createStatement() throws SQLException {
    final ISession session = getSession();
    final IDatabaseObjectInfo doi = getDatabaseObjectInfo();
    ISQLConnection conn = session.getSQLConnection();
    if (s_log.isDebugEnabled()) {
      s_log.debug("Running SQL for View source tab: " + SQL);
    }
    PreparedStatement pstmt = conn.prepareStatement(SQL);
    pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
}




First
Previous
Clone Instance
2
Line Count
34
Source Line
35
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/tab/ViewSourceTab.java

/**
 * This class will display the source for an Postgres view.
 *
 * @author manningr
 */
public class ViewSourceTab extends FormattedSourceTab {
  /** SQL that retrieves the source of a stored procedure. */
  private static String SQL = "select view_definition " + "from information_schema.views " + "where table_schema = ? " + "and table_name = ? ";

  /** Logger for this class. */
  private final static ILogger s_log = LoggerController.createLogger(ViewSourceTab.class );

  public ViewSourceTab(String hint, String stmtSep) {
    super(hint);
    super.setCompressWhitespace(true);
    super.setupFormatter(stmtSep, null);
  }

  protected PreparedStatement createStatement() throws SQLException {
    final ISession session = getSession();
    final IDatabaseObjectInfo doi = getDatabaseObjectInfo();
    ISQLConnection conn = session.getSQLConnection();
    if (s_log.isDebugEnabled()) {
      s_log.debug("Running SQL for View source tab: " + SQL);
    }
    PreparedStatement pstmt = conn.prepareStatement(SQL);
    pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
}




Clone AbstractionParameter Count: 0Parameter Bindings

/**
 * This class will display the source for an Postgres view.
 *
 * @author manningr
 */
/**
 * This class will display the source for an H2 view.
 *
 * @author manningr
 */
public class ViewSourceTab extends FormattedSourceTab {
  /** SQL that retrieves the source of a stored procedure. */
  private static String SQL = "select view_definition " + "from information_schema.views " + "where table_schema = ? " + "and table_name = ? ";

  /** Logger for this class. */
  private final static ILogger s_log = LoggerController.createLogger(ViewSourceTab.class );

  public ViewSourceTab(String hint, String stmtSep) {
    super(hint);
    super.setCompressWhitespace(true);
    super.setupFormatter(stmtSep, null);
  }

  protected PreparedStatement createStatement() throws SQLException {
    final ISession session = getSession();
    final IDatabaseObjectInfo doi = getDatabaseObjectInfo();
    ISQLConnection conn = session.getSQLConnection();
    if (s_log.isDebugEnabled()) {
      s_log.debug("Running SQL for View source tab: " + SQL);
    }
    PreparedStatement pstmt = conn.prepareStatement(SQL);
    pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None