private void resolveNameContext() {
        for (Map.Entry<String, Set<Symbol>> entry : symbolNames.entrySet()) {
            Set<Symbol> duplicates = entry.getValue();
            // If the duplicates list has more than one entry
            // then duplicates are present, and we need to de-dupe
            if (duplicates.size() > 1) {
                duplicates.forEach(dupe -> {
                    // If we are in the namespace of a Symbol, use its
                    // short name, otherwise use the full name
                    if (dupe.getNamespace().equals(namespace)) {
                        putContext(dupe.getFullName(), dupe.getName());
                    } else {
                        putContext(dupe.getFullName(), dupe.getFullName());
                    }
                });
            } else {
                Symbol symbol = duplicates.iterator().next();
                putContext(symbol.getFullName(), symbol.getName());
            }
        }
    }
");

        // Split out any HTML-tag wrapped sections as we do not want to wrap
        // any customer documentation with tags
        Matcher matcher = PATTERN.matcher(contents);
        int lastMatchPos = 0;
        writeInlineWithNoFormatting(" * ");
        while (matcher.find()) {
            // write all contents up to the match.
            writeDocStringLine(contents.substring(lastMatchPos, matcher.start()));

            // write match contents
            writeInlineWithNoFormatting(contents.substring(matcher.start(), matcher.end()).replace("\n", "\n * "));
            lastMatchPos = matcher.end();
        }

        // Write out all remaining contents
        writeDocStringLine(contents.substring(lastMatchPos));
        writeWithNoFormatting("\n
smithy-trait-codegen/src/main/java/software/amazon/smithy/traitcodegen/writer/TraitCodegenWriter.java