<commit_before>package i5.las2peer.services.codeGenerationService.generators;

import java.io.IOException;

import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.RepositoryService;

import i5.las2peer.services.codeGenerationService.models.exception.GitHubException;
import i5.las2peer.services.codeGenerationService.models.microservice.Microservice;

public class MicroserviceGenerator {

  public static void createSourceCode(Microservice microservice, GitHubClient client,
      String gitHubOrganization, String templateRepositoryName) throws GitHubException {
    RepositoryService repService = new RepositoryService(client);
    try {
      Repository templateRepository =
          repService.getRepository(gitHubOrganization, templateRepositoryName);
      System.out.println(templateRepository.getName());
    } catch (IOException e) {
      e.printStackTrace();
      throw new GitHubException(e.getMessage());
    }
    Repository repository = new Repository();
    repository.setName("microservice " + microservice.getName());
    try {
      repService.createRepository(gitHubOrganization, repository);
    } catch (IOException e) {
      e.printStackTrace();
      throw new GitHubException(e.getMessage());
    }
  }

}
<commit_msg>..and finally I do understand how to retrieve files via GitHub API<commit_after>package i5.las2peer.services.codeGenerationService.generators;

import java.io.IOException;
import java.util.List;

import org.eclipse.egit.github.core.Blob;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.RepositoryContents;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.ContentsService;
import org.eclipse.egit.github.core.service.DataService;
import org.eclipse.egit.github.core.service.RepositoryService;
import org.eclipse.egit.github.core.util.EncodingUtils;

import i5.las2peer.services.codeGenerationService.models.exception.GitHubException;
import i5.las2peer.services.codeGenerationService.models.microservice.Microservice;

public class MicroserviceGenerator {

  public static void createSourceCode(Microservice microservice, GitHubClient client,
      String gitHubOrganization, String templateRepositoryName) throws GitHubException {
    // initialize repository service, contents service and data service
    RepositoryService repService = new RepositoryService(client);
    ContentsService contentsService = new ContentsService(client);
    DataService dataService = new DataService(client);
    // retrieve template repository
    try {
      Repository templateRepository =
          repService.getRepository(gitHubOrganization, templateRepositoryName);
      List<RepositoryContents> contents = contentsService.getContents(templateRepository);
      for (int i = 0; i < contents.size(); i++) {
        System.out.println(contents.get(i).getName());
        System.out.println(contents.get(i).getType());
        System.out.println(contents.get(i).getSize());
        // don't print out directories..
        if (contents.get(i).getSize() != 0) {
          String contentSha = contents.get(i).getSha();
          Blob content = dataService.getBlob(templateRepository, contentSha);
          byte[] decodedContent = EncodingUtils.fromBase64(content.getContent());
          String decodedContentUTF8 = new String(decodedContent, "UTF-8");
          System.out.println(decodedContentUTF8);
        }

      }
    } catch (IOException e) {
      e.printStackTrace();
      throw new GitHubException(e.getMessage());
    }

    // put code into new repository
    Repository repository = new Repository();
    repository.setName("microservice-" + microservice.getName());
    try {
      repService.createRepository(gitHubOrganization, repository);
    } catch (IOException e) {
      e.printStackTrace();
      throw new GitHubException(e.getMessage());
    }
  }

}

{'fraction_non_alphanumeric': 0.09755501222493887, 'fraction_numerical': 0.004645476772616137, 'mean_word_length': 3.801643192488263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '423910', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1048, 'n_words': 208}