Buggy code:
public class GridCoverage2DRIA extends GeometricOpImage { private static final Logger LOGGER = Logger . getLogger ( GridCoverage2DRIA . class . getName ( ) ) ; private final GridCoverage2D src ; private final GridGeometry2D dst ; private final MathTransform g2wd ; private final MathTransform g2ws ; private final MathTransform w2gd ; private final MathTransform w2gs ; private final MathTransform src2dstCRSTransform ; private final MathTransform dst2srcCRSTransform ; private byte [ ] [ ] ctable = null ; public static GridCoverage2DRIA create ( final GridCoverage2D src , final GridGeometry2D dst , final double [ ] nodata ) { } public static GridCoverage2DRIA create ( GridCoverage2D src , GridGeometry2D dst , double [ ] nodata , Hints hints ) { Utilities . ensureNonNull ( "dst" , dst ) ; final GridEnvelope2D destinationRasterDimension = dst . getGridRange2D ( ) ; final ImageLayout imageLayout = new ImageLayout ( ) ; imageLayout . setMinX ( destinationRasterDimension . x ) . setMinY ( destinationRasterDimension . y ) ; imageLayout . setWidth ( destinationRasterDimension . width ) . setHeight ( destinationRasterDimension . height ) ; imageLayout . setColorModel ( src . getRenderedImage ( ) . getColorModel ( ) ) ; imageLayout . setSampleModel ( src . getRenderedImage ( ) . getSampleModel ( ) ) ; if ( ( hints != null ) && ( hints . containsKey ( KEY_IMAGE_LAYOUT ) ) ) { ImageLayout l = ( ( ImageLayout ) ( hints . get ( KEY_IMAGE_LAYOUT ) ) ) ; if ( ( l . isValid ( TILE_HEIGHT_MASK ) ) && ( l . isValid ( TILE_WIDTH_MASK ) ) ) { imageLayout . setTileHeight ( Math . min ( imageLayout . getHeight ( null ) , l . getTileHeight ( null ) ) ) ; imageLayout . setTileWidth ( Math . min ( imageLayout . getWidth ( null ) , l . getTileWidth ( null ) ) ) ; } } <START_BUG> BorderExtender extender = new BorderExtenderConstant ( nodata ) ; <END_BUG> return new GridCoverage2DRIA ( src , dst , vectorize ( src . getRenderedImage ( ) ) , imageLayout , null , false , extender , Interpolation . getInstance ( INTERP_NEAREST ) , nodata ) ; } public static GridCoverage2DRIA create ( final GridCoverage2D src , final GridCoverage2D dst , final double nodata ) { } protected GridCoverage2DRIA ( final GridCoverage2D src , final GridGeometry2D dst , final Vector sources , final ImageLayout layout , final Map configuration , final boolean cobbleSources , final BorderExtender extender , final Interpolation interp , final double [ ] nodata ) { } @ Override public Point2D mapSourcePoint ( Point2D srcPt , int sourceIndex ) { } private static boolean inside ( Point2D point , RenderedImage ri ) { } @ Override protected Rectangle forwardMapRect ( Rectangle pxRect , int i ) { } @ Override public Point2D mapDestPoint ( Point2D destPt , int sourceIndex ) { } private void mapDestPoint ( double [ ] coords ) throws TransformException { } private void mapSrcPoint ( double [ ] coords ) throws TransformException { } @ Override protected Rectangle backwardMapRect ( Rectangle destRect , int sourceIndex ) { } private static float [ ] rect2PointArr ( Rectangle rect ) { } private Rectangle pointArr2Rect ( float [ ] points ) { } @ Override protected void computeRect ( PlanarImage [ ] sources , WritableRaster dest , Rectangle destRect ) { } private void computeRectByte ( PlanarImage src , RasterAccessor dst ) { } private void computeRectUShort ( PlanarImage src , RasterAccessor dst ) { } private void computeRectShort ( PlanarImage src , RasterAccessor dst ) { } private void computeRectInt ( PlanarImage src , RasterAccessor dst ) { } private void computeRectFloat ( PlanarImage src , RasterAccessor dst ) { } private void computeRectDouble ( PlanarImage src , RasterAccessor dst ) { } private static final int floor ( float f ) { } public float [ ] warpRect ( int x , int y , int width , int height , float [ ] destRect ) { } public float [ ] warpSparseRect ( int x0 , int y0 , int width , int height , int periodX , int periodY , float [ ] destRect ) { } private RandomIter getRandomIterator ( final PlanarImage src ) { } private RandomIter getRandomIterator ( final PlanarImage src , int leftPad , int rightPad , int topPad , int bottomPad , BorderExtender extender ) { } }

Fix:
BorderExtender extender = new BorderExtenderConstant ( new double [ ] { nodata [ 0 ] } ) ;