CloneSet158


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33220.997class_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
133290
libraries/joomla/database/database/mysql.php
233306
libraries/joomla/database/database/mysqli.php
Clone Instance
1
Line Count
33
Source Line
290
Source File
libraries/joomla/database/database/mysql.php

        /**
         * Diagnostic function
         *
         * @access      public
         * @return      string
         */
        public

               function explain() {

                $temp=  $this->_sql;
                $this->_sql = "EXPLAIN $this->_sql";

                if (!($cur=  $this->query())) {
                        return NULL;
                      }
                $first=  TRUE;

                $buffer=  '<table id="explain-sql">';
                $buffer.=  '<thead><tr><td colspan="99">'
                           .                              $this->getQuery()
                .                                                           '</td></tr>';
                while ($row=  mysql_fetch_assoc($cur)) {
                        if ($first) {
                                $buffer.=  '<tr>';
                                foreach ($row as $k => $v) {
                                        $buffer.=  '<th>'
                                                   .      $k
                                                   .         '</th>';
                                      }
                                $buffer.=  '</tr>';
                                $first=  FALSE;
                              }
                        $buffer.=  '</thead><tbody><tr>';
                        foreach ($row as $k => $v) {
                                $buffer.=  '<td>'
                                           .      $v
                                           .         '</td>';
                              }
                        $buffer.=  '</tr>';
                      }
                $buffer.=  '</tbody></table>';
                mysql_free_result($cur);
                $this->_sql = $temp;
                return $buffer;
              }


Clone Instance
2
Line Count
33
Source Line
306
Source File
libraries/joomla/database/database/mysqli.php

        /**
         * Diagnostic function
         *
         * @access public
         * @return      string
         */
        public

               function explain() {

                $temp=  $this->_sql;
                $this->_sql = "EXPLAIN $this->_sql";

                if (!($cur=  $this->query())) {
                        return NULL;
                      }
                $first=  TRUE;

                $buffer=  '<table id="explain-sql">';
                $buffer.=  '<thead><tr><td colspan="99">'
                           .                              $this->getQuery()
                .                                                           '</td></tr>';
                while ($row=  mysqli_fetch_assoc($cur)) {
                        if ($first) {
                                $buffer.=  '<tr>';
                                foreach ($row as $k => $v) {
                                        $buffer.=  '<th>'
                                                   .      $k
                                                   .         '</th>';
                                      }
                                $buffer.=  '</tr>';
                                $first=  FALSE;
                              }
                        $buffer.=  '</thead><tbody><tr>';
                        foreach ($row as $k => $v) {
                                $buffer.=  '<td>'
                                           .      $v
                                           .         '</td>';
                              }
                        $buffer.=  '</tr>';
                      }
                $buffer.=  '</tbody></table>';
                mysqli_free_result($cur);
                $this->_sql = $temp;
                return $buffer;
              }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Diagnostic function
         *
         * @access public
         * @return      string
         */
/**
         * Diagnostic function
         *
         * @access      public
         * @return      string
         */
public

      function explain() {
        $temp=$this->_sql;
        $this->_sql = "EXPLAIN $this->_sql";
        if (!($cur=$this->query())) {
          return NULL;
        }
        $first=TRUE;
        $buffer='<table id="explain-sql">';
        $buffer.='<thead><tr><td colspan="99">'
                 . $this->getQuery()
        . '</td></tr>';
        while ($row= [[#variable3f9c3300]]($cur)) {
          if ($first) {
            $buffer.='<tr>';
            foreach ($row as $k => $v) {
              $buffer.='<th>'
                       . $k
                       . '</th>';
            }
            $buffer.='</tr>';
            $first=FALSE;
          }
          $buffer.='</thead><tbody><tr>';
          foreach ($row as $k => $v) {
            $buffer.='<td>'
                     . $v
                     . '</td>';
          }
          $buffer.='</tr>';
        }
        $buffer.='</tbody></table>';
         [[#variable3f9c32a0]]($cur);
        $this->_sql =$temp;
        return $buffer;
      }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#3f9c3300]]
mysqli_fetch_assoc 
12[[#3f9c3300]]
mysql_fetch_assoc 
21[[#3f9c32a0]]
mysqli_free_result 
22[[#3f9c32a0]]
mysql_free_result