#vulnerable code 
                             public void testHandle() throws SQLException {
		ResultSetHandler h = new ArrayListHandler();
		List results = (List) h.handle(this.rs);

		assertNotNull(results);
		assertEquals(ROWS, results.size());

		Iterator iter = results.iterator();
		Object[] row = null;
		while (iter.hasNext()) {
			row = (Object[]) iter.next();
			assertEquals(COLS, row.length);
		}

		assertEquals("4", row[0]);
		assertEquals("5", row[1]);
		assertEquals("6", row[2]);
	} 
                            #location 15 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public void testHandle() throws SQLException {
		ResultSetHandler h = new ArrayListHandler();
		List results = (List) h.handle(this.rs);

		assertNotNull(results);
		assertEquals(ROWS, results.size());

		Iterator iter = results.iterator();
	    Object[] row = null;
	    assertTrue(iter.hasNext());
	    row = (Object[]) iter.next();
	    assertEquals(COLS, row.length);
	    assertEquals("1", row[0]);
	    assertEquals("2", row[1]);
	    assertEquals("3", row[2]);
	        
	    assertTrue(iter.hasNext());
	    row = (Object[]) iter.next();
	    assertEquals(COLS, row.length);

	    assertEquals("4", row[0]);
	    assertEquals("5", row[1]);
	    assertEquals("6", row[2]);
	        
	    assertFalse(iter.hasNext());
	}