test_class.declarator: parameters = mock(Parameters.class)
test_class.modifier: private final
test_class.original_string: private final Parameters parameters = mock(Parameters.class);
test_class.type: Parameters
test_class.var_name: parameters
test_class.declarator: unnamed
test_class.modifier: private
test_class.original_string: private List<String> unnamed;
test_class.type: List<String>
test_class.var_name: unnamed
test_class.file: services/src/test/java/com/greensopinion/finance/services/application/ConstantsTest.java
test_class.identifier: ConstantsTest
test_case.body: @Test
  	public void webViewLocationWithParameter() {
  		unnamed.add("-XexternalUI");
  		assertEquals("http://localhost:9000", Constants.webViewLocation(parameters));
  	}
test_case.class_method_signature: ConstantsTest.webViewLocationWithParameter()
test_case.full_signature: @Test public void webViewLocationWithParameter()
test_case.identifier: webViewLocationWithParameter
test_case.invocations: add assertEquals webViewLocation
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void webViewLocationWithParameter()
focal_class.declarator: DEFAULT_HEIGHT = 1024
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_HEIGHT = 1024;
focal_class.type: int
focal_class.var_name: DEFAULT_HEIGHT
focal_class.declarator: DEFAULT_WIDTH = 1024
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_WIDTH = 1024;
focal_class.type: int
focal_class.var_name: DEFAULT_WIDTH
focal_class.declarator: DEFAULT_FILL_COLOUR = Color.web("#666970")
focal_class.modifier: public static final
focal_class.original_string: public static final Color DEFAULT_FILL_COLOUR = Color.web("#666970");
focal_class.type: Color
focal_class.var_name: DEFAULT_FILL_COLOUR
focal_class.declarator: PARAM_EXTERNAL_UI = "-XexternalUI"
focal_class.modifier: public static final
focal_class.original_string: public static final Object PARAM_EXTERNAL_UI = "-XexternalUI";
focal_class.type: Object
focal_class.var_name: PARAM_EXTERNAL_UI
focal_class.file: services/src/main/java/com/greensopinion/finance/services/application/Constants.java
focal_class.identifier: Constants
focal_class.class_method_signature: Constants.isExternalUi(Parameters parameters)
focal_class.full_signature: public static boolean isExternalUi(Parameters parameters)
focal_class.identifier: isExternalUi
focal_class.modifiers: public static
focal_class.parameters: (Parameters parameters)
focal_class.return: boolean
focal_class.signature: boolean isExternalUi(Parameters parameters)
focal_class.class_method_signature: Constants.webViewLocation(Parameters parameters)
focal_class.full_signature: public static String webViewLocation(Parameters parameters)
focal_class.identifier: webViewLocation
focal_class.modifiers: public static
focal_class.parameters: (Parameters parameters)
focal_class.return: String
focal_class.signature: String webViewLocation(Parameters parameters)
focal_method.body: public static String webViewLocation(Parameters parameters) {
  		if (isExternalUi(parameters)) {
  			return "http://localhost:9000";
  		}
  		URL selfUri = checkNotNull(Constants.class.getResource(Constants.class.getSimpleName() + ".class"));
  		String protocol = selfUri.getProtocol();
  		if ("file".equals(protocol)) {
  			String path = selfUri.getPath();
  			checkState(path.contains("target/classes"));
  			String rootPath = path.substring(0, path.indexOf("target/classes"));
  
  			File file = new File(rootPath);
  
  			String localPath = file.getParentFile().getPath() + "/ui/dist/index.html";
  			return "file://" + localPath;
  		} else if ("jar".equals(protocol)) {
  			String path = selfUri.getPath();
  			Matcher matcher = Pattern.compile("(.*?/)([^/]+\\.jar!).*").matcher(path);
  			checkState(matcher.matches(), "%s", path);
  
  			String prefix = matcher.group(1);
  			return prefix + "web-assets/index.html";
  		} else {
  			throw new IllegalStateException(selfUri.toString());
  		}
  	}
focal_method.class_method_signature: Constants.webViewLocation(Parameters parameters)
focal_method.full_signature: public static String webViewLocation(Parameters parameters)
focal_method.identifier: webViewLocation
focal_method.invocations: isExternalUi checkNotNull getResource getSimpleName getProtocol equals getPath checkState contains substring indexOf getPath getParentFile equals getPath matcher compile checkState matches group toString
focal_method.modifiers: public static
focal_method.parameters: (Parameters parameters)
focal_method.return: String
focal_method.signature: String webViewLocation(Parameters parameters)