Source:
<code>private boolean assembleFormWithJackson(Long formId) { log.info("Starting Jackson assembly of form " + formId); SurveyDAO surveyDao = new SurveyDAO(); Survey form = surveyDao.loadFullSurvey(formId); SurveyGroupDAO surveyGroupDao = new SurveyGroupDAO(); SurveyGroup sg = surveyGroupDao.getByKey(form.getSurveyGroupId()); Long transactionId = randomNumber.nextLong(); XmlForm jacksonForm = new XmlForm(form, sg.getCode()); String formXML; try { formXML = PublishedForm.generate(jacksonForm); } catch (IOException e) { log.error("Failed to convert form to XML: "+ e.getMessage()); return false; } boolean uploadOk = false; log.info("Uploading " + formId); UploadStatusContainer uc = uploadFormXML( Long.toString(formId), Long.toString(formId) + "v" + form.getVersion(), formXML.toString()); Message message = new Message(); message.setActionAbout("surveyAssembly"); message.setObjectId(formId); message.setObjectTitle(sg.getCode() + " / " + form.getName()); if (uc.getUploadedZip1() && uc.getUploadedZip2()) { log.info("Finishing assembly of " + formId); form.setStatus(Survey.Status.PUBLISHED); surveyDao.save(form); String messageText = "Published. Please check: " + uc.getUrl(); message.setShortMessage(messageText); message.setTransactionUUID(transactionId.toString()); MessageDao messageDao = new MessageDao(); messageDao.save(message); uploadOk = true; List<Long> ids = new ArrayList<Long>(); ids.add(formId); SurveyUtils.notifyReportService(ids, "invalidate"); } else { String messageText = "Failed to publish: " + formId + "\n" + uc.getMessage(); message.setTransactionUUID(transactionId.toString()); message.setShortMessage(messageText); MessageDao messageDao = new MessageDao(); messageDao.save(message); log.warn("Failed to upload assembled form, id " + formId + "\n" + uc.getMessage()); } <START> log.info("Completed form assembly for " + formId); <END> return uploadOk; }</code><technical_language>Ditto debug</technical_language>

Target:
private boolean assembleFormWithJackson(Long formId) { log.debug("Starting Jackson assembly of form " + formId); SurveyDAO surveyDao = new SurveyDAO(); Survey form = surveyDao.loadFullSurvey(formId); SurveyGroupDAO surveyGroupDao = new SurveyGroupDAO(); SurveyGroup sg = surveyGroupDao.getByKey(form.getSurveyGroupId()); Long transactionId = randomNumber.nextLong(); XmlForm jacksonForm = new XmlForm(form, sg.getCode()); String formXML; try { formXML = PublishedForm.generate(jacksonForm); } catch (IOException e) { log.error("Failed to convert form to XML: "+ e.getMessage()); return false; } boolean uploadOk = false; log.debug("Uploading " + formId); UploadStatusContainer uc = uploadFormXML( Long.toString(formId), Long.toString(formId) + "v" + form.getVersion(), formXML.toString()); Message message = new Message(); message.setActionAbout("surveyAssembly"); message.setObjectId(formId); message.setObjectTitle(sg.getCode() + " / " + form.getName()); if (uc.getUploadedZip1() && uc.getUploadedZip2()) { log.debug("Finishing assembly of " + formId); form.setStatus(Survey.Status.PUBLISHED); surveyDao.save(form); String messageText = "Published. Please check: " + uc.getUrl(); message.setShortMessage(messageText); message.setTransactionUUID(transactionId.toString()); MessageDao messageDao = new MessageDao(); messageDao.save(message); uploadOk = true; List<Long> ids = new ArrayList<Long>(); ids.add(formId); SurveyUtils.notifyReportService(ids, "invalidate"); } else { String messageText = "Failed to publish: " + formId + "\n" + uc.getMessage(); message.setTransactionUUID(transactionId.toString()); message.setShortMessage(messageText); MessageDao messageDao = new MessageDao(); messageDao.save(message); log.warn("Failed to upload assembled form, id " + formId + "\n" + uc.getMessage()); } log.debug("Completed form assembly for " + formId); return uploadOk; }