CloneSet116


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18220.987statement_sequence[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1181485
libraries/bitfolge/feedcreator.php
22147
libraries/bitfolge/vcard.php
Clone Instance
1
Line Count
18
Source Line
1485
Source File
libraries/bitfolge/feedcreator.php

                        //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary
                        $linlen=  strlen($line);
                        $newline=  "";
                        for ($i=  0; $i<  $linlen; $i ++) {
                                $c=  substr($line, $i, 1);
                                $dec=  ord($c);
                                if (($dec == 32)
                                    &&              ($i == ($linlen-  1))) { // convert space at eol only
                                        $c=  "=20";
                                      }
                                  elseif (($dec == 61)
                                          ||              ($dec<  32)
                                          ||                             ($dec>  126)) { // always encode "\t", which is *not* required
                                        $h2=  floor($dec/16); $h1=  floor($dec%16);
                                        $c=  $escape
                                             .       $hex[ "$h2" ]
                                             .                   $hex[ "$h1" ];
                                      }
                                if ((strlen($newline)+  strlen($c))>=  $line_max) { // CRLF is not counted
                                        $output.=  $newline
                                                   .        $escape
                                                   .                $eol; // soft line break; " =\r\n" is okay
                                        $newline=  "";
                                      }
                                $newline.=  $c;
                              } // end of for
                        $output.=  $newline
                                   .        $eol;


Clone Instance
2
Line Count
21
Source Line
47
Source File
libraries/bitfolge/vcard.php

                $linlen=          strlen($line);
                $newline=         '';

                for ($i=  0; $i<  $linlen; $i ++) {
                        $c=               substr($line, $i, 1);
                        $dec=     ord($c);

                        if (($dec == 32)
                            &&              ($i == ($linlen-  1))) { // convert space at eol only
                                $c=  '=20';
                              }
                          elseif (($dec == 61)
                                  ||              ($dec<  32)
                                  ||                             ($dec>  126)) { // always encode "\t", which is *not* required
                                $h2=  floor($dec/16);
                                $h1=  floor($dec%16);
                                $c=       $escape
                                          .       $hex[ "$h2" ]
                                          .                     $hex[ "$h1" ];
                              }
                        if ((strlen($newline)+  strlen($c))>=  $line_max) { // CRLF is not counted
                                $output.=  $newline
                                           .        $escape
                                           .                $eol; // soft line break; " =\r\n" is okay
                                $newline=  "    ";
                              }
                        $newline.=  $c;
                      } // end of for
                $output.=  $newline;


Clone AbstractionParameter Count: 2Parameter Bindings

//$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary
$linlen=strlen($line);
$newline="";
for ($i=0; $i<$linlen; $i ++) {
  $c=substr($line,$i,1);
  $dec=ord($c);
  if (($dec == 32)
      && ($i == ($linlen-1))) { // convert space at eol only
    $c="=20";
  }
  elseif (($dec == 61)
          || ($dec<32)
          || ($dec>126)) { // always encode "\t", which is *not* required
    $h2=floor($dec/16);
    $h1=floor($dec%16);
    $c=$escape
       . $hex[ "$h2" ]
       . $hex[ "$h1" ];
  }
  if ((strlen($newline)+strlen($c))>=$line_max) { // CRLF is not counted
    $output.=$newline
             . $escape
             . $eol; // soft line break; " =\r\n" is okay
    $newline= [[#variable50a81600]];
  }
  $newline.=$c;
} // end of for
$output.= [[#variable585201a0]];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#50a81600]]
"" 
12[[#50a81600]]
"    " 
21[[#585201a0]]
$newline
. $eol 
22[[#585201a0]]
$newline