public class NullPointer {
  private int x;
  private Object y;

  public static void main(String[] args) {
    // invokeinterface
    try {
      ((Runnable) null).run();
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // invokevirtual
    try {
      ((Object) null).toString();
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // arraylength
    try {
      int a = ((byte[]) null).length;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // iaload
    try {
      int a = ((byte[]) null)[42];
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // aaload
    try {
      Object a = ((Object[]) null)[42];
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // getfield (int)
    try {
      int a = ((NullPointer) null).x;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // getfield (Object)
    try {
      Object a = ((NullPointer) null).y;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // iastore
    try {
      ((byte[]) null)[42] = 42;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // aastore
    try {
      ((Object[]) null)[42] = null;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // putfield (int)
    try {
      ((NullPointer) null).x = 42;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // putfield (Object)
    try {
      ((NullPointer) null).y = null;
    } catch (NullPointerException e) {
      e.printStackTrace();
    }

    // monitorenter
    try {
      synchronized ((Object) null) {
        int a = 42;
      }
    } catch (NullPointerException e) {
      e.printStackTrace();
    }
  }
}

@@ -65,47 +65,467 @@
 %0A  p
-ublic static void main(String%5B%5D args) %7B
+rivate static void throw_(Object o) %7B%0A    o.toString();%0A  %7D%0A%0A  private static void throwAndCatch(Object o) %7B%0A    try %7B%0A      o.toString();%0A      throw new RuntimeException();%0A    %7D catch (NullPointerException e) %7B%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    try %7B%0A      throw_(null);%0A      throw new RuntimeException();%0A    %7D catch (NullPointerException e) %7B%0A      e.printStackTrace();%0A    %7D%0A%0A    throwAndCatch(null);%0A
 %0A   
@@ -581,24 +581,60 @@
 ull).run();%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -755,24 +755,60 @@
 toString();%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -935,16 +935,52 @@
 length;%0A
+      throw new RuntimeException();%0A
     %7D ca
@@ -1095,32 +1095,68 @@
 e%5B%5D) null)%5B42%5D;%0A
+      throw new RuntimeException();%0A
     %7D catch (Nul
@@ -1272,24 +1272,60 @@
  null)%5B42%5D;%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -1455,16 +1455,52 @@
 ull).x;%0A
+      throw new RuntimeException();%0A
     %7D ca
@@ -1640,16 +1640,52 @@
 ull).y;%0A
+      throw new RuntimeException();%0A
     %7D ca
@@ -1802,24 +1802,60 @@
 )%5B42%5D = 42;%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -1968,32 +1968,68 @@
 ll)%5B42%5D = null;%0A
+      throw new RuntimeException();%0A
     %7D catch (Nul
@@ -2148,24 +2148,60 @@
 ll).x = 42;%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -2329,24 +2329,60 @@
 ).y = null;%0A
+      throw new RuntimeException();%0A
     %7D catch 
@@ -2533,16 +2533,16 @@
 42;%0A
-
       %7D%0A
     
@@ -2537,16 +2537,52 @@
       %7D%0A
+      throw new RuntimeException();%0A
     %7D ca

add a couple of test cases to NullPointer.java