<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.adriaaaaan.backend;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

/**
 *
 * @author adrian
 */
@Path("messages")
public class Backend {
	
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<Message> getMessages(){
		return database;
	}
	
	@GET
	@Path("{id}")
	@Produces(MediaType.APPLICATION_JSON)
	public Message getMessageById(@PathParam("id") long id){
		return database.get(database.indexOf(new Message(id)));
	}
	
	private final static DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm");
	private final List<Message> database = new ArrayList<>(Arrays.asList(
						new MessageBuilder()
								.setId(1)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Hey wanna meet up?")
								.setBody(Messages.message1)
								.setAvatar("img/person1.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 20:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(2)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Great insurance offer!")
								.setBody(Messages.message2)
								.setAvatar("img/person2.jpg")
								.setReceived(formatter.parseDateTime("22/03/2014 21:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(3)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Thank you for your purchase")
								.setBody(Messages.message3)
								.setAvatar("img/person3.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 10:15").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(4)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Party next saturday!")
								.setBody(Messages.message4)
								.setAvatar("img/person4.JPG")
								.setReceived(formatter.parseDateTime("10/03/2014 22:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(5)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Newsletter")
								.setBody(Messages.message5)
								.setAvatar("img/person5.jpg")
								.setReceived(formatter.parseDateTime("18/03/2014 17:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(6)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Great to see you")
								.setBody(Messages.message6)
								.setAvatar("img/person6.jpg")
								.setReceived(formatter.parseDateTime("15/03/2014 13:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(7)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Watch the new trailer")
								.setBody(Messages.message7)
								.setAvatar("img/person1.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 12:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(8)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Reset you password")
								.setBody(Messages.message8)
								.setAvatar("img/person2.jpg")
								.setReceived(formatter.parseDateTime("12/05/2014 09:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(9)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("This is not a circular!")
								.setBody(Messages.message9)
								.setAvatar("img/person3.jpg")
								.setReceived(formatter.parseDateTime("12/04/2014 20:32").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(10)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Do you want to be a millionaire???")
								.setBody(Messages.message10)
								.setAvatar("img/person4.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 20:52").toCalendar(Locale.UK))
						.createMessage()
				));
}
<commit_msg>fixed missing image<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.adriaaaaan.backend;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

/**
 *
 * @author adrian
 */
@Path("messages")
public class Backend {
	
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<Message> getMessages(){
		return database;
	}
	
	@GET
	@Path("{id}")
	@Produces(MediaType.APPLICATION_JSON)
	public Message getMessageById(@PathParam("id") long id){
		return database.get(database.indexOf(new Message(id)));
	}
	
	private final static DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm");
	private final List<Message> database = new ArrayList<>(Arrays.asList(
						new MessageBuilder()
								.setId(1)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Hey wanna meet up?")
								.setBody(Messages.message1)
								.setAvatar("img/person1.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 20:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(2)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Great insurance offer!")
								.setBody(Messages.message2)
								.setAvatar("img/person2.jpg")
								.setReceived(formatter.parseDateTime("22/03/2014 21:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(3)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Thank you for your purchase")
								.setBody(Messages.message3)
								.setAvatar("img/person3.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 10:15").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(4)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Party next saturday!")
								.setBody(Messages.message4)
								.setAvatar("img/person4.JPG")
								.setReceived(formatter.parseDateTime("10/03/2014 22:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(5)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Newsletter")
								.setBody(Messages.message5)
								.setAvatar("img/person5.jpg")
								.setReceived(formatter.parseDateTime("18/03/2014 17:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(6)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Great to see you")
								.setBody(Messages.message6)
								.setAvatar("img/person6.jpg")
								.setReceived(formatter.parseDateTime("15/03/2014 13:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(7)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Watch the new trailer")
								.setBody(Messages.message7)
								.setAvatar("img/person1.jpg")
								.setReceived(formatter.parseDateTime("12/03/2014 12:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(8)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Reset you password")
								.setBody(Messages.message8)
								.setAvatar("img/person2.jpg")
								.setReceived(formatter.parseDateTime("12/05/2014 09:12").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(9)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("This is not a circular!")
								.setBody(Messages.message9)
								.setAvatar("img/person3.jpg")
								.setReceived(formatter.parseDateTime("12/04/2014 20:32").toCalendar(Locale.UK))
						.createMessage(),
						new MessageBuilder()
								.setId(10)
								.setToAddress("<EMAIL>")
								.setFromAddress("<EMAIL>")
								.setSubject("Do you want to be a millionaire???")
								.setBody(Messages.message10)
								.setAvatar("img/person4.JPG")
								.setReceived(formatter.parseDateTime("12/03/2014 20:52").toCalendar(Locale.UK))
						.createMessage()
				));
}

{'fraction_non_alphanumeric': 0.15012053473591935, 'fraction_numerical': 0.03331141792680254, 'mean_word_length': 2.9121303043291897, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '3390980', 'n_tokens_mistral': 4178, 'n_tokens_neox': 2831, 'n_words': 458}