| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 33 | 4 | 5 | 0.976 | toplevel_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 35 | 20 | administrator/components/com_categories/controller.php |
| 2 | 33 | 19 | administrator/components/com_content/controller.php |
| 3 | 35 | 20 | administrator/components/com_menus/controller.php |
| 4 | 33 | 18 | administrator/components/com_weblinks/controller.php |
| ||||
/**
* Categories view class for the Category package.
*
* @package Joomla.Administrator
* @subpackage com_categories
* @since 1.6
*/
class CategoriesController extends JController {
/**
* Method to display a view.
*
* @return void
*/
function display() {
// Get the document object.
$document= &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName= JRequest::getWord('view', 'categories');
$vFormat= $document->getType();
$lName= JRequest::getWord('layout', 'default');
// Get and render the view.
if ($view= &$this->getView($vName, $vFormat))
{
// Get the model for the view.
$model= &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model, TRUE);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT
. DS
. 'helpers'
. DS
. 'categories.php';
CategoriesHelper::addSubmenu($model->getState('filter.extension'));
}
}
}
|
| ||||
/**
* Component Controller
*
* @package Joomla.Administrator
* @subpackage com_content
*/
class ContentController extends JController {
/**
* Display the view
*/
function display() {
// Get the document object.
$document= &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName= JRequest::getWord('view', 'articles');
$vFormat= $document->getType();
$lName= JRequest::getWord('layout', 'default');
// Get and render the view.
if ($view= &$this->getView($vName, $vFormat))
{
// Get the model for the view.
$model= &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model, TRUE);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT
. DS
. 'helpers'
. DS
. 'content.php';
ContentHelper::addSubmenu($vName);
}
}
}
|
| ||||
/**
* Base controller class for Menu Manager.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @version 1.6
*/
class MenusController extends JController {
/**
* Method to display a view.
*
* @return void
*/
function display() {
// Get the document object.
$document= &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName= JRequest::getWord('view', 'items');
$vFormat= $document->getType();
$lName= JRequest::getWord('layout', 'default');
// Get and render the view.
if ($view= &$this->getView($vName, $vFormat))
{
// Get the model for the view.
$model= &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model, TRUE);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT
. DS
. 'helpers'
. DS
. 'menus.php';
MenusHelper::addSubmenu($vName);
}
}
}
|
| ||||
/**
* Weblinks Weblink Controller
*
* @package Joomla.Administrator
* @subpackage com_weblinks
* @since 1.5
*/
class WeblinksController extends JController {
/**
* Method to display a view.
*/
function display() {
// Get the document object.
$document= &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName= JRequest::getWord('view', 'weblinks');
$vFormat= $document->getType();
$lName= JRequest::getWord('layout', 'default');
// Get and render the view.
if ($view= &$this->getView($vName, $vFormat))
{
// Get the model for the view.
$model= &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model, TRUE);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT
. DS
. 'helpers'
. DS
. 'weblinks.php';
WeblinksHelper::addSubmenu($vName);
}
}
}
|
| |||
/**
* Weblinks Weblink Controller
*
* @package Joomla.Administrator
* @subpackage com_weblinks
* @since 1.5
*/
/**
* Base controller class for Menu Manager.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @version 1.6
*/
/**
* Component Controller
*
* @package Joomla.Administrator
* @subpackage com_content
*/
/**
* Categories view class for the Category package.
*
* @package Joomla.Administrator
* @subpackage com_categories
* @since 1.6
*/
class [[#variable45079ea0]]extends JController {
/**
* Method to display a view.
*/
/**
* Method to display a view.
*
* @return void
*/
/**
* Display the view
*/
function display() {
// Get the document object.
$document= &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName=JRequest::getWord('view', [[#variable45079e40]]);
$vFormat=$document->getType();
$lName=JRequest::getWord('layout','default');
// Get and render the view.
if ($view= &$this->getView($vName,$vFormat)) {
// Get the model for the view.
$model= &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model,TRUE);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document',$document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT
. DS
. 'helpers'
. DS
. [[#variable45079de0]];
[[#variable45079d60]]::addSubmenu( [[#variable45079c20]]);
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#45079ea0]] | WeblinksController |
| 1 | 2 | [[#45079ea0]] | MenusController |
| 1 | 3 | [[#45079ea0]] | ContentController |
| 1 | 4 | [[#45079ea0]] | CategoriesController |
| 2 | 1 | [[#45079e40]] | 'weblinks' |
| 2 | 2 | [[#45079e40]] | 'items' |
| 2 | 3 | [[#45079e40]] | 'articles' |
| 2 | 4 | [[#45079e40]] | 'categories' |
| 3 | 1 | [[#45079de0]] | 'weblinks.php' |
| 3 | 2 | [[#45079de0]] | 'menus.php' |
| 3 | 3 | [[#45079de0]] | 'content.php' |
| 3 | 4 | [[#45079de0]] | 'categories.php' |
| 4 | 1 | [[#45079d60]] | WeblinksHelper |
| 4 | 2 | [[#45079d60]] | MenusHelper |
| 4 | 3 | [[#45079d60]] | ContentHelper |
| 4 | 4 | [[#45079d60]] | CategoriesHelper |
| 5 | 1 | [[#45079c20]] | $vName |
| 5 | 2 | [[#45079c20]] | $vName |
| 5 | 3 | [[#45079c20]] | $vName |
| 5 | 4 | [[#45079c20]] | $model->getState('filter.extension') |