Program: 91743
Project: 91743
Buggy source:
/** 
 * Creates a new map for the given attribute characteristics. <p>This constructor does not clone the   {@code characterizedBy} array. If that arrayis a user-provided argument, then cloning that array is caller responsibility.</p>
 * @param source  the attribute which is characterized by {@code characterizedBy}.
 * @param characterizedBy  characteristics of {@code source}. Should not be empty.
 * @throws IllegalArgumentException if two characteristics have the same name.
 */
private CharacteristicTypeMap(final DefaultAttributeType<?> source,final DefaultAttributeType<?>[] characterizedBy){
  this.characterizedBy=characterizedBy;
  int index=0;
  final Map<String,Integer> indices=new HashMap<>(Containers.hashMapCapacity(characterizedBy.length));
  final Map<String,Integer> aliases=new HashMap<>();
  for (int i=0; i < characterizedBy.length; i++) {
    final DefaultAttributeType<?> attribute=characterizedBy[i];
    ensureNonNullElement("String_Node_Str",i,attribute);
    GenericName name=attribute.getName();
    String key=AbstractIdentifiedType.toString(name,source,"String_Node_Str",i);
    final Integer value=index++;
    if (indices.put(key,value) != null) {
      throw new IllegalArgumentException(Errors.format(Errors.Keys.DuplicatedIdentifier_1,key));
    }
    while (name instanceof ScopedName) {
      if (name == (name=((ScopedName)name).tail()))       break;
      key=name.toString();
      if (key == null || (key=key.trim()).isEmpty())       break;
      if (aliases.put(key,value) != null) {
        aliases.put(key,-1);
      }
    }
  }
  for (  final Map.Entry<String,Integer> entry : aliases.entrySet()) {
    final Integer value=entry.getValue();
    if (value >= 0) {
      JDK8.putIfAbsent(indices,entry.getKey(),value);
    }
  }
  this.indices=CollectionsExt.compact(indices);
}

Fixed version (ground truth):
/** 
 * Creates a new map for the given attribute characteristics. <p>This constructor does not clone the   {@code characterizedBy} array. If that arrayis a user-provided argument, then cloning that array is caller responsibility.</p>
 * @param source           the attribute which is characterized by {@code characterizedBy}.
 * @param characterizedBy  characteristics of {@code source}. Should not be empty.
 * @throws IllegalArgumentException if two characteristics have the same name.
 */
private CharacteristicTypeMap(final DefaultAttributeType<?> source,final DefaultAttributeType<?>[] characterizedBy){
  this.characterizedBy=characterizedBy;
  int index=0;
  final Map<String,Integer> indices=new HashMap<>(Containers.hashMapCapacity(characterizedBy.length));
  final Map<String,Integer> aliases=new HashMap<>();
  for (int i=0; i < characterizedBy.length; i++) {
    final DefaultAttributeType<?> attribute=characterizedBy[i];
    ensureNonNullElement("String_Node_Str",i,attribute);
    GenericName name=attribute.getName();
    String key=AbstractIdentifiedType.toString(name,source,"String_Node_Str",i);
    final Integer value=index++;
    if (indices.put(key,value) != null) {
      throw new IllegalArgumentException(Errors.format(Errors.Keys.DuplicatedIdentifier_1,key));
    }
    while (name instanceof ScopedName) {
      if (name == (name=((ScopedName)name).tail()))       break;
      key=name.toString();
      if (key == null || (key=key.trim()).isEmpty())       break;
      if (aliases.put(key,value) != null) {
        aliases.put(key,-1);
      }
    }
  }
  for (  final Map.Entry<String,Integer> entry : aliases.entrySet()) {
    final Integer value=entry.getValue();
    if (value >= 0) {
      JDK8.putIfAbsent(indices,entry.getKey(),value);
    }
  }
  this.indices=CollectionsExt.compact(indices);
}