Buggy code:
public abstract class ApacheLicenseHeaderTestCase extends TestCase { private static final Logger log = LoggerFactory . getLogger ( ApacheLicenseHeaderTestCase . class ) ; private static final String LINE_ENDING = System . getProperty ( "line.separator" ) ; static interface FileVisitor { void visitFile ( File file ) { } } private class SuffixAndIgnoreFileFilter implements FileFilter { private final List < String > suffixes ; private final List < String > ignoreFiles ; private SuffixAndIgnoreFileFilter ( List < String > suffixes ) { } private SuffixAndIgnoreFileFilter ( List < String > suffixes , List < String > ignoreFiles ) { } public boolean accept ( File pathname ) { } private boolean ignoreFile ( File pathname ) { } } private class DirectoryFileFilter implements FileFilter { private final String [ ] ignoreDirectory = new String [ ] { ".svn" } ; public boolean accept ( File pathname ) { } } private ILicenseHeaderHandler [ ] licenseHeaderHandlers ; private File baseDirectory = new File ( "" ) . getAbsoluteFile ( ) ; protected List < String > javaIgnore = Generics . newArrayList ( ) ; protected List < String > htmlIgnore = Generics . newArrayList ( ) ; protected List < String > xmlPrologIgnore = Generics . newArrayList ( ) ; protected List < String > propertiesIgnore = Generics . newArrayList ( ) ; protected List < String > xmlIgnore = Generics . newArrayList ( ) ; protected List < String > cssIgnore = Generics . newArrayList ( ) ; protected List < String > velocityIgnore = Generics . newArrayList ( ) ; protected List < String > javaScriptIgnore = Generics . newArrayList ( ) ; protected boolean addHeaders = false ; public ApacheLicenseHeaderTestCase ( ) { } @ Override public final void setUp ( ) { } public void testLicenseHeaders ( ) { } private void failIncorrectLicenceHeaders ( Map < ILicenseHeaderHandler , List < File > > files ) { if ( ( files . size ( ) ) > 0 ) { <START_BUG> StringBuffer failString = new StringBuffer ( ) ; <END_BUG> for ( Map . Entry < ILicenseHeaderHandler , List < File > > entry : files . entrySet ( ) ) { ILicenseHeaderHandler licenseHeaderHandler = entry . getKey ( ) ; List < File > fileList = entry . getValue ( ) ; failString . append ( "\n" ) ; failString . append ( licenseHeaderHandler . getClass ( ) . getName ( ) ) ; failString . append ( "<seq2seq4repair_space>failed.<seq2seq4repair_space>The<seq2seq4repair_space>following<seq2seq4repair_space>files(" ) ; failString . append ( fileList . size ( ) ) ; failString . append ( ")<seq2seq4repair_space>didn\'t<seq2seq4repair_space>have<seq2seq4repair_space>correct<seq2seq4repair_space>license<seq2seq4repair_space>header:\n" ) ; for ( File file : fileList ) { String filename = file . getAbsolutePath ( ) ; String licenseType = licenseHeaderHandler . getLicenseType ( file ) ; if ( licenseType == null ) { failString . append ( "NONE" ) ; } else { failString . append ( licenseType ) ; } failString . append ( "<seq2seq4repair_space>" ) . append ( filename ) . append ( ApacheLicenseHeaderTestCase . LINE_ENDING ) ; } } System . out . println ( failString ) ; fail ( failString . toString ( ) ) ; } } private void visitFiles ( List < String > suffixes , List < String > ignoreFiles , ApacheLicenseHeaderTestCase . FileVisitor fileVisitor ) { } private void visitDirectory ( List < String > suffixes , List < String > ignoreFiles , File directory , ApacheLicenseHeaderTestCase . FileVisitor fileVisitor ) { } }

Fix:
StringBuilder failString = new StringBuilder ( ) ;