String () { final String className = getInspectionClass().getName(); final String[] words = className.split("\\."); final StringBuilder basePath = new StringBuilder(INSPECTION_GADGETS_TEST_DATA_PATH); final int lastWordIndex = words.length - 1; for (int i = 0; i < lastWordIndex; i++) { String word = words[i]; if (word.equals("ig")) { //noinspection SpellCheckingInspection word = "igtest"; } basePath.append(word).append('/'); } String lastWord = words[lastWordIndex]; lastWord = StringUtil.trimEnd(lastWord, "Inspection"); final int length = lastWord.length(); boolean upperCase = false; for (int i = 0; i < length; i++) { final char ch = lastWord.charAt(i); if (Character.isUpperCase(ch)) { if (!upperCase) { upperCase = true; if (i != 0) { basePath.append('_'); } } basePath.append(Character.toLowerCase(ch)); } else { upperCase = false; basePath.append(ch); } } return basePath.toString(); }