<commit_before>package org.openshift.data;

import java.net.UnknownHostException;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;

import com.mongodb.DB;
import com.mongodb.Mongo;

@Named
@ApplicationScoped
public class DBConnection {
	
	private DB mongoDB;
	private String test = "why greetings to you";
	

    public DBConnection() {
		super();
		System.out.println("Why am I getting no output");

	}
    
    @PostConstruct
	public void afterCreate() {
		System.out.println("just see if we can say anything");
		
		String host = System.getenv("OPENSHIFT_MONGODB_DB_GEAR_DNS");
		
		if (host == null || "".equals(host)){
			//we are not on openshift
			Mongo mongo = null;
			try {
				mongo = new Mongo( "localhost" , 27017 );
				mongoDB = mongo.getDB("javaws");
			} catch (UnknownHostException e) {
				System.out.println("Could not connect to Mongo on Localhost: " + e.getMessage());
			}
			
			
		} else {
			
			//on openshift
			String mongoport = System.getenv("OPENSHIFT_MONGODB_DB_PORT");
		    String user = System.getenv("OPENSHIFT_MONGODB_DB_USERNAME");
		    String password = System.getenv("OPENSHIFT_MONGODB_DB_PASSWORD");
		    String db = System.getenv("OPENSHIFT_APP_NAME");
		    int port = Integer.decode(mongoport);<commit_msg>hard coding mongo gear dns because of a bug in openshift<commit_after>package org.openshift.data;

import java.net.UnknownHostException;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;

import com.mongodb.DB;
import com.mongodb.Mongo;

@Named
@ApplicationScoped
public class DBConnection {
	
	private DB mongoDB;
	private String test = "why greetings to you";
	

    public DBConnection() {
		super();
		System.out.println("Why am I getting no output");

	}
    
    @PostConstruct
	public void afterCreate() {
		System.out.println("just see if we can say anything");
		
		String host = "518c27645973ca43db0002ab-sipsummit.rhcloud.com";
		
		if (host == null || "".equals(host)){
			//we are not on openshift
			Mongo mongo = null;
			try {
				mongo = new Mongo( "localhost" , 27017 );
				mongoDB = mongo.getDB("javaws");
			} catch (UnknownHostException e) {
				System.out.println("Could not connect to Mongo on Localhost: " + e.getMessage());
			}
			
			
		} else {
			
			//on openshift
			String mongoport = System.getenv("OPENSHIFT_MONGODB_DB_PORT");
		    String user = System.getenv("OPENSHIFT_MONGODB_DB_USERNAME");
		    String password = System.getenv("OPENSHIFT_MONGODB_DB_PASSWORD");
		    String db = System.getenv("OPENSHIFT_APP_NAME");
		    int port = Integer.decode(mongoport);
{'fraction_non_alphanumeric': 0.11148272017837235, 'fraction_numerical': 0.010033444816053512, 'mean_word_length': 3.798573975044563, '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': '5707643', 'n_tokens_mistral': 997, 'n_tokens_neox': 853, 'n_words': 211}