Program: 91747
Project: 91747
Buggy source:
/** 
 * Creates an operation computing the envelope that encompass all geometries found in the given attributes. Geometries can be in different coordinate reference systems; they will be transformed to the first non-null CRS in the following choices: <ol> <li>the CRS specified to this method,</li> <li>the CRS of the default geometry, or</li> <li>the CRS of the first non-empty geometry.</li> </ol> The   {@linkplain AbstractOperation#getResult() result} of this operation is an {@code Attribute}with values of type   {@link org.opengis.geometry.Envelope}. If the   {@code crs} argument given tothis method is non-null, then the {@linkplain org.apache.sis.geometry.GeneralEnvelope#getCoordinateReferenceSystem() envelope CRS}will be that CRS. <div class="section">Limitations</div> If a geometry contains other geometries, this operation queries only the envelope of the root geometry. It is the root geometry responsibility to take in account the envelope of all its children. <div class="section">Read/write behavior</div> This operation is read-only. Calls to   {@code Attribute.setValue(Envelope)} will result in an{@link IllegalStateException} to be thrown.<div class="warning"><b>Warning:</b> The type of  {@code geometryAttributes} elements will be changed to {@code PropertyType}if and when such interface will be defined in GeoAPI.</div>
 * @param identification     the name and other information to be given to the operation.
 * @param crs                the Coordinate Reference System in which to express the envelope, or {@code null}.
 * @param geometryAttributes the operation or attribute type from which to get geometry values.Any element which is  {@code null} or has a non-geometric value class will be ignored.
 * @return an operation which will compute the envelope encompassing all geometries in the given attributes.
 * @throws FactoryException if a coordinate operation to the target CRS can not be created.
 */
public static AbstractOperation envelope(final Map<String,?> identification,final CoordinateReferenceSystem crs,final AbstractIdentifiedType... geometryAttributes) throws FactoryException {
  ArgumentChecks.ensureNonNull("String_Node_Str",geometryAttributes);
  return POOL.unique(new EnvelopeOperation(identification,crs,geometryAttributes));
}

Fixed version (ground truth):
/** 
 * Creates an operation computing the envelope that encompass all geometries found in the given attributes. Geometries can be in different coordinate reference systems; they will be transformed to the first non-null CRS in the following choices: <ol> <li>the CRS specified to this method,</li> <li>the CRS of the default geometry, or</li> <li>the CRS of the first non-empty geometry.</li> </ol> The   {@linkplain AbstractOperation#getResult() result} of this operation is an {@code Attribute}with values of type   {@link org.opengis.geometry.Envelope}. If the   {@code crs} argument given tothis method is non-null, then the {@linkplain org.apache.sis.geometry.GeneralEnvelope#getCoordinateReferenceSystem() envelope CRS}will be that CRS. <div class="section">Limitations</div> If a geometry contains other geometries, this operation queries only the envelope of the root geometry. It is the root geometry responsibility to take in account the envelope of all its children. <div class="section">Read/write behavior</div> This operation is read-only. Calls to   {@code Attribute.setValue(Envelope)} will result in an{@link IllegalStateException} to be thrown.<div class="warning"><b>Warning:</b> The type of  {@code geometryAttributes} elements will be changed to {@code PropertyType}if and when such interface will be defined in GeoAPI.</div>
 * @param identification      the name and other information to be given to the operation.
 * @param crs                 the Coordinate Reference System in which to express the envelope, or {@code null}.
 * @param geometryAttributes  the operation or attribute type from which to get geometry values.Any element which is  {@code null} or has a non-geometric value class will be ignored.
 * @return an operation which will compute the envelope encompassing all geometries in the given attributes.
 * @throws FactoryException if a coordinate operation to the target CRS can not be created.
 */
public static AbstractOperation envelope(final Map<String,?> identification,final CoordinateReferenceSystem crs,final AbstractIdentifiedType... geometryAttributes) throws FactoryException {
  ArgumentChecks.ensureNonNull("String_Node_Str",geometryAttributes);
  return POOL.unique(new EnvelopeOperation(identification,crs,geometryAttributes));
}