Stack Overflow recommends adding a Minimum, Reproducible example to certain questions. As an editor, is it appropriate for an edit to include a minimum reproducible example when one does not exist? I recently made this edit where I added an example demonstrating how to order XML by attribute value in Groovy (using one of the classes referenced by the original poster), but without maintaining comments.
Originally I was attempting to answer the question, but realized I couldn't find an elegant way to achieve the requirements specified by the original poster. So I "repurposed" my code block to be used as an example instead of an answer.
Thoughts on if this is or is not appropriate and why?