<commit_before>package eloquent;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.List;

import eloquent.exceptions.EloquentException;
import eloquent.models.File;
import eloquent.adapters.AdapterInterface;

public class BatchTransfer {

	protected Queue<String> paths;

	protected List<File> files;

	protected AdapterInterface toAdapter;

	protected AdapterInterface fromAdapter;

	public BatchTransfer() {

		this.paths = new LinkedList<>();
		this.files = new ArrayList<>();
	}

	public BatchTransfer(List<String> filePaths) {
		super();

		for (String path : filePaths) {
			this.add(path);
		}
	}

	public BatchTransfer add(String path) {
		this.paths.add(path);

		return this;
	}

	public BatchTransfer to(AdapterInterface toAdapter) {
		this.toAdapter = toAdapter;

		return this;
	}

	public BatchTransfer from(AdapterInterface fromAdapter) {
		this.fromAdapter = fromAdapter;

		return this;
	}

	public List<File> getFiles() throws EloquentException {

		while (!this.paths.isEmpty()) {

			// Retrieve first path | HEAD
			String path = this.paths.poll();

			Transfer transfer = new Transfer(path);
			transfer.from(this.fromAdapter).to(this.toAdapter);

			try {
				File file = transfer.getFile();
				this.files.add(file);
			} catch (Exception e) {
				throw new EloquentException(e.getMessage());
			}
		}

		return this.files;
	}

}<commit_msg>Use BatchTransferFile for transferring file and allow new path<commit_after>package eloquent;

import eloquent.adapters.AdapterInterface;
import eloquent.exceptions.EloquentException;
import eloquent.models.BatchTransferFile;
import eloquent.models.File;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

public class BatchTransfer {

	protected Queue<BatchTransferFile> paths;

	protected List<File> files;

	protected AdapterInterface toAdapter;

	protected AdapterInterface fromAdapter;

	public BatchTransfer() {

		this.paths = new LinkedList<BatchTransferFile>();
		this.files = new ArrayList<>();
	}

	public BatchTransfer(List<String> filePaths) {
		super();

		for (String path : filePaths) {
			this.add(path);
		}
	}

	public BatchTransfer add(String path) {
		return this.add(path, path);
	}

	public BatchTransfer add(String path, String newPath) {
		this.paths.add(new BatchTransferFile(path, newPath));

		return this;
	}

	public BatchTransfer to(AdapterInterface toAdapter) {
		this.toAdapter = toAdapter;

		return this;
	}

	public BatchTransfer from(AdapterInterface fromAdapter) {
		this.fromAdapter = fromAdapter;

		return this;
	}

	public List<File> getFiles() throws EloquentException {

		while (!this.paths.isEmpty()) {

			// Retrieve first path | HEAD
			BatchTransferFile transferFile = this.paths.poll();

			Transfer transfer = new Transfer(transferFile.getPath());
			transfer.from(this.fromAdapter).to(this.toAdapter).at(transferFile.getNewpath());

			try {
				File file = transfer.getFile();
				this.files.add(file);
			} catch (Exception e) {
				throw new EloquentException(e.getMessage());
			}
		}

		return this.files;
	}

}
{'fraction_non_alphanumeric': 0.10866794136392607, 'fraction_numerical': 0.0, 'mean_word_length': 4.384219554030874, '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': '1447170', 'n_tokens_mistral': 1099, 'n_tokens_neox': 952, 'n_words': 227}