CloneSet70


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
48260.990class_member_list[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
148234
libraries/joomla/database/database/mysql.php
248250
libraries/joomla/database/database/mysqli.php
Clone Instance
1
Line Count
48
Source Line
234
Source File
libraries/joomla/database/database/mysql.php

        /**
         * Description
         *
         * @access      public
         * @return int The number of affected rows in the previous operation
         * @since 1.0.5
         */
        public

               function getAffectedRows() {

                return mysql_affected_rows($this->_resource);
              }
        /**
         * Execute a batch query
         *
         * @access      public
         * @return mixed A database resource if successful, FALSE if not.
         */
        public

               function queryBatch($abort_on_error=TRUE, $p_transaction_safe=  FALSE) {

                $this->_errorNum = 0;
                $this->_errorMsg = '';
                if ($p_transaction_safe) {
                        $this->_sql = rtrim($this->_sql ,"; \t\r\n\000");
                        $si=  $this->getVersion();
                        preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m);
                        if ($m[1]>=  4) {
                                $this->_sql = 'START TRANSACTION;'
                                              .                      $this->_sql
                                              .                                    '; COMMIT;';
                              }
                        else   if ($m[2]>=  23
                                   &&             $m[3]>=  19) {
                                $this->_sql = 'BEGIN WORK;'
                                              .               $this->_sql
                                              .                             '; COMMIT;';
                              }
                               else if ($m[2]>=  23
                                        &&             $m[3]>=  17) {
                                     $this->_sql = 'BEGIN;'
                                                   .          $this->_sql
                                                   .                        '; COMMIT;';
                                   }
                      }
                $query_split=  $this->splitSql($this->_sql);
                $error=  0;
                foreach ($query_split as $command_line) {
                        $command_line=  trim($command_line);
                        if ($command_line != '') {
                                $this->_cursor = mysql_query($command_line, $this->_resource);
                                if ($this->_debug) {
                                        $this->_ticker ++;
                                        $this->_log[]=  $command_line;
                                      }
                                if (!$this->_cursor) {
                                        $error=  1;
                                        $this->_errorNum .= mysql_errno($this->_resource)
                                                            .                               ' ';
                                        $this->_errorMsg .= mysql_error($this->_resource)
                                                            .                             " SQL=$command_line <br />";
                                        if ($abort_on_error) {
                                                return $this->_cursor;
                                              }
                                      }
                              }
                      }
                return $error
                       ?        FALSE
                       :                TRUE;
              }


Clone Instance
2
Line Count
48
Source Line
250
Source File
libraries/joomla/database/database/mysqli.php

        /**
         * Description
         *
         * @access public
         * @return int The number of affected rows in the previous operation
         * @since 1.0.5
         */
        public

               function getAffectedRows() {

                return mysqli_affected_rows($this->_resource);
              }
        /**
        * Execute a batch query
        *
        * @access public
        * @return mixed A database resource if successful, FALSE if not.
        */
        public

               function queryBatch($abort_on_error=TRUE, $p_transaction_safe=  FALSE) {

                $this->_errorNum = 0;
                $this->_errorMsg = '';
                if ($p_transaction_safe) {
                        $this->_sql = rtrim($this->_sql ,"; \t\r\n\000");
                        $si=  $this->getVersion();
                        preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m);
                        if ($m[1]>=  4) {
                                $this->_sql = 'START TRANSACTION;'
                                              .                      $this->_sql
                                              .                                    '; COMMIT;';
                              }
                        else   if ($m[2]>=  23
                                   &&             $m[3]>=  19) {
                                $this->_sql = 'BEGIN WORK;'
                                              .               $this->_sql
                                              .                             '; COMMIT;';
                              }
                               else if ($m[2]>=  23
                                        &&             $m[3]>=  17) {
                                     $this->_sql = 'BEGIN;'
                                                   .          $this->_sql
                                                   .                        '; COMMIT;';
                                   }
                      }
                $query_split=  $this->splitSql($this->_sql);
                $error=  0;
                foreach ($query_split as $command_line) {
                        $command_line=  trim($command_line);
                        if ($command_line != '') {
                                $this->_cursor = mysqli_query($this->_resource ,$command_line);
                                if ($this->_debug) {
                                        $this->_ticker ++;
                                        $this->_log[]=  $command_line;
                                      }
                                if (!$this->_cursor) {
                                        $error=  1;
                                        $this->_errorNum .= mysqli_errno($this->_resource)
                                                            .                                ' ';
                                        $this->_errorMsg .= mysqli_error($this->_resource)
                                                            .                              " SQL=$command_line <br />";
                                        if ($abort_on_error) {
                                                return $this->_cursor;
                                              }
                                      }
                              }
                      }
                return $error
                       ?        FALSE
                       :                TRUE;
              }


Clone AbstractionParameter Count: 6Parameter Bindings

/**
         * Description
         *
         * @access      public
         * @return int The number of affected rows in the previous operation
         * @since 1.0.5
         */
/**
         * Description
         *
         * @access public
         * @return int The number of affected rows in the previous operation
         * @since 1.0.5
         */
public

      function getAffectedRows() {
        return [[#variable586001c0]]($this->_resource);
      }
/**
         * Execute a batch query
         *
         * @access      public
         * @return mixed A database resource if successful, FALSE if not.
         */
/**
        * Execute a batch query
        *
        * @access public
        * @return mixed A database resource if successful, FALSE if not.
        */
public

      function queryBatch($abort_on_error=TRUE,$p_transaction_safe=FALSE) {
        $this->_errorNum =0;
        $this->_errorMsg ='';
        if ($p_transaction_safe) {
          $this->_sql =rtrim($this->_sql ,"; \t\r\n\000");
          $si=$this->getVersion();
          preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m);
          if ($m[1]>=4) {
            $this->_sql ='START TRANSACTION;'
                         . $this->_sql
                         . '; COMMIT;';
          }
          else if ($m[2]>=23
                   && $m[3]>=19) {
                 $this->_sql ='BEGIN WORK;'
                              . $this->_sql
                              . '; COMMIT;';
               }
               else if ($m[2]>=23
                        && $m[3]>=17) {
                      $this->_sql ='BEGIN;'
                                   . $this->_sql
                                   . '; COMMIT;';
                    }
        }
        $query_split=$this->splitSql($this->_sql);
        $error=0;
        foreach ($query_split as $command_line) {
          $command_line=trim($command_line);
          if ($command_line != '') {
            $this->_cursor = [[#variable58600140]]( [[#variable58600060]], [[#variable58600000]]);
            if ($this->_debug) {
              $this->_ticker ++;
              $this->_log[]=$command_line;
            }
            if (!$this->_cursor) {
              $error=1;
              $this->_errorNum .= [[#variable23d7c000]]($this->_resource)
                                 . ' ';
              $this->_errorMsg .= [[#variable58759f20]]($this->_resource)
                                 . " SQL=$command_line <br />";
              if ($abort_on_error) {
                return $this->_cursor;
              }
            }
          }
        }
        return $error
               ? FALSE
               : TRUE;
      }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#586001c0]]
mysql_affected_rows 
12[[#586001c0]]
mysqli_affected_rows 
21[[#58600140]]
mysql_query 
22[[#58600140]]
mysqli_query 
31[[#58600060]]
$command_line 
32[[#58600060]]
$this->_resource 
41[[#58600000]]
$this->_resource 
42[[#58600000]]
$command_line 
51[[#23d7c000]]
mysql_errno 
52[[#23d7c000]]
mysqli_errno 
61[[#58759f20]]
mysql_error 
62[[#58759f20]]
mysqli_error