<commit_before>package com.atlassian.jira.plugins.dvcs.webwork;

import com.atlassian.crowd.embedded.api.User;
import com.atlassian.jira.config.FeatureManager;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.plugins.dvcs.service.OrganizationService;
import com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator;
import com.atlassian.jira.plugins.dvcs.spi.githubenterprise.GithubEnterpriseCommunicator;
import com.atlassian.jira.security.PermissionManager;
import com.atlassian.jira.security.Permissions;
import com.atlassian.jira.user.ApplicationUsers;
import com.atlassian.plugin.PluginAccessor;

public class PanelVisibleManager
{
    private static final String DEVSUMMARY_PLUGIN_ID = "com.atlassian.jira.plugins.jira-development-integration-plugin";
    private static final String LABS_OPT_IN = "jira.plugin.devstatus.phasetwo";

    private final FeatureManager featureManager;
    private final OrganizationService organizationService;
    private final PermissionManager permissionManager;
    private final PluginAccessor pluginAccessor;

    public PanelVisibleManager(FeatureManager featureManager, OrganizationService organizationService, PermissionManager permissionManager, PluginAccessor pluginAccessor)
    {
        this.featureManager = featureManager;
        this.organizationService = organizationService;
        this.permissionManager = permissionManager;
        this.pluginAccessor = pluginAccessor;
    }

    public boolean showPanel(Issue issue, User user)
    {
        return (!pluginAccessor.isPluginEnabled(DEVSUMMARY_PLUGIN_ID) ||
                // JIRA 6.1.x was installed with 0.x of the devsummary plugin, everything else after will want to hide this panel
                pluginAccessor.getPlugin(DEVSUMMARY_PLUGIN_ID).getPluginInformation().getVersion().startsWith("0.")) &&
                permissionManager.hasPermission(Permissions.VIEW_VERSION_CONTROL, issue, user) &&
                (!featureManager.isEnabledForUser(ApplicationUsers.from(user), LABS_OPT_IN) || isGithubConnected());
    }

    private boolean isGithubConnected()
    {
        return organizationService.existsOrganizationWithType(GithubCommunicator.GITHUB, GithubEnterpriseCommunicator.GITHUB_ENTERPRISE);
    }
}
<commit_msg>FUSE-700 Remove condition for Github being connected<commit_after>package com.atlassian.jira.plugins.dvcs.webwork;

import com.atlassian.crowd.embedded.api.User;
import com.atlassian.jira.config.FeatureManager;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.security.PermissionManager;
import com.atlassian.jira.security.Permissions;
import com.atlassian.jira.user.ApplicationUsers;
import com.atlassian.plugin.PluginAccessor;

public class PanelVisibleManager
{
    private static final String DEVSUMMARY_PLUGIN_ID = "com.atlassian.jira.plugins.jira-development-integration-plugin";
    private static final String LABS_OPT_IN = "jira.plugin.devstatus.phasetwo";

    private final FeatureManager featureManager;
    private final PermissionManager permissionManager;
    private final PluginAccessor pluginAccessor;

    public PanelVisibleManager(FeatureManager featureManager, PermissionManager permissionManager, PluginAccessor pluginAccessor)
    {
        this.featureManager = featureManager;
        this.permissionManager = permissionManager;
        this.pluginAccessor = pluginAccessor;
    }

    public boolean showPanel(Issue issue, User user)
    {
        return (!pluginAccessor.isPluginEnabled(DEVSUMMARY_PLUGIN_ID) ||
                // JIRA 6.1.x was installed with 0.x of the devsummary plugin, everything else after will want to hide this panel
                pluginAccessor.getPlugin(DEVSUMMARY_PLUGIN_ID).getPluginInformation().getVersion().startsWith("0.")) &&
                permissionManager.hasPermission(Permissions.VIEW_VERSION_CONTROL, issue, user) &&
                !featureManager.isEnabledForUser(ApplicationUsers.from(user), LABS_OPT_IN);
    }
}

{'fraction_non_alphanumeric': 0.07961703199798438, 'fraction_numerical': 0.002771478961955152, 'mean_word_length': 4.591549295774648, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2567716', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1069, 'n_words': 205}