Program: 75848
Project: 75848
Buggy source:
private synchronized void handleAction(TriggerCondition[] tg,ComponentEvent event,boolean cleanState){
  if (tg == null || event == null) {
    return;
  }
  Point p=null;
  if (event instanceof MouseEvent) {
    p=((MouseEvent)event).getPoint();
  }
  if (event instanceof KeyEvent) {
  }
  ShapedAction sa=getShapedActionForConditionPoint(tg,p);
  if (sa == null)   return;
  final StructureSource src=sa.getSource();
  Action ac=null;
  for (int i=0; i < tg.length; i++) {
    ac=sa.getActionForCondition(tg[i]);
    if (ac != null)     break;
  }
  if (ac == null)   return;
  boolean bFound=false;
switch (ac.getType().getValue()) {
case ActionType.URL_REDIRECT:
    final URLValue uv=(URLValue)ac.getValue();
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",lcl) + uv.getBaseUrl());
DeviceUtil.openURL(uv.getBaseUrl());
break;
case ActionType.SHOW_TOOLTIP:
if (ac != acTooltip) {
hideTooltip();
}
bFound=true;
showTooltip(ac);
break;
case ActionType.TOGGLE_VISIBILITY:
if (src.getType() == StructureType.SERIES || src.getType() == StructureType.SERIES_DATA_POINT) {
final Series seRT;
if (src.getType() == StructureType.SERIES) {
seRT=(Series)src.getSource();
}
 else {
seRT=(Series)((WrappedStructureSource)src).getParent().getSource();
}
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",lcl) + seRT);
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
seDT.setVisible(!seDT.isVisible());
iun.regenerateChart();
break;
}
break;
case ActionType.TOGGLE_DATA_POINT_VISIBILITY:
if (src.getType() == StructureType.SERIES || src.getType() == StructureType.SERIES_DATA_POINT) {
final Series seRT;
if (src.getType() == StructureType.SERIES) {
seRT=(Series)src.getSource();
}
 else {
seRT=(Series)((WrappedStructureSource)src).getParent().getSource();
}
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",lcl) + seRT);
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
seDT.getLabel().setVisible(!seDT.getLabel().isVisible());
iun.regenerateChart();
break;
}
break;
case ActionType.HIGHLIGHT:
bFound=true;
boolean newRegion=saHighlighted == null;
if (!newRegion) {
if (p == null || !saHighlighted.getShape().contains(p)) {
newRegion=true;
}
}
if (newRegion) {
saHighlighted=sa;
toggleHighlight(sa);
break;
}
break;
case ActionType.CALL_BACK:
if (iun instanceof ICallBackNotifier) {
final CallBackValue cv=(CallBackValue)ac.getValue();
((ICallBackNotifier)iun).callback(event,sa.getSource(),cv);
}
 else {
logger.log(ILogger.WARNING,Messages.getString("String_Node_Str",new Object[]{iun},lcl));
}
break;
}
if (!bFound && acTooltip != null) {
hideTooltip();
acTooltip=null;
}
if (cleanState || (!bFound && saHighlighted != null)) {
saHighlighted=null;
}
}

Fixed version (ground truth):
private synchronized void handleAction(TriggerCondition[] tg,ComponentEvent event,boolean cleanState){
  if (tg == null || event == null) {
    return;
  }
  Point p=null;
  if (event instanceof MouseEvent) {
    p=((MouseEvent)event).getPoint();
  }
  if (event instanceof KeyEvent) {
  }
  ShapedAction sa=getShapedActionForConditionPoint(tg,p);
  if (sa == null) {
    for (int i=0; i < tg.length; i++) {
      if (lhmAllTriggers.get(tg[i]) != null)       disableActions(getActionTypesForConditions(tg));
    }
    return;
  }
  final StructureSource src=sa.getSource();
  Action ac=null;
  for (int i=0; i < tg.length; i++) {
    ac=sa.getActionForCondition(tg[i]);
    if (ac != null)     break;
  }
  if (ac == null) {
    return;
  }
switch (ac.getType().getValue()) {
case ActionType.URL_REDIRECT:
    final URLValue uv=(URLValue)ac.getValue();
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",lcl) + uv.getBaseUrl());
DeviceUtil.openURL(uv.getBaseUrl());
break;
case ActionType.SHOW_TOOLTIP:
if (ac != acTooltip) {
hideTooltip();
}
acTooltip=ac;
showTooltip(ac);
break;
case ActionType.TOGGLE_VISIBILITY:
srcToggleVisibility=handleGraphicAction(src,srcToggleVisibility,ActionType.TOGGLE_VISIBILITY_LITERAL,cleanState);
break;
case ActionType.TOGGLE_DATA_POINT_VISIBILITY:
srcToggleDataPoint=handleGraphicAction(src,srcToggleDataPoint,ActionType.TOGGLE_DATA_POINT_VISIBILITY_LITERAL,cleanState);
break;
case ActionType.HIGHLIGHT:
srcHighlight=handleGraphicAction(src,srcHighlight,ActionType.HIGHLIGHT_LITERAL,cleanState);
break;
case ActionType.CALL_BACK:
if (iun instanceof ICallBackNotifier) {
final CallBackValue cv=(CallBackValue)ac.getValue();
((ICallBackNotifier)iun).callback(event,sa.getSource(),cv);
}
 else {
logger.log(ILogger.WARNING,Messages.getString("String_Node_Str",new Object[]{iun},lcl));
}
break;
}
}