Clover coverage report - PMD - 3.7 Coverage timestamp: Wed May 31 2006 09:25:59 EDT FRAMES NO FRAMES |

file stats: | LOC: | 29 |  | Methods: | 1
| NCLOC: | 21 |  | Classes: | 1

Source file | Conditionals | Statements | Methods | TOTAL
CSVRenderer.java | 0% | 0% | 0% | 0% |

1 |  | /**
2 |  | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3 |  | */
4 |  | package net.sourceforge.pmd.cpd;
5 |  |
6 |  | import net.sourceforge.pmd.PMD;
7 |  |
8 |  | import java.util.Iterator;
9 |  |
10 |  | public class CSVRenderer implements Renderer {
11 |  |
12 | 0 | public String render(Iterator matches) {
13 | 0 | StringBuffer rpt = new StringBuffer();
14 | 0 | rpt.append("lines,tokens,occurrences" + PMD.EOL);
15 | 0 | while (matches.hasNext()) {
16 | 0 | Match match = (Match) matches.next();
17 | 0 | rpt.append(match.getLineCount() + "," + match.getTokenCount() + "," + match.getMarkCount() + ",");
18 | 0 | for (Iterator marks = match.iterator(); marks.hasNext();) {
19 | 0 | TokenEntry mark = (TokenEntry) marks.next();
20 | 0 | rpt.append(mark.getBeginLine() + "," + mark.getTokenSrcID());
21 | 0 | if (marks.hasNext()) {
22 | 0 | rpt.append(",");
23 |  | }
24 |  | }
25 | 0 | rpt.append(PMD.EOL);
26 |  | }
27 | 0 | return rpt.toString();
28 |  | }
29 |  | }