test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/process/ForkableRepoValidatorTest.java
test_class.identifier: ForkableRepoValidatorTest
test_case.body: @Test(dataProvider = "shouldForkData")
      public void testShouldFork(ShouldForkResult isForkResult,
                                 ShouldForkResult isArchivedResult,
                                 ShouldForkResult userIsNotOwnerResult,
                                 ShouldForkResult contentHasChangesResult,
                                 ShouldForkResult expectedResult) {
          ForkableRepoValidator validator = mock(ForkableRepoValidator.class);
  
          when(validator.parentIsFork(any())).thenReturn(isForkResult);
          when(validator.parentIsArchived(any())).thenReturn(isArchivedResult);
          when(validator.thisUserIsNotOwner(any())).thenReturn(userIsNotOwnerResult);
          when(validator.contentHasChangesInDefaultBranch(any(), any(), any())).thenReturn(contentHasChangesResult);
          when(validator.shouldFork(any(), any(), any())).thenCallRealMethod();
  
          assertEquals(validator.shouldFork(mock(GHRepository.class), mock(GHContent.class), mock(GitForkBranch.class)),
                  expectedResult);
      }
test_case.class_method_signature: ForkableRepoValidatorTest.testShouldFork(ShouldForkResult isForkResult,
                                 ShouldForkResult isArchivedResult,
                                 ShouldForkResult userIsNotOwnerResult,
                                 ShouldForkResult contentHasChangesResult,
                                 ShouldForkResult expectedResult)
test_case.full_signature: @Test(dataProvider = "shouldForkData") public void testShouldFork(ShouldForkResult isForkResult,
                                 ShouldForkResult isArchivedResult,
                                 ShouldForkResult userIsNotOwnerResult,
                                 ShouldForkResult contentHasChangesResult,
                                 ShouldForkResult expectedResult)
test_case.identifier: testShouldFork
test_case.invocations: mock thenReturn when parentIsFork any thenReturn when parentIsArchived any thenReturn when thisUserIsNotOwner any thenReturn when contentHasChangesInDefaultBranch any any any thenCallRealMethod when shouldFork any any any assertEquals shouldFork mock mock mock
test_case.modifiers: @Test(dataProvider = "shouldForkData") public
test_case.parameters: (ShouldForkResult isForkResult,
                                 ShouldForkResult isArchivedResult,
                                 ShouldForkResult userIsNotOwnerResult,
                                 ShouldForkResult contentHasChangesResult,
                                 ShouldForkResult expectedResult)
test_case.return: void
test_case.signature: void testShouldFork(ShouldForkResult isForkResult,
                                 ShouldForkResult isArchivedResult,
                                 ShouldForkResult userIsNotOwnerResult,
                                 ShouldForkResult contentHasChangesResult,
                                 ShouldForkResult expectedResult)
focal_class.declarator: log = LoggerFactory.getLogger(ForkableRepoValidator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(ForkableRepoValidator.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: REPO_IS_ARCHIVED = "it's archived."
focal_class.modifier: public static final
focal_class.original_string: public static final String REPO_IS_ARCHIVED = "it's archived.";
focal_class.type: String
focal_class.var_name: REPO_IS_ARCHIVED
focal_class.declarator: REPO_IS_OWNED_BY_THIS_USER = "it is owned by this user."
focal_class.modifier: public static final
focal_class.original_string: public static final String REPO_IS_OWNED_BY_THIS_USER = "it is owned by this user.";
focal_class.type: String
focal_class.var_name: REPO_IS_OWNED_BY_THIS_USER
focal_class.declarator: COULD_NOT_CHECK_THIS_USER =
              "we could not determine fork status because we don't know the identity of the authenticated user."
focal_class.modifier: public static final
focal_class.original_string: public static final String COULD_NOT_CHECK_THIS_USER =
              "we could not determine fork status because we don't know the identity of the authenticated user.";
focal_class.type: String
focal_class.var_name: COULD_NOT_CHECK_THIS_USER
focal_class.declarator: CONTENT_PATH_NOT_IN_DEFAULT_BRANCH_TEMPLATE =
              "didn't find content path %s in default branch"
focal_class.modifier: public static final
focal_class.original_string: public static final String CONTENT_PATH_NOT_IN_DEFAULT_BRANCH_TEMPLATE =
              "didn't find content path %s in default branch";
focal_class.type: String
focal_class.var_name: CONTENT_PATH_NOT_IN_DEFAULT_BRANCH_TEMPLATE
focal_class.declarator: COULD_NOT_FIND_IMAGE_TO_UPDATE_TEMPLATE =
              "didn't find the image '%s' which required an update in path %s"
focal_class.modifier: public static final
focal_class.original_string: public static final String COULD_NOT_FIND_IMAGE_TO_UPDATE_TEMPLATE =
              "didn't find the image '%s' which required an update in path %s";
focal_class.type: String
focal_class.var_name: COULD_NOT_FIND_IMAGE_TO_UPDATE_TEMPLATE
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.file: dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/process/ForkableRepoValidator.java
focal_class.identifier: ForkableRepoValidator
focal_class.class_method_signature: ForkableRepoValidator.ForkableRepoValidator(DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.full_signature: public  ForkableRepoValidator(DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.identifier: ForkableRepoValidator
focal_class.modifiers: public
focal_class.parameters: (DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.signature:  ForkableRepoValidator(DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.class_method_signature: ForkableRepoValidator.shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_class.full_signature: public ShouldForkResult shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_class.identifier: shouldFork
focal_class.modifiers: public
focal_class.parameters: (GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_class.return: ShouldForkResult
focal_class.signature: ShouldForkResult shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_class.class_method_signature: ForkableRepoValidator.contentHasChangesInDefaultBranch(GHRepository parentRepo,
                                                                  GHContent searchResultContent,
                                                                  GitForkBranch gitForkBranch)
focal_class.full_signature: protected ShouldForkResult contentHasChangesInDefaultBranch(GHRepository parentRepo,
                                                                  GHContent searchResultContent,
                                                                  GitForkBranch gitForkBranch)
focal_class.identifier: contentHasChangesInDefaultBranch
focal_class.modifiers: protected
focal_class.parameters: (GHRepository parentRepo,
                                                                  GHContent searchResultContent,
                                                                  GitForkBranch gitForkBranch)
focal_class.return: ShouldForkResult
focal_class.signature: ShouldForkResult contentHasChangesInDefaultBranch(GHRepository parentRepo,
                                                                  GHContent searchResultContent,
                                                                  GitForkBranch gitForkBranch)
focal_class.class_method_signature: ForkableRepoValidator.hasNoChanges(GHContent content, GitForkBranch gitForkBranch)
focal_class.full_signature: protected boolean hasNoChanges(GHContent content, GitForkBranch gitForkBranch)
focal_class.identifier: hasNoChanges
focal_class.modifiers: protected
focal_class.parameters: (GHContent content, GitForkBranch gitForkBranch)
focal_class.return: boolean
focal_class.signature: boolean hasNoChanges(GHContent content, GitForkBranch gitForkBranch)
focal_class.class_method_signature: ForkableRepoValidator.thisUserIsNotOwner(GHRepository parentRepo)
focal_class.full_signature: protected ShouldForkResult thisUserIsNotOwner(GHRepository parentRepo)
focal_class.identifier: thisUserIsNotOwner
focal_class.modifiers: protected
focal_class.parameters: (GHRepository parentRepo)
focal_class.return: ShouldForkResult
focal_class.signature: ShouldForkResult thisUserIsNotOwner(GHRepository parentRepo)
focal_class.class_method_signature: ForkableRepoValidator.parentIsFork(GHRepository parentRepo)
focal_class.full_signature: protected ShouldForkResult parentIsFork(GHRepository parentRepo)
focal_class.identifier: parentIsFork
focal_class.modifiers: protected
focal_class.parameters: (GHRepository parentRepo)
focal_class.return: ShouldForkResult
focal_class.signature: ShouldForkResult parentIsFork(GHRepository parentRepo)
focal_class.class_method_signature: ForkableRepoValidator.parentIsArchived(GHRepository parentRepo)
focal_class.full_signature: protected ShouldForkResult parentIsArchived(GHRepository parentRepo)
focal_class.identifier: parentIsArchived
focal_class.modifiers: protected
focal_class.parameters: (GHRepository parentRepo)
focal_class.return: ShouldForkResult
focal_class.signature: ShouldForkResult parentIsArchived(GHRepository parentRepo)
focal_method.body: public ShouldForkResult shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch) {
          return parentIsFork(parentRepo)
                  .and(parentIsArchived(parentRepo)
                          .and(thisUserIsNotOwner(parentRepo)
                                  .and(contentHasChangesInDefaultBranch(parentRepo, searchResultContent, gitForkBranch))));
      }
focal_method.class_method_signature: ForkableRepoValidator.shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_method.full_signature: public ShouldForkResult shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_method.identifier: shouldFork
focal_method.invocations: and parentIsFork and parentIsArchived and thisUserIsNotOwner contentHasChangesInDefaultBranch
focal_method.modifiers: public
focal_method.parameters: (GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)
focal_method.return: ShouldForkResult
focal_method.signature: ShouldForkResult shouldFork(GHRepository parentRepo,
                                         GHContent searchResultContent,
                                         GitForkBranch gitForkBranch)