Program: 60074
Project: 60074
Buggy source:
/** 
 * Adds the line.
 * @param startNode the start node
 * @param prevLine the prev line
 * @param newLineY the new line y
 * @return the r line
 */
private RLine addLine(ModelNode startNode,RLine prevLine,int newLineY){
  this.lineDone(prevLine);
  this.checkY(newLineY);
  int leftOffset=this.fetchLeftOffset(newLineY);
  int newX=leftOffset;
  int newMaxWidth=this.desiredWidth - this.fetchRightOffset(newLineY) - leftOffset;
  RLine rline;
  boolean initialAllowOverflow;
  if (prevLine == null) {
    RenderState rs=this.modelNode.getRenderState();
    initialAllowOverflow=rs == null ? false : rs.getWhiteSpace() == RenderState.WS_NOWRAP;
    int textIndent=rs == null ? 0 : rs.getTextIndent(this.availContentWidth);
    if (textIndent != 0) {
      newX+=textIndent;
      newMaxWidth+=leftOffset - newX;
    }
  }
 else {
    int prevLineHeight=prevLine.getHeight();
    if (prevLineHeight > 0) {
      this.currentCollapsibleMargin=0;
    }
    initialAllowOverflow=prevLine.isAllowOverflow();
    if (prevLine.x + prevLine.width > this.maxX) {
      this.maxX=prevLine.x + prevLine.width;
    }
  }
  rline=new RLine(startNode,this.container,newX,newLineY,newMaxWidth,0,initialAllowOverflow);
  rline.setParent(this);
  RenderState rs=startNode.getRenderState();
  if (!Strings.isBlank(rs.getlineHeight())) {
    if (Strings.isNumeric(rs.getlineHeight())) {
      float flh=Float.parseFloat(rs.getlineHeight()) * LAFSettings.getInstance().getFontSize();
      rline.setHeight(HtmlValues.getPixelSize(String.valueOf(flh),null,0));
    }
 else {
      rline.setHeight(HtmlValues.getPixelSize(rs.getlineHeight(),null,0));
    }
  }
  ArrayList<RLine> sr=this.seqRenderables;
  if (sr == null) {
    sr=new ArrayList(1);
    this.seqRenderables=sr;
  }
  sr.add(rline);
  this.currentLine=rline;
  return rline;
}

Fixed version (ground truth):
/** 
 * Adds the line.
 * @param startNode the start node
 * @param prevLine the prev line
 * @param newLineY the new line y
 * @return the r line
 */
private RLine addLine(ModelNode startNode,RLine prevLine,int newLineY){
  this.lineDone(prevLine);
  this.checkY(newLineY);
  int leftOffset=this.fetchLeftOffset(newLineY);
  int newX=leftOffset;
  int newMaxWidth=this.desiredWidth - this.fetchRightOffset(newLineY) - leftOffset;
  RLine rline;
  boolean initialAllowOverflow;
  if (prevLine == null) {
    RenderState rs=this.modelNode.getRenderState();
    initialAllowOverflow=rs == null ? false : rs.getWhiteSpace() == RenderState.WS_NOWRAP;
    int textIndent=rs == null ? 0 : rs.getTextIndent(this.availContentWidth);
    if (textIndent != 0) {
      newX+=textIndent;
      newMaxWidth+=leftOffset - newX;
    }
  }
 else {
    int prevLineHeight=prevLine.getHeight();
    if (prevLineHeight > 0) {
      this.currentCollapsibleMargin=0;
    }
    initialAllowOverflow=prevLine.isAllowOverflow();
    if (prevLine.x + prevLine.width > this.maxX) {
      this.maxX=prevLine.x + prevLine.width;
    }
  }
  rline=new RLine(startNode,this.container,newX,newLineY,newMaxWidth,0,initialAllowOverflow);
  rline.setParent(this);
  RenderState rs=startNode.getRenderState();
  if (!Strings.isBlank(rs.getlineHeight())) {
    Float f=Float.parseFloat(rs.getlineHeight());
    rline.setHeight(f.intValue());
  }
  ArrayList<RLine> sr=this.seqRenderables;
  if (sr == null) {
    sr=new ArrayList(1);
    this.seqRenderables=sr;
  }
  sr.add(rline);
  this.currentLine=rline;
  return rline;
}