<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gdal;

import org.gdal.gdal.gdal;
import org.gdal.ogr.ogr;

/**
 * This class must be placed in the common class loader location of the
 * application server. In the event of Glassfish this is domain/lib/ext; for
 * Tomcat it must be determined but is likely to be tomcat/lib
 *
 * This class loads the GDAL libraries one time only for the life-time of the
 * server
 *
 * The class must be referenced from the application code using a
 * Class.forName("org.gdal.Loader"); statement
 *
 * This will instantiate the class (only if it hasn't already been done) and
 * execute the code in the static constructor.
 *
 * This generic loader class can in principle be re-used independent of
 * applications.
 *
 */
public class Loader {
    static {
        try {
            gdal.AllRegister();
            ogr.RegisterAll();
            System.out.println("Loaded and registerred all GDAL/OGR drivers");
        } catch (Exception e) {
            System.out.println("Error registering GDAL/OGR dependencies: " + e.toString());
        }
    }
}

}<commit_msg>Bugfix<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gdal;

import org.gdal.gdal.gdal;
import org.gdal.ogr.ogr;

/**
 * This class must be placed in the common class loader location of the
 * application server. In the event of Glassfish this is domain/lib/ext; for
 * Tomcat it must be determined but is likely to be tomcat/lib
 *
 * This class loads the GDAL libraries one time only for the life-time of the
 * server
 *
 * The class must be referenced from the application code using a
 * Class.forName("org.gdal.Loader"); statement
 *
 * This will instantiate the class (only if it hasn't already been done) and
 * execute the code in the static constructor.
 *
 * This generic loader class can in principle be re-used independent of
 * applications.
 *
 */
public class Loader {
    static {
        try {
            gdal.AllRegister();
            ogr.RegisterAll();
            System.out.println("Loaded and registerred all GDAL/OGR drivers");
        } catch (Exception e) {
            System.out.println("Error registering GDAL/OGR dependencies: " + e.toString());
        }
    }
}
{'fraction_non_alphanumeric': 0.08353127474267617, 'fraction_numerical': 0.0, 'mean_word_length': 2.967032967032967, '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': '5291499', 'n_tokens_mistral': 692, 'n_tokens_neox': 675, 'n_words': 298}