Source:
public XMLInfo getXMLInfo(String xml) throws DocumentParserException { Document document = null; try { document = getXMLDocument(xml); } catch (ParserConfigurationException | IOException | SAXException e) { throw new DocumentParserException(e.getMessage()); } String externalProjectId = getTagId(document, "project"); if (externalProjectId == null) { externalProjectId = Constants.DEFAULT_PROJECT_ID; } String externalUserName = getTagValue(document, "user_name"); if (externalUserName == null) { externalUserName = Constants.DEFAULT_VOGONWEB_USER_NAME; } String externalUserId = getTagValue(document, "user_id"); if (externalUserId == null) { externalUserId = Constants.DEFAULT_VOGONWEB_USER_ID; } String name = getTagValue(document, "name"); if (name == null) { name = Constants.DEFAULT_PROJECT_NAME; } String description = getTagValue(document, "description"); if (description == null) { description = Constants.DEFAULT_PROJECT_DESCRIPTION; } String sender = getTagValue(document, "sender"); if (sender == null) { sender = Constants.VOGONWEB_SENDER; } String workspaceName = getTagValue(document, "workspace"); if (workspaceName == null) { workspaceName = Constants.DEFAULT_WORKSPACE_NAME; } String externalWorkspaceId = getTagId(document, "workspace"); if (externalWorkspaceId == null) { externalWorkspaceId = Constants.DEFAULT_WORKSPACE_ID; } String networkName = getTagValue(document, "network_name"); if (networkName == null) { networkName = Constants.VOGONWEB_NETWORK_NAME; } XMLInfo info = new XMLInfo(); info.setProjectId(externalProjectId); info.setExternalUserId(externalUserId); info.setExternalUserName(externalUserName); info.setName(name); info.setDescription(description); info.setSender(sender); info.setWorkspaceName(workspaceName); info.setExternalWorkspaceId(externalWorkspaceId); info.setNetworkName(networkName); return info; }

Target:
public XMLInfo getXMLInfo(String xml) throws DocumentParserException { Document document = null; try { document = getXMLDocument(xml); } catch (ParserConfigurationException | IOException | SAXException e) { throw new DocumentParserException(e); } String externalProjectId = getTagId(document, "project"); if (externalProjectId == null) { externalProjectId = Constants.DEFAULT_PROJECT_ID; } String externalUserName = getTagValue(document, "user_name"); if (externalUserName == null) { externalUserName = Constants.DEFAULT_VOGONWEB_USER_NAME; } String externalUserId = getTagValue(document, "user_id"); if (externalUserId == null) { externalUserId = Constants.DEFAULT_VOGONWEB_USER_ID; } String name = getTagValue(document, "name"); if (name == null) { name = Constants.DEFAULT_PROJECT_NAME; } String description = getTagValue(document, "description"); if (description == null) { description = Constants.DEFAULT_PROJECT_DESCRIPTION; } String sender = getTagValue(document, "sender"); if (sender == null) { sender = Constants.VOGONWEB_SENDER; } String workspaceName = getTagValue(document, "workspace"); if (workspaceName == null) { workspaceName = Constants.DEFAULT_WORKSPACE_NAME; } String externalWorkspaceId = getTagId(document, "workspace"); if (externalWorkspaceId == null) { externalWorkspaceId = Constants.DEFAULT_WORKSPACE_ID; } String networkName = getTagValue(document, "network_name"); if (networkName == null) { networkName = Constants.VOGONWEB_NETWORK_NAME; } XMLInfo info = new XMLInfo(); info.setProjectId(externalProjectId); info.setExternalUserId(externalUserId); info.setExternalUserName(externalUserName); info.setName(name); info.setDescription(description); info.setSender(sender); info.setWorkspaceName(workspaceName); info.setExternalWorkspaceId(externalWorkspaceId); info.setNetworkName(networkName); return info; }