Program: 38847
Project: 38847
Buggy source:
@Test public void canDecodeCommunicationState(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.PositionReportClassAScheduled,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  PositionReportClassAScheduled message=(PositionReportClassAScheduled)aisMessage;
  assertEquals(MMSI.valueOf(503175400),message.getSourceMmsi());
  assertEquals(NavigationStatus.Undefined,message.getNavigationStatus());
  assertEquals(Integer.valueOf(-127),message.getRateOfTurn());
  assertEquals(Float.valueOf(0.0f),message.getSpeedOverGround());
  assertFalse(message.getPositionAccuracy());
  assertEquals(Float.valueOf(-34.773254f),message.getLatitude());
  assertEquals(Float.valueOf(138.48856f),message.getLongitude());
  assertEquals(Float.valueOf(4.8f),message.getCourseOverGround());
  assertEquals(Integer.valueOf(47),message.getSecond());
  assertEquals(Integer.valueOf(511),message.getTrueHeading());
  assertEquals(ManeuverIndicator.NotAvailable,message.getSpecialManeuverIndicator());
  assertFalse(message.getRaimFlag());
  CommunicationState communicationState=message.getCommunicationState();
  assertEquals(SyncState.UTCDirect,communicationState.getSyncState());
  assertTrue(communicationState instanceof SOTDMACommunicationState);
  SOTDMACommunicationState sotdmaCommunicationState=(SOTDMACommunicationState)communicationState;
  assertNull(sotdmaCommunicationState.getNumberOfReceivedStations());
  assertNull(sotdmaCommunicationState.getSlotNumber());
  assertNull(sotdmaCommunicationState.getSlotOffset());
  assertEquals(Integer.valueOf(1),sotdmaCommunicationState.getSlotTimeout());
  assertEquals(Integer.valueOf(0),sotdmaCommunicationState.getUtcHour());
  assertEquals(Integer.valueOf(24),sotdmaCommunicationState.getUtcMinute());
}

Fixed version (ground truth):
@Test public void canDecodeCommunicationState(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.PositionReportClassAScheduled,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  PositionReportClassAScheduled message=(PositionReportClassAScheduled)aisMessage;
  assertEquals(MMSI.valueOf(503175400),message.getSourceMmsi());
  assertEquals(NavigationStatus.Undefined,message.getNavigationStatus());
  assertEquals(Integer.valueOf(-128),message.getRateOfTurn());
  assertEquals(Float.valueOf(0.0f),message.getSpeedOverGround());
  assertFalse(message.getPositionAccuracy());
  assertEquals(Float.valueOf(-34.773254f),message.getLatitude());
  assertEquals(Float.valueOf(138.48856f),message.getLongitude());
  assertEquals(Float.valueOf(4.8f),message.getCourseOverGround());
  assertEquals(Integer.valueOf(47),message.getSecond());
  assertEquals(Integer.valueOf(511),message.getTrueHeading());
  assertEquals(ManeuverIndicator.NotAvailable,message.getSpecialManeuverIndicator());
  assertFalse(message.getRaimFlag());
  CommunicationState communicationState=message.getCommunicationState();
  assertEquals(SyncState.UTCDirect,communicationState.getSyncState());
  assertTrue(communicationState instanceof SOTDMACommunicationState);
  SOTDMACommunicationState sotdmaCommunicationState=(SOTDMACommunicationState)communicationState;
  assertNull(sotdmaCommunicationState.getNumberOfReceivedStations());
  assertNull(sotdmaCommunicationState.getSlotNumber());
  assertNull(sotdmaCommunicationState.getSlotOffset());
  assertEquals(Integer.valueOf(1),sotdmaCommunicationState.getSlotTimeout());
  assertEquals(Integer.valueOf(0),sotdmaCommunicationState.getUtcHour());
  assertEquals(Integer.valueOf(24),sotdmaCommunicationState.getUtcMinute());
}