1 package jdiff; 2 3 import java.util.*; 4 import java.io.*; 5 import java.text.*; 6 7 /** 8 * Emit an HTML file containing statistics about the differences. 9 * Statistical information only appears if the -stats argument is used. 10 * 11 * See the file LICENSE.txt for copyright details. 12 * @author Matthew Doar, mdoar@pobox.com 13 */ 14 15 public class HTMLStatistics { 16 17 /** Constructor. */ HTMLStatistics(HTMLReportGenerator h)18 public HTMLStatistics(HTMLReportGenerator h) { 19 h_ = h; 20 } 21 22 /** The HTMLReportGenerator instance used to write HTML. */ 23 private HTMLReportGenerator h_ = null; 24 25 /** 26 * Emit the statistics HTML file. 27 */ 28 emitStatistics(String filename, APIDiff apiDiff)29 public void emitStatistics(String filename, APIDiff apiDiff) { 30 try { 31 FileOutputStream fos = new FileOutputStream(filename); 32 h_.reportFile = new PrintWriter(fos); 33 // Write out the HTML header 34 h_.writeStartHTMLHeader(); 35 String oldAPIName = "Old API"; 36 if (apiDiff.oldAPIName_ != null) 37 oldAPIName = apiDiff.oldAPIName_; 38 String newAPIName = "New API"; 39 if (apiDiff.newAPIName_ != null) 40 newAPIName = apiDiff.newAPIName_; 41 // Write out the title 42 h_.writeHTMLTitle("API Change Statistics"); 43 h_.writeStyleSheetRef(); 44 h_.writeText("</HEAD>"); 45 h_.writeText("<body class=\"gc-documentation\">"); 46 47 // writeText("<div class=\"g-section g-tpl-180\">"); 48 // Add the nav bar for the summary page 49 50 51 // Write a customized navigation bar for the statistics page 52 h_.writeText("<!-- Start of nav bar -->"); 53 54 SimpleDateFormat formatter 55 = new SimpleDateFormat ("yyyy.MM.dd HH:mm"); 56 Date day = new Date(); 57 58 h_.writeText("<a name=\"top\"></a>"); 59 h_.writeText("<div id=\"header\" style=\"margin-bottom:0;xborder-bottom:none;\">"); 60 h_.writeText("<div id=\"headerLeft\">"); 61 h_.writeText("<a href=\"../../../../index.html\" tabindex=\"-1\" target=\"_top\"><img src=\"../../../../assets/images/bg_logo.png\" alt=\"Android Developers\" /></a>"); 62 h_.writeText("</div>"); 63 h_.writeText(" <div id=\"headerRight\">"); 64 h_.writeText(" <div id=\"headerLinks\">"); 65 h_.writeText("<!-- <img src=\"/assets/images/icon_world.jpg\" alt=\"\" /> -->"); 66 h_.writeText("<span class=\"text\">"); 67 h_.writeText("<!-- <a href=\"#\">English</a> | -->"); 68 h_.writeText("<nobr><a href=\"https://developer.android.com\" target=\"_top\">Android Developers</a> | <a href=\"https://www.android.com\" target=\"_top\">Android.com</a></nobr>"); 69 h_.writeText("</span>"); 70 h_.writeText("</div>"); 71 h_.writeText(" <div class=\"and-diff-id\" style=\"margin-top:6px;margin-right:8px;\">"); 72 h_.writeText(" <table class=\"diffspectable\">"); 73 h_.writeText(" <tr>"); 74 h_.writeText(" <td colspan=\"2\" class=\"diffspechead\">API Diff Specification</td>"); 75 h_.writeText(" </tr>"); 76 h_.writeText(" <tr>"); 77 h_.writeText(" <td class=\"diffspec\" style=\"padding-top:.25em\">To Level:</td>"); 78 h_.writeText(" <td class=\"diffvaluenew\" style=\"padding-top:.25em\">" + newAPIName + "</td>"); 79 h_.writeText(" </tr>"); 80 h_.writeText(" <tr>"); 81 h_.writeText(" <td class=\"diffspec\">From Level:</td>"); 82 h_.writeText(" <td class=\"diffvalueold\">" + oldAPIName + "</td>"); 83 h_.writeText(" </tr>"); 84 h_.writeText(" <tr>"); 85 h_.writeText(" <td class=\"diffspec\">Generated</td>"); 86 h_.writeText(" <td class=\"diffvalue\">" + formatter.format( day ) + "</td>"); 87 h_.writeText(" </tr>"); 88 h_.writeText(" </table>"); 89 h_.writeText(" </div><!-- End and-diff-id -->"); 90 91 h_.writeText(" <div class=\"and-diff-id\" style=\"margin-right:8px;\">"); 92 h_.writeText(" <table class=\"diffspectable\">"); 93 h_.writeText(" <tr>"); 94 h_.writeText(" <td class=\"diffspec\" colspan=\"2\"><a href=\"../changes.html\" target=\"_top\">Top of Report</a>"); 95 h_.writeText(" </tr>"); 96 h_.writeText(" </table>"); 97 h_.writeText(" </div> <!-- End and-diff-id -->"); 98 99 h_.writeText(" </div> <!-- End headerRight -->"); 100 h_.writeText(" </div> <!-- End header -->"); 101 h_.writeText("<div id=\"body-content\">"); 102 h_.writeText("<div id=\"doc-content\" style=\"position:relative;\">"); 103 h_.writeText("<div id=\"mainBodyFluid\">"); 104 105 h_.writeText("<h1>API Change Statistics</h1>"); 106 107 108 DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" ); 109 double dd = apiDiff.pdiff; 110 double dd2dec = new Double(df2.format(dd)).doubleValue(); 111 112 h_.writeText("<p>The overall difference between API Levels " + oldAPIName + " and " + newAPIName + " is approximately <span style=\"color:222;font-weight:bold;\">" + dd2dec + "%</span>."); 113 h_.writeText("</p>"); 114 115 h_.writeText("<br>"); 116 h_.writeText("<a name=\"numbers\"></a>"); 117 h_.writeText("<h2>Total of Differences, by Number and Type</h2>"); 118 h_.writeText("<p>"); 119 h_.writeText("The table below lists the numbers of program elements (packages, classes, constructors, methods, and fields) that were added, changed, or removed. The table includes only the highest-level program elements — that is, if a class with two methods was added, the number of methods added does not include those two methods, but the number of classes added does include that class."); 120 h_.writeText("</p>"); 121 122 emitNumbersByElement(apiDiff); 123 124 h_.writeText("<br>"); 125 h_.writeText("<a name=\"packages\"></a>"); 126 h_.writeText("<h2>Changed Packages, Sorted by Percentage Difference</h2>"); 127 emitPackagesByDiff(apiDiff); 128 h_.writeText("<p style=\"font-size:10px\">* See <a href=\"#calculation\">Calculation of Change Percentages</a>, below.</p>"); 129 130 h_.writeText("<br>"); 131 h_.writeText("<a name=\"classes\"></a>"); 132 h_.writeText("<h2>Changed Classes and <i>Interfaces</i>, Sorted by Percentage Difference</h2>"); 133 emitClassesByDiff(apiDiff); 134 h_.writeText("<p style=\"font-size:10px\">* See <a href=\"#calculation\">Calculation of Change Percentages</a>, below.</p>"); 135 136 h_.writeText("<br>"); 137 h_.writeText("<h2 id=\"calculation\">Calculation of Change Percentages</h2>"); 138 h_.writeText("<p>"); 139 h_.writeText("The percent change statistic reported for all elements in the "to" API Level specification is defined recursively as follows:</p>"); 140 h_.writeText("<pre>"); 141 h_.writeText("Percentage difference = 100 * (added + removed + 2*changed)"); 142 h_.writeText(" -----------------------------------"); 143 h_.writeText(" sum of public elements in BOTH APIs"); 144 h_.writeText("</pre>"); 145 h_.writeText("<p>where <code>added</code> is the number of packages added, <code>removed</code> is the number of packages removed, and <code>changed</code> is the number of packages changed."); 146 h_.writeText("This definition is applied recursively for the classes and their program elements, so the value for a changed package will be less than 1, unless every class in that package has changed."); 147 h_.writeText("The definition ensures that if all packages are removed and all new packages are"); 148 h_.writeText("added, the change will be 100%.</p>"); 149 150 h_.writeText(" </div> "); 151 h_.writeText(" <div id=\"footer\">"); 152 h_.writeText(" <div id=\"copyright\">"); 153 h_.writeText(" Except as noted, this content is licensed under "); 154 h_.writeText(" <a href=\"https://creativecommons.org/licenses/by/2.5/\"> Creative Commons Attribution 2.5</a>."); 155 h_.writeText(" For details and restrictions, see the <a href=\"https://developer.android.com/license.html\">Content License</a>."); 156 h_.writeText(" </div>"); 157 h_.writeText(" <div id=\"footerlinks\">"); 158 h_.writeText(" <p>"); 159 h_.writeText(" <a href=\"https://www.android.com/terms.html\">Site Terms of Service</a> -"); 160 h_.writeText(" <a href=\"https://www.android.com/privacy.html\">Privacy Policy</a> -"); 161 h_.writeText(" <a href=\"https://www.android.com/branding.html\">Brand Guidelines</a>"); 162 h_.writeText(" </p>"); 163 h_.writeText(" </div>"); 164 h_.writeText(" </div> <!-- end footer -->"); 165 h_.writeText(" </div><!-- end doc-content -->"); 166 h_.writeText(" </div> <!-- end body-content --> "); 167 h_.writeText("</BODY></HTML>"); 168 h_.reportFile.close(); 169 } catch(IOException e) { 170 System.out.println("IO Error while attempting to create " + filename); 171 System.out.println("Error: " + e.getMessage()); 172 System.exit(1); 173 } 174 } 175 176 /** 177 * Emit all packages sorted by percentage difference, and a histogram 178 * of the values. 179 */ emitPackagesByDiff(APIDiff apiDiff)180 public void emitPackagesByDiff(APIDiff apiDiff) { 181 182 Collections.sort(apiDiff.packagesChanged, new ComparePkgPdiffs()); 183 184 // Write out the table start 185 h_.writeText("<TABLE summary=\"Packages sorted by percentage difference\" WIDTH=\"100%\">"); 186 h_.writeText("<TR>"); 187 h_.writeText(" <TH WIDTH=\"10%\">Percentage Difference*</TH>"); 188 h_.writeText(" <TH>Package</TH>"); 189 h_.writeText("</TR>"); 190 191 int[] hist = new int[101]; 192 for (int i = 0; i < 101; i++) { 193 hist[i] = 0; 194 } 195 196 Iterator iter = apiDiff.packagesChanged.iterator(); 197 while (iter.hasNext()) { 198 PackageDiff pkg = (PackageDiff)(iter.next()); 199 int bucket = (int)(pkg.pdiff); 200 hist[bucket]++; 201 h_.writeText("<TR>"); 202 if (bucket != 0) 203 h_.writeText(" <TD ALIGN=\"center\">" + bucket + "</TD>"); 204 else 205 h_.writeText(" <TD ALIGN=\"center\"><1</TD>"); 206 h_.writeText(" <TD><A HREF=\"pkg_" + pkg.name_ + h_.reportFileExt + "\">" + pkg.name_ + "</A></TD>"); 207 h_.writeText("</TR>"); 208 } 209 210 h_.writeText("</TABLE>"); 211 212 /* Emit the histogram of the results 213 h_.writeText("<hr>"); 214 h_.writeText("<p><a name=\"packages_hist\"></a>"); 215 h_.writeText("<TABLE summary=\"Histogram of the package percentage differences\" BORDER=\"1\" cellspacing=\"0\" cellpadding=\"0\">"); 216 h_.writeText("<TR>"); 217 h_.writeText(" <TD ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Percentage<br>Difference</b></FONT></TD>"); 218 h_.writeText(" <TD ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Frequency</b></FONT></TD>"); 219 h_.writeText(" <TD width=\"300\" ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Percentage Frequency</b></FONT></TD>"); 220 h_.writeText("</TR>"); 221 222 double total = 0; 223 for (int i = 0; i < 101; i++) { 224 total += hist[i]; 225 } 226 for (int i = 0; i < 101; i++) { 227 if (hist[i] != 0) { 228 h_.writeText("<TR>"); 229 h_.writeText(" <TD ALIGN=\"center\">" + i + "</TD>"); 230 h_.writeText(" <TD>" + (hist[i]/total) + "</TD>"); 231 h_.writeText(" <TD><img alt=\"|\" src=\"../black.gif\" height=20 width=" + (hist[i]*300/total) + "></TD>"); 232 h_.writeText("</TR>"); 233 } 234 } 235 // Repeat the data in a format which is easier for spreadsheets 236 h_.writeText("<!-- START_PACKAGE_HISTOGRAM"); 237 for (int i = 0; i < 101; i++) { 238 if (hist[i] != 0) { 239 h_.writeText(i + "," + (hist[i]/total)); 240 } 241 } 242 h_.writeText("END_PACKAGE_HISTOGRAM -->"); 243 244 h_.writeText("</TABLE>"); 245 */ 246 } 247 248 /** 249 * Emit all classes sorted by percentage difference, and a histogram 250 * of the values.. 251 */ emitClassesByDiff(APIDiff apiDiff)252 public void emitClassesByDiff(APIDiff apiDiff) { 253 // Add all the changed classes to a list 254 List allChangedClasses = new ArrayList(); 255 Iterator iter = apiDiff.packagesChanged.iterator(); 256 while (iter.hasNext()) { 257 PackageDiff pkg = (PackageDiff)(iter.next()); 258 if (pkg.classesChanged != null) { 259 // Add the package name to the class name 260 List cc = new ArrayList(pkg.classesChanged); 261 Iterator iter2 = cc.iterator(); 262 while (iter2.hasNext()) { 263 ClassDiff classDiff = (ClassDiff)(iter2.next()); 264 classDiff.name_ = pkg.name_ + "." + classDiff.name_; 265 } 266 allChangedClasses.addAll(cc); 267 } 268 } 269 Collections.sort(allChangedClasses, new CompareClassPdiffs()); 270 271 // Write out the table start 272 h_.writeText("<TABLE summary=\"Classes sorted by percentage difference\" WIDTH=\"100%\">"); 273 h_.writeText("<TR WIDTH=\"20%\">"); 274 h_.writeText(" <TH WIDTH=\"10%\">Percentage<br>Difference*</TH>"); 275 h_.writeText(" <TH><b>Class or <i>Interface</i></b></TH>"); 276 h_.writeText("</TR>"); 277 278 int[] hist = new int[101]; 279 for (int i = 0; i < 101; i++) { 280 hist[i] = 0; 281 } 282 283 iter = allChangedClasses.iterator(); 284 while (iter.hasNext()) { 285 ClassDiff classDiff = (ClassDiff)(iter.next()); 286 int bucket = (int)(classDiff.pdiff); 287 hist[bucket]++; 288 h_.writeText("<TR>"); 289 if (bucket != 0) 290 h_.writeText(" <TD ALIGN=\"center\">" + bucket + "</TD>"); 291 else 292 h_.writeText(" <TD ALIGN=\"center\"><1</TD>"); 293 h_.writeText(" <TD><A HREF=\"" + classDiff.name_ + h_.reportFileExt + "\">"); 294 if (classDiff.isInterface_) 295 h_.writeText("<i>" + classDiff.name_ + "</i></A></TD>"); 296 else 297 h_.writeText(classDiff.name_ + "</A></TD>"); 298 h_.writeText("</TR>"); 299 } 300 301 h_.writeText("</TABLE>"); 302 303 /* Emit the histogram of the results 304 h_.writeText("<hr>"); 305 h_.writeText("<p><a name=\"classes_hist\"></a>"); 306 h_.writeText("<TABLE summary=\"Histogram of the class percentage differences\" BORDER=\"1\" cellspacing=\"0\" cellpadding=\"0\">"); 307 h_.writeText("<TR>"); 308 h_.writeText(" <TD ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Percentage<br>Difference</b></FONT></TD>"); 309 h_.writeText(" <TD ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Frequency</b></FONT></TD>"); 310 h_.writeText(" <TD width=\"300\" ALIGN=\"center\" bgcolor=\"#EEEEFF\"><FONT size=\"+1\"><b>Percentage Frequency</b></FONT></TD>"); 311 h_.writeText("</TR>"); 312 313 double total = 0; 314 for (int i = 0; i < 101; i++) { 315 total += hist[i]; 316 } 317 for (int i = 0; i < 101; i++) { 318 if (hist[i] != 0) { 319 h_.writeText("<TR>"); 320 h_.writeText(" <TD ALIGN=\"center\">" + i + "</TD>"); 321 h_.writeText(" <TD>" + (hist[i]/total) + "</TD>"); 322 h_.writeText(" <TD><img alt=\"|\" src=\"../black.gif\" height=20 width=" + (hist[i]*300/total) + "></TD>"); 323 h_.writeText("</TR>"); 324 } 325 } 326 // Repeat the data in a format which is easier for spreadsheets 327 h_.writeText("<!-- START_CLASS_HISTOGRAM"); 328 for (int i = 0; i < 101; i++) { 329 if (hist[i] != 0) { 330 h_.writeText(i + "," + (hist[i]/total)); 331 } 332 } 333 h_.writeText("END_CLASS_HISTOGRAM -->"); 334 335 h_.writeText("</TABLE>"); 336 */ 337 } 338 339 /** 340 * Emit a table of numbers of removals, additions and changes by 341 * package, class, constructor, method and field. 342 */ emitNumbersByElement(APIDiff apiDiff)343 public void emitNumbersByElement(APIDiff apiDiff) { 344 345 // Local variables to hold the values 346 int numPackagesRemoved = apiDiff.packagesRemoved.size(); 347 int numPackagesAdded = apiDiff.packagesAdded.size(); 348 int numPackagesChanged = apiDiff.packagesChanged.size(); 349 350 int numClassesRemoved = 0; 351 int numClassesAdded = 0; 352 int numClassesChanged = 0; 353 354 int numCtorsRemoved = 0; 355 int numCtorsAdded = 0; 356 int numCtorsChanged = 0; 357 358 int numMethodsRemoved = 0; 359 int numMethodsAdded = 0; 360 int numMethodsChanged = 0; 361 362 int numFieldsRemoved = 0; 363 int numFieldsAdded = 0; 364 int numFieldsChanged = 0; 365 366 int numRemoved = 0; 367 int numAdded = 0; 368 int numChanged = 0; 369 370 // Calculate the values 371 Iterator iter = apiDiff.packagesChanged.iterator(); 372 while (iter.hasNext()) { 373 PackageDiff pkg = (PackageDiff)(iter.next()); 374 numClassesRemoved += pkg.classesRemoved.size(); 375 numClassesAdded += pkg.classesAdded.size(); 376 numClassesChanged += pkg.classesChanged.size(); 377 378 Iterator iter2 = pkg.classesChanged.iterator(); 379 while (iter2.hasNext()) { 380 ClassDiff classDiff = (ClassDiff)(iter2.next()); 381 numCtorsRemoved += classDiff.ctorsRemoved.size(); 382 numCtorsAdded += classDiff.ctorsAdded.size(); 383 numCtorsChanged += classDiff.ctorsChanged.size(); 384 385 numMethodsRemoved += classDiff.methodsRemoved.size(); 386 numMethodsAdded += classDiff.methodsAdded.size(); 387 numMethodsChanged += classDiff.methodsChanged.size(); 388 389 numFieldsRemoved += classDiff.fieldsRemoved.size(); 390 numFieldsAdded += classDiff.fieldsAdded.size(); 391 numFieldsChanged += classDiff.fieldsChanged.size(); 392 } 393 } 394 395 // Write out the table 396 h_.writeText("<TABLE summary=\"Number of differences\" WIDTH=\"100%\">"); 397 h_.writeText("<TR>"); 398 h_.writeText(" <th>Type</th>"); 399 h_.writeText(" <TH ALIGN=\"center\"><b>Additions</b></TH>"); 400 h_.writeText(" <TH ALIGN=\"center\"><b>Changes</b></TH>"); 401 h_.writeText(" <TH ALIGN=\"center\">Removals</TH>"); 402 h_.writeText(" <TH ALIGN=\"center\"><b>Total</b></TH>"); 403 h_.writeText("</TR>"); 404 405 h_.writeText("<TR>"); 406 h_.writeText(" <TD>Packages</TD>"); 407 408 h_.writeText(" <TD ALIGN=\"right\">" + numPackagesAdded + "</TD>"); 409 h_.writeText(" <TD ALIGN=\"right\">" + numPackagesChanged + "</TD>"); 410 h_.writeText(" <TD ALIGN=\"right\">" + numPackagesRemoved + "</TD>"); 411 int numPackages = numPackagesRemoved + numPackagesAdded + numPackagesChanged; 412 h_.writeText(" <TD ALIGN=\"right\">" + numPackages + "</TD>"); 413 h_.writeText("</TR>"); 414 415 numRemoved += numPackagesRemoved; 416 numAdded += numPackagesAdded; 417 numChanged += numPackagesChanged; 418 419 h_.writeText("<TR>"); 420 h_.writeText(" <TD>Classes and <i>Interfaces</i></TD>"); 421 422 h_.writeText(" <TD ALIGN=\"right\">" + numClassesAdded + "</TD>"); 423 h_.writeText(" <TD ALIGN=\"right\">" + numClassesChanged + "</TD>"); 424 h_.writeText(" <TD ALIGN=\"right\">" + numClassesRemoved + "</TD>"); 425 int numClasses = numClassesRemoved + numClassesAdded + numClassesChanged; 426 h_.writeText(" <TD ALIGN=\"right\">" + numClasses + "</TD>"); 427 h_.writeText("</TR>"); 428 429 numRemoved += numClassesRemoved; 430 numAdded += numClassesAdded; 431 numChanged += numClassesChanged; 432 433 h_.writeText("<TR>"); 434 h_.writeText(" <TD>Constructors</TD>"); 435 h_.writeText(" <TD ALIGN=\"right\">" + numCtorsAdded + "</TD>"); 436 h_.writeText(" <TD ALIGN=\"right\">" + numCtorsChanged + "</TD>"); 437 h_.writeText(" <TD ALIGN=\"right\">" + numCtorsRemoved + "</TD>"); 438 int numCtors = numCtorsRemoved + numCtorsAdded + numCtorsChanged; 439 h_.writeText(" <TD ALIGN=\"right\">" + numCtors + "</TD>"); 440 h_.writeText("</TR>"); 441 442 numRemoved += numCtorsRemoved; 443 numAdded += numCtorsAdded; 444 numChanged += numCtorsChanged; 445 446 h_.writeText("<TR>"); 447 h_.writeText(" <TD>Methods</TD>"); 448 h_.writeText(" <TD ALIGN=\"right\">" + numMethodsAdded + "</TD>"); 449 h_.writeText(" <TD ALIGN=\"right\">" + numMethodsChanged + "</TD>"); 450 h_.writeText(" <TD ALIGN=\"right\">" + numMethodsRemoved + "</TD>"); 451 int numMethods = numMethodsRemoved + numMethodsAdded + numMethodsChanged; 452 h_.writeText(" <TD ALIGN=\"right\">" + numMethods + "</TD>"); 453 h_.writeText("</TR>"); 454 455 numRemoved += numMethodsRemoved; 456 numAdded += numMethodsAdded; 457 numChanged += numMethodsChanged; 458 459 h_.writeText("<TR>"); 460 h_.writeText(" <TD>Fields</TD>"); 461 h_.writeText(" <TD ALIGN=\"right\">" + numFieldsAdded + "</TD>"); 462 h_.writeText(" <TD ALIGN=\"right\">" + numFieldsChanged + "</TD>"); 463 h_.writeText(" <TD ALIGN=\"right\">" + numFieldsRemoved + "</TD>"); 464 int numFields = numFieldsRemoved + numFieldsAdded + numFieldsChanged; 465 h_.writeText(" <TD ALIGN=\"right\">" + numFields + "</TD>"); 466 h_.writeText("</TR>"); 467 468 numRemoved += numFieldsRemoved; 469 numAdded += numFieldsAdded; 470 numChanged += numFieldsChanged; 471 472 h_.writeText("<TR>"); 473 h_.writeText(" <TD style=\"background-color:#FAFAFA\"><b>Total</b></TD>"); 474 475 h_.writeText(" <TD style=\"background-color:#FAFAFA\" ALIGN=\"right\"><strong>" + numAdded + "</strong></TD>"); 476 h_.writeText(" <TD style=\"background-color:#FAFAFA\" ALIGN=\"right\"><strong>" + numChanged + "</strong></TD>"); 477 h_.writeText(" <TD style=\"background-color:#FAFAFA\" ALIGN=\"right\"><strong>" + numRemoved + "</strong></TD>"); 478 int total = numRemoved + numAdded + numChanged; 479 h_.writeText(" <TD style=\"background-color:#FAFAFA\" ALIGN=\"right\"><strong>" + total + "</strong></TD>"); 480 h_.writeText("</TR>"); 481 482 h_.writeText("</TABLE>"); 483 } 484 485 } 486 487