| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 11 | 2 | 5 | 0.956 | statement_sequence[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 12 | 120 | plugins/content/emailcloak.php |
| 2 | 11 | 138 | plugins/content/emailcloak.php |
| ||||
/*
* Search for derivatives of link code <a href="mailto:email@amail.com?
* subject=Text">email@amail.com</a>
*/
$pattern= plgContentEmailCloak_searchPattern($searchEmailLink, $searchEmail);
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) {
$mail= $regs[1][0]
. $regs[2][0];
$mailText= $regs[3][0];
// Needed for handling of Body parameter
$mail= str_replace('&', '&', $mail);
// Check to see if mail text is different from mail addy
$replacement= JHtml::_('email.cloak', $mail, $mode, $mailText);
// Replace the found address with the js cloaked email
$text= substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0]));
}
|
| ||||
/*
* Search for derivatives of link code <a href="mailto:email@amail.com?
* subject=Text">anytext</a>
*/
$pattern= plgContentEmailCloak_searchPattern($searchEmailLink, $searchText);
while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) {
$mail= $regs[1][0]
. $regs[2][0];
$mailText= $regs[3][0];
// Needed for handling of Body parameter
$mail= str_replace('&', '&', $mail);
$replacement= JHtml::_('email.cloak', $mail, $mode, $mailText, 0);
// Replace the found address with the js cloaked email
$text= substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0]));
}
|
| |||
/*
* Search for derivatives of link code <a href="mailto:email@amail.com?
* subject=Text">anytext</a>
*/
/*
* Search for derivatives of link code <a href="mailto:email@amail.com?
* subject=Text">email@amail.com</a>
*/
$pattern=plgContentEmailCloak_searchPattern($searchEmailLink, [[#variable4e957d60]]);
while (preg_match($pattern,$text,$regs,PREG_OFFSET_CAPTURE)) {
$mail=$regs[1][0]
. $regs[2][0];
$mailText=$regs[3][0];
// Needed for handling of Body parameter
$mail=str_replace('&','&',$mail);
// Check to see if mail text is different from mail addy
$replacement=JHtml::_( [[#variable4e957cc0]], [[#variable4e957c80]], [[#variable5233bf20]], [[#variable226dc7c0]]);
// Replace the found address with the js cloaked email
$text=substr_replace($text,$replacement,$regs[0][1],strlen($regs[0][0]));
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4e957d60]] | $searchText |
| 1 | 2 | [[#4e957d60]] | $searchEmail |
| 2 | 1 | [[#4e957cc0]] | 'email.cloak',$mail |
| 2 | 2 | [[#4e957cc0]] | 'email.cloak' |
| 3 | 1 | [[#4e957c80]] | $mode |
| 3 | 2 | [[#4e957c80]] | |
| 4 | 1 | [[#5233bf20]] | $mailText |
| 4 | 2 | [[#5233bf20]] | $mode |
| 5 | 1 | [[#226dc7c0]] | 0 |
| 5 | 2 | [[#226dc7c0]] | $mailText |