<commit_before>package org.helioviewer.gl3d.model.image;

import org.helioviewer.base.logging.Log;
import org.helioviewer.gl3d.scenegraph.GL3DState;
import org.helioviewer.gl3d.view.GL3DView;
import org.helioviewer.viewmodel.metadata.HelioviewerMetaData;
import org.helioviewer.viewmodel.metadata.HelioviewerOcculterMetaData;
import org.helioviewer.viewmodel.metadata.MetaData;
import org.helioviewer.viewmodel.view.MetaDataView;

/**
 * Factory to be used for creating GL3DImageLayer Objects. This class is used by
 * the GL3DSceneGraphView.
 * 
 * @author <NAME> (<EMAIL>)
 * 
 */
public class GL3DImageLayerFactory {

    public static GL3DImageLayer createImageLayer(GL3DState state, GL3DView mainView) {
        MetaData metaData = mainView.getAdapter(MetaDataView.class).getMetaData();

        GL3DImageLayer imageLayer = null;

        if (metaData instanceof HelioviewerOcculterMetaData) {
            // LASCO
            Log.debug("GL3DImageLayerFactory: Creating LASCO Image Layer");
            return new GL3DLascoImageLayer(mainView);
        } else if (metaData instanceof HelioviewerMetaData) {

            HelioviewerMetaData hvMetaData = (HelioviewerMetaData) metaData;
            if (hvMetaData.getInstrument().equalsIgnoreCase("HMI")) {
                // HMI
                Log.debug("GL3DImageLayerFactory: Creating HMI Image Layer!");
                return new GL3DHMIImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("EIT")) {
                // EIT
                return new GL3DEITImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("AIA")) {
                // AIA
                return new GL3DAIAImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("STEREO")) {
                // STEREO
                return new GL3DStereoImageLayer(mainView);
            } else {
                // GENERIC
                return new GL3DAIAImageLayer(mainView);
            }
        } else {
            Log.error("GL3DShaderFactory: Cannot create ImageMesh for given ImageTextureView, not recognized underlying data " + metaData);
        }

        return imageLayer;
    }
}<commit_msg>Put proper name<commit_after>package org.helioviewer.gl3d.model.image;

import org.helioviewer.base.logging.Log;
import org.helioviewer.gl3d.scenegraph.GL3DState;
import org.helioviewer.gl3d.view.GL3DView;
import org.helioviewer.viewmodel.metadata.HelioviewerMetaData;
import org.helioviewer.viewmodel.metadata.HelioviewerOcculterMetaData;
import org.helioviewer.viewmodel.metadata.MetaData;
import org.helioviewer.viewmodel.view.MetaDataView;

/**
 * Factory to be used for creating GL3DImageLayer Objects. This class is used by
 * the GL3DSceneGraphView.
 * 
 * @author <NAME> (<EMAIL>)
 * 
 */
public class GL3DImageLayerFactory {

    public static GL3DImageLayer createImageLayer(GL3DState state, GL3DView mainView) {
        MetaData metaData = mainView.getAdapter(MetaDataView.class).getMetaData();

        GL3DImageLayer imageLayer = null;

        if (metaData instanceof HelioviewerOcculterMetaData) {
            // LASCO
            Log.debug("GL3DImageLayerFactory: Creating LASCO Image Layer");
            return new GL3DLascoImageLayer(mainView);
        } else if (metaData instanceof HelioviewerMetaData) {

            HelioviewerMetaData hvMetaData = (HelioviewerMetaData) metaData;
            if (hvMetaData.getInstrument().equalsIgnoreCase("HMI")) {
                // HMI
                Log.debug("GL3DImageLayerFactory: Creating HMI Image Layer!");
                return new GL3DHMIImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("EIT")) {
                // EIT
                return new GL3DEITImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("AIA")) {
                // AIA
                return new GL3DAIAImageLayer(mainView);
            } else if (hvMetaData.getInstrument().equalsIgnoreCase("SECCHI")) {
                // STEREO
                return new GL3DStereoImageLayer(mainView);
            } else {
                // GENERIC
                return new GL3DAIAImageLayer(mainView);
            }
        } else {
            Log.error("GL3DShaderFactory: Cannot create ImageMesh for given ImageTextureView, not recognized underlying data " + metaData);
        }

        return imageLayer;
    }
}
{'fraction_non_alphanumeric': 0.08931777378815081, 'fraction_numerical': 0.009425493716337522, 'mean_word_length': 2.6443172526574, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '984528', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1327, 'n_words': 252}