← back to mixpanel__mixpanel-java

Function bodies 269 total

All specs Real LLM only Function bodies
build method · java · L110-L112 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/DeliveryOptions.java
        public DeliveryOptions build() {
            return new DeliveryOptions(this);
        }
BaseFlagsConfig class · java · L9-L110 (102 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
public class BaseFlagsConfig {
    private final String projectToken;
    private final String apiHost;
    private final int requestTimeoutSeconds;

    /**
     * Creates a new BaseFlagsConfig with specified settings.
     *
     * @param projectToken the Mixpanel project token
     * @param apiHost the API endpoint host
     * @param requestTimeoutSeconds HTTP request timeout in seconds
     */
    protected BaseFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds) {
        this.projectToken = projectToken;
        this.apiHost = apiHost;
        this.requestTimeoutSeconds = requestTimeoutSeconds;
    }

    /**
     * @return the Mixpanel project token
     */
    public String getProjectToken() {
        return projectToken;
    }

    /**
     * @return the API endpoint host
     */
    public String getApiHost() {
        return apiHost;
    }

    /**
     * @return the HTTP request timeout in seconds
     */
    public int getRequestTimeoutSeconds() {
  
BaseFlagsConfig method · java · L21-L25 (5 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    protected BaseFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds) {
        this.projectToken = projectToken;
        this.apiHost = apiHost;
        this.requestTimeoutSeconds = requestTimeoutSeconds;
    }
getProjectToken method · java · L30-L32 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    public String getProjectToken() {
        return projectToken;
    }
getApiHost method · java · L37-L39 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    public String getApiHost() {
        return apiHost;
    }
getRequestTimeoutSeconds method · java · L44-L46 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    public int getRequestTimeoutSeconds() {
        return requestTimeoutSeconds;
    }
Builder class · java · L54-L100 (47 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    public static class Builder<T extends Builder<T>> {
        protected String projectToken;
        protected String apiHost = "api.mixpanel.com";
        protected int requestTimeoutSeconds = 10;

        /**
         * Sets the project token.
         *
         * @param projectToken the Mixpanel project token
         * @return this builder
         */
        public T projectToken(String projectToken) {
            this.projectToken = projectToken;
            return (T) this;
        }

        /**
         * Sets the API host.
         *
         * @param apiHost the API endpoint host (e.g., "api.mixpanel.com", "api-eu.mixpanel.com")
         * @return this builder
         */
        public T apiHost(String apiHost) {
            this.apiHost = apiHost;
            return (T) this;
        }

        /**
         * Sets the request timeout.
         *
         * @param requestTimeoutSeconds HTTP request timeout in seconds
         * @return this builder
         */
        pu
Methodology: Repobility · https://repobility.com/research/state-of-ai-code-2026/
projectToken method · java · L65-L68 (4 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
        public T projectToken(String projectToken) {
            this.projectToken = projectToken;
            return (T) this;
        }
apiHost method · java · L76-L79 (4 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
        public T apiHost(String apiHost) {
            this.apiHost = apiHost;
            return (T) this;
        }
requestTimeoutSeconds method · java · L87-L90 (4 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
        public T requestTimeoutSeconds(int requestTimeoutSeconds) {
            this.requestTimeoutSeconds = requestTimeoutSeconds;
            return (T) this;
        }
build method · java · L97-L99 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
        public BaseFlagsConfig build() {
            return new BaseFlagsConfig(projectToken, apiHost, requestTimeoutSeconds);
        }
builder method · java · L107-L109 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/BaseFlagsConfig.java
    public static Builder<?> builder() {
        return new Builder<>();
    }
LocalFlagsConfig class · java · L10-L91 (82 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
public final class LocalFlagsConfig extends BaseFlagsConfig {
    private final boolean enablePolling;
    private final int pollingIntervalSeconds;

    /**
     * Creates a new LocalFlagsConfig with all settings.
     *
     * @param projectToken the Mixpanel project token
     * @param apiHost the API endpoint host
     * @param requestTimeoutSeconds HTTP request timeout in seconds
     * @param enablePolling whether to periodically refresh flag definitions
     * @param pollingIntervalSeconds time between refresh cycles in seconds
     */
    private LocalFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds, boolean enablePolling, int pollingIntervalSeconds) {
        super(projectToken, apiHost, requestTimeoutSeconds);
        this.enablePolling = enablePolling;
        this.pollingIntervalSeconds = pollingIntervalSeconds;
    }

    /**
     * @return true if polling is enabled
     */
    public boolean isEnablePolling() {
        return enablePolling;
    
LocalFlagsConfig method · java · L23-L27 (5 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
    private LocalFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds, boolean enablePolling, int pollingIntervalSeconds) {
        super(projectToken, apiHost, requestTimeoutSeconds);
        this.enablePolling = enablePolling;
        this.pollingIntervalSeconds = pollingIntervalSeconds;
    }
isEnablePolling method · java · L32-L34 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
    public boolean isEnablePolling() {
        return enablePolling;
    }
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
getPollingIntervalSeconds method · java · L39-L41 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
    public int getPollingIntervalSeconds() {
        return pollingIntervalSeconds;
    }
Builder class · java · L46-L81 (36 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
    public static final class Builder extends BaseFlagsConfig.Builder<Builder> {
        private boolean enablePolling = true;
        private int pollingIntervalSeconds = 60;

        /**
         * Sets whether polling should be enabled.
         *
         * @param enablePolling true to enable periodic flag definition refresh
         * @return this builder
         */
        public Builder enablePolling(boolean enablePolling) {
            this.enablePolling = enablePolling;
            return this;
        }

        /**
         * Sets the polling interval.
         *
         * @param pollingIntervalSeconds time between refresh cycles in seconds
         * @return this builder
         */
        public Builder pollingIntervalSeconds(int pollingIntervalSeconds) {
            this.pollingIntervalSeconds = pollingIntervalSeconds;
            return this;
        }

        /**
         * Builds the LocalFlagsConfig instance.
         *
         * @return a new LocalFlagsConfig
  
enablePolling method · java · L56-L59 (4 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
        public Builder enablePolling(boolean enablePolling) {
            this.enablePolling = enablePolling;
            return this;
        }
pollingIntervalSeconds method · java · L67-L70 (4 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
        public Builder pollingIntervalSeconds(int pollingIntervalSeconds) {
            this.pollingIntervalSeconds = pollingIntervalSeconds;
            return this;
        }
build method · java · L78-L80 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
        public LocalFlagsConfig build() {
            return new LocalFlagsConfig(projectToken, apiHost, requestTimeoutSeconds, enablePolling, pollingIntervalSeconds);
        }
builder method · java · L88-L90 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/LocalFlagsConfig.java
    public static Builder builder() {
        return new Builder();
    }
RemoteFlagsConfig class · java · L10-L47 (38 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/RemoteFlagsConfig.java
public final class RemoteFlagsConfig extends BaseFlagsConfig {

    /**
     * Creates a new RemoteFlagsConfig with specified settings.
     *
     * @param projectToken the Mixpanel project token
     * @param apiHost the API endpoint host
     * @param requestTimeoutSeconds HTTP request timeout in seconds
     */
    private RemoteFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds) {
        super(projectToken, apiHost, requestTimeoutSeconds);
    }

    /**
     * Builder for RemoteFlagsConfig.
     */
    public static final class Builder extends BaseFlagsConfig.Builder<Builder> {

        /**
         * Builds the RemoteFlagsConfig instance.
         *
         * @return a new RemoteFlagsConfig
         */
        @Override
        public RemoteFlagsConfig build() {
            return new RemoteFlagsConfig(projectToken, apiHost, requestTimeoutSeconds);
        }
    }

    /**
     * Creates a new builder for RemoteFlagsConfig.
     *
     * @return a new b
RemoteFlagsConfig method · java · L19-L21 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/RemoteFlagsConfig.java
    private RemoteFlagsConfig(String projectToken, String apiHost, int requestTimeoutSeconds) {
        super(projectToken, apiHost, requestTimeoutSeconds);
    }
Powered by Repobility — scan your code at https://repobility.com
Builder class · java · L26-L37 (12 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/RemoteFlagsConfig.java
    public static final class Builder extends BaseFlagsConfig.Builder<Builder> {

        /**
         * Builds the RemoteFlagsConfig instance.
         *
         * @return a new RemoteFlagsConfig
         */
        @Override
        public RemoteFlagsConfig build() {
            return new RemoteFlagsConfig(projectToken, apiHost, requestTimeoutSeconds);
        }
    }
build method · java · L34-L36 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/RemoteFlagsConfig.java
        public RemoteFlagsConfig build() {
            return new RemoteFlagsConfig(projectToken, apiHost, requestTimeoutSeconds);
        }
builder method · java · L44-L46 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/config/RemoteFlagsConfig.java
    public static Builder builder() {
        return new Builder();
    }
ExperimentationFlag class · java · L15-L139 (125 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
public final class ExperimentationFlag {
    private final String id;
    private final String name;
    private final String key;
    private final String status;
    private final int projectId;
    private final RuleSet ruleset;
    private final String context;
    private final UUID experimentId;
    private final Boolean isExperimentActive;
    private final String hashSalt;

    /**
     * Creates a new ExperimentationFlag.
     *
     * @param id the unique identifier for this flag
     * @param name the human-readable name of this flag
     * @param key the key used to reference this flag in code
     * @param status the current status of this flag
     * @param projectId the Mixpanel project ID this flag belongs to
     * @param ruleset the ruleset defining variant assignment logic
     * @param context the property name used for rollout hashing (e.g., "distinct_id")
     * @param experimentId the experiment ID (may be null)
     * @param isExperimentActive whether the experi
ExperimentationFlag method · java · L41-L52 (12 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public ExperimentationFlag(String id, String name, String key, String status, int projectId, RuleSet ruleset, String context, UUID experimentId, Boolean isExperimentActive, String hashSalt) {
        this.id = id;
        this.name = name;
        this.key = key;
        this.status = status;
        this.projectId = projectId;
        this.ruleset = ruleset;
        this.context = context;
        this.experimentId = experimentId;
        this.isExperimentActive = isExperimentActive;
        this.hashSalt = hashSalt;
    }
getId method · java · L57-L59 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getId() {
        return id;
    }
getName method · java · L64-L66 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getName() {
        return name;
    }
getKey method · java · L71-L73 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getKey() {
        return key;
    }
Generated by Repobility's multi-pass static-analysis pipeline (https://repobility.com)
getStatus method · java · L78-L80 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getStatus() {
        return status;
    }
getProjectId method · java · L85-L87 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public int getProjectId() {
        return projectId;
    }
getRuleset method · java · L92-L94 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public RuleSet getRuleset() {
        return ruleset;
    }
getContext method · java · L99-L101 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getContext() {
        return context;
    }
getExperimentId method · java · L106-L108 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public UUID getExperimentId() {
        return experimentId;
    }
getIsExperimentActive method · java · L113-L115 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public Boolean getIsExperimentActive() {
        return isExperimentActive;
    }
getHashSalt method · java · L120-L122 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String getHashSalt() {
        return hashSalt;
    }
toString method · java · L125-L138 (14 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/ExperimentationFlag.java
    public String toString() {
        return "ExperimentationFlag{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", key='" + key + '\'' +
                ", status=" + status +
                ", projectId=" + projectId +
                ", ruleset=" + ruleset +
                ", context='" + context + '\'' +
                ", experimentId=" + experimentId +
                ", isExperimentActive=" + isExperimentActive +
                ", hashSalt='" + hashSalt + '\'' +
                '}';
    }
Methodology: Repobility · https://repobility.com/research/state-of-ai-code-2026/
Rollout class · java · L18-L148 (131 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
public final class Rollout {
    private final float rolloutPercentage;
    private final JSONObject runtimeEvaluationRule;
    private final Map<String, Object> legacyRuntimeEvaluationDefinition;
    private final VariantOverride variantOverride;
    private final Map<String, Float> variantSplits;

    /**
     * Creates a new Rollout with all parameters.
     *
     * @param rolloutPercentage the percentage of users to include (0.0-1.0)
     * @param runtimeEvaluationRule optional JSONObject containing jsonLogic rule for targeting
     * @param legacyRuntimeEvaluationDefinition optional map of property name to expected value for targeting
     * @param variantOverride optional variant override to force selection
     * @param variantSplits optional map of variant key to split percentage at assignment group level
     */
    public Rollout(float rolloutPercentage, JSONObject runtimeEvaluationRule, Map<String, Object> legacyRuntimeEvaluationDefinition, VariantOverride variantOverride, 
Rollout method · java · L34-L44 (11 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public Rollout(float rolloutPercentage, JSONObject runtimeEvaluationRule, Map<String, Object> legacyRuntimeEvaluationDefinition, VariantOverride variantOverride, Map<String, Float> variantSplits) {
        this.rolloutPercentage = rolloutPercentage;
        this.legacyRuntimeEvaluationDefinition = legacyRuntimeEvaluationDefinition != null
            ? Collections.unmodifiableMap(legacyRuntimeEvaluationDefinition)
            : null;
        this.runtimeEvaluationRule = runtimeEvaluationRule;
        this.variantOverride = variantOverride;
        this.variantSplits = variantSplits != null
            ? Collections.unmodifiableMap(variantSplits)
            : null;
    }
Rollout method · java · L54-L64 (11 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public Rollout(float rolloutPercentage, Map<String, Object> legacyRuntimeEvaluationDefinition, VariantOverride variantOverride, Map<String, Float> variantSplits) {
        this.rolloutPercentage = rolloutPercentage;
        this.legacyRuntimeEvaluationDefinition = legacyRuntimeEvaluationDefinition != null
            ? Collections.unmodifiableMap(legacyRuntimeEvaluationDefinition)
            : null;
        this.runtimeEvaluationRule = null;
        this.variantOverride = variantOverride;
        this.variantSplits = variantSplits != null
            ? Collections.unmodifiableMap(variantSplits)
            : null;
    }
Rollout method · java · L71-L73 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public Rollout(float rolloutPercentage) {
        this(rolloutPercentage, null, null, null);
    }
getRolloutPercentage method · java · L78-L80 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public float getRolloutPercentage() {
        return rolloutPercentage;
    }
getLegacyRuntimeEvaluationDefinition method · java · L85-L87 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public Map<String, Object> getLegacyRuntimeEvaluationDefinition() {
        return legacyRuntimeEvaluationDefinition;
    }
getVariantOverride method · java · L92-L94 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public VariantOverride getVariantOverride() {
        return variantOverride;
    }
getVariantSplits method · java · L99-L101 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public Map<String, Float> getVariantSplits() {
        return variantSplits;
    }
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
hasLegacyRuntimeEvaluation method · java · L106-L108 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public boolean hasLegacyRuntimeEvaluation() {
        return legacyRuntimeEvaluationDefinition != null && !legacyRuntimeEvaluationDefinition.isEmpty();
    }
hasRuntimeEvaluation method · java · L113-L115 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public boolean hasRuntimeEvaluation() {
        return runtimeEvaluationRule != null && runtimeEvaluationRule.length() > 0;
    }
hasVariantOverride method · java · L120-L122 (3 LOC)
src/main/java/com/mixpanel/mixpanelapi/featureflags/model/Rollout.java
    public boolean hasVariantOverride() {
        return variantOverride != null;
    }
‹ prevpage 2 / 6next ›