class FileProfileActivator implements ProfileActivator {

    private final ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator;

    @Inject
    public FileProfileActivator(ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator) {
        this.profileActivationFilePathInterpolator = profileActivationFilePathInterpolator;
    }

    @Override
    public boolean isActive(Profile profile, ProfileActivationContext context, ModelProblemCollector problems) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean presentInConfig(Profile profile, ProfileActivationContext context, ModelProblemCollector problems) {
        Activation activation = profile.getActivation();

        if (activation == null) {
            return false;
        }

        ActivationFile file = activation.getFile();

        return file != null;
    }
}

        Activation activation = profile.getActivation();

        if (activation == null) {
            return false;
        }

        ActivationFile file = activation.getFile();

        if (file == null) {
            return false;
        }

        String path;
        boolean missing;

        if (file.getExists() != null && !file.getExists().isEmpty()) {
            path = file.getExists();
            missing = false;
        } else if (file.getMissing() != null && !file.getMissing().isEmpty()) {
            path = file.getMissing();
            missing = true;
        } else {
            return false;
        }

        try {
            path = profileActivationFilePathInterpolator.interpolate(path, context);
        } catch (InterpolationException e) {
            problems.add(
                    BuilderProblem.Severity.ERROR,
                    ModelProblem.Version.BASE,
                    "Failed to interpolate file location " + path + " for profile " + profile.getId() + ": "
                            + e.getMessage(),
                    file.getLocation(missing ? "missing" : "exists"),
                    e);
            return false;
        }

        if (path == null) {
            return false;
        }

        File f = new File(path);

        if (!f.isAbsolute()) {
            return false;
        }

        boolean fileExists = f.exists();

        return missing != fileExists;
    
<no_super_class>