Let's assume, we have an ITD, where we use the following types:
For the first type, the ImportRegistrationResolver sucessfully adds the proper import for java.util.List. So, the type name in the code becomes the short form: List<String>
But when the second type is resolved, ImportRegistrationResolver.isAdditionLegal() will return false, since both types have the same simple type name (List). Thus, the Javatype java.util.List<java.lang.Integer> is not registered as an import.
Thus, the long form is used in the generated code: java.util.List<Integer>
I think a solution to this problem could be not to keep the full JavaTypes in the Set of registered types in ImportRegistrationResolver. Instead, the generic type arguments (and probably also array dimesions and so on) should be stripped off. (Since java.util.List<java.lang.String> , java.util.List<java.lang.Integer>, java.util.List<java.lang.String>  are all the same import statement java.util.List...)