<commit_before>package org.ossmeter.platform.app.example;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.ossmeter.platform.Platform;
import org.ossmeter.platform.app.example.util.ProjectCreationUtil;
import org.ossmeter.platform.osgi.OssmeterApplication;
import org.ossmeter.repository.model.LocalStorage;
import org.ossmeter.repository.model.Project;
import org.ossmeter.repository.model.ProjectCollection;
import org.ossmeter.repository.model.ProjectRepository;

import com.googlecode.pongo.runtime.PongoFactory;
import com.googlecode.pongo.runtime.osgi.OsgiPongoFactoryContributor;
import com.mongodb.Mongo;

public class App implements IApplication {

	@Override
	public Object start(IApplicationContext context) throws Exception {
		// Add projects to the DB here 
		Mongo mongo = new Mongo(); // FIXME: this needs to connect to the replica set
		PongoFactory.getInstance().getContributors().add(new OsgiPongoFactoryContributor());
		Platform platform = new Platform(mongo);
		ProjectRepository repo = platform.getProjectRepositoryManager().getProjectRepository();
		
//		Project pongo = ProjectCreationUtil.createSvnProject("pongo", "http://pongo.googlecode.com/svn/trunk");
//		platform.getProjectRepositoryManager().getProjectRepository().getProjects().add(pongo);
		ProjectCollection coll = repo.getProjects();
		for (Project p : coll) {
			coll.remove(p);
		}
		
		Project pdb = ProjectCreationUtil.createGitProject("pdb.values", "file:///Users/jurgenv/Workspaces/Rascal/pdb.values");
		coll.add(pdb);
		
		// Synchronise the changes and close the connection<commit_msg>Added local repository of pongo for testing<commit_after>package org.ossmeter.platform.app.example;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.ossmeter.platform.Platform;
import org.ossmeter.platform.app.example.util.ProjectCreationUtil;
import org.ossmeter.platform.osgi.OssmeterApplication;
import org.ossmeter.repository.model.LocalStorage;
import org.ossmeter.repository.model.Project;
import org.ossmeter.repository.model.ProjectCollection;
import org.ossmeter.repository.model.ProjectRepository;

import com.googlecode.pongo.runtime.PongoFactory;
import com.googlecode.pongo.runtime.osgi.OsgiPongoFactoryContributor;
import com.mongodb.Mongo;

public class App implements IApplication {

	@Override
	public Object start(IApplicationContext context) throws Exception {
		// Add projects to the DB here 
		Mongo mongo = new Mongo(); // FIXME: this needs to connect to the replica set
		PongoFactory.getInstance().getContributors().add(new OsgiPongoFactoryContributor());
		Platform platform = new Platform(mongo);
		ProjectRepository repo = platform.getProjectRepositoryManager().getProjectRepository();
		
//		Project pongo = ProjectCreationUtil.createSvnProject("pongo", "http://pongo.googlecode.com/svn/trunk");
//		platform.getProjectRepositoryManager().getProjectRepository().getProjects().add(pongo);
		ProjectCollection coll = repo.getProjects();
		for (Project p : coll) {
			coll.remove(p);
		}
		
//		Project pdb = ProjectCreationUtil.createGitProject("pdb_values", "file:///Users/shahi/Documents/CWI/l1_workspace/pdb.values");
//		coll.add(pdb);
		
		Project pongo = ProjectCreationUtil.createSvnProject("pongo", "file:///Users/shahi/svn/pongo");
		coll.add(pongo);
		
		// Synchronise the changes and close the connection
{'fraction_non_alphanumeric': 0.11175616835994194, 'fraction_numerical': 0.00029027576197387516, 'mean_word_length': 5.73046875, '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': '2374762', 'n_tokens_mistral': 1085, 'n_tokens_neox': 997, 'n_words': 192}