CloneSet222


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13201.000if_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113147
administrator/components/com_categories/models/categories.php
213148
administrator/components/com_content/models/articles.php
Clone Instance
1
Line Count
13
Source Line
147
Source File
administrator/components/com_categories/models/categories.php

                if (!empty($search)) {
                        if (stripos($search, 'id:') === 0) {
                                $query->where('a.id = '
                                              .         (int) substr($search, 3));
                              }
                        else if (stripos($search, 'author:') === 0)
                        {
                                $search=  $this->_db->Quote('%'
                                                            .   $this->_db->getEscaped(substr($search, 7), TRUE)
                                                            .                                                    '%');
                                $query->where('ua.name LIKE '
                                              .               $search
                                              .                       ' OR ua.username LIKE '
                                              .                                               $search);
                              }
                             else {
                                $search=  $this->_db->Quote('%'
                                                            .   $this->_db->getEscaped($search, TRUE)
                                                            .                                         '%');
                                $query->where('a.title LIKE '
                                              .               $search
                                              .                       ' OR a.alias LIKE '
                                              .                                           $search);
                              }
                      }


Clone Instance
2
Line Count
13
Source Line
148
Source File
administrator/components/com_content/models/articles.php

                if (!empty($search)) {
                        if (stripos($search, 'id:') === 0) {
                                $query->where('a.id = '
                                              .         (int) substr($search, 3));
                              }
                        else if (stripos($search, 'author:') === 0)
                        {
                                $search=  $this->_db->Quote('%'
                                                            .   $this->_db->getEscaped(substr($search, 7), TRUE)
                                                            .                                                    '%');
                                $query->where('ua.name LIKE '
                                              .               $search
                                              .                       ' OR ua.username LIKE '
                                              .                                               $search);
                              }
                             else {
                                $search=  $this->_db->Quote('%'
                                                            .   $this->_db->getEscaped($search, TRUE)
                                                            .                                         '%');
                                $query->where('a.title LIKE '
                                              .               $search
                                              .                       ' OR a.alias LIKE '
                                              .                                           $search);
                              }
                      }


Clone AbstractionParameter Count: 0Parameter Bindings

if (!empty($search)) {
  if (stripos($search,'id:') === 0) {
    $query->where('a.id = '
                  . (int) substr($search,3));
  }
  else if (stripos($search,'author:') === 0) {
         $search=$this->_db->Quote('%'
                                   . $this->_db->getEscaped(substr($search,7),TRUE)
                                   . '%');
         $query->where('ua.name LIKE '
                       . $search
                       . ' OR ua.username LIKE '
                       . $search);
       }
       else {
         $search=$this->_db->Quote('%'
                                   . $this->_db->getEscaped($search,TRUE)
                                   . '%');
         $query->where('a.title LIKE '
                       . $search
                       . ' OR a.alias LIKE '
                       . $search);
       }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None