Program: 143540
Project: 143540
Buggy source:
private void setUpComponent(Component comp,IRecordInternal record,Object compColor,Object fgColor,Object compFont,Object compBorder,int visibleRowIndex){
  if (tabIndex < 0) {
    TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex);
  }
 else {
    if (elementTabIndexes.size() > 0) {
      Integer idx=elementTabIndexes.get(cellToElement.get(comp));
      if (idx == null) {
        TabIndexHelper.setUpTabIndexAttributeModifier(comp,ISupportWebTabSeq.SKIP);
      }
 else {
        TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex + 1 + visibleRowIndex * elementTabIndexes.size() + idx.intValue());
      }
    }
 else {
      TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex + 1);
    }
  }
  if (compColor != null) {
    setParentBGcolor(comp,compColor);
  }
  WebCellBasedView.this.applyStyleOnComponent(comp,compColor,fgColor,compFont,compBorder);
  if (scriptable.isReadOnly() && validationEnabled && comp instanceof IScriptableProvider&& ((IScriptableProvider)comp).getScriptObject() instanceof HasRuntimeReadOnly) {
    ((HasRuntimeReadOnly)((IScriptableProvider)comp).getScriptObject()).setReadOnly(true);
  }
  if (!isEnabled() && comp instanceof IComponent) {
    ((IComponent)comp).setComponentEnabled(false);
  }
  if (comp instanceof IDisplayRelatedData && record != null) {
    ((IDisplayRelatedData)comp).setRecord(record,true);
  }
  MarkupContainer parent=comp.getParent();
  if (parent instanceof CellContainer) {
    parent.setVisible(comp.isVisible());
  }
  if (compBorder != null) {
    IPersist elem=WebCellBasedView.this.cellToElement.get(comp);
    Object colId=WebCellBasedView.this.elementToColumnIdentifierComponent.get(elem);
    final int idx=WebCellBasedView.this.visibleColummIdentifierComponents.indexOf(colId);
    final int[] borderWidth=new int[]{0,0};
    Border cb=ComponentFactoryHelper.createBorder((String)compBorder);
    if (cb != null) {
      int defaultLeftPadding;
      int defaultRightPadding;
switch (elem.getTypeID()) {
case IRepository.FIELDS:
        Insets fieldMargin=null;
      if (comp instanceof IFieldComponent) {
        fieldMargin=((IFieldComponent)comp).getMargin();
      }
    defaultLeftPadding=fieldMargin != null ? fieldMargin.left : TemplateGenerator.DEFAULT_FIELD_PADDING.left;
  defaultRightPadding=fieldMargin != null ? fieldMargin.right : TemplateGenerator.DEFAULT_FIELD_PADDING.right;
break;
case IRepository.GRAPHICALCOMPONENTS:
Insets gcMargin=null;
if (elem instanceof GraphicalComponent) {
gcMargin=((GraphicalComponent)elem).getMargin();
}
defaultLeftPadding=gcMargin != null ? gcMargin.left : TemplateGenerator.DEFAULT_LABEL_PADDING.left;
defaultRightPadding=gcMargin != null ? gcMargin.right : TemplateGenerator.DEFAULT_LABEL_PADDING.right;
break;
default :
defaultLeftPadding=0;
defaultRightPadding=0;
}
Insets borderInsets=ComponentFactoryHelper.getBorderInsetsForNoComponent(cb);
borderWidth[0]=borderInsets.left + defaultLeftPadding;
borderWidth[1]=borderInsets.right + defaultRightPadding;
}
}
}

Fixed version (ground truth):
private void setUpComponent(Component comp,IRecordInternal record,Object compColor,Object fgColor,Object compFont,Object listItemBorder,int visibleRowIndex){
  if (tabIndex < 0) {
    TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex);
  }
 else {
    if (elementTabIndexes.size() > 0) {
      Integer idx=elementTabIndexes.get(cellToElement.get(comp));
      if (idx == null) {
        TabIndexHelper.setUpTabIndexAttributeModifier(comp,ISupportWebTabSeq.SKIP);
      }
 else {
        TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex + 1 + visibleRowIndex * elementTabIndexes.size() + idx.intValue());
      }
    }
 else {
      TabIndexHelper.setUpTabIndexAttributeModifier(comp,tabIndex + 1);
    }
  }
  if (compColor != null) {
    setParentBGcolor(comp,compColor);
  }
  WebCellBasedView.this.applyStyleOnComponent(comp,compColor,fgColor,compFont,listItemBorder);
  if (scriptable.isReadOnly() && validationEnabled && comp instanceof IScriptableProvider&& ((IScriptableProvider)comp).getScriptObject() instanceof HasRuntimeReadOnly) {
    ((HasRuntimeReadOnly)((IScriptableProvider)comp).getScriptObject()).setReadOnly(true);
  }
  if (!isEnabled() && comp instanceof IComponent) {
    ((IComponent)comp).setComponentEnabled(false);
  }
  if (comp instanceof IDisplayRelatedData && record != null) {
    ((IDisplayRelatedData)comp).setRecord(record,true);
  }
  MarkupContainer parent=comp.getParent();
  if (parent instanceof CellContainer) {
    parent.setVisible(comp.isVisible());
  }
}