

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class UserMistakes {
	public static void main(String[] args) {
		String name="Mr. Ed";
		name=name.replaceAll(".", "s.");
		System.out.println(name);
		
		
		//FIXME:FindBugs only catches this error with name.indexOf(String)
		if (name.indexOf("s") > 0)
			System.out.println("Yay");
		else
			System.out.println("Boo");
		
		String result;
		
		try 
		{
			BufferedReader findFiles=new BufferedReader(new FileReader("/mainList.txt"));
			if (findFiles.readLine()!=null)
				result=findFiles.readLine();
		} catch (FileNotFoundException e) {
			System.exit(7);
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
}

@@ -118,16 +118,49 @@
 ception;
+%0Aimport java.io.LineNumberReader;
 %0A%0Apublic
@@ -220,16 +220,35 @@
 %5B%5D args)
+ throws IOException
  %7B%0A%09%09Str
@@ -679,24 +679,55 @@
 readLine();%0A
+            findFiles.close();%0A
 %09%09%7D catch (F
@@ -853,12 +853,200 @@
 ;%0A%09%09%7D%0A%0A%09
-%7D
+%0A%0A        LineNumberReader tmp=new LineNumberReader(new FileReader(%22/mainList.txt%22));%0A        int count = 0;%0A        while (tmp.readLine()!=null) count++;%0A          %0A        tmp.close();%0A%7D%0A
 %0A%7D%0A

add test case