'Structural Search for log.debug(String.format.... not working as expected

I'm doing a search for the following

$Instance$.debug(String.format($Parameter$))

and found lots of instances from before we have a sensible logging framework in our project, however some calls are not being found and I don't understand what the difference is with those vs the ones that did get found. This didn't get found:

log.debug(
    String.format(
        "Failed to discard amendment (%s)", amendmentToDiscard.getID()),
    amendment_.getFields());

enter image description here



Solution 1:[1]

Try the following template $Instance$.$MethodCall$($Parameter$):

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Egor Klepikov