Program: 92003
Project: 92003
Buggy source:
/** 
 * Tests the   {@link MathTransform} between North-Orientated and South-Orientated cases.
 * @throws ParseException if the parsing failed.
 * @throws NoninvertibleTransformException if computation of the conversion from North-Orientatedto South-Orientated failed.
 */
@Test @DependsOnMethod("String_Node_Str") public void testMathTransform() throws ParseException, NoninvertibleTransformException {
  final double TOLERANCE=1E-10;
  ProjectedCRS north=parseTransverseMercator(false,false,1000);
  assertEquals(AxisDirection.WEST,north.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.NORTH,north.getCoordinateSystem().getAxis(1).getDirection());
  ProjectedCRS south=parseTransverseMercator(false,true,1000);
  assertEquals(AxisDirection.WEST,south.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.SOUTH,south.getCoordinateSystem().getAxis(1).getDirection());
  Matrix matrix=conversion(north,south);
  assertEquals("String_Node_Str",+1,matrix.getElement(0,0),TOLERANCE);
  assertEquals("String_Node_Str",-1,matrix.getElement(1,1),TOLERANCE);
  assertEquals("String_Node_Str",0,matrix.getElement(0,2),TOLERANCE);
  assertEquals("String_Node_Str",0,matrix.getElement(1,2),TOLERANCE);
  assertDiagonalEquals(new double[]{+1,-1,1},true,matrix,TOLERANCE);
  south=parseTransverseMercator(true,true,1000);
  assertEquals(AxisDirection.WEST,south.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.SOUTH,south.getCoordinateSystem().getAxis(1).getDirection());
  matrix=conversion(north,south);
  assertEquals("String_Node_Str",+1,matrix.getElement(0,0),TOLERANCE);
  assertEquals("String_Node_Str",-1,matrix.getElement(1,1),TOLERANCE);
  assertEquals("String_Node_Str",0,matrix.getElement(0,2),TOLERANCE);
  assertEquals("String_Node_Str",2000,matrix.getElement(1,2),TOLERANCE);
}

Fixed version (ground truth):
/** 
 * Tests the   {@link MathTransform} between North-Orientated and South-Orientated cases.
 * @throws ParseException if the parsing failed.
 * @throws NoninvertibleTransformException if computation of the conversion from North-Orientatedto South-Orientated failed.
 */
@Test @DependsOnMethod("String_Node_Str") public void testMathTransform() throws ParseException, NoninvertibleTransformException {
  ProjectedCRS north=parseTransverseMercator(false,false,1000);
  assertEquals(AxisDirection.WEST,north.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.NORTH,north.getCoordinateSystem().getAxis(1).getDirection());
  ProjectedCRS south=parseTransverseMercator(false,true,1000);
  assertEquals(AxisDirection.WEST,south.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.SOUTH,south.getCoordinateSystem().getAxis(1).getDirection());
  Matrix matrix=conversion(north,south);
  assertEquals("String_Node_Str",+1,matrix.getElement(0,0),STRICT);
  assertEquals("String_Node_Str",-1,matrix.getElement(1,1),STRICT);
  assertEquals("String_Node_Str",0,matrix.getElement(0,2),STRICT);
  assertEquals("String_Node_Str",0,matrix.getElement(1,2),STRICT);
  assertDiagonalEquals(new double[]{+1,-1,1},true,matrix,STRICT);
  south=parseTransverseMercator(true,true,1000);
  assertEquals(AxisDirection.WEST,south.getCoordinateSystem().getAxis(0).getDirection());
  assertEquals(AxisDirection.SOUTH,south.getCoordinateSystem().getAxis(1).getDirection());
  matrix=conversion(north,south);
  assertEquals("String_Node_Str",+1,matrix.getElement(0,0),STRICT);
  assertEquals("String_Node_Str",-1,matrix.getElement(1,1),STRICT);
  assertEquals("String_Node_Str",0,matrix.getElement(0,2),STRICT);
  assertEquals("String_Node_Str",2000,matrix.getElement(1,2),STRICT);
}