Program: 62481
Project: 62481
Buggy source:
@Override public void dscAlarmEventReceived(EventObject event,Thing thing){
  if (thing != null) {
    DSCAlarmEvent dscAlarmEvent=(DSCAlarmEvent)event;
    DSCAlarmMessage dscAlarmMessage=dscAlarmEvent.getDSCAlarmMessage();
    String dscAlarmMessageData=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);
    setTimeStampState(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.TIME_STAMP));
    if (getThing() == thing) {
      ChannelUID channelUID=null;
      DSCAlarmCode dscAlarmCode=DSCAlarmCode.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
      logger.debug("String_Node_Str",thing.getUID(),dscAlarmCode);
      int state=0;
switch (dscAlarmCode) {
case CommandAcknowledge:
        break;
case SystemError:
      int errorCode=Integer.parseInt(dscAlarmMessageData);
    if (errorCode == 23 || errorCode == 24) {
      List<Thing> things=dscAlarmBridgeHandler.getThing().getThings();
      for (      Thing thg : things) {
        if (thg.getThingTypeUID().equals(PARTITION_THING_TYPE)) {
          DSCAlarmBaseThingHandler handler=(DSCAlarmBaseThingHandler)thg.getHandler();
          if (handler != null) {
            channelUID=new ChannelUID(thg.getUID(),PARTITION_ARM_MODE);
            handler.updateChannel(channelUID,0,"String_Node_Str");
          }
        }
      }
    }
  panelSystemError(dscAlarmMessage);
break;
case TimeDateBroadcast:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME);
String panelTime=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);
updateChannel(channelUID,state,panelTime);
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME_BROADCAST);
updateChannel(channelUID,1,"String_Node_Str");
break;
case FireKeyAlarm:
state=1;
case FireKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_FIRE_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
break;
case AuxiliaryKeyAlarm:
state=1;
case AuxiliaryKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_AUX_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
break;
case PanicKeyAlarm:
state=1;
case PanicKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_PANIC_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
break;
case AuxiliaryInputAlarm:
state=1;
case AuxiliaryInputAlarmRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_AUX_INPUT_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
break;
case TroubleLEDOn:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_LED);
updateChannel(channelUID,1,"String_Node_Str");
break;
case TroubleLEDOff:
channelUID=new ChannelUID(getThing().getUID(),PANEL_SERVICE_REQUIRED);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_AC_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TELEPHONE_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_FTC_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_FAULT);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_TAMPER);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_LOW_BATTERY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME_LOSS);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_LED);
updateChannel(channelUID,0,"String_Node_Str");
break;
case PanelBatteryTrouble:
case PanelACTrouble:
case SystemBellTrouble:
case TLMLine1Trouble:
case TLMLine2Trouble:
case FTCTrouble:
case GeneralDeviceLowBattery:
case WirelessKeyLowBatteryTrouble:
case HandheldKeypadLowBatteryTrouble:
case GeneralSystemTamper:
case HomeAutomationTrouble:
case KeybusFault:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_MESSAGE);
updateChannel(channelUID,0,dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DESCRIPTION));
break;
case PanelBatteryTroubleRestore:
case PanelACRestore:
case SystemBellTroubleRestore:
case TLMLine1TroubleRestore:
case TLMLine2TroubleRestore:
case GeneralDeviceLowBatteryRestore:
case WirelessKeyLowBatteryTroubleRestore:
case HandheldKeypadLowBatteryTroubleRestore:
case GeneralSystemTamperRestore:
case HomeAutomationTroubleRestore:
case KeybusFaultRestore:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_MESSAGE);
updateChannel(channelUID,0,"String_Node_Str");
break;
case VerboseTroubleStatus:
verboseTroubleStatusHandler(event);
break;
case CodeRequired:
dscAlarmBridgeHandler.sendCommand(DSCAlarmCode.CodeSend,getUserCode());
break;
default :
break;
}
}
}
}

Fixed version (ground truth):
@Override public void dscAlarmEventReceived(EventObject event,Thing thing){
  if (thing != null) {
    DSCAlarmEvent dscAlarmEvent=(DSCAlarmEvent)event;
    DSCAlarmMessage dscAlarmMessage=dscAlarmEvent.getDSCAlarmMessage();
    String dscAlarmMessageData=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);
    setTimeStampState(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.TIME_STAMP));
    if (getThing() == thing) {
      ChannelUID channelUID=null;
      DSCAlarmCode dscAlarmCode=DSCAlarmCode.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
      logger.debug("String_Node_Str",thing.getUID(),dscAlarmCode);
      int state=0;
switch (dscAlarmCode) {
case CommandAcknowledge:
        break;
case SystemError:
      int errorCode=Integer.parseInt(dscAlarmMessageData);
    if (errorCode == 23 || errorCode == 24) {
      List<Thing> things=dscAlarmBridgeHandler.getThing().getThings();
      for (      Thing thg : things) {
        if (thg.getThingTypeUID().equals(PARTITION_THING_TYPE)) {
          DSCAlarmBaseThingHandler handler=(DSCAlarmBaseThingHandler)thg.getHandler();
          if (handler != null) {
            channelUID=new ChannelUID(thg.getUID(),PARTITION_ARM_MODE);
            handler.updateChannel(channelUID,0,"String_Node_Str");
          }
        }
      }
    }
  panelSystemError(dscAlarmMessage);
break;
case TimeDateBroadcast:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME);
String panelTime=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);
updateChannel(channelUID,state,panelTime);
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME_BROADCAST);
updateChannel(channelUID,1,"String_Node_Str");
break;
case FireKeyAlarm:
state=1;
case FireKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_FIRE_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
restorePartitionsInAlarm(dscAlarmCode);
break;
case AuxiliaryKeyAlarm:
state=1;
case AuxiliaryKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_AUX_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
restorePartitionsInAlarm(dscAlarmCode);
break;
case PanicKeyAlarm:
state=1;
case PanicKeyRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_PANIC_KEY_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
restorePartitionsInAlarm(dscAlarmCode);
break;
case AuxiliaryInputAlarm:
state=1;
case AuxiliaryInputAlarmRestored:
channelUID=new ChannelUID(getThing().getUID(),PANEL_AUX_INPUT_ALARM);
updateChannel(channelUID,state,"String_Node_Str");
restorePartitionsInAlarm(dscAlarmCode);
break;
case TroubleLEDOn:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_LED);
updateChannel(channelUID,1,"String_Node_Str");
break;
case TroubleLEDOff:
channelUID=new ChannelUID(getThing().getUID(),PANEL_SERVICE_REQUIRED);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_AC_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TELEPHONE_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_FTC_TROUBLE);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_FAULT);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_TAMPER);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_ZONE_LOW_BATTERY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TIME_LOSS);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_LED);
updateChannel(channelUID,0,"String_Node_Str");
break;
case PanelBatteryTrouble:
case PanelACTrouble:
case SystemBellTrouble:
case TLMLine1Trouble:
case TLMLine2Trouble:
case FTCTrouble:
case GeneralDeviceLowBattery:
case WirelessKeyLowBatteryTrouble:
case HandheldKeypadLowBatteryTrouble:
case GeneralSystemTamper:
case HomeAutomationTrouble:
case KeybusFault:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_MESSAGE);
updateChannel(channelUID,0,dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DESCRIPTION));
break;
case PanelBatteryTroubleRestore:
case PanelACRestore:
case SystemBellTroubleRestore:
case TLMLine1TroubleRestore:
case TLMLine2TroubleRestore:
case GeneralDeviceLowBatteryRestore:
case WirelessKeyLowBatteryTroubleRestore:
case HandheldKeypadLowBatteryTroubleRestore:
case GeneralSystemTamperRestore:
case HomeAutomationTroubleRestore:
case KeybusFaultRestore:
channelUID=new ChannelUID(getThing().getUID(),PANEL_TROUBLE_MESSAGE);
updateChannel(channelUID,0,"String_Node_Str");
break;
case VerboseTroubleStatus:
verboseTroubleStatusHandler(event);
break;
case CodeRequired:
dscAlarmBridgeHandler.sendCommand(DSCAlarmCode.CodeSend,getUserCode());
break;
default :
break;
}
}
}
}