Buggy code:
public class ManifestTest extends BuildFileTest { public static final String EXPANDED_MANIFEST = "src//etc//testcases//taskdefs//manifests//META-INF//MANIFEST.MF" ; public static final String LONG_LINE = "AReallyLongLineToTestLineBreakingInManifests-ACapabilityWhich" + ( ( "IsSureToLeadToHundredsOfQuestionsAboutWhyAntMungesManifests" + "OfCourseTheAnswerIsThatIsWhatTheSpecRequiresAndIfAnythingHas" ) + "AProblemWithThatItIsNotABugInAnt" ) ; public static final String LONG_70_NAME = "ThisNameIsJustSeventyCharactersWhichIsAllowedAccordingToTheSpecsFiller" ; public static final String LONG_68_NAME = "ThisNameIsJustSixtyEightCharactersWhichIsAllowedAccordingToTheSpecsX" ; public static final String NOT_LONG_NAME = "NameIsJustUnderSeventyCharactersWhichIsAllowedAccordingTheSpec" ; public static final String VALUE = "NOT_LONG" ; public ManifestTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void test1 ( ) throws IOException , ManifestException { } public void test2 ( ) throws IOException , ManifestException { } public void test3 ( ) { } public void test4 ( ) { } public void test5 ( ) { } public void test6 ( ) { } public void test7 ( ) { } public void test8 ( ) throws IOException , ManifestException { } public void test9 ( ) { } public void test10 ( ) { } public void test11 ( ) { } public void test12 ( ) { } public void test13 ( ) { } public void test14 ( ) throws IOException , ManifestException { } public void testLongLine ( ) throws IOException , ManifestException { Project p = getProject ( ) ; p . setUserProperty ( "test.longline" , ManifestTest . LONG_LINE ) ; p . setUserProperty ( "test.long68name" , ManifestTest . LONG_68_NAME ) ; p . setUserProperty ( "test.long70name" , ManifestTest . LONG_70_NAME ) ; p . setUserProperty ( "test.notlongname" , ManifestTest . NOT_LONG_NAME ) ; p . setUserProperty ( "test.value" , ManifestTest . VALUE ) ; executeTarget ( "testLongLine" ) ; Manifest manifest = getManifest ( ManifestTest . EXPANDED_MANIFEST ) ; Manifest . Section mainSection = manifest . getMainSection ( ) ; String classpath = mainSection . getAttributeValue ( "class-path" ) ; assertEquals ( "Class-Path<seq2seq4repair_space>attribute<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>set<seq2seq4repair_space>correctly<seq2seq4repair_space>-<seq2seq4repair_space>" , ManifestTest . LONG_LINE , classpath ) ; String value = mainSection . getAttributeValue ( ManifestTest . LONG_68_NAME ) ; assertEquals ( "LONG_68_NAME_VALUE_MISMATCH" , ManifestTest . VALUE , value ) ; value = mainSection . getAttributeValue ( ManifestTest . LONG_70_NAME ) ; assertEquals ( "LONG_70_NAME_VALUE_MISMATCH" , ManifestTest . VALUE , value ) ; value = mainSection . getAttributeValue ( ManifestTest . NOT_LONG_NAME ) ; assertEquals ( "NOT_LONG_NAME_VALUE_MISMATCH" , ManifestTest . VALUE , value ) ; <START_BUG> BufferedReader in = new BufferedReader ( new FileReader ( ManifestTest . EXPANDED_MANIFEST ) ) ; <END_BUG> Set set = new HashSet ( ) ; String read = in . readLine ( ) ; while ( read != null ) { set . add ( read ) ; read = in . readLine ( ) ; } assertTrue ( "Manifest<seq2seq4repair_space>file<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>string<seq2seq4repair_space>" , set . remove ( "<seq2seq4repair_space>NOT_LONG" ) ) ; assertTrue ( "Manifest<seq2seq4repair_space>file<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>string<seq2seq4repair_space>" , set . remove ( "<seq2seq4repair_space>NG" ) ) ; assertTrue ( "Manifest<seq2seq4repair_space>file<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>string<seq2seq4repair_space>" , set . remove ( ( ( ManifestTest . LONG_70_NAME ) + ":<seq2seq4repair_space>" ) ) ) ; assertTrue ( "Manifest<seq2seq4repair_space>file<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>contained<seq2seq4repair_space>string<seq2seq4repair_space>" , set . remove ( ( ( ManifestTest . NOT_LONG_NAME ) + ":<seq2seq4repair_space>NOT_LO" ) ) ) ; } public void testOrder1 ( ) throws IOException , ManifestException { } public void testOrder2 ( ) throws IOException , ManifestException { } public void testNoFile ( ) { } public void testReplace ( ) throws IOException , ManifestException { } public void testUpdate ( ) throws IOException , ManifestException { } public void testFrom ( ) { } public void testIllegalName ( ) { } public void testIllegalNameInSection ( ) { } public void testIllegalNameBegin ( ) { } public void testIllegalName2 ( ) { } public void testIllegalName3 ( ) { } private Manifest getManifest ( String filename ) throws IOException , ManifestException { } }

Fix:
BufferedReader in = new BufferedReader ( new FileReader ( new File ( System . getProperty ( "root" ) , ManifestTest . EXPANDED_MANIFEST ) ) ) ;