Source:
<code>protected Map<String, Object> updateSection(ParameterParser params, SessionState state) { String message; String errorMessage = null; Map<String, Object> results = new HashMap<String, Object>(); try { String addSectionHTML = params.getString("addSectionHTML"); int locationId = params.getInt("locationId"); String cleanAddSectionHTML = getFormattedText().processFormattedText(addSectionHTML, new StringBuilder(), true, true); cleanAddSectionHTML = cleanAddSectionHTML.replaceAll("'", "&apos;"); CitationCollectionOrder.SectionType sectionType = CitationCollectionOrder.SectionType.valueOf(params.getString("sectionType")); CitationCollection collection = getCitationCollection(state, false); CitationCollectionOrder citationCollectionOrder = new CitationCollectionOrder(collection.getId(), locationId, sectionType, cleanAddSectionHTML); errorMessage = getCitationValidator().getUpdateSectionErrorMessage(citationCollectionOrder, collection); if (errorMessage==null){ getCitationService().updateSection(citationCollectionOrder); message = rb.getString("resource.updated"); logger.info("Reading list successfully updated."); } else { message = errorMessage; <START> logger.warn("Invalid citation list in updateSection(). " + errorMessage); <END> } } catch (Exception e){ message = e.getMessage(); logger.warn("Exception in updateSection() " + e); } if(errorMessage==null && message != null && ! message.trim().equals("")) { results.put("message", message); } else { results.put("Error: ", new String[]{errorMessage}); } return results; }</code><technical_language>Include ID of citation list update easier trace broken</technical_language>

Target:
protected Map<String, Object> updateSection(ParameterParser params, SessionState state) { String message; String errorMessage = null; Map<String, Object> results = new HashMap<String, Object>(); try { String addSectionHTML = params.getString("addSectionHTML"); int locationId = params.getInt("locationId"); String cleanAddSectionHTML = getFormattedText().processFormattedText(addSectionHTML, new StringBuilder(), true, true); cleanAddSectionHTML = cleanAddSectionHTML.replaceAll("'", "&apos;"); CitationCollectionOrder.SectionType sectionType = CitationCollectionOrder.SectionType.valueOf(params.getString("sectionType")); CitationCollection collection = getCitationCollection(state, false); CitationCollectionOrder citationCollectionOrder = new CitationCollectionOrder(collection.getId(), locationId, sectionType, cleanAddSectionHTML); errorMessage = getCitationValidator().getUpdateSectionErrorMessage(citationCollectionOrder, collection); if (errorMessage==null){ getCitationService().updateSection(citationCollectionOrder); message = rb.getString("resource.updated"); logger.debug("Reading list with collection id: " + collection.getId() + " successfully updated. Section updated at location:" + locationId) ; } else { message = errorMessage; logger.warn("Invalid citation list with collection id: " + collection.getId() + " in updateSection(). " + errorMessage); } } catch (Exception e){ message = e.getMessage(); logger.warn("Exception in updateSection() " + e); } if(errorMessage==null && message != null && ! message.trim().equals("")) { results.put("message", message); } else { results.put("Error: ", new String[]{errorMessage}); } return results; }