test_class.declarator: server = new MockWebServer()
test_class.modifier: private final
test_class.original_string: private final MockWebServer server = new MockWebServer();
test_class.type: MockWebServer
test_class.var_name: server
test_class.file: runelite-client/src/test/java/net/runelite/client/rs/ClientConfigLoaderTest.java
test_class.identifier: ClientConfigLoaderTest
test_case.body: @Test
  	public void testFetch() throws IOException
  	{
  		final RSConfig config = new ClientConfigLoader(new OkHttpClient()).fetch(server.url("/"));
  		assertEquals("http://oldschool1.runescape.com/", config.getCodeBase());
  	}
test_case.class_method_signature: ClientConfigLoaderTest.testFetch()
test_case.full_signature: @Test public void testFetch()
test_case.identifier: testFetch
test_case.invocations: fetch url assertEquals getCodeBase
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFetch()
focal_class.declarator: okHttpClient
focal_class.modifier: private final
focal_class.original_string: private final OkHttpClient okHttpClient;
focal_class.type: OkHttpClient
focal_class.var_name: okHttpClient
focal_class.file: runelite-client/src/main/java/net/runelite/client/rs/ClientConfigLoader.java
focal_class.identifier: ClientConfigLoader
focal_class.class_method_signature: ClientConfigLoader.fetch(HttpUrl url)
focal_class.full_signature:  RSConfig fetch(HttpUrl url)
focal_class.identifier: fetch
focal_class.parameters: (HttpUrl url)
focal_class.return: RSConfig
focal_class.signature: RSConfig fetch(HttpUrl url)
focal_method.body: RSConfig fetch(HttpUrl url) throws IOException
  	{
  		final Request request = new Request.Builder()
  			.url(url)
  			.build();
  
  		final RSConfig config = new RSConfig();
  
  		try (final Response response = okHttpClient.newCall(request).execute())
  		{
  			if (!response.isSuccessful())
  			{
  				throw new IOException("Unsuccessful response: " + response.message());
  			}
  
  			String str;
  			final BufferedReader in = new BufferedReader(new InputStreamReader(response.body().byteStream(), StandardCharsets.UTF_8));
  			while ((str = in.readLine()) != null)
  			{
  				int idx = str.indexOf('=');
  
  				if (idx == -1)
  				{
  					continue;
  				}
  
  				String s = str.substring(0, idx);
  
  				switch (s)
  				{
  					case "param":
  						str = str.substring(idx + 1);
  						idx = str.indexOf('=');
  						s = str.substring(0, idx);
  
  						config.getAppletProperties().put(s, str.substring(idx + 1));
  						break;
  					case "msg":
  						// ignore
  						break;
  					default:
  						config.getClassLoaderProperties().put(s, str.substring(idx + 1));
  						break;
  				}
  			}
  		}
  
  		return config;
  	}
focal_method.class_method_signature: ClientConfigLoader.fetch(HttpUrl url)
focal_method.full_signature:  RSConfig fetch(HttpUrl url)
focal_method.identifier: fetch
focal_method.invocations: build url execute newCall isSuccessful message byteStream body readLine indexOf substring substring indexOf substring put getAppletProperties substring put getClassLoaderProperties substring
focal_method.parameters: (HttpUrl url)
focal_method.return: RSConfig
focal_method.signature: RSConfig fetch(HttpUrl url)