Program: 92199
Project: 92199
Buggy source:
/** 
 * Returns an object of the given type which is nil for the reason represented by this instance. The   {@code type} argument can be one of the following cases:<ul> <li><p>An <strong>interface</strong>: in such case, this method returns an object which implement the given interface together with the  {@link NilObject} and {@link LenientComparable} interfaces:</p><ul> <li>The  {@link NilObject#getNilReason()} method will return this {@code NilReason} instance.</li><li>The  {@code equals(…)} and {@code hashCode()} methods behave as documented in {@link LenientComparable}.</li> <li>The   {@code toString()} method is unspecified (may contain debugging information).</li><li>All other methods return an empty collections, empty arrays,  {@code null},   {@link Double#NaN NaN},  {@code 0} or {@code false}, in this preference order, depending on the method return type.</li> </ul> </li> <li><p>One of   {@code Boolean},   {@link Byte},   {@link Short},   {@code Integer},   {@link Long},   {@link Float},  {@code Double} or {@code String} types: in such case, this method returns a specific instance whichwill be recognized as "nil" by the XML marshaller.</p></li> </ul>
 * @param < T > The compile-time type of the {@code type} argument.
 * @param type The object type as an <strong>interface</strong>(usually a <a href="http://www.geoapi.org">GeoAPI</a> one) or one of the special types.
 * @throws IllegalArgumentException If the given type is not a supported type.
 * @return An {@link NilObject} of the given type.
 */
@SuppressWarnings("String_Node_Str") public synchronized <T>T createNilObject(final Class<T> type){
  ArgumentChecks.ensureNonNull("String_Node_Str",type);
  if (nilObjects == null) {
    nilObjects=new WeakValueHashMap<>((Class)Class.class);
  }
  Object object=nilObjects.get(type);
  if (object == null) {
    if (type.isInterface()) {
      if (NilObjectHandler.isIgnoredInterface(type)) {
        throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2,"String_Node_Str",type));
      }
      if (type == InternationalString.class) {
        object=new NilInternationalString(this);
      }
 else {
        if (handler == null) {
          handler=new NilObjectHandler(this);
        }
        object=Proxy.newProxyInstance(NilReason.class.getClassLoader(),new Class<?>[]{type,NilObject.class,LenientComparable.class},handler);
      }
    }
 else {
      object=createNilPrimitive(type);
      PrimitiveTypeProperties.associate(object,this);
    }
    if (nilObjects.put(type,object) != null) {
      throw new AssertionError(type);
    }
  }
  return type.cast(object);
}

Fixed version (ground truth):
/** 
 * Returns an object of the given type which is nil for the reason represented by this instance. The   {@code type} argument can be one of the following cases:<ul> <li>An <strong>interface</strong>: in such case, this method returns an object which implement the given interface together with the  {@link NilObject} and {@link LenientComparable} interfaces:<ul> <li>The  {@link NilObject#getNilReason()} method will return this {@code NilReason} instance.</li><li>The  {@code equals(…)} and {@code hashCode()} methods behave as documented in {@link LenientComparable}.</li> <li>The   {@code toString()} method is unspecified (may contain debugging information).</li><li>All other methods return an empty collections, empty arrays,  {@code null},   {@link Double#NaN NaN},  {@code 0} or {@code false}, in this preference order, depending on the method return type.</li> </ul> </li> <li>One of   {@code Boolean},   {@link Byte},   {@link Short},   {@code Integer},   {@link Long},   {@link Float},  {@code Double} or {@code String} types: in such case, this method returns a specific instance whichwill be recognized as "nil" by the XML marshaller.</li> </ul>
 * @param < T > The compile-time type of the {@code type} argument.
 * @param type The object type as an <strong>interface</strong>(usually a <a href="http://www.geoapi.org">GeoAPI</a> one) or one of the special types.
 * @throws IllegalArgumentException If the given type is not a supported type.
 * @return An {@link NilObject} of the given type.
 */
@SuppressWarnings("String_Node_Str") public synchronized <T>T createNilObject(final Class<T> type){
  ArgumentChecks.ensureNonNull("String_Node_Str",type);
  if (nilObjects == null) {
    nilObjects=new WeakValueHashMap<>((Class)Class.class);
  }
  Object object=nilObjects.get(type);
  if (object == null) {
    if (type.isInterface()) {
      if (NilObjectHandler.isIgnoredInterface(type)) {
        throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2,"String_Node_Str",type));
      }
      if (type == InternationalString.class) {
        object=new NilInternationalString(this);
      }
 else {
        if (handler == null) {
          handler=new NilObjectHandler(this);
        }
        object=Proxy.newProxyInstance(NilReason.class.getClassLoader(),new Class<?>[]{type,NilObject.class,LenientComparable.class},handler);
      }
    }
 else {
      object=createNilPrimitive(type);
      PrimitiveTypeProperties.associate(object,this);
    }
    if (nilObjects.put(type,object) != null) {
      throw new AssertionError(type);
    }
  }
  return type.cast(object);
}