<commit_before>package devopsdistilled.operp.server;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Properties;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import devopsdistilled.operp.server.context.AppContext;

public class ServerApp {

	public static void main(String[] args) {
		ApplicationContext context = new AnnotationConfigApplicationContext(
				AppContext.class);

		Properties hibernateProperties = new Properties();
		URL hibernatePropertiesFileUrl = ServerApp.class.getClassLoader()
				.getResource("server/hibernate.properties");
		File hibernatePropertiesFile = new File(
				hibernatePropertiesFileUrl.getFile());
		try {
			InputStream in = new FileInputStream(hibernatePropertiesFile);
			hibernateProperties.load(in);
			String hbm2dllKey = "hibernate.hbm2ddl.auto";
			String hbm2ddlValue = hibernateProperties.getProperty(hbm2dllKey);

			if (hbm2ddlValue.equalsIgnoreCase("create"))
				hibernateProperties.setProperty(hbm2dllKey, "update");

			in.close();
			OutputStream out = new FileOutputStream(hibernatePropertiesFile);
			hibernateProperties.store(out, null);

		} catch (IOException e) {
			System.err.println("hibernate.properties file not found!");
		}

		System.out.println(context);
	}
}<commit_msg>Print stack trace upon error<commit_after>package devopsdistilled.operp.server;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Properties;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import devopsdistilled.operp.server.context.AppContext;

public class ServerApp {

	public static void main(String[] args) {
		ApplicationContext context = new AnnotationConfigApplicationContext(
				AppContext.class);

		Properties hibernateProperties = new Properties();
		URL hibernatePropertiesFileUrl = ServerApp.class.getClassLoader()
				.getResource("server/hibernate.properties");
		File hibernatePropertiesFile = new File(
				hibernatePropertiesFileUrl.getFile());
		try {
			InputStream in = new FileInputStream(hibernatePropertiesFile);
			hibernateProperties.load(in);
			String hbm2dllKey = "hibernate.hbm2ddl.auto";
			String hbm2ddlValue = hibernateProperties.getProperty(hbm2dllKey);

			if (hbm2ddlValue.equalsIgnoreCase("create"))
				hibernateProperties.setProperty(hbm2dllKey, "update");

			in.close();
			OutputStream out = new FileOutputStream(hibernatePropertiesFile);
			hibernateProperties.store(out, null);

		} catch (IOException e) {
			System.err.println("hibernate.properties file not found!");
			e.printStackTrace();
		}

		System.out.println(context);
	}
}
{'fraction_non_alphanumeric': 0.09844730756524611, 'fraction_numerical': 0.003964321110009911, 'mean_word_length': 5.850678733031674, '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': '677361', 'n_tokens_mistral': 959, 'n_tokens_neox': 821, 'n_words': 167}