Program: 78347
Project: 78347
Buggy source:
private synchronized void handleAction(List al,Object event,boolean cleanState){
  if (al == null || event == null) {
    return;
  }
  ShapedAction sa;
  Shape sh;
  Action ac;
  Point p=null;
  if (event instanceof MouseEvent) {
    p=((MouseEvent)event).getPoint();
  }
  if (event instanceof KeyEvent) {
  }
  boolean bFound=false;
  LOOP:   for (int i=0; i < al.size(); i++) {
    sa=(ShapedAction)al.get(i);
    sh=sa.getShape();
    if (p == null || sh.contains(p)) {
      ac=sa.getAction();
      final StructureSource src=(StructureSource)sa.getSource();
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 LOOP;
case ActionType.SHOW_TOOLTIP:
if (sa != saTooltip) {
  hideTooltip();
}
saTooltip=sa;
bFound=true;
showTooltip(saTooltip);
break LOOP;
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 LOOP;
}
break;
case ActionType.TOGGLE_DATA_POINT_VISIBILITY:
if (src.getType() == StructureType.SERIES) {
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 LOOP;
}
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 LOOP;
}
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 LOOP;
}
}
}
if (!bFound && saTooltip != null) {
hideTooltip();
saTooltip=null;
}
if (cleanState || (!bFound && saHighlighted != null)) {
saHighlighted=null;
}
}

Fixed version (ground truth):
private synchronized void handleAction(List al,Object event,boolean cleanState){
  if (al == null || event == null) {
    return;
  }
  ShapedAction sa;
  Shape sh;
  Action ac;
  Point p=null;
  if (event instanceof MouseEvent) {
    p=((MouseEvent)event).getPoint();
  }
  if (event instanceof KeyEvent) {
  }
  boolean bFound=false;
  LOOP:   for (int i=0; i < al.size(); i++) {
    sa=(ShapedAction)al.get(i);
    sh=sa.getShape();
    if (p == null || sh.contains(p)) {
      ac=sa.getAction();
      final StructureSource src=(StructureSource)sa.getSource();
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 LOOP;
case ActionType.SHOW_TOOLTIP:
if (sa != saTooltip) {
  hideTooltip();
}
saTooltip=sa;
bFound=true;
showTooltip(saTooltip);
break LOOP;
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 LOOP;
}
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 LOOP;
}
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 LOOP;
}
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 LOOP;
}
}
}
if (!bFound && saTooltip != null) {
hideTooltip();
saTooltip=null;
}
if (cleanState || (!bFound && saHighlighted != null)) {
saHighlighted=null;
}
}