test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/process/ForkableRepoValidatorTest.java
test_class.identifier: ForkableRepoValidatorTest
test_case.body: @Test(dataProvider = "hasNoChangesData")
      public void testHasNoChanges(String contentText, String imageName, String imageTag, boolean expectedResult) throws IOException {
          DockerfileGitHubUtil dockerfileGitHubUtil = mock(DockerfileGitHubUtil.class);
          GHRepository repo = mock(GHRepository.class);
          ForkableRepoValidator validator = new ForkableRepoValidator(dockerfileGitHubUtil);
          GHContent content = mock(GHContent.class);
          InputStream inputStream = new ByteArrayInputStream(contentText.getBytes());
          GitForkBranch gitForkBranch = new GitForkBranch(imageName, imageTag, null);
  
          when(content.read()).thenReturn(inputStream);
  
          when(repo.isArchived()).thenReturn(false);
          assertEquals(validator.hasNoChanges(content, gitForkBranch), expectedResult);
      }
test_case.class_method_signature: ForkableRepoValidatorTest.testHasNoChanges(String contentText, String imageName, String imageTag, boolean expectedResult)
test_case.full_signature: @Test(dataProvider = "hasNoChangesData") public void testHasNoChanges(String contentText, String imageName, String imageTag, boolean expectedResult)
test_case.identifier: testHasNoChanges
test_case.invocations: mock mock mock getBytes thenReturn when read thenReturn when isArchived assertEquals hasNoChanges
test_case.modifiers: @Test(dataProvider = "hasNoChangesData") public
test_case.parameters: (String contentText, String imageName, String imageTag, boolean expectedResult)
test_case.return: void
test_case.signature: void testHasNoChanges(String contentText, String imageName, String imageTag, boolean 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: protected boolean hasNoChanges(GHContent content, GitForkBranch gitForkBranch) {
          try (InputStream stream = content.read();
               InputStreamReader streamR = new InputStreamReader(stream);
               BufferedReader reader = new BufferedReader(streamR)) {
              String line;
              while ( (line = reader.readLine()) != null ) {
                  if (FromInstruction.isFromInstructionWithThisImageAndOlderTag(line,
                          gitForkBranch.getImageName(), gitForkBranch.getImageTag())) {
                      return false;
                  }
              }
          } catch (IOException exception) {
              log.warn("Failed while checking if there are changes in {}. Skipping... exception: {}",
                      content.getPath(), exception.getMessage());
          }
          return true;
      }
focal_method.class_method_signature: ForkableRepoValidator.hasNoChanges(GHContent content, GitForkBranch gitForkBranch)
focal_method.full_signature: protected boolean hasNoChanges(GHContent content, GitForkBranch gitForkBranch)
focal_method.identifier: hasNoChanges
focal_method.invocations: read readLine isFromInstructionWithThisImageAndOlderTag getImageName getImageTag warn getPath getMessage
focal_method.modifiers: protected
focal_method.parameters: (GHContent content, GitForkBranch gitForkBranch)
focal_method.return: boolean
focal_method.signature: boolean hasNoChanges(GHContent content, GitForkBranch gitForkBranch)