class InputReader implements AutoCloseable{
    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private InputStream inputStream;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 1 << 20);
        tokenizer = null;
        inputStream = stream;
    }

    private String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()){
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (IOException e){
                throw new RuntimeException(e);
            }
        }

        return  tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextToken());
    }

    public String nextString(){
        return nextToken();
    }

    public void close() throws IOException {
        inputStream.close();
    }
}

@@ -853,15 +853,74 @@
 e() 
-throws 
+%7B%0A        try %7B%0A            inputStream.close();%0A        %7D catch (
 IOEx
@@ -926,16 +926,19 @@
 xception
+ e)
  %7B%0A     
@@ -940,36 +940,50 @@
         
-inputStream.close();
+    e.printStackTrace();%0A        %7D
 %0A    %7D%0A%7D

Update InputReader.java