#vulnerable code 
                             @Test
	public void testWindowPeer() throws Exception {
    if (Platform.isMacOSX() ||
        System.getProperty("java.version)").matches("1\\.6\\..*")) {
      // Oracle Java and jawt: it's complicated.
      // See http://forum.lwjgl.org/index.php?topic=4326.0
      // OpenJDK 6 + Linux seem problematic too.
      return;
    }
		assertEquals(6 * Pointer.SIZE, BridJ.sizeOf(JAWT_DrawingSurface.class));
		assertEquals(4 * 4, BridJ.sizeOf(JAWT_Rectangle.class));
		//assertEquals(4 + 5 * Pointer.SIZE, BridJ.sizeOf(JAWT.class));
		//assertEquals(2 * 4 * 4 + 4 + Pointer.SIZE, BridJ.sizeOf(JAWT_DrawingSurfaceInfo.class));
		 
		
		Frame f = new Frame();
		f.pack();
		
		f.setVisible(true);
    Thread.sleep(500);
		long p = JAWTUtils.getNativePeerHandle(f);
		assertTrue(p != 0);
		f.setVisible(false);
	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testWindowPeer() throws Exception {
    if (Platform.isMacOSX() ||
        System.getProperty("java.version").matches("1\\.6\\..*")) {
      // Oracle Java and jawt: it's complicated.
      // See http://forum.lwjgl.org/index.php?topic=4326.0
      // OpenJDK 6 + Linux seem problematic too.
      return;
    }
		assertEquals(6 * Pointer.SIZE, BridJ.sizeOf(JAWT_DrawingSurface.class));
		assertEquals(4 * 4, BridJ.sizeOf(JAWT_Rectangle.class));
		//assertEquals(4 + 5 * Pointer.SIZE, BridJ.sizeOf(JAWT.class));
		//assertEquals(2 * 4 * 4 + 4 + Pointer.SIZE, BridJ.sizeOf(JAWT_DrawingSurfaceInfo.class));
		 
		
		Frame f = new Frame();
		f.pack();
		
		f.setVisible(true);
    Thread.sleep(500);
		long p = JAWTUtils.getNativePeerHandle(f);
		assertTrue(p != 0);
		f.setVisible(false);
	}