<commit_before>package main.java.sociam.pybossa.rest;

import java.io.InputStream;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.json.JSONObject;

import sociam.pybossa.TaskPerformer;
import sociam.pybossa.config.Config;

@Path("/getTasks")
public class GetTasks {
	private static final Logger logger = Logger.getLogger(sendTaskRun.class);

	@GET
	@Produces("application/json")
	public Response getTasks(@QueryParam("offset") Integer offset) {
		JSONObject result = new JSONObject();

		try {

			InputStream stream = sendTaskRun.class.getResourceAsStream("/log4j.properties");
			PropertyConfigurator.configure(stream);
			Config.reload();
			if (offset == null) {
				offset = 0;
			}
			result = TaskPerformer.getTasks(offset);

			return Response.status(200).entity(result.toString()).build();
		} catch (Exception e) {
			logger.error("error", e);
			return Response.status(500).entity(result.toString()).build();
		}
	}
}<commit_msg>no message<commit_after>package main.java.sociam.pybossa.rest;

import java.io.InputStream;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.json.JSONObject;

import sociam.pybossa.TaskPerformer;
import sociam.pybossa.config.Config;

@Path("/getTasks")
public class GetTasks {
	private static final Logger logger = Logger.getLogger(sendTaskRun.class);

	@GET
	@Produces("application/json")
	public Response getTasks(@QueryParam("offset") Integer offset) {
		JSONObject result = new JSONObject();

		try {

			InputStream stream = sendTaskRun.class.getResourceAsStream("/log4j.properties");
			PropertyConfigurator.configure(stream);
			Config.reload();
			if (offset == null) {
				offset = 0;
			}
			result = TaskPerformer.getTasks(offset);
			result.put("status", "success");
			return Response.status(200).entity(result.toString()).build();
		} catch (Exception e) {
			logger.error("error", e);
			result.put("status", "error");
			result.put("message", e);
			return Response.status(500).entity(result.toString()).build();
		}
	}
}
{'fraction_non_alphanumeric': 0.1417624521072797, 'fraction_numerical': 0.008514261387824606, 'mean_word_length': 4.889724310776942, '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': '5004446', 'n_tokens_mistral': 831, 'n_tokens_neox': 754, 'n_words': 141}