test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/storage/GitHubJsonStoreTest.java
test_class.identifier: GitHubJsonStoreTest
test_case.body: @Test(dataProvider = "inputStores")
      public void testGetAndModifyJsonString(String storeContent, String image, String tag, String expectedOutput) throws Exception {
          GitHubUtil gitHubUtil = mock(GitHubUtil.class);
          JsonElement json = JsonParser.parseString(storeContent);
  
          String output = new GitHubJsonStore(gitHubUtil, "test").getAndModifyJsonString(json, image, tag);
          assertEquals(output, expectedOutput);
      }
test_case.class_method_signature: GitHubJsonStoreTest.testGetAndModifyJsonString(String storeContent, String image, String tag, String expectedOutput)
test_case.full_signature: @Test(dataProvider = "inputStores") public void testGetAndModifyJsonString(String storeContent, String image, String tag, String expectedOutput)
test_case.identifier: testGetAndModifyJsonString
test_case.invocations: mock parseString getAndModifyJsonString assertEquals
test_case.modifiers: @Test(dataProvider = "inputStores") public
test_case.parameters: (String storeContent, String image, String tag, String expectedOutput)
test_case.return: void
test_case.signature: void testGetAndModifyJsonString(String storeContent, String image, String tag, String expectedOutput)
focal_class.declarator: log = LoggerFactory.getLogger(GitHubJsonStore.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(GitHubJsonStore.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: gitHubUtil
focal_class.modifier: private final
focal_class.original_string: private final GitHubUtil gitHubUtil;
focal_class.type: GitHubUtil
focal_class.var_name: gitHubUtil
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final String store;
focal_class.type: String
focal_class.var_name: store
focal_class.file: dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/storage/GitHubJsonStore.java
focal_class.identifier: GitHubJsonStore
focal_class.class_method_signature: GitHubJsonStore.GitHubJsonStore(GitHubUtil gitHubUtil, String store)
focal_class.full_signature: public  GitHubJsonStore(GitHubUtil gitHubUtil, String store)
focal_class.identifier: GitHubJsonStore
focal_class.modifiers: public
focal_class.parameters: (GitHubUtil gitHubUtil, String store)
focal_class.signature:  GitHubJsonStore(GitHubUtil gitHubUtil, String store)
focal_class.class_method_signature: GitHubJsonStore.updateStore(String img, String tag)
focal_class.full_signature: public void updateStore(String img, String tag)
focal_class.identifier: updateStore
focal_class.modifiers: public
focal_class.parameters: (String img, String tag)
focal_class.return: void
focal_class.signature: void updateStore(String img, String tag)
focal_class.class_method_signature: GitHubJsonStore.updateStoreOnGithub(GHRepository repo, String path, String img, String tag)
focal_class.full_signature: protected void updateStoreOnGithub(GHRepository repo, String path, String img, String tag)
focal_class.identifier: updateStoreOnGithub
focal_class.modifiers: protected
focal_class.parameters: (GHRepository repo, String path, String img, String tag)
focal_class.return: void
focal_class.signature: void updateStoreOnGithub(GHRepository repo, String path, String img, String tag)
focal_class.class_method_signature: GitHubJsonStore.getAndModifyJsonString(JsonElement json, String img, String tag)
focal_class.full_signature: protected String getAndModifyJsonString(JsonElement json, String img, String tag)
focal_class.identifier: getAndModifyJsonString
focal_class.modifiers: protected
focal_class.parameters: (JsonElement json, String img, String tag)
focal_class.return: String
focal_class.signature: String getAndModifyJsonString(JsonElement json, String img, String tag)
focal_method.body: protected String getAndModifyJsonString(JsonElement json, String img, String tag) {
          JsonElement images;
          if (json.isJsonNull()) {
              json = new JsonObject();
              images = new JsonObject();
              json.getAsJsonObject().add("images", images);
          }
          images = json.getAsJsonObject().get("images");
          if (images == null) {
              images = new JsonObject();
              json.getAsJsonObject().add("images", images);
              images = json.getAsJsonObject().get("images");
          }
          JsonElement newTag = new JsonPrimitive(tag);
          images.getAsJsonObject().add(img, newTag);
  
          Gson gson = new GsonBuilder().setPrettyPrinting().create();
          return gson.toJson(json);
      }
focal_method.class_method_signature: GitHubJsonStore.getAndModifyJsonString(JsonElement json, String img, String tag)
focal_method.full_signature: protected String getAndModifyJsonString(JsonElement json, String img, String tag)
focal_method.identifier: getAndModifyJsonString
focal_method.invocations: isJsonNull add getAsJsonObject get getAsJsonObject add getAsJsonObject get getAsJsonObject add getAsJsonObject create setPrettyPrinting toJson
focal_method.modifiers: protected
focal_method.parameters: (JsonElement json, String img, String tag)
focal_method.return: String
focal_method.signature: String getAndModifyJsonString(JsonElement json, String img, String tag)