test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/process/GitHubPullRequestSenderTest.java
test_class.identifier: GitHubPullRequestSenderTest
test_case.body: @Test
      public void testGetForkNotFoundFromExistingRecords() {
          String reponame = "reponame";
          DockerfileGitHubUtil dockerfileGitHubUtil = mock(DockerfileGitHubUtil.class);
          GitHubPullRequestSender gitHubPullRequestSender = new GitHubPullRequestSender(dockerfileGitHubUtil, mock(ForkableRepoValidator.class));
          Multimap<String, GitHubContentToProcess> processMultimap = HashMultimap.create();
          assertNull(gitHubPullRequestSender.getForkFromExistingRecordToProcess(processMultimap, reponame));
      }
test_case.class_method_signature: GitHubPullRequestSenderTest.testGetForkNotFoundFromExistingRecords()
test_case.full_signature: @Test public void testGetForkNotFoundFromExistingRecords()
test_case.identifier: testGetForkNotFoundFromExistingRecords
test_case.invocations: mock mock create assertNull getForkFromExistingRecordToProcess
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetForkNotFoundFromExistingRecords()
focal_class.declarator: log = LoggerFactory.getLogger(GitHubPullRequestSender.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(GitHubPullRequestSender.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: REPO_IS_FORK = "it's a fork already. Sending a PR to a fork is unsupported at the moment."
focal_class.modifier: public static final
focal_class.original_string: public static final String REPO_IS_FORK = "it's a fork already. Sending a PR to a fork is unsupported at the moment.";
focal_class.type: String
focal_class.var_name: REPO_IS_FORK
focal_class.declarator: dockerfileGitHubUtil
focal_class.modifier: private final
focal_class.original_string: private final DockerfileGitHubUtil dockerfileGitHubUtil;
focal_class.type: DockerfileGitHubUtil
focal_class.var_name: dockerfileGitHubUtil
focal_class.declarator: forkableRepoValidator
focal_class.modifier: private final
focal_class.original_string: private final ForkableRepoValidator forkableRepoValidator;
focal_class.type: ForkableRepoValidator
focal_class.var_name: forkableRepoValidator
focal_class.file: dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/process/GitHubPullRequestSender.java
focal_class.identifier: GitHubPullRequestSender
focal_class.class_method_signature: GitHubPullRequestSender.GitHubPullRequestSender(DockerfileGitHubUtil dockerfileGitHubUtil, ForkableRepoValidator forkableRepoValidator)
focal_class.full_signature: public  GitHubPullRequestSender(DockerfileGitHubUtil dockerfileGitHubUtil, ForkableRepoValidator forkableRepoValidator)
focal_class.identifier: GitHubPullRequestSender
focal_class.modifiers: public
focal_class.parameters: (DockerfileGitHubUtil dockerfileGitHubUtil, ForkableRepoValidator forkableRepoValidator)
focal_class.signature:  GitHubPullRequestSender(DockerfileGitHubUtil dockerfileGitHubUtil, ForkableRepoValidator forkableRepoValidator)
focal_class.class_method_signature: GitHubPullRequestSender.forkRepositoriesFoundAndGetPathToDockerfiles(
              PagedSearchIterable<GHContent> contentsWithImage,
              GitForkBranch gitForkBranch)
focal_class.full_signature: public Multimap<String, GitHubContentToProcess> forkRepositoriesFoundAndGetPathToDockerfiles(
              PagedSearchIterable<GHContent> contentsWithImage,
              GitForkBranch gitForkBranch)
focal_class.identifier: forkRepositoriesFoundAndGetPathToDockerfiles
focal_class.modifiers: public
focal_class.parameters: (
              PagedSearchIterable<GHContent> contentsWithImage,
              GitForkBranch gitForkBranch)
focal_class.return: Multimap<String, GitHubContentToProcess>
focal_class.signature: Multimap<String, GitHubContentToProcess> forkRepositoriesFoundAndGetPathToDockerfiles(
              PagedSearchIterable<GHContent> contentsWithImage,
              GitForkBranch gitForkBranch)
focal_class.class_method_signature: GitHubPullRequestSender.ensureForkedAndAddToListForProcessing(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                         GHRepository parent,
                                                         String parentRepoName,
                                                         GHContent ghContent)
focal_class.full_signature: private void ensureForkedAndAddToListForProcessing(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                         GHRepository parent,
                                                         String parentRepoName,
                                                         GHContent ghContent)
focal_class.identifier: ensureForkedAndAddToListForProcessing
focal_class.modifiers: private
focal_class.parameters: (Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                         GHRepository parent,
                                                         String parentRepoName,
                                                         GHContent ghContent)
focal_class.return: void
focal_class.signature: void ensureForkedAndAddToListForProcessing(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                         GHRepository parent,
                                                         String parentRepoName,
                                                         GHContent ghContent)
focal_class.class_method_signature: GitHubPullRequestSender.getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_class.full_signature: protected GHRepository getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_class.identifier: getForkFromExistingRecordToProcess
focal_class.modifiers: protected
focal_class.parameters: (Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_class.return: GHRepository
focal_class.signature: GHRepository getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_method.body: protected GHRepository getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName) {
          if (pathToDockerfilesInParentRepo.containsKey(parentRepoName)) {
              Optional<GitHubContentToProcess> firstForkData = pathToDockerfilesInParentRepo.get(parentRepoName).stream().findFirst();
              if (firstForkData.isPresent()) {
                  return firstForkData.get().getFork();
              } else {
                  log.warn("For some reason we have data inconsistency when trying to find the fork for {}", parentRepoName);
              }
          }
          return null;
      }
focal_method.class_method_signature: GitHubPullRequestSender.getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_method.full_signature: protected GHRepository getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_method.identifier: getForkFromExistingRecordToProcess
focal_method.invocations: containsKey findFirst stream get isPresent getFork get warn
focal_method.modifiers: protected
focal_method.parameters: (Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)
focal_method.return: GHRepository
focal_method.signature: GHRepository getForkFromExistingRecordToProcess(Multimap<String, GitHubContentToProcess> pathToDockerfilesInParentRepo,
                                                              String parentRepoName)