CloneSet163


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24350.953statement_sequence[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12472
administrator/components/com_banners/controllers/banner.php
22190
administrator/components/com_messages/admin.messages.php
31970
administrator/components/com_search/models/search.php
Clone Instance
1
Line Count
24
Source Line
72
Source File
administrator/components/com_banners/controllers/banner.php

                $orderby=         ' ORDER BY '
                                  .             $filter_order
                                  .                            ' '
                                  .                                 $filter_order_Dir
                                  .                                                    ', b.ordering';
                // get the total number of records
                $query=  'SELECT COUNT(*)'
                         . ' FROM #__banner AS b'
                         . ' LEFT JOIN #__categories AS cc ON cc.id = b.catid'
                         . $where;
                $db->setQuery($query);
                $total=  $db->loadResult();
                jimport('joomla.html.pagination');
                $pageNav=  new JPagination($total, $limitstart, $limit);
                $query=  'SELECT b.*, c.name AS client_name, cc.title AS category_name, u.name AS editor'
                         . ' FROM #__banner AS b'
                         . ' INNER JOIN #__bannerclient AS c ON c.cid = b.cid'
                         . ' LEFT JOIN #__categories AS cc ON cc.id = b.catid'
                         . ' LEFT JOIN #__users AS u ON u.id = b.checked_out'
                         . $where
                         . $orderby;

                $db->setQuery($query, $pageNav->limitstart ,$pageNav->limit);
                $rows=  $db->loadObjectList();


Clone Instance
2
Line Count
21
Source Line
90
Source File
administrator/components/com_messages/admin.messages.php

        $orderby=         ' ORDER BY '
                          .             $filter_order
                          .                            ' '
                          .                                 $filter_order_Dir
                          .                                                    ', a.date_time DESC';
        $query=  'SELECT COUNT(*)'
                 . ' FROM #__messages AS a'
                 . ' INNER JOIN #__users AS u ON u.id = a.user_id_from'
                 . $where;
        $db->setQuery($query);
        $total=  $db->loadResult();
        jimport('joomla.html.pagination');
        $pageNav=  new JPagination($total, $limitstart, $limit);
        $query=  'SELECT a.*, u.name AS user_from'
                 . ' FROM #__messages AS a'
                 . ' INNER JOIN #__users AS u ON u.id = a.user_id_from'
                 . $where
                 . $orderby;

        $db->setQuery($query, $pageNav->limitstart ,$pageNav->limit);
        $rows=  $db->loadObjectList();


Clone Instance
3
Line Count
19
Source Line
70
Source File
administrator/components/com_search/models/search.php

                $orderby=         ' ORDER BY '
                                  .             $filter_order
                                  .                            ' '
                                  .                                 $filter_order_Dir
                                  .                                                    ', hits DESC';
                // get the total number of records
                $query=  'SELECT COUNT(*)'
                         . ' FROM #__core_log_searches'
                         . $where;
                $db->setQuery($query);
                $total=  $db->loadResult();
                jimport('joomla.html.pagination');
                $pageNav=  new JPagination($total, $limitstart, $limit);
                $query=  ' SELECT * '
                         . ' FROM #__core_log_searches '
                         . $where
                         . $orderby;
                $db->setQuery($query, $pageNav->limitstart ,$pageNav->limit);
                $rows=  $db->loadObjectList();


Clone AbstractionParameter Count: 5Parameter Bindings

$orderby=' ORDER BY '
         . $filter_order
         . ' '
         . $filter_order_Dir
         .  [[#variable4c7acf60]];
// get the total number of records
$query= [[#variable4c7acec0]]
       .  [[#variable4c7ace40]]
       . $where;
$db->setQuery($query);
$total=$db->loadResult();
jimport('joomla.html.pagination');
$pageNav=new JPagination($total,$limitstart,$limit);
$query= [[#variable4dddace0]]
       .  [[#variable4c7acda0]]
       . $where
       . $orderby;
$db->setQuery($query,$pageNav->limitstart ,$pageNav->limit);
$rows=$db->loadObjectList();
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4c7acf60]]
', b.ordering' 
12[[#4c7acf60]]
', a.date_time DESC' 
13[[#4c7acf60]]
', hits DESC' 
21[[#4c7acec0]]
'SELECT COUNT(*)'
. ' FROM #__banner AS b' 
22[[#4c7acec0]]
'SELECT COUNT(*)'
. ' FROM #__messages AS a' 
23[[#4c7acec0]]
'SELECT COUNT(*)' 
31[[#4c7ace40]]
' LEFT JOIN #__categories AS cc ON cc.id = b.catid' 
32[[#4c7ace40]]
' INNER JOIN #__users AS u ON u.id = a.user_id_from' 
33[[#4c7ace40]]
' FROM #__core_log_searches' 
41[[#4dddace0]]
'SELECT b.*, c.name AS client_name, cc.title AS category_name, u.name AS editor'
. ' FROM #__banner AS b'
. ' INNER JOIN #__bannerclient AS c ON c.cid = b.cid'
. ' LEFT JOIN #__categories AS cc ON cc.id = b.catid' 
42[[#4dddace0]]
'SELECT a.*, u.name AS user_from'
. ' FROM #__messages AS a' 
43[[#4dddace0]]
' SELECT * ' 
51[[#4c7acda0]]
' LEFT JOIN #__users AS u ON u.id = b.checked_out' 
52[[#4c7acda0]]
' INNER JOIN #__users AS u ON u.id = a.user_id_from' 
53[[#4c7acda0]]
' FROM #__core_log_searches '