public static String makeUnique(String className) {
        
        final Matcher m = UNIQUE_NAMING_PATTERN.matcher(className);
        
        if (m.matches()) {
            // get the current number
            final Integer number = Integer.parseInt(m.group(2));
            // replace the current number in the string with the number +1
            return m.group(1) + (number + 1);
        } else {
            return className + "__1";
        }
    }
public static String makeUnique ( String className ) { final Matcher m = UNIQUE_NAMING_PATTERN . matcher ( className ) ; if ( m . matches ( ) ) { final Integer number = Integer . parseInt ( m . group ( 2 ) ) ; return m . group ( 1 ) + ( number + 1 ) ; } else { return className + "__1" ; } }
When the class name is not unique we will use two underscore '__' and a digit representing the number of time
this class was found