#fixed code
                              public static void main( String[] args )
  {
      String user_id = args[0];
      String license_key = args[1];
      String ip_address = args[2];
      Client cl = new Client(user_id,license_key);
      Country c = cl.Country(ip_address);
      System.out.println(c.get_country_name("en"));
  }
#vulnerable code 
                              public static void main( String[] args )
  {
    try {
      String user_id = args[0];
      String license_key = args[1];
      String ip_address = args[2];
      Client cl = new Client(user_id,license_key);
      JSONObject o = cl.Country(ip_address);
      o = o.getJSONObject("country");
      o = o.getJSONObject("name");
      String name = o.getString("en");
      System.out.println(name);
    } catch (JSONException e) {
      e.printStackTrace();
    }
  } 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE