test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.file: app/src/test/java/org/jak_linux/dns66/ConfigurationTest.java
test_class.identifier: ConfigurationTest
test_case.body: @Test
      public void testReadNewer() throws Exception {
          thrown.expect(IOException.class);
  
          thrown.expectMessage(CoreMatchers.containsString("version"));
          Configuration.read(new StringReader("{version: " + (Configuration.VERSION + 1) + "}"));
      }
test_case.class_method_signature: ConfigurationTest.testReadNewer()
test_case.full_signature: @Test public void testReadNewer()
test_case.identifier: testReadNewer
test_case.invocations: expect expectMessage containsString read
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadNewer()
focal_class.declarator: GSON = new Gson()
focal_class.modifier: public static final
focal_class.original_string: public static final Gson GSON = new Gson();
focal_class.type: Gson
focal_class.var_name: GSON
focal_class.declarator: VERSION = 1
focal_class.modifier: static final
focal_class.original_string: static final int VERSION = 1;
focal_class.type: int
focal_class.var_name: VERSION
focal_class.declarator: MINOR_VERSION = 1
focal_class.modifier: static final
focal_class.original_string: static final int MINOR_VERSION = 1;
focal_class.type: int
focal_class.var_name: MINOR_VERSION
focal_class.declarator: version = 1
focal_class.modifier: public
focal_class.original_string: public int version = 1;
focal_class.type: int
focal_class.var_name: version
focal_class.declarator: minorVersion = 0
focal_class.modifier: public
focal_class.original_string: public int minorVersion = 0;
focal_class.type: int
focal_class.var_name: minorVersion
focal_class.declarator: autoStart
focal_class.modifier: public
focal_class.original_string: public boolean autoStart;
focal_class.type: boolean
focal_class.var_name: autoStart
focal_class.declarator: hosts = new Hosts()
focal_class.modifier: public
focal_class.original_string: public Hosts hosts = new Hosts();
focal_class.type: Hosts
focal_class.var_name: hosts
focal_class.declarator: dnsServers = new DnsServers()
focal_class.modifier: public
focal_class.original_string: public DnsServers dnsServers = new DnsServers();
focal_class.type: DnsServers
focal_class.var_name: dnsServers
focal_class.declarator: whitelist = new Whitelist()
focal_class.modifier: public
focal_class.original_string: public Whitelist whitelist = new Whitelist();
focal_class.type: Whitelist
focal_class.var_name: whitelist
focal_class.declarator: showNotification = true
focal_class.modifier: public
focal_class.original_string: public boolean showNotification = true;
focal_class.type: boolean
focal_class.var_name: showNotification
focal_class.declarator: nightMode
focal_class.modifier: public
focal_class.original_string: public boolean nightMode;
focal_class.type: boolean
focal_class.var_name: nightMode
focal_class.declarator: watchDog = false
focal_class.modifier: public
focal_class.original_string: public boolean watchDog = false;
focal_class.type: boolean
focal_class.var_name: watchDog
focal_class.declarator: ipV6Support = true
focal_class.modifier: public
focal_class.original_string: public boolean ipV6Support = true;
focal_class.type: boolean
focal_class.var_name: ipV6Support
focal_class.file: app/src/main/java/org/jak_linux/dns66/Configuration.java
focal_class.identifier: Configuration
focal_class.class_method_signature: Configuration.read(Reader reader)
focal_class.full_signature: public static Configuration read(Reader reader)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (Reader reader)
focal_class.return: Configuration
focal_class.signature: Configuration read(Reader reader)
focal_class.class_method_signature: Configuration.runUpdate(int level)
focal_class.full_signature: public void runUpdate(int level)
focal_class.identifier: runUpdate
focal_class.modifiers: public
focal_class.parameters: (int level)
focal_class.return: void
focal_class.signature: void runUpdate(int level)
focal_class.class_method_signature: Configuration.updateURL(String oldURL, String newURL, int newState)
focal_class.full_signature: public void updateURL(String oldURL, String newURL, int newState)
focal_class.identifier: updateURL
focal_class.modifiers: public
focal_class.parameters: (String oldURL, String newURL, int newState)
focal_class.return: void
focal_class.signature: void updateURL(String oldURL, String newURL, int newState)
focal_class.class_method_signature: Configuration.updateDNS(String oldIP, String newIP)
focal_class.full_signature: public void updateDNS(String oldIP, String newIP)
focal_class.identifier: updateDNS
focal_class.modifiers: public
focal_class.parameters: (String oldIP, String newIP)
focal_class.return: void
focal_class.signature: void updateDNS(String oldIP, String newIP)
focal_class.class_method_signature: Configuration.addDNS(String title, String location, boolean isEnabled)
focal_class.full_signature: public void addDNS(String title, String location, boolean isEnabled)
focal_class.identifier: addDNS
focal_class.modifiers: public
focal_class.parameters: (String title, String location, boolean isEnabled)
focal_class.return: void
focal_class.signature: void addDNS(String title, String location, boolean isEnabled)
focal_class.class_method_signature: Configuration.addURL(int index, String title, String location, int state)
focal_class.full_signature: public void addURL(int index, String title, String location, int state)
focal_class.identifier: addURL
focal_class.modifiers: public
focal_class.parameters: (int index, String title, String location, int state)
focal_class.return: void
focal_class.signature: void addURL(int index, String title, String location, int state)
focal_class.class_method_signature: Configuration.removeURL(String oldURL)
focal_class.full_signature: public void removeURL(String oldURL)
focal_class.identifier: removeURL
focal_class.modifiers: public
focal_class.parameters: (String oldURL)
focal_class.return: void
focal_class.signature: void removeURL(String oldURL)
focal_class.class_method_signature: Configuration.write(Writer writer)
focal_class.full_signature: public void write(Writer writer)
focal_class.identifier: write
focal_class.modifiers: public
focal_class.parameters: (Writer writer)
focal_class.return: void
focal_class.signature: void write(Writer writer)
focal_method.body: public static Configuration read(Reader reader) throws IOException {
          Configuration config = GSON.fromJson(reader, Configuration.class);
  
          if (config.whitelist.items.isEmpty()) {
              config.whitelist = new Whitelist();
              config.whitelist.items.add("com.android.vending");
          }
  
          if (config.version > VERSION)
              throw new IOException("Unhandled file format version");
  
          for (int i = config.minorVersion + 1; i <= MINOR_VERSION; i++) {
              config.runUpdate(i);
          }
          config.updateURL("http://someonewhocares.org/hosts/hosts", "https://someonewhocares.org/hosts/hosts", 0);
  
  
          return config;
      }
focal_method.class_method_signature: Configuration.read(Reader reader)
focal_method.full_signature: public static Configuration read(Reader reader)
focal_method.identifier: read
focal_method.invocations: fromJson isEmpty add runUpdate updateURL
focal_method.modifiers: public static
focal_method.parameters: (Reader reader)
focal_method.return: Configuration
focal_method.signature: Configuration read(Reader reader)