Program: 43080
Project: 43080
Buggy source:
/** 
 * Test getState by world coordinates.
 */
public void testGetStateByCoord(){
  Grid grid=new ArrayGrid(1.0,0.4,0.5,0.05,0.01);
  grid.setData(0.0,0.0,0.0,Grid.OUTSIDE,(byte)2);
  grid.setData(0.95,0.39,0.45,Grid.EXTERIOR,(byte)1);
  grid.setData(0.6,0.1,0.4,Grid.INTERIOR,(byte)0);
  assertEquals("String_Node_Str",Grid.OUTSIDE,grid.getState(0.0,0.0,0.0));
  assertEquals("String_Node_Str",Grid.EXTERIOR,grid.getState(0.95,0.39,0.45));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.6,0.1,0.4));
  grid=new ArrayGrid(0.12,0.11,0.16,0.05,0.02);
  grid.setData(0.06,0.07,0.08,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.06,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0999,0.06,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.0799,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.06,0.0999));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0999,0.0799,0.0999));
  assertEquals("String_Node_Str",0,grid.getState(0.0499,0.06,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.0599,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.06,0.0499));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.06,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.08,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.06,0.1));
  grid.setData(0.0,0.0,0.0,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0499,0.0,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0199,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0,0.0499));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0499,0.0199,0.0499));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.0,0.0));
  assertEquals("String_Node_Str",0,grid.getState(0.0,0.02,0.0));
  assertEquals("String_Node_Str",0,grid.getState(0.0,0.0,0.05));
  grid.setData(0.149,0.119,0.199,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.1,0.1,0.15));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.149,0.1,0.15));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.1,0.119,0.15));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.1,0.1,0.199));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.149,0.119,0.199));
  assertEquals("String_Node_Str",0,grid.getState(0.15,0.1,0.15));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.12,0.15));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.1,0.2));
  assertEquals("String_Node_Str",0,grid.getState(0.15,0.12,0.2));
}

Fixed version (ground truth):
/** 
 * Test getState by world coordinates.
 */
public void testGetStateByCoord(){
  Grid grid=new ArrayGrid(1.0,0.4,0.5,0.05,0.01);
  grid.setData(0.0,0.0,0.0,Grid.OUTSIDE,(byte)2);
  grid.setData(0.95,0.39,0.45,Grid.EXTERIOR,(byte)1);
  grid.setData(0.6,0.1,0.4,Grid.INTERIOR,(byte)0);
  assertEquals("String_Node_Str",Grid.OUTSIDE,grid.getState(0.0,0.0,0.0));
  assertEquals("String_Node_Str",Grid.EXTERIOR,grid.getState(0.95,0.39,0.45));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.6,0.1,0.4));
  grid=new ArrayGrid(0.12,0.11,0.16,0.05,0.02);
  grid.setData(0.06,0.07,0.08,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.06,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0999,0.06,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.0799,0.05));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.05,0.06,0.0999));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0999,0.0799,0.0999));
  assertEquals("String_Node_Str",0,grid.getState(0.0499,0.06,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.0599,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.06,0.0499));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.06,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.08,0.05));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.06,0.1));
  grid.setData(0.0,0.0,0.0,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0499,0.0,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0199,0.0));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0,0.0,0.0499));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.0499,0.0199,0.0499));
  assertEquals("String_Node_Str",0,grid.getState(0.05,0.0,0.0));
  assertEquals("String_Node_Str",0,grid.getState(0.0,0.02,0.0));
  assertEquals("String_Node_Str",0,grid.getState(0.0,0.0,0.05));
  grid.setData(0.149,0.119,0.199,Grid.INTERIOR,(byte)2);
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.149,0.1,0.151));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.1,0.119,0.151));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.1,0.1,0.199));
  assertEquals("String_Node_Str",Grid.INTERIOR,grid.getState(0.149,0.119,0.199));
  assertEquals("String_Node_Str",0,grid.getState(0.0999,0.1,0.1501));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.0999,0.1501));
  assertEquals("String_Node_Str",0,grid.getState(0.1,0.1,0.1499));
  assertEquals("String_Node_Str",0,grid.getState(0.0999,0.0999,0.1499));
}