package utils;

import org.apache.commons.lang.StringUtils;

public class Config {

    public static String getAuthority() {
        return getAuthority("localhost");
    }

    public static String getAuthority(String defaultValue) {
        String hostname = play.Configuration.root().getString("application.hostname");

        if (hostname != null && !hostname.isEmpty()) {
            Integer port = play.Configuration.root().getInt("application.port");

            if (port != null) {
               return hostname + ":" + port.toString();
            } else {
               return hostname;
            }
        } else {
           return defaultValue;
        }
    }

    public static String getScheme() {
        return getScheme("http");
    }

    public static String getScheme(String defaultValue) {
        String scheme = play.Configuration.root().getString("application.scheme");

        if (scheme == null || scheme.isEmpty()) {
            return defaultValue;
        } else {
            return scheme;
        }
    }

    public static String createURL(String[] pathSegments, String defaultHost, String defaultScheme) {
        String path = "/" + StringUtils.join(pathSegments, "/");
        return getScheme(defaultScheme) + "://" + getAuthority(defaultHost) + path;
    }
}

@@ -1,8 +1,9 @@
+%0A
 package 
@@ -9,17 +9,16 @@
  utils;%0A
-%0A
 import o
@@ -81,98 +81,8 @@
  %7B%0A%0A
-    public static String getAuthority() %7B%0A        return getAuthority(%22localhost%22);%0A    %7D%0A
 %0A   
@@ -589,88 +589,8 @@
  %7D%0A%0A
-    public static String getScheme() %7B%0A        return getScheme(%22http%22);%0A    %7D%0A%0A
     

Remove unnecessary methods.