#vulnerable code 
                             @Test
	public void testMultiParse() throws Exception {
		ByteBuffer buffer = BufferUtils.toBuffer("GET /mp HTTP/1.0\015\012" + "Connection: Keep-Alive\015\012"
				+ "Header1: value1\015\012" + "Transfer-Encoding: chunked\015\012" + "\015\012" + "a;\015\012"
				+ "0123456789\015\012" + "1a\015\012" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ\015\012" + "0\015\012"

		+ "\015\012"

		+ "POST /foo HTTP/1.0\015\012" + "Connection: Keep-Alive\015\012" + "Header2: value2\015\012"
				+ "Content-Length: 0\015\012" + "\015\012"

		+ "PUT /doodle HTTP/1.0\015\012" + "Connection: close\015\012" + "Header3: value3\015\012"
				+ "Content-Length: 10\015\012" + "\015\012" + "0123456789\015\012");

		HttpParser.RequestHandler handler = new Handler();
		HttpParser parser = new HttpParser(handler);
		parser.parseNext(buffer);
		assertEquals("GET", _methodOrVersion);
		assertEquals("/mp", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header1", _hdr[1]);
		assertEquals("value1", _val[1]);
		assertEquals("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", _content);

		parser.reset();
		init();
		parser.parseNext(buffer);
		assertEquals("POST", _methodOrVersion);
		assertEquals("/foo", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header2", _hdr[1]);
		assertEquals("value2", _val[1]);
		assertEquals(null, _content);

		parser.reset();
		init();
		parser.parseNext(buffer);
		parser.atEOF();
		assertEquals("PUT", _methodOrVersion);
		assertEquals("/doodle", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header3", _hdr[1]);
		assertEquals("value3", _val[1]);
		assertEquals("0123456789", _content);
	} 
                            #location 33 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testMultiParse() throws Exception {
		ByteBuffer buffer = BufferUtils.toBuffer("GET /mp HTTP/1.0\015\012" + "Connection: Keep-Alive\015\012"
				+ "Header1: value1\015\012" + "Transfer-Encoding: chunked\015\012" + "\015\012" + "a;\015\012"
				+ "0123456789\015\012" + "1a\015\012" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ\015\012" + "0\015\012"

				+ "\015\012"

				+ "POST /foo HTTP/1.0\015\012" + "Connection: Keep-Alive\015\012" + "Header2: value2\015\012"
				+ "Content-Length: 0\015\012" + "\015\012"

				+ "PUT /doodle HTTP/1.0\015\012" + "Connection: close\015\012" + "Header3: value3\015\012"
				+ "Content-Length: 10\015\012" + "\015\012" + "0123456789\015\012");

		HttpParser.RequestHandler handler = new Handler();
		HttpParser parser = new HttpParser(handler);
		parser.parseNext(buffer);
		assertEquals("GET", _methodOrVersion);
		assertEquals("/mp", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header1", _hdr[1]);
		assertEquals("value1", _val[1]);
		assertEquals("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", _content);

		parser.reset();
		init();
		parser.parseNext(buffer);
		assertEquals("POST", _methodOrVersion);
		assertEquals("/foo", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header2", _hdr[1]);
		assertEquals("value2", _val[1]);
		assertEquals(null, _content);

		parser.reset();
		init();
		parser.parseNext(buffer);
		parser.atEOF();
		assertEquals("PUT", _methodOrVersion);
		assertEquals("/doodle", _uriOrStatus);
		assertEquals("HTTP/1.0", _versionOrReason);
		assertEquals(2, _headers);
		assertEquals("Header3", _hdr[1]);
		assertEquals("value3", _val[1]);
		assertEquals("0123456789", _content);
	}