Source:
<code>private void putElement(final String elemName, final Attributes atts, final boolean removeConref) throws SAXException { <START> final Set<String> namespaces = new HashSet<>(32); <END> try { pushcontentWriter.writeStartElement(elemName); for (int index = 0; index < atts.getLength(); index++) { final String name = atts.getQName(index); if (!removeConref || !ATTRIBUTE_NAME_CONREF.equals(name) && !ATTRIBUTE_NAME_CONACTION.equals(name)) { String value = atts.getValue(index); if (ATTRIBUTE_NAME_HREF.equals(name) || ATTRIBUTE_NAME_CONREF.equals(name)) { value = replaceURL(value); } final int offset = atts.getQName(index).indexOf(":"); final String prefix = offset != -1 ? atts.getQName(index).substring(0, offset) : ""; if (!namespaces.contains(prefix)) { namespaces.add(prefix); if (!(prefix.equals(""))) { pushcontentWriter.writeNamespace(prefix, atts.getURI(index)); } } pushcontentWriter.writeAttribute(prefix, atts.getURI(index), atts.getLocalName(index), value); } } if (ATTR_CONACTION_VALUE_PUSHREPLACE.equals(pushType) && atts.getValue(ATTRIBUTE_NAME_ID) == null && level == 1) { final String fragment = target.getFragment(); if (fragment == null) { logger.error(MessageUtils.getMessage("DOTJ041E", target.toString()).toString()); } else { String id; if (fragment.contains(SLASH)) { id = fragment.substring(fragment.lastIndexOf(SLASH) + 1); } else { id = fragment; } pushcontentWriter.writeAttribute(ATTRIBUTE_NAME_ID, id); } } } catch (final XMLStreamException e) { throw new SAXException(e); } }</code><technical_language>need set default size of set Java in cases correct explicit set size user assume 32 means something. explicit initial size in OT code base removed</technical_language>

Target:
private void putElement(final String elemName, final Attributes atts, final boolean removeConref) throws SAXException { final Set<String> namespaces = new HashSet<>(); try { pushcontentWriter.writeStartElement(elemName); for (int index = 0; index < atts.getLength(); index++) { final String name = atts.getQName(index); if (!removeConref || !ATTRIBUTE_NAME_CONREF.equals(name) && !ATTRIBUTE_NAME_CONACTION.equals(name)) { String value = atts.getValue(index); if (ATTRIBUTE_NAME_HREF.equals(name) || ATTRIBUTE_NAME_CONREF.equals(name)) { value = replaceURL(value); } final int offset = atts.getQName(index).indexOf(":"); final String prefix = offset != -1 ? atts.getQName(index).substring(0, offset) : ""; if (!namespaces.contains(prefix)) { namespaces.add(prefix); if (!prefix.isEmpty()) { pushcontentWriter.writeNamespace(prefix, atts.getURI(index)); } } pushcontentWriter.writeAttribute(prefix, atts.getURI(index), atts.getLocalName(index), value); } } if (ATTR_CONACTION_VALUE_PUSHREPLACE.equals(pushType) && atts.getValue(ATTRIBUTE_NAME_ID) == null && level == 1) { final String fragment = target.getFragment(); if (fragment == null) { logger.error(MessageUtils.getMessage("DOTJ041E", target.toString()).toString()); } else { String id; if (fragment.contains(SLASH)) { id = fragment.substring(fragment.lastIndexOf(SLASH) + 1); } else { id = fragment; } pushcontentWriter.writeAttribute(ATTRIBUTE_NAME_ID, id); } } } catch (final XMLStreamException e) { throw new SAXException(e); } }