class DefaultLicenseGroupImporter implements IDefaultObjectImporter {

    private static final Logger LOGGER = Logger.getLogger(DefaultLicenseGroupImporter.class);

    private QueryManager qm;

    public DefaultLicenseGroupImporter(final QueryManager qm) {
        this.qm = qm;
    }

    public boolean shouldImport() {
        if (qm.getLicenseGroups().getTotal() > 0) {
            return false;
        }
        return true;
    }

    public void loadDefaults() throws IOException {
        final File defaultsFile = new File(URLDecoder.decode(getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), UTF_8.name()) + "default-objects/licenseGroups.json");
        final JSONArray licenseGroups = readFile(defaultsFile);
        for (int i = 0; i < licenseGroups.length(); i++) {
            final JSONObject json = licenseGroups.getJSONObject(i);
            final LicenseGroup licenseGroup = new LicenseGroup();
            licenseGroup.setName(json.getString("name"));
            licenseGroup.setRiskWeight(json.getInt("riskWeight"));
            LOGGER.debug("Adding " + licenseGroup.getName());
            final List<License> licenses = new ArrayList<>();
            for (int k=0; k<json.getJSONArray("licenses").length(); k++) {
                final String licenseId = json.getJSONArray("licenses").getString(k);
                final License license = qm.getLicense(licenseId);
                if (license != null) {
                    LOGGER.debug("Adding " + license.getLicenseId() + " to " + licenseGroup.getName());
                    licenses.add(license);
                } else {
                    LOGGER.debug(licenseId + " was not found in the datastore. Unable to add license to " + licenseGroup.getName());
                }
            }
            licenseGroup.setLicenses(licenses);
            qm.persist(licenseGroup);
        }
    }

    private JSONArray readFile(final File file) throws IOException {<FILL_FUNCTION_BODY>}
}

        final BufferedReader streamReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), UTF_8));
        final StringBuilder responseStrBuilder = new StringBuilder();
        String inputStr;
        while ((inputStr = streamReader.readLine()) != null)
            responseStrBuilder.append(inputStr);
        return new JSONArray(responseStrBuilder.toString());
    
<no_super_class>