<commit_before>package be.ugent.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.google.gson.Gson;

import be.ugent.Authentication;
import be.ugent.MongoDBSingleton;
import be.ugent.dao.DrugDao;
import be.ugent.dao.TriggerDao;
import be.ugent.entitity.Drug;
import be.ugent.entitity.Trigger;

@Path("/DBService")
public class DBConnectionService {
	
	Gson gson = new Gson();

	
	@GET
	@Path("/status")
	public Response getStatus() {
		System.out.println("Database status opgevraagd");
		Gson gson = new Gson();
		try{
			DrugDao drugDao = new DrugDao();
			if(MongoDBSingleton.getInstance().isOnline("CHRONIC"))
				return Response.ok().build();
			else
				return Response.status(503).build();
		}catch(Exception e){
			return Response.status(503).build();
		}
	}	
}<commit_msg>veel code<commit_after>package be.ugent.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.google.gson.Gson;

import be.ugent.Authentication;
import be.ugent.MongoDBSingleton;
import be.ugent.dao.DrugDao;
import be.ugent.dao.TriggerDao;
import be.ugent.entitity.Drug;
import be.ugent.entitity.Trigger;

@Path("/DBService")
public class DBConnectionService {
	
	Gson gson = new Gson();

	
	@GET
	@Path("/status")
	public Response getStatus() {
		System.out.println("Database status opgevraagd");
		Gson gson = new Gson();
		try{
			if(MongoDBSingleton.getInstance().isOnline("CHRONIC"))
				return Response.ok().build();
			else
				return Response.status(503).build();
		}catch(Exception e){
			return Response.status(503).build();
		}
	}	
}
{'fraction_non_alphanumeric': 0.14414414414414414, 'fraction_numerical': 0.005405405405405406, 'mean_word_length': 4.497524752475248, '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': '525792', 'n_tokens_mistral': 861, 'n_tokens_neox': 822, 'n_words': 151}