class FindSecBugsGlobalConfig {

    private static final FindSecBugsGlobalConfig instance = new FindSecBugsGlobalConfig();

    private String findSecBugsVersion = "1.6.0";
    private boolean debugPrintInstructionVisited = false;
    private boolean debugPrintInvocationVisited = false;
    private boolean debugTaintState = false;
    private boolean workaroundVisitInvokeDynamic = false;
    private boolean verboseLocationReport = false;
    
    // set through SystemProperties
    private boolean debugOutputTaintConfigs;
    private boolean taintedSystemVariables;
    private String customConfigFile;
    private boolean taintedMainArgument;
    private boolean reportPotentialXssWrongContext;

    protected FindSecBugsGlobalConfig() {
        debugOutputTaintConfigs = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.outputconfigs", Boolean.FALSE.toString()));
        taintedSystemVariables = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.taintedsystemvariables", Boolean.FALSE.toString()));
        customConfigFile = loadFromSystem("findsecbugs.taint.customconfigfile", null);
        taintedMainArgument = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.taintedmainargument", Boolean.TRUE.toString()));
        reportPotentialXssWrongContext = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.reportpotentialxsswrongcontext", Boolean.FALSE.toString()));
        debugTaintState = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.debugtaintstate", Boolean.FALSE.toString()));
        workaroundVisitInvokeDynamic = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.workaroundvisitinvokedynamic", Boolean.FALSE.toString()));
        verboseLocationReport = Boolean.parseBoolean(loadFromSystem("findsecbugs.taint.verboselocationreport", Boolean.FALSE.toString()));
    }

    public String loadFromSystem(String key, String defaultValue) {<FILL_FUNCTION_BODY>}

    /**
     * This getter will load sink injections.
     *
     * TODO: Load dynamically all system variable with the prefix in the constructor.
     * @param suffix
     * @return
     */
    public String getCustomSinksConfigFile(String suffix) {
        return loadFromSystem("findsecbugs.injection.customconfigfile." + suffix, null);
    }

    public static FindSecBugsGlobalConfig getInstance() {
        return instance;
    }

    /*** Getters and setters only **/

    public String getFindSecBugsVersion() {
        return findSecBugsVersion;
    }

    public void setFindSecBugsVersion(String findSecBugsVersion) {
        this.findSecBugsVersion = findSecBugsVersion;
    }

    public boolean isDebugOutputTaintConfigs() {
        return debugOutputTaintConfigs;
    }

    public boolean isWorkaroundVisitInvokeDynamic() {
        return workaroundVisitInvokeDynamic;
    }

    public void setWorkaroundVisitInvokeDynamic(boolean workaroundVisitInvokeDynamic) {
        this.workaroundVisitInvokeDynamic = workaroundVisitInvokeDynamic;
    }

    public boolean isVerboseLocationReport() {
        return verboseLocationReport;
    }

    public void setDebugOutputTaintConfigs(boolean debugOutputTaintConfigs) {
        this.debugOutputTaintConfigs = debugOutputTaintConfigs;
    }

    public boolean isDebugPrintInstructionVisited() {
        return debugPrintInstructionVisited;
    }

    public void setDebugPrintInstructionVisited(boolean debugPrintInstructionVisited) {
        this.debugPrintInstructionVisited = debugPrintInstructionVisited;
    }

    public boolean isDebugPrintInvocationVisited() {
        return debugPrintInvocationVisited;
    }

    public void setDebugPrintInvocationVisited(boolean debugPrintInvocationVisited) {
        this.debugPrintInvocationVisited = debugPrintInvocationVisited;
    }

    public boolean isDebugTaintState() {
        return debugTaintState;
    }

    public void setDebugTaintState(boolean debugTaintState) {
        this.debugTaintState = debugTaintState;
    }

    public boolean isTaintedSystemVariables() {
        return taintedSystemVariables;
    }

    public void setTaintedSystemVariables(boolean taintedSystemVariables) {
        this.taintedSystemVariables = taintedSystemVariables;
    }

    public String getCustomConfigFile() {
        return customConfigFile;
    }

    public void setCustomConfigFile(String customConfigFile) {
        this.customConfigFile = customConfigFile;
    }

    public boolean isTaintedMainArgument() {
        return taintedMainArgument;
    }

    public void setTaintedMainArgument(boolean taintedMainArguments) {
        this.taintedMainArgument = taintedMainArguments;
    }

    public boolean isReportPotentialXssWrongContext() {
        return reportPotentialXssWrongContext;
    }

    public void setReportPotentialXssWrongContext(boolean reportPotentialXssWrongContext) {
        this.reportPotentialXssWrongContext = reportPotentialXssWrongContext;
    }
}

        String value = System.getenv(key);
        if (value == null) {
            // Environment variables containing dots are difficult to setup in
            // bash. Thus also accept underscores instead of dots.
            value = System.getenv(key.replace('.', '_'));
        }
        value = SystemProperties.getProperty(key, value);

        if (value == null) {
            return defaultValue;
        }

        return value;
    
<no_super_class>