Source:
<code>private Response createGovernanceAsset(String assetType, DetachedGenericArtifact genericArtifact, String baseURL) throws RegistryException { String shortName = Util.getShortName(assetType); if (validateAssetType(shortName)){ if (isContentType(shortName, genericArtifact)) { String[][] propertyArray = new String[2][2]; <START> propertyArray[0][0] = "version"; <END> propertyArray[0][1] = genericArtifact.getAttribute(OVERVIEW_VERSION); propertyArray[1][0] = "resource.source"; propertyArray[1][1] = "GovernanceAPI"; Registry registry = getUserRegistry(); boolean isSuccessful = importResourceWithRegistry(registry, genericArtifact.getAttribute("overview_path") + genericArtifact.getAttribute(OVERVIEW_VERSION), genericArtifact.getAttribute("overview_name"), genericArtifact.getAttribute("overview_type"), null, genericArtifact.getAttribute("overview_url"), null, propertyArray); if (isSuccessful) { return Response.status(Response.Status.CREATED).build(); } else { return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } } else { try { GenericArtifactManager manager = getGenericArtifactManager(shortName); GenericArtifact artifact = genericArtifact.makeRegistryAware(manager); manager.addGenericArtifact(artifact); URI link = new URL(Util.generateLink(assetType, artifact.getId(), baseURL, false)).toURI(); return Response.created(link).build(); } catch (MalformedURLException | URISyntaxException e) { throw new GovernanceException(e); } } } return validationFail(shortName); }</code><technical_language>good declare this string literals constants</technical_language>

Target:
private Response createGovernanceAsset(String assetType, DetachedGenericArtifact genericArtifact, String baseURL) throws RegistryException { String shortName = Util.getShortName(assetType); if (validateAssetType(shortName)){ if (isContentType(shortName, genericArtifact)) { String[][] propertyArray = new String[2][2]; propertyArray[0][0] = CommonConstants.VERSION; propertyArray[0][1] = genericArtifact.getAttribute(CommonConstants.OVERVIEW_VERSION); propertyArray[1][0] = CommonConstants.RESOURCE_SOURCE; propertyArray[1][1] = CommonConstants.GOVERNANCE_API; Registry registry = getUserRegistry(); boolean isSuccessful = importResourceWithRegistry(registry, genericArtifact.getAttribute(CommonConstants.OVERVIEW_PATH) + genericArtifact .getAttribute(CommonConstants.OVERVIEW_VERSION), genericArtifact.getAttribute(CommonConstants.OVERVIEW_NAME), genericArtifact.getAttribute(CommonConstants.OVERVIEW_TYPE), null, genericArtifact.getAttribute(CommonConstants.OVERVIEW_URL), null, propertyArray); if (isSuccessful) { return Response.status(Response.Status.CREATED).build(); } else { return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } } else { try { GenericArtifactManager manager = getGenericArtifactManager(shortName); GenericArtifact artifact = genericArtifact.makeRegistryAware(manager); manager.addGenericArtifact(artifact); URI link = new URL(Util.generateLink(assetType, artifact.getId(), baseURL, false)).toURI(); return Response.created(link).build(); } catch (MalformedURLException | URISyntaxException e) { throw new GovernanceException(e); } } } return validationFail(shortName); }