Source:
<code>protected void handleVerifyUnverify(String entry, String versionName, String verifySource, boolean unverifyRequest, boolean isScript) { <START> String action = "verify"; <END> if (unverifyRequest) { action = "unverify"; } boolean toOverwrite = true; try { DockstoreTool tool = containersApi.getContainerByToolPath(entry); List<Tag> tags = tool.getTags(); Tag tagToUpdate = null; for (Tag tag : tags) { if (tag.getName().equals(versionName)) { tagToUpdate = tag; break; } } if (tagToUpdate == null) { errorMessage(versionName + " is not a valid tag for " + entry, Client.CLIENT_ERROR); } VerifyRequest verifyRequest = new VerifyRequest(); if (unverifyRequest) { verifyRequest.setVerify(false); verifyRequest.setVerifiedSource(null); } else { if (tagToUpdate.getVerified() && !isScript) { Scanner scanner = new Scanner(System.in, "utf-8"); out("The tag " + versionName + " has already been verified by \'" + tagToUpdate.getVerifiedSource() + "\'"); out("Would you like to overwrite this with \'" + verifySource + "\'? (y/n)"); String overwrite = scanner.nextLine(); if (overwrite.toLowerCase().equals("y")) { verifyRequest.setVerify(true); verifyRequest.setVerifiedSource(verifySource); } else { toOverwrite = false; } } else { verifyRequest.setVerify(true); verifyRequest.setVerifiedSource(verifySource); } } if (toOverwrite) { List<Tag> result = containerTagsApi.verifyToolTag(tool.getId(), tagToUpdate.getId(), verifyRequest); if (unverifyRequest) { out("Tag " + versionName + " has been unverified."); } else { out("Tag " + versionName + " has been verified by \'" + verifySource + "\'"); } } } catch (ApiException ex) { exceptionMessage(ex, "Unable to " + action + " tag " + versionName, Client.API_ERROR); } }</code><technical_language>If this is for text, simplify move closer. e.g. String action = unverifyRequest ? "unverify" : "verify" line 469</technical_language>

Target:
protected void handleVerifyUnverify(String entry, String versionName, String verifySource, boolean unverifyRequest, boolean isScript) { boolean toOverwrite = true; try { DockstoreTool tool = containersApi.getContainerByToolPath(entry); List<Tag> tags = tool.getTags(); Tag tagToUpdate = tags .stream() .filter((Tag u) -> u.getName().equals(versionName)) .findFirst() .get(); if (tagToUpdate == null) { errorMessage(versionName + " is not a valid tag for " + entry, Client.CLIENT_ERROR); } VerifyRequest verifyRequest = new VerifyRequest(); if (unverifyRequest) { verifyRequest.setVerify(false); verifyRequest.setVerifiedSource(null); } else { if (tagToUpdate.getVerified() && !isScript) { Scanner scanner = new Scanner(System.in, "utf-8"); out("The tag " + versionName + " has already been verified by \'" + tagToUpdate.getVerifiedSource() + "\'"); out("Would you like to overwrite this with \'" + verifySource + "\'? (y/n)"); String overwrite = scanner.nextLine(); if (overwrite.toLowerCase().equals("y")) { verifyRequest.setVerify(true); verifyRequest.setVerifiedSource(verifySource); } else { toOverwrite = false; } } else { verifyRequest.setVerify(true); verifyRequest.setVerifiedSource(verifySource); } } if (toOverwrite) { List<Tag> result = containerTagsApi.verifyToolTag(tool.getId(), tagToUpdate.getId(), verifyRequest); if (unverifyRequest) { out("Tag " + versionName + " has been unverified."); } else { out("Tag " + versionName + " has been verified by \'" + verifySource + "\'"); } } } catch (ApiException ex) { exceptionMessage(ex, "Unable to " + (unverifyRequest ? "unverify" : "verify") + " tag " + versionName, Client.API_ERROR); } }