Program: 62557
Project: 62557
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void dscAlarmEventReceived(EventObject event,Thing thing){
  if (thing != null) {
    if (getThing() == thing) {
      DSCAlarmEvent dscAlarmEvent=(DSCAlarmEvent)event;
      DSCAlarmMessage dscAlarmMessage=dscAlarmEvent.getDSCAlarmMessage();
      ChannelUID channelUID=null;
      DSCAlarmCode dscAlarmCode=DSCAlarmCode.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
      String dscAlarmMessageName=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.NAME);
      String dscAlarmMessageMode=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.MODE);
      logger.debug("String_Node_Str",thing.getUID(),dscAlarmCode);
switch (dscAlarmCode) {
case PartitionReady:
case PartitionNotReady:
case PartitionReadyForceArming:
case SystemArmingInProgress:
        partitionStatus(dscAlarmMessageName);
      break;
case PartitionArmed:
    channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARMED);
  updateChannel(channelUID,1,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ENTRY_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_EXIT_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
int armMode=Integer.parseInt(dscAlarmMessageMode) + 1;
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,armMode,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case PartitionDisarmed:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARMED);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ENTRY_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_EXIT_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_IN_ALARM);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,0,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case PartitionInAlarm:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_IN_ALARM);
updateChannel(channelUID,1,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case FailureToArm:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,0,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case UserClosing:
case SpecialClosing:
case PartialClosing:
case UserOpening:
case SpecialOpening:
partitionOpenCloseModeEventHandler(event);
default :
break;
}
}
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void dscAlarmEventReceived(EventObject event,Thing thing){
  if (thing != null) {
    if (getThing() == thing) {
      DSCAlarmEvent dscAlarmEvent=(DSCAlarmEvent)event;
      DSCAlarmMessage dscAlarmMessage=dscAlarmEvent.getDSCAlarmMessage();
      ChannelUID channelUID=null;
      DSCAlarmCode dscAlarmCode=DSCAlarmCode.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
      String dscAlarmMessageName=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.NAME);
      String dscAlarmMessageMode=dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.MODE);
      logger.debug("String_Node_Str",thing.getUID(),dscAlarmCode);
switch (dscAlarmCode) {
case PartitionReady:
case PartitionNotReady:
case PartitionReadyForceArming:
case SystemArmingInProgress:
        partitionStatus(dscAlarmMessageName);
      break;
case PartitionArmed:
    channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARMED);
  updateChannel(channelUID,1,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ENTRY_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_EXIT_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
int armMode=Integer.parseInt(dscAlarmMessageMode) + 1;
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,armMode,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case PartitionDisarmed:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARMED);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ENTRY_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_EXIT_DELAY);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_IN_ALARM);
updateChannel(channelUID,0,"String_Node_Str");
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,0,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case PartitionInAlarm:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_IN_ALARM);
updateChannel(channelUID,1,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case ExitDelayInProgress:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_EXIT_DELAY);
updateChannel(channelUID,1,"String_Node_Str");
break;
case EntryDelayInProgress:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ENTRY_DELAY);
updateChannel(channelUID,1,"String_Node_Str");
break;
case FailureToArm:
channelUID=new ChannelUID(getThing().getUID(),PARTITION_ARM_MODE);
updateChannel(channelUID,0,"String_Node_Str");
partitionStatus(dscAlarmMessageName);
break;
case UserClosing:
case SpecialClosing:
case PartialClosing:
case UserOpening:
case SpecialOpening:
partitionOpenCloseModeEventHandler(event);
default :
break;
}
}
}
}