class Provisioner {

    List<ProvisionPlaintext> extractProvisionsPlaintext(List<File> files) {
        List<ProvisionPlaintext> result = new ArrayList<>();
        if (files != null) {
            for (File file : files) {
                ProvisionPlaintext plain = new ProvisionPlaintext();
                plain.setProvisionPath(file.getAbsolutePath());
                ZipInputStream in = null;
                try {
                    in = new ZipInputStream(new FileInputStream(file));
                    ZipEntry zipEntry;
                    while ((zipEntry = in.getNextEntry()) != null) { // NOPMD Avoid assignments in operands
                        String name = zipEntry.getName();
                        if ("repo_provision.json".equals(name)) {
                            if (plain.getRepositoryProvision() != null) {
                                throw new IOException("provision malformed: contains more than one repo provision file.");
                            }
                            plain.setRepositoryProvision(IOUtils.toString(in, Charset.forName("UTF-8")));
                        } else if ("repo_provision.ojson".equals(name)) {
                            if (plain.getRepositoryProvision() != null) {
                                throw new IOException("provision malformed: contains more than one repo provision file.");
                            }
                            plain.setRepositoryProvision(deobfuscate(IOUtils.toString(in, Charset.forName("UTF-8"))));
                        }
                    }
                } catch (FileNotFoundException e) {
                    Utils.debugLog(TAG, String.format("finding provision '%s' failed", file.getPath()), e);
                    continue;
                } catch (IOException e) {
                    Utils.debugLog(TAG, String.format("reading provision '%s' failed", file.getPath()), e);
                    continue;
                } finally {
                    IOUtils.closeQuietly(in);
                }

                result.add(plain);
            }
        }
        return result;
    }

    protected  Provisioner();

}