<commit_before>package com.demonwav.mcdev.platform.mcp;

import com.demonwav.mcdev.buildsystem.BuildSystem;
import com.demonwav.mcdev.buildsystem.gradle.GradleBuildSystem;
import com.demonwav.mcdev.platform.AbstractModule;
import com.demonwav.mcdev.platform.PlatformType;
import com.demonwav.mcdev.platform.mcp.srg.SrgManager;

import com.intellij.openapi.module.Module;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiMethod;
import org.jetbrains.annotations.NotNull;

import javax.swing.Icon;

public class McpModule extends AbstractModule {
    public McpModule(@NotNull Module module) {
        super(module);
        this.buildSystem = BuildSystem.getInstance(module);
        if (buildSystem != null) {
            buildSystem.reImport(module);
        }
        SrgManager.getInstance(this).recomputeSrgMap();
    }

    @Override
    public GradleBuildSystem getBuildSystem() {
        return (GradleBuildSystem) buildSystem;
    }

    @Override
    public McpModuleType getModuleType() {
        return McpModuleType.getInstance();
    }

    @Override
    public PlatformType getType() {
        return PlatformType.MCP;
    }

    @Override
    public Icon getIcon() {<commit_msg>We should only setup run SrgManager#recomputeSrgMap() if buildSystem isn't null<commit_after>package com.demonwav.mcdev.platform.mcp;

import com.demonwav.mcdev.buildsystem.BuildSystem;
import com.demonwav.mcdev.buildsystem.gradle.GradleBuildSystem;
import com.demonwav.mcdev.platform.AbstractModule;
import com.demonwav.mcdev.platform.PlatformType;
import com.demonwav.mcdev.platform.mcp.srg.SrgManager;

import com.intellij.openapi.module.Module;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiMethod;
import org.jetbrains.annotations.NotNull;

import javax.swing.Icon;

public class McpModule extends AbstractModule {
    public McpModule(@NotNull Module module) {
        super(module);
        this.buildSystem = BuildSystem.getInstance(module);
        if (buildSystem != null) {
            buildSystem.reImport(module);
            SrgManager.getInstance(this).recomputeSrgMap();
        }
    }

    @Override
    public GradleBuildSystem getBuildSystem() {
        return (GradleBuildSystem) buildSystem;
    }

    @Override
    public McpModuleType getModuleType() {
        return McpModuleType.getInstance();
    }

    @Override
    public PlatformType getType() {
        return PlatformType.MCP;
    }

    @Override
    public Icon getIcon() {
{'fraction_non_alphanumeric': 0.09516129032258064, 'fraction_numerical': 0.0, 'mean_word_length': 3.646067415730337, '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': '6985765', 'n_tokens_mistral': 768, 'n_tokens_neox': 754, 'n_words': 133}