Difference between java:S1158 and java:S2131?

As for how to do the textRange: if it were me, I would find the way S2131 marks the text range (so that the method call, e.g., toString(), is included) would be more useful than cutting that off like S1158 does. As I said here (Include surrounding parentheses in textRange for S1905) we’ve been toying around with automated fixing, having a Python or PowerShell script use the web_api to get at things.