static String parameterNameFor(CtBehavior method, LocalVariableAttribute locals, int i) {

        if (locals == null) {
            return Integer.toString(i + 1);
        }

        int modifiers = method.getModifiers();

        int j = i;

        if (Modifier.isSynchronized(modifiers)) {
            // skip object to synchronize upon.
            j++;
            // System.err.println("Synchronized");
        }
        if (Modifier.isStatic(modifiers) == false) {
            // skip "this"
            j++;
            // System.err.println("Instance");
        }
        String variableName = locals.variableName(j);
        // if (variableName.equals("this")) {
        // System.err.println("'this' returned as a parameter name for "
        // + method.getName() + " index " + j
        // +
        // ", names are probably shifted. Please submit source for class in slf4j bugreport");
        // }
        return variableName;
    }
Determine the name of parameter with index i in the given method. Use the
locals attributes about local variables from the classfile. Note: This is
still work in progress.

@param method
@param locals
@param i
@return the name of the parameter if available or a number if not.
slf4j-ext/src/main/java/org/slf4j/instrumentation/JavassistHelper.java