<commit_before>package com.headwire.aemdc.command;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.headwire.aemdc.companion.Resource;


/**
 * Concrete command to create file
 *
 */
public class CreateFileCommand implements Command {

  private static final Logger LOG = LoggerFactory.getLogger(CreateFileCommand.class);

  private final Resource resource;

  /**
   * Constructor
   *
   * @param resource
   *          - resource
   */
  public CreateFileCommand(final Resource resource) {
    this.resource = resource;
  }

  @Override
  public void execute() throws IOException {
    final String sourcePath = resource.getSourceFolderPath() + "/" + resource.getSourceName();
    final String targetPath = resource.getTargetFolderPath() + "/" + resource.getTargetName();
    final File srcFile = new File(sourcePath);
    final File targetFile = new File(targetPath);

    LOG.debug("Copying file from [{}] to [{}] ...", sourcePath, targetPath);

    // copy directory
    copyFile(srcFile, targetFile);
  }<commit_msg>comments updated<commit_after>package com.headwire.aemdc.command;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.headwire.aemdc.companion.Resource;


/**
 * Concrete command to create file
 *
 */
public class CreateFileCommand implements Command {

  private static final Logger LOG = LoggerFactory.getLogger(CreateFileCommand.class);

  private final Resource resource;

  /**
   * Constructor
   *
   * @param resource
   *          - resource
   */
  public CreateFileCommand(final Resource resource) {
    this.resource = resource;
  }

  @Override
  public void execute() throws IOException {
    final String sourcePath = resource.getSourceFolderPath() + "/" + resource.getSourceName();
    final String targetPath = resource.getTargetFolderPath() + "/" + resource.getTargetName();
    final File srcFile = new File(sourcePath);
    final File targetFile = new File(targetPath);

    LOG.debug("Copying file from [{}] to [{}] ...", sourcePath, targetPath);

    // copy file
    copyFile(srcFile, targetFile);
  }
{'fraction_non_alphanumeric': 0.11120917917034422, 'fraction_numerical': 0.00176522506619594, 'mean_word_length': 3.782700421940928, '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': '4153160', 'n_tokens_mistral': 662, 'n_tokens_neox': 640, 'n_words': 161}