Source:
<code>public ProcessDTO convertJSONObjectToDTO(Map<String, Object> jsonObject, boolean related) throws DataException { ProcessDTO processDTO = new ProcessDTO(); <START> if (jsonObject.size() != 0) { <END> processDTO.setId(getIdFromJSONObject(jsonObject)); processDTO.setTitle(ProcessTypeField.TITLE.getStringValue(jsonObject)); processDTO.setWikiField(ProcessTypeField.WIKI_FIELD.getStringValue(jsonObject)); processDTO.setCreationDate(ProcessTypeField.CREATION_DATE.getStringValue(jsonObject)); processDTO.setProperties(convertRelatedJSONObjectToDTO(jsonObject, ProcessTypeField.PROPERTIES.getKey(), ServiceManager.getPropertyService())); processDTO.setSortedCorrectionSolutionMessages(getSortedCorrectionSolutionMessages(processDTO)); processDTO.setSortHelperArticles(ProcessTypeField.SORT_HELPER_ARTICLES.getIntValue(jsonObject)); processDTO.setSortHelperDocstructs(ProcessTypeField.SORT_HELPER_DOCSTRUCTS.getIntValue(jsonObject)); processDTO.setSortHelperImages(ProcessTypeField.SORT_HELPER_IMAGES.getIntValue(jsonObject)); processDTO.setSortHelperMetadata(ProcessTypeField.SORT_HELPER_METADATA.getIntValue(jsonObject)); processDTO.setProcessBaseUri(ProcessTypeField.PROCESS_BASE_URI.getStringValue(jsonObject)); processDTO.setTifDirectoryExists( checkIfTifDirectoryExists(processDTO.getId(), processDTO.getTitle(), processDTO.getProcessBaseUri())); processDTO.setBatches(getBatchesForProcessDTO(jsonObject)); if (!related) { convertRelatedJSONObjects(jsonObject, processDTO); } else { ProjectDTO projectDTO = new ProjectDTO(); projectDTO.setId(ProcessTypeField.PROJECT_ID.getIntValue(jsonObject)); projectDTO.setTitle(ProcessTypeField.PROJECT_TITLE.getStringValue(jsonObject)); projectDTO.setActive(ProcessTypeField.PROJECT_ACTIVE.getBooleanValue(jsonObject)); processDTO.setProject(projectDTO); } } return processDTO; }</code><technical_language>is !jsonObject.isEmpty()</technical_language>

Target:
public ProcessDTO convertJSONObjectToDTO(Map<String, Object> jsonObject, boolean related) throws DataException { ProcessDTO processDTO = new ProcessDTO(); if (!jsonObject.isEmpty()) { processDTO.setId(getIdFromJSONObject(jsonObject)); processDTO.setTitle(ProcessTypeField.TITLE.getStringValue(jsonObject)); processDTO.setWikiField(ProcessTypeField.WIKI_FIELD.getStringValue(jsonObject)); processDTO.setCreationDate(ProcessTypeField.CREATION_DATE.getStringValue(jsonObject)); processDTO.setProperties(convertRelatedJSONObjectToDTO(jsonObject, ProcessTypeField.PROPERTIES.getKey(), ServiceManager.getPropertyService())); processDTO.setSortedCorrectionSolutionMessages(getSortedCorrectionSolutionMessages(processDTO)); processDTO.setSortHelperArticles(ProcessTypeField.SORT_HELPER_ARTICLES.getIntValue(jsonObject)); processDTO.setSortHelperDocstructs(ProcessTypeField.SORT_HELPER_DOCSTRUCTS.getIntValue(jsonObject)); processDTO.setSortHelperImages(ProcessTypeField.SORT_HELPER_IMAGES.getIntValue(jsonObject)); processDTO.setSortHelperMetadata(ProcessTypeField.SORT_HELPER_METADATA.getIntValue(jsonObject)); processDTO.setProcessBaseUri(ProcessTypeField.PROCESS_BASE_URI.getStringValue(jsonObject)); processDTO.setTifDirectoryExists( checkIfTifDirectoryExists(processDTO.getId(), processDTO.getTitle(), processDTO.getProcessBaseUri())); processDTO.setBatches(getBatchesForProcessDTO(jsonObject)); if (!related) { convertRelatedJSONObjects(jsonObject, processDTO); } else { ProjectDTO projectDTO = new ProjectDTO(); projectDTO.setId(ProcessTypeField.PROJECT_ID.getIntValue(jsonObject)); projectDTO.setTitle(ProcessTypeField.PROJECT_TITLE.getStringValue(jsonObject)); projectDTO.setActive(ProcessTypeField.PROJECT_ACTIVE.getBooleanValue(jsonObject)); processDTO.setProject(projectDTO); } } return processDTO; }