Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 3 | 5 | 0.965 | statement_sequence[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 384 | libraries/joomla/access/helper.php |
2 | 16 | 530 | libraries/joomla/access/helper.php |
3 | 16 | 732 | libraries/joomla/access/helper.php |
| ||||
// If the section does not exist, throw an exception. if (empty($sectionId)) { return new JException(JText::_('Access_Section_Invalid')); } // Check to see if the action already exists. $db->setQuery( 'SELECT `id`' . ' FROM `#__access_actions`' . ' WHERE `name` = ' . $db->Quote($name) . ' AND `section_id` = ' . (int) $sectionId); $actionId= $db->loadResult(); // Check for a database error. if ($db->getErrorNum()) { return new JException($db->getErrorMsg()); } |
| ||||
// If the section does not exist, throw an exception. if (empty($sectionId)) { return new JException(JText::_('Access_Section_Invalid')); } // Check to see if the user group already exists. $db->setQuery( 'SELECT `id`' . ' FROM `#__usergroups`' . ' WHERE `title` = ' . $db->Quote($title) . ' AND `section_id` = ' . (int) $sectionId); $groupId= $db->loadResult(); // Check for a database error. if ($db->getErrorNum()) { return new JException($db->getErrorMsg()); } |
| ||||
// If the section does not exist, throw an exception. if (empty($sectionId)) { return new JException(JText::_('Access_Section_Invalid')); } // Check to see if the assetgroup already exists. $db->setQuery( 'SELECT `id`' . ' FROM `#__access_assetgroups`' . ' WHERE `title` = ' . $db->Quote($title) . ' AND `section_id` = ' . (int) $sectionId); $groupId= (int) $db->loadResult(); // Check for a database error. if ($db->getErrorNum()) { return new JException($db->getErrorMsg()); } |
| |||
// If the section does not exist, throw an exception. if (empty($sectionId)) { return new JException(JText::_('Access_Section_Invalid')); } // Check to see if the action already exists. // Check to see if the user group already exists. // Check to see if the assetgroup already exists. $db->setQuery('SELECT `id`' . [[#variable50545be0]] . [[#variable50545b20]] . $db->Quote( [[#variable50545a80]]) . ' AND `section_id` = ' . (int) $sectionId); [[#variable4b65cf80]]= [[#variable50545ac0]]->loadResult(); // Check for a database error. if ($db->getErrorNum()) { return new JException($db->getErrorMsg()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#50545be0]] | ' FROM `#__access_actions`' |
1 | 2 | [[#50545be0]] | ' FROM `#__usergroups`' |
1 | 3 | [[#50545be0]] | ' FROM `#__access_assetgroups`' |
2 | 1 | [[#50545b20]] | ' WHERE `name` = ' |
2 | 2 | [[#50545b20]] | ' WHERE `title` = ' |
2 | 3 | [[#50545b20]] | ' WHERE `title` = ' |
3 | 1 | [[#50545a80]] | $name |
3 | 2 | [[#50545a80]] | $title |
3 | 3 | [[#50545a80]] | $title |
4 | 1 | [[#4b65cf80]] | $actionId |
4 | 2 | [[#4b65cf80]] | $groupId |
4 | 3 | [[#4b65cf80]] | $groupId |
5 | 1 | [[#50545ac0]] | $db |
5 | 2 | [[#50545ac0]] | $db |
5 | 3 | [[#50545ac0]] | (int) $db |