Program: 78426
Project: 78426
Buggy source:
public void enableInteraction(InteractionEvent ie) throws ChartException {
  if (_iun == null) {
    logger.log(ILogger.WARNING,Messages.getString("String_Node_Str",getLocale()));
    return;
  }
  Trigger[] triggers=ie.getTriggers();
  if (triggers == null) {
    return;
  }
  final PrimitiveRenderEvent pre=ie.getHotSpot();
  Element elm=null;
  if (pre instanceof PolygonRenderEvent) {
    final Location[] loa=((PolygonRenderEvent)pre).getPoints();
    int[][] pa=getCoordinatesAsInts(loa);
    elm=svggc.createPolygon(pa[0],pa[1],pa[0].length);
  }
 else   if (pre instanceof OvalRenderEvent) {
    final Bounds boEllipse=((OvalRenderEvent)pre).getBounds();
    elm=svggc.createOval(boEllipse.getLeft(),boEllipse.getTop(),boEllipse.getWidth(),boEllipse.getHeight());
  }
 else   if (pre instanceof ArcRenderEvent) {
    final ArcRenderEvent are=(ArcRenderEvent)pre;
    if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {
      Shape outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Shape innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      elm=svggc.createGeneralPath(fArea);
    }
 else {
      elm=svggc.createGeneralPath(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toSwingArcType(are.getStyle())));
    }
  }
  if (elm != null) {
    for (int x=0; x < triggers.length; x++) {
      Trigger tg=triggers[x];
      final StructureSource src=(StructureSource)ie.getSource();
switch (tg.getAction().getType().getValue()) {
case ActionType.SHOW_TOOLTIP:
        String tooltipText=((TooltipValue)tg.getAction().getValue()).getText();
      if ((tooltipText != null) && (tooltipText.trim().length() > 0)) {
        Element title=svggc.dom.createElement("String_Node_Str");
        title.appendChild(svggc.dom.createTextNode(tooltipText));
        elm.appendChild(title);
        elm.setAttribute("String_Node_Str","String_Node_Str");
        elm.setAttribute("String_Node_Str","String_Node_Str");
      }
    break;
case ActionType.URL_REDIRECT:
  URLValue urlValue=((URLValue)tg.getAction().getValue());
if (urlValue.getBaseUrl().startsWith("String_Node_Str")) {
  Element aLink=((SVGGraphics2D)_g2d).createElement("String_Node_Str");
  aLink.setAttribute("String_Node_Str","String_Node_Str" + urlValue.getBaseUrl() + "String_Node_Str");
  aLink.setAttribute("String_Node_Str","String_Node_Str");
  aLink.appendChild(elm);
  elm=aLink;
}
 else {
  Element aLink=((SVGGraphics2D)_g2d).createElement("String_Node_Str");
  aLink.setAttribute("String_Node_Str",urlValue.getBaseUrl());
  if (urlValue.getTarget() != null)   aLink.setAttribute("String_Node_Str",urlValue.getTarget());
  aLink.appendChild(elm);
  elm=aLink;
}
break;
case ActionType.TOGGLE_VISIBILITY:
if (src.getType() == StructureType.SERIES) {
final Series seRT=(Series)src.getSource();
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",getLocale()) + seRT);
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
cacheSeriesHotspots.put(elm,seDT);
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
}
break;
case ActionType.HIGHLIGHT:
if (src.getType() == StructureType.SERIES) {
final Series seRT=(Series)src.getSource();
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",getLocale()) + seRT);
String scriptEvent=getJsScriptEvent(tg.getCondition().getValue());
if (scriptEvent != null) {
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
List components=(List)componentPrimitives.get(seDT);
if (components != null) {
Iterator iter=components.iterator();
StringBuffer sb=new StringBuffer();
sb.append(seDT.hashCode());
if (iter.hasNext()) sb.append("String_Node_Str");
while (iter.hasNext()) {
  sb.append("String_Node_Str").append(iter.next()).append("String_Node_Str");
  if (iter.hasNext())   sb.append("String_Node_Str");
}
if (components.size() > 0) sb.append("String_Node_Str");
elm.setAttribute(scriptEvent,"String_Node_Str" + sb.toString() + "String_Node_Str");
if (tg.getCondition().getValue() == TriggerCondition.ONMOUSEOVER) {
  elm.setAttribute("String_Node_Str","String_Node_Str");
}
setCursor(elm);
((SVGGraphics2D)_g2d).addCSSStyle("String_Node_Str" + seDT.hashCode(),"String_Node_Str","String_Node_Str");
}
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
}
}
break;
case ActionType.INVOKE_SCRIPT:
final StructureSource sructSource=(StructureSource)ie.getSource();
String scriptEvent=getJsScriptEvent(tg.getCondition().getValue());
if (scriptEvent != null) {
String script=((ScriptValue)tg.getAction().getValue()).getScript();
String callbackFunction="String_Node_Str" + Math.abs(script.hashCode()) + "String_Node_Str"+ sructSource.getSource().hashCode()+ "String_Node_Str";
elm.setAttribute(scriptEvent,callbackFunction);
setCursor(elm);
if (!(scripts.contains(script))) {
((SVGGraphics2D)_g2d).addScript("String_Node_Str" + Math.abs(script.hashCode()) + "String_Node_Str"+ "String_Node_Str"+ script+ "String_Node_Str");
scripts.add(script);
}
}
break;
}
}
hotspotLayer.appendChild(elm);
}
}

Fixed version (ground truth):
public void enableInteraction(InteractionEvent ie) throws ChartException {
  if (_iun == null) {
    logger.log(ILogger.WARNING,Messages.getString("String_Node_Str",getLocale()));
    return;
  }
  Trigger[] triggers=ie.getTriggers();
  if (triggers == null) {
    return;
  }
  final PrimitiveRenderEvent pre=ie.getHotSpot();
  Element elm=null;
  if (pre instanceof PolygonRenderEvent) {
    final Location[] loa=((PolygonRenderEvent)pre).getPoints();
    int[][] pa=getCoordinatesAsInts(loa);
    elm=svggc.createPolygon(pa[0],pa[1],pa[0].length);
  }
 else   if (pre instanceof OvalRenderEvent) {
    final Bounds boEllipse=((OvalRenderEvent)pre).getBounds();
    elm=svggc.createOval(boEllipse.getLeft(),boEllipse.getTop(),boEllipse.getWidth(),boEllipse.getHeight());
  }
 else   if (pre instanceof ArcRenderEvent) {
    final ArcRenderEvent are=(ArcRenderEvent)pre;
    if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {
      Shape outerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2,2 * are.getOuterRadius(),2 * are.getOuterRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Shape innerArc=new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2,are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2,2 * are.getInnerRadius(),2 * are.getInnerRadius(),are.getStartAngle(),are.getAngleExtent(),Arc2D.PIE);
      Area fArea=new Area(outerArc);
      fArea.exclusiveOr(new Area(innerArc));
      elm=svggc.createGeneralPath(fArea);
    }
 else {
      elm=svggc.createGeneralPath(new Arc2D.Double(are.getTopLeft().getX(),are.getTopLeft().getY(),are.getWidth(),are.getHeight(),are.getStartAngle(),are.getAngleExtent(),toSwingArcType(are.getStyle())));
    }
  }
  if (elm != null) {
    for (int x=0; x < triggers.length; x++) {
      Trigger tg=triggers[x];
      final StructureSource src=(StructureSource)ie.getSource();
switch (tg.getAction().getType().getValue()) {
case ActionType.SHOW_TOOLTIP:
        String tooltipText=((TooltipValue)tg.getAction().getValue()).getText();
      if ((tooltipText != null) && (tooltipText.trim().length() > 0)) {
        Element title=svggc.dom.createElement("String_Node_Str");
        title.appendChild(svggc.dom.createTextNode(tooltipText));
        elm.appendChild(title);
        elm.setAttribute("String_Node_Str","String_Node_Str");
        elm.setAttribute("String_Node_Str","String_Node_Str");
      }
    break;
case ActionType.URL_REDIRECT:
  URLValue urlValue=((URLValue)tg.getAction().getValue());
if (urlValue.getBaseUrl().startsWith("String_Node_Str")) {
  Element aLink=((SVGGraphics2D)_g2d).createElement("String_Node_Str");
  aLink.setAttribute("String_Node_Str","String_Node_Str" + urlValue.getBaseUrl() + "String_Node_Str");
  aLink.setAttribute("String_Node_Str","String_Node_Str");
  aLink.appendChild(elm);
  elm=aLink;
}
 else {
  Element aLink=((SVGGraphics2D)_g2d).createElement("String_Node_Str");
  aLink.setAttribute("String_Node_Str",urlValue.getBaseUrl());
  if (urlValue.getTarget() != null)   aLink.setAttribute("String_Node_Str",urlValue.getTarget());
  aLink.appendChild(elm);
  elm=aLink;
}
break;
case ActionType.TOGGLE_VISIBILITY:
if (src.getType() == StructureType.SERIES) {
final Series seRT=(Series)src.getSource();
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",getLocale()) + seRT);
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
cacheSeriesHotspots.put(elm,seDT);
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
}
break;
case ActionType.TOGGLE_DATA_POINT_VISIBILITY:
if (src.getType() == StructureType.SERIES) {
final Series seRT=(Series)src.getSource();
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",getLocale()) + seRT);
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
if (seDT != null) cacheHotspots.put(elm,seDT);
}
break;
case ActionType.HIGHLIGHT:
if (src.getType() == StructureType.SERIES) {
final Series seRT=(Series)src.getSource();
logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",getLocale()) + seRT);
String scriptEvent=getJsScriptEvent(tg.getCondition().getValue());
if (scriptEvent != null) {
Series seDT=null;
try {
seDT=findDesignTimeSeries(seRT);
List components=(List)componentPrimitives.get(seDT);
if (components != null) {
Iterator iter=components.iterator();
StringBuffer sb=new StringBuffer();
sb.append(seDT.hashCode());
if (iter.hasNext()) sb.append("String_Node_Str");
while (iter.hasNext()) {
sb.append("String_Node_Str").append(iter.next()).append("String_Node_Str");
if (iter.hasNext()) sb.append("String_Node_Str");
}
if (components.size() > 0) sb.append("String_Node_Str");
elm.setAttribute(scriptEvent,"String_Node_Str" + sb.toString() + "String_Node_Str");
if (tg.getCondition().getValue() == TriggerCondition.ONMOUSEOVER) {
elm.setAttribute("String_Node_Str","String_Node_Str");
}
setCursor(elm);
((SVGGraphics2D)_g2d).addCSSStyle("String_Node_Str" + seDT.hashCode(),"String_Node_Str","String_Node_Str");
}
}
 catch (ChartException oosx) {
logger.log(oosx);
return;
}
}
}
break;
case ActionType.INVOKE_SCRIPT:
final StructureSource sructSource=(StructureSource)ie.getSource();
String scriptEvent=getJsScriptEvent(tg.getCondition().getValue());
if (scriptEvent != null) {
String script=((ScriptValue)tg.getAction().getValue()).getScript();
String callbackFunction="String_Node_Str" + Math.abs(script.hashCode()) + "String_Node_Str"+ sructSource.getSource().hashCode()+ "String_Node_Str";
elm.setAttribute(scriptEvent,callbackFunction);
setCursor(elm);
if (!(scripts.contains(script))) {
((SVGGraphics2D)_g2d).addScript("String_Node_Str" + Math.abs(script.hashCode()) + "String_Node_Str"+ "String_Node_Str"+ script+ "String_Node_Str");
scripts.add(script);
}
}
break;
}
}
hotspotLayer.appendChild(elm);
}
}