Program: 185228
Project: 185228
Buggy source:
/** 
 * Setup the slope dx, dy label that will be positioned at the top of the plot
 */
@SuppressWarnings("String_Node_Str") private void setupSlopeLineDisplay(){
  slopeLine=new SlopeLine();
  slopeLine.attach(parentPlot.plotView);
  slopeLine.addListenerForPlot(parentPlot.plotView,slopeLabel);
  slopeLine.addListenerForPlot(parentPlot.plotView,new SlopeLine.Listener(){
    @Override public void slopeLineUpdated(    SlopeLine line,    XYPlot plot,    double arg2,    double arg3,    double arg4,    double arg5){
    }
    @Override public void slopeLineRemoved(    SlopeLine line,    XYPlot plot){
      pin.setPinned(false);
    }
    @Override public void slopeLineAdded(    SlopeLine line,    XYPlot plot,    double arg2,    double arg3){
      pin.setPinned(true);
    }
  }
);
  slopeLine.setForeground(PlotConstants.DATA_CURSOR_COLOR);
  slopeLabel.setFont(parentPlot.timeAxisFont);
  slopeLabel.setForeground(PlotConstants.DATA_CURSOR_COLOR);
  if (parentPlot.axisOrientation == AxisOrientationSetting.X_AXIS_AS_TIME) {
    MessageFormat format=new MessageFormat("String_Node_Str" + HTML_WHITESPACES + "String_Node_Str"+ HTML_WHITESPACES+ "String_Node_Str"+ BUNDLE.getString("String_Node_Str")+ "String_Node_Str"+ PlotConstants.SLOPE_UNIT+ "String_Node_Str");
    format.setFormatByArgumentIndex(0,TIME_SPAN_FORMAT);
    format.setFormatByArgumentIndex(1,PlotConstants.SCIENTIFIC_FORMAT);
    format.setFormatByArgumentIndex(2,new NumberFormat(){
      @Override public Number parse(      String source,      ParsePosition parsePosition){
        throw new RuntimeException("String_Node_Str");
      }
      @Override public StringBuffer format(      long number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(number * PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS));
        return toAppendTo;
      }
      @Override public StringBuffer format(      double number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(number * PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS));
        return toAppendTo;
      }
    }
);
    slopeLabel.setFormat(format);
  }
 else {
    MessageFormat format=new MessageFormat("String_Node_Str" + HTML_WHITESPACES + "String_Node_Str"+ HTML_WHITESPACES+ "String_Node_Str"+ BUNDLE.getString("String_Node_Str")+ "String_Node_Str"+ PlotConstants.SLOPE_UNIT+ "String_Node_Str");
    format.setFormatByArgumentIndex(0,PlotConstants.SCIENTIFIC_FORMAT);
    format.setFormatByArgumentIndex(1,TIME_SPAN_FORMAT);
    format.setFormatByArgumentIndex(2,new NumberFormat(){
      @Override public Number parse(      String source,      ParsePosition parsePosition){
        throw new RuntimeException("String_Node_Str");
      }
      @Override public StringBuffer format(      long number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS / (double)number));
        return toAppendTo;
      }
      @Override public StringBuffer format(      double number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS / number));
        return toAppendTo;
      }
    }
);
    slopeLabel.setFormat(format);
  }
  slopeLabel.setText("String_Node_Str");
  Dimension size=slopeLabel.getPreferredSize();
  size.width=100;
  slopeLabel.setText("String_Node_Str");
  slopeLabel.setPreferredSize(size);
  XYPlot plot=parentPlot.plotView;
  plot.add(slopeLabel);
  XYPlotContents contents=plot.getContents();
  SpringLayout layout2=(SpringLayout)plot.getLayout();
  layout2.putConstraint(SpringLayout.NORTH,slopeLabel,0,SpringLayout.NORTH,plot);
  layout2.putConstraint(SpringLayout.EAST,slopeLabel,0,SpringLayout.EAST,contents);
  layout2.putConstraint(SpringLayout.WEST,timeSystemFormattedLabel,0,SpringLayout.WEST,contents);
  layout2.putConstraint(SpringLayout.NORTH,timeSystemFormattedLabel,0,SpringLayout.NORTH,plot);
  layout2.putConstraint(SpringLayout.WEST,pointerXYValueLabel,10,SpringLayout.EAST,timeSystemFormattedLabel);
  layout2.putConstraint(SpringLayout.NORTH,contents,0,SpringLayout.SOUTH,pointerXYValueLabel);
  layout2.putConstraint(SpringLayout.NORTH,contents,0,SpringLayout.SOUTH,timeSystemFormattedLabel);
}

Fixed version (ground truth):
/** 
 * Setup the slope dx, dy label that will be positioned at the top of the plot
 */
@SuppressWarnings("String_Node_Str") private void setupSlopeLineDisplay(){
  slopeLine=new SlopeLine();
  slopeLine.attach(parentPlot.plotView);
  slopeLine.addListenerForPlot(parentPlot.plotView,slopeLabel);
  slopeLine.addListenerForPlot(parentPlot.plotView,new SlopeLine.Listener(){
    @Override public void slopeLineUpdated(    SlopeLine line,    XYPlot plot,    double arg2,    double arg3,    double arg4,    double arg5){
    }
    @Override public void slopeLineRemoved(    SlopeLine line,    XYPlot plot){
      pin.setPinned(false);
    }
    @Override public void slopeLineAdded(    SlopeLine line,    XYPlot plot,    double arg2,    double arg3){
      pin.setPinned(true);
    }
  }
);
  slopeLine.setForeground(PlotConstants.DATA_CURSOR_COLOR);
  slopeLabel.setFont(parentPlot.timeAxisFont);
  slopeLabel.setForeground(PlotConstants.DATA_CURSOR_COLOR);
  if (parentPlot.axisOrientation == AxisOrientationSetting.X_AXIS_AS_TIME) {
    MessageFormat format=new MessageFormat("String_Node_Str" + HTML_WHITESPACES + "String_Node_Str"+ HTML_WHITESPACES+ "String_Node_Str"+ BUNDLE.getString("String_Node_Str")+ "String_Node_Str"+ PlotConstants.SLOPE_UNIT+ "String_Node_Str");
    format.setFormatByArgumentIndex(0,TIME_SPAN_FORMAT);
    format.setFormatByArgumentIndex(1,PlotConstants.SCIENTIFIC_FORMAT);
    format.setFormatByArgumentIndex(2,new NumberFormat(){
      @Override public Number parse(      String source,      ParsePosition parsePosition){
        throw new RuntimeException("String_Node_Str");
      }
      @Override public StringBuffer format(      long number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(number * PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS));
        return toAppendTo;
      }
      @Override public StringBuffer format(      double number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(number * PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS));
        return toAppendTo;
      }
    }
);
    slopeLabel.setFormat(format);
  }
 else {
    MessageFormat format=new MessageFormat("String_Node_Str" + HTML_WHITESPACES + "String_Node_Str"+ HTML_WHITESPACES+ "String_Node_Str"+ BUNDLE.getString("String_Node_Str")+ "String_Node_Str"+ PlotConstants.SLOPE_UNIT+ "String_Node_Str");
    format.setFormatByArgumentIndex(0,PlotConstants.SCIENTIFIC_FORMAT);
    format.setFormatByArgumentIndex(1,TIME_SPAN_FORMAT);
    format.setFormatByArgumentIndex(2,new NumberFormat(){
      @Override public Number parse(      String source,      ParsePosition parsePosition){
        throw new RuntimeException("String_Node_Str");
      }
      @Override public StringBuffer format(      long number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS / (double)number));
        return toAppendTo;
      }
      @Override public StringBuffer format(      double number,      StringBuffer toAppendTo,      FieldPosition pos){
        toAppendTo.append(PlotConstants.SCIENTIFIC_FORMAT.format(PlotConstants.SLOPE_UNIT_DIVIDER_IN_MS / number));
        return toAppendTo;
      }
    }
);
    slopeLabel.setFormat(format);
  }
  slopeLabel.setText("String_Node_Str");
  Dimension size=slopeLabel.getPreferredSize();
  size.width=100;
  slopeLabel.setText("String_Node_Str");
  slopeLabel.setPreferredSize(size);
  XYPlot plot=parentPlot.plotView;
  plot.add(slopeLabel);
  XYPlotContents contents=plot.getContents();
  SpringLayout layout2=(SpringLayout)plot.getLayout();
  layout2.putConstraint(SpringLayout.NORTH,slopeLabel,0,SpringLayout.NORTH,plot);
  layout2.putConstraint(SpringLayout.EAST,slopeLabel,0,SpringLayout.EAST,contents);
  layout2.putConstraint(SpringLayout.WEST,timeSystemFormattedLabel,0,SpringLayout.WEST,contents);
  layout2.putConstraint(SpringLayout.NORTH,timeSystemFormattedLabel,0,SpringLayout.NORTH,plot);
  layout2.putConstraint(SpringLayout.WEST,pointerXYValueLabel,10,SpringLayout.EAST,timeSystemFormattedLabel);
  JComponent top=(pointerXYValueLabel.getPreferredSize().height > timeSystemFormattedLabel.getPreferredSize().height) ? pointerXYValueLabel : timeSystemFormattedLabel;
  layout2.putConstraint(SpringLayout.NORTH,contents,0,SpringLayout.SOUTH,top);
  plot.getYAxis().setEndMargin(top.getPreferredSize().height);
}