diff --git a/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java b/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java index 64e0e720da..10ac5afe2b 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java @@ -10,14 +10,16 @@ import java.util.Iterator; public class VSRenderer implements Renderer { public String render(Iterator matches) { - StringBuffer buffer = new StringBuffer(300); + + StringBuilder buffer = new StringBuilder(300); + for (Match match; matches.hasNext();) { match = matches.next(); TokenEntry mark; for (Iterator iterator = match.iterator(); iterator.hasNext();) { mark = iterator.next(); buffer.append(mark.getTokenSrcID()); - buffer.append("(" + mark.getBeginLine() +"):"); + buffer.append('(').append(mark.getBeginLine()).append("):"); buffer.append(" Between lines " + mark.getBeginLine() + " and " + (mark.getBeginLine()+match.getLineCount()) + PMD.EOL); } }