Fix the whitespace. Intellij has "reformat code" and the simpler "auto-indent lines" in the code menu. Make sure it is configured to use spaces instead of tabs (file > settings > code style > groovy, uncheck "use tab character").

Instead of mangling with the concept path and trying to turn it into a concept key, it would be better to pass the concept key directly. The concept key is certainly available somewhere, at the very least the frontend has it.

The condition is also strange. Are there conceptKeys sent that don't start with \ followed by different characters.