<commit_before>package com.myhoard.model.dao;

import java.util.ArrayList;
import java.util.List;

public class CollectionMapper {

	/**
	 * Metoda przepisuje obiekt CollectionDTO na obiekt CollectionDS
	 * 
	 * @param collectionDTO
	 * @return collectionDS
	 */
	public static CollectionDS map(CollectionDTO collectionDTO) {
		CollectionDS collectionDS = new CollectionDS();

		collectionDS.setCreatedDate(collectionDTO.getCreatedDate());
		collectionDS.setDescription(collectionDTO.getDescription());
		try {
		collectionDS.setId(Integer.parseInt(collectionDTO.getId()));
		} catch (Exception e) {
			e.printStackTrace();
		}
		collectionDS.setItemsNumber(collectionDTO.getItemsNumber());
		collectionDS.setModifiedDate(collectionDTO.getModifiedDate());
		collectionDS.setName(collectionDTO.getName());
		collectionDS.setOwner(collectionDTO.getOwner());
		collectionDS.setTags(collectionDTO.getTags());

		return collectionDS;
	}

	/**
	 * Metoda przepisuje obiekt CollectionDS na obiekt CollectionDTO
	 * 
	 * @param collectionDS
	 * @return collectionDTO
	 */
	public static CollectionDTO map(CollectionDS collectionDS) {

		CollectionDTO collectionDTO = new CollectionDTO();

		collectionDTO.setCreatedDate(collectionDS.getCreatedDate());
		collectionDTO.setDescription(collectionDS.getDescription());
		collectionDTO.setId(collectionDS.getId() + "");
		collectionDTO.setItemsNumber(collectionDS.getItemsNumber());
		collectionDTO.setModifiedDate(collectionDS.getModifiedDate());
		collectionDTO.setName(collectionDS.getName());
		collectionDTO.setOwner(collectionDS.getOwner());
		collectionDTO.setTags(collectionDS.getTags());

		return collectionDTO;
	}

	/**
	 * @param List
	 *            <CollectionDS>
	 * @return List<CollectionDTO>
	 */
	public static List<CollectionDTO> map(List<CollectionDS> collectionDS) {
		List<CollectionDTO> collectionDTOs = new ArrayList<CollectionDTO>();
<commit_msg>nieistotne<commit_after>package com.myhoard.model.dao;

import java.util.ArrayList;
import java.util.List;

public class CollectionMapper {

	/**
	 * Metoda przepisuje obiekt CollectionDTO na obiekt CollectionDS
	 * 
	 * @param collectionDTO
	 * @return collectionDS
	 */
	public static CollectionDS map(CollectionDTO collectionDTO) {
		CollectionDS collectionDS = new CollectionDS();

		collectionDS.setCreatedDate(collectionDTO.getCreatedDate());
		collectionDS.setDescription(collectionDTO.getDescription());
		try {
		collectionDS.setId(Integer.parseInt(collectionDTO.getId()));
		} catch (Exception e) {
			e.printStackTrace();
		}
		collectionDS.setItemsNumber(collectionDTO.getItemsNumber());
		collectionDS.setModifiedDate(collectionDTO.getModifiedDate());
		collectionDS.setName(collectionDTO.getName());
		collectionDS.setOwner(collectionDTO.getOwner());
		collectionDS.setTags(collectionDTO.getTags());

		return collectionDS;
	}

	/**
	 * Metoda przepisuje obiekt CollectionDS na obiekt CollectionDTO
	 * 
	 * @param collectionDS
	 * @return collectionDTO
	 */
	public static CollectionDTO map(CollectionDS collectionDS) {

		CollectionDTO collectionDTO = new CollectionDTO();

		collectionDTO.setCreatedDate(collectionDS.getCreatedDate());
		collectionDTO.setDescription(collectionDS.getDescription());
		collectionDTO.setId(String.valueOf(collectionDS.getId()));
		collectionDTO.setItemsNumber(collectionDS.getItemsNumber());
		collectionDTO.setModifiedDate(collectionDS.getModifiedDate());
		collectionDTO.setName(collectionDS.getName());
		collectionDTO.setOwner(collectionDS.getOwner());
		collectionDTO.setTags(collectionDS.getTags());

		return collectionDTO;
	}

	/**
	 * @param List
	 *            <CollectionDS>
	 * @return List<CollectionDTO>
	 */
	public static List<CollectionDTO> map(List<CollectionDS> collectionDS) {
		List<CollectionDTO> collectionDTOs = new ArrayList<CollectionDTO>();

{'fraction_non_alphanumeric': 0.11035564853556486, 'fraction_numerical': 0.0, 'mean_word_length': 5.904332129963899, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2403970', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1100, 'n_words': 176}