nus-yam/ex-repair huggingface dataset:
Program: 143700
Project: 143700
Buggy source:
/** 
 * Returns whether this calculation is a stored one or not.
 * @sample var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers"); if (calc.isStored()) application.output("The calculation is stored"). else application.output("The calculation is not stored").
 * @return true if the calculation is stored, false otherwise
 */
public boolean js_isStored(){
  try {
    return scriptCalculation.getTable().getColumn(scriptCalculation.getName()) != null;
  }
 catch (  RepositoryException e) {
    Debug.error(e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns whether this calculation is a stored one or not.
 * @sample var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers"); if (calc.isStored()) application.output("The calculation is stored"); else application.output("The calculation is not stored");
 * @return true if the calculation is stored, false otherwise
 */
public boolean js_isStored(){
  try {
    return scriptCalculation.getTable().getColumn(scriptCalculation.getName()) != null;
  }
 catch (  RepositoryException e) {
    Debug.error(e);
  }
  return false;
}
Program: 143701
Project: 143701
Buggy source:
/** 
 * Creates a new foundset method with the specified code.
 * @sample var method = solutionModel.getDataSourceNode("db:/example_data/orders").newMethod("function doubleSize() { return 2*getSize(); }", application.output('Doubled orders for this customer: '+customers_to_orders.doubleSize())
 * @param code the specified code for the foundset method
 * @return a JSMethod object
 */
public JSMethod js_newMethod(String code){
  try {
    FlattenedSolution fs=application.getFlattenedSolution();
    TableNode tablenode=fs.getSolutionCopyTableNode(dataSource);
    if (tablenode == null)     throw new RuntimeException("String_Node_Str" + dataSource);
    String name=JSMethod.parseName(code);
    ScriptMethod method=tablenode.createNewFoundsetMethod(new ScriptNameValidator(fs),name);
    method.setDeclaration(code);
    ((FoundSetManager)application.getFoundSetManager()).reloadFoundsetMethod(dataSource,method);
    return new JSMethod(this,method,application,true);
  }
 catch (  RepositoryException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new foundset method with the specified code.
 * @sample var method = solutionModel.getDataSourceNode("db:/example_data/orders").newMethod("function doubleSize() { return 2*getSize(); }"), application.output('Doubled orders for this customer: '+customers_to_orders.doubleSize())
 * @param code the specified code for the foundset method
 * @return a JSMethod object
 */
public JSMethod js_newMethod(String code){
  try {
    FlattenedSolution fs=application.getFlattenedSolution();
    TableNode tablenode=fs.getSolutionCopyTableNode(dataSource);
    if (tablenode == null)     throw new RuntimeException("String_Node_Str" + dataSource);
    String name=JSMethod.parseName(code);
    ScriptMethod method=tablenode.createNewFoundsetMethod(new ScriptNameValidator(fs),name);
    method.setDeclaration(code);
    ((FoundSetManager)application.getFoundSetManager()).reloadFoundsetMethod(dataSource,method);
    return new JSMethod(this,method,application,true);
  }
 catch (  RepositoryException e) {
    throw new RuntimeException(e);
  }
}
Program: 143703
Project: 143703
Buggy source:
public String getLanguageKey(){
  return language + "String_Node_Str" + key;
}

Fixed version (ground truth):
public String getLanguageKey(){
  return language + '.' + key;
}
Program: 143704
Project: 143704
Buggy source:
/** 
 * @see wicket.Page#configureResponse()
 */
@SuppressWarnings("String_Node_Str") @Override protected void configureResponse(){
  super.configureResponse();
  if (getWebRequestCycle().getResponse() instanceof WebResponse) {
    final WebResponse response=getWebRequestCycle().getWebResponse();
    HTTPUtils.setNoCacheHeaders(response.getHttpServletResponse(),"String_Node_Str");
  }
  final RequestCycle cycle=getRequestCycle();
  final Response response=cycle.getResponse();
  if (main != null) {
    final MarkupStream markupStream=main.getAssociatedMarkupStream(false);
    if (markupStream != null) {
      markupStream.setCurrentIndex(0);
      MarkupElement m=markupStream.get();
      String docType=m.toString().trim();
      if (m != null && docType.toUpperCase().startsWith("String_Node_Str")) {
        int index=docType.indexOf('>');
        if (index != -1) {
          response.write(docType.substring(0,index + 1));
        }
 else {
          response.write(docType);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see wicket.Page#configureResponse()
 */
@SuppressWarnings("String_Node_Str") @Override protected void configureResponse(){
  super.configureResponse();
  if (getWebRequestCycle().getResponse() instanceof WebResponse) {
    final WebResponse response=getWebRequestCycle().getWebResponse();
    HTTPUtils.setNoCacheHeaders(response.getHttpServletResponse(),"String_Node_Str");
  }
  final RequestCycle cycle=getRequestCycle();
  final Response response=cycle.getResponse();
  if (main != null) {
    final MarkupStream markupStream=main.getAssociatedMarkupStream(false);
    if (markupStream != null) {
      MarkupElement m=markupStream.get();
      if (m != null) {
        String docType=m.toString().trim();
        if (docType.toUpperCase().startsWith("String_Node_Str")) {
          int index=docType.indexOf('>');
          if (index != -1) {
            response.write(docType.substring(0,index + 1));
          }
 else {
            response.write(docType);
          }
        }
      }
    }
  }
}
Program: 143707
Project: 143707
Buggy source:
private Collection<ListItem<?>> getRows(ServoyListView<IRecordInternal> listView,int startIdx,int rowsCount){
  ArrayList<ListItem<?>> rows=new ArrayList<ListItem<?>>();
  int endIdx=startIdx + rowsCount;
  ListItem<?> listItem;
  for (int i=startIdx; i < endIdx; i++) {
    listItem=listView.getOrCreateListItem(i);
    rows.add(listItem);
  }
  return rows;
}

Fixed version (ground truth):
private Collection<ListItem<?>> getRows(ServoyListView<IRecordInternal> listView,int startIdx,int rowsCount){
  ArrayList<ListItem<?>> rows=new ArrayList<ListItem<?>>();
  int endIdx=startIdx + rowsCount;
  ListItem<?> listItem;
  isGettingRows=true;
  for (int i=startIdx; i < endIdx; i++) {
    listItem=listView.getOrCreateListItem(i);
    rows.add(listItem);
  }
  isGettingRows=false;
  return rows;
}
Program: 143708
Project: 143708
Buggy source:
public Solution createDummyCopy(Solution sol){
  Solution copy=new Solution(sol.getRepository(),sol.getSolutionMetaData());
  copy.setReleaseNumber(sol.getReleaseNumber());
  copy.setRevisionNumber(sol.getRevisionNumber());
  return copy;
}

Fixed version (ground truth):
public static Solution createDummyCopy(Solution sol){
  Solution copy=new Solution(sol.getRepository(),sol.getSolutionMetaData());
  copy.setReleaseNumber(sol.getReleaseNumber());
  copy.setRevisionNumber(sol.getRevisionNumber());
  return copy;
}
Program: 143709
Project: 143709
Buggy source:
public void fireOnRender(boolean hasFocus){
  if (isRenderStateChanged && renderScriptExecuter != null && renderCallback != null) {
    IScriptRenderMethods renderable=onRenderComponent.getRenderable();
    if (renderable instanceof RenderableWrapper)     ((RenderableWrapper)renderable).resetProperties();
    JSRenderEvent event=new JSRenderEvent();
    event.setElement(onRenderComponent);
    event.setHasFocus(hasFocus);
    event.setRecord(renderRecord);
    event.setIndex(renderIndex);
    event.setSelected(renderIsSelected);
    renderScriptExecuter.executeFunction(renderCallback,new Object[]{event},false,onRenderComponent.getComponent(),false,StaticContentSpecLoader.PROPERTY_ONRENDERMETHODID.getPropertyName(),true);
    isRenderStateChanged=false;
  }
}

Fixed version (ground truth):
public void fireOnRender(boolean hasFocus){
  if (isRenderStateChanged && renderScriptExecuter != null && renderCallback != null && (renderIndex != -1 || renderRecord == null)) {
    IScriptRenderMethods renderable=onRenderComponent.getRenderable();
    if (renderable instanceof RenderableWrapper)     ((RenderableWrapper)renderable).resetProperties();
    JSRenderEvent event=new JSRenderEvent();
    event.setElement(onRenderComponent);
    event.setHasFocus(hasFocus);
    event.setRecord(renderRecord);
    event.setIndex(renderIndex);
    event.setSelected(renderIsSelected);
    renderScriptExecuter.executeFunction(renderCallback,new Object[]{event},false,onRenderComponent.getComponent(),false,StaticContentSpecLoader.PROPERTY_ONRENDERMETHODID.getPropertyName(),true);
    isRenderStateChanged=false;
  }
}
Program: 143714
Project: 143714
Buggy source:
/** 
 * @see wicket.MarkupContainer#onRender(wicket.markup.MarkupStream)
 */
@Override protected void onRender(MarkupStream markupStream){
  super.onRender(markupStream);
  getStylePropertyChanges().setRendered();
}

Fixed version (ground truth):
/** 
 * @see wicket.MarkupContainer#onRender(wicket.markup.MarkupStream)
 */
@Override protected void onRender(MarkupStream markupStream){
  super.onRender(markupStream);
  getStylePropertyChanges().setRendered();
  hasOnRender=hasOnRender();
}
Program: 143715
Project: 143715
Buggy source:
public void updateRowComponentsRenderState(AjaxRequestTarget target){
  if (currentData == null)   return;
  List<Integer> indexToUpdate;
  if ((indexToUpdate=getIndexToUpdate()) != null) {
    int firstRow=table.getCurrentPage() * table.getRowsPerPage();
    int lastRow=firstRow + table.getViewSize() - 1;
    int[] newSelectedIndexes=getSelectedIndexes();
    for (    int rowIdx : indexToUpdate) {
      if (rowIdx >= firstRow && rowIdx <= lastRow) {
        ListItem<IRecordInternal> selectedListItem=(ListItem<IRecordInternal>)table.get(Integer.toString(rowIdx));
        if (selectedListItem instanceof WebCellBasedViewListItem) {
          ((WebCellBasedViewListItem)selectedListItem).updateComponentsRenderState(target,Arrays.binarySearch(newSelectedIndexes,rowIdx) >= 0);
        }
      }
    }
    selectedIndexes=newSelectedIndexes;
  }
}

Fixed version (ground truth):
public void updateRowComponentsRenderState(AjaxRequestTarget target){
  if (currentData == null)   return;
  List<Integer> indexToUpdate;
  if ((indexToUpdate=getIndexToUpdate()) != null) {
    int firstRow=table.getCurrentPage() * table.getRowsPerPage();
    int lastRow=firstRow + table.getViewSize() - 1;
    int[] newSelectedIndexes=getSelectedIndexes();
    for (    int rowIdx : indexToUpdate) {
      if (rowIdx >= firstRow && rowIdx <= lastRow) {
        ListItem<IRecordInternal> selectedListItem=(ListItem<IRecordInternal>)table.get(Integer.toString(rowIdx));
        if (selectedListItem instanceof WebCellBasedViewListItem) {
          boolean isSelected=Arrays.binarySearch(newSelectedIndexes,rowIdx) >= 0;
          Object color=WebCellBasedView.this.getListItemBgColor(selectedListItem,isSelected);
          String sColor=(color == null || color instanceof Undefined) ? null : color.toString();
          Object fgColor=WebCellBasedView.this.getListItemFgColor(selectedListItem,isSelected);
          String sFgColor=(fgColor == null || fgColor instanceof Undefined) ? null : fgColor.toString();
          Object styleFont=WebCellBasedView.this.getListItemFont(selectedListItem,isSelected);
          String sStyleFont=(styleFont == null || styleFont instanceof Undefined) ? null : styleFont.toString();
          ((WebCellBasedViewListItem)selectedListItem).updateComponentsRenderState(target,sColor,sFgColor,sStyleFont,isSelected);
        }
      }
    }
    selectedIndexes=newSelectedIndexes;
  }
}
Program: 143717
Project: 143717
Buggy source:
@Override public void renderHead(HtmlHeaderContainer container){
  super.renderHead(container);
  selectedIndexes=null;
  String rowSelectionScript=getRowSelectionScript();
  updateRowComponentsRenderState(null);
  if (rowSelectionScript != null)   container.getHeaderResponse().renderOnDomReadyJavascript(rowSelectionScript);
  String columnResizeScript=getColumnResizeScript();
  if (columnResizeScript != null)   container.getHeaderResponse().renderOnDomReadyJavascript(columnResizeScript);
}

Fixed version (ground truth):
@Override public void renderHead(HtmlHeaderContainer container){
  super.renderHead(container);
  selectedIndexes=null;
  updateRowComponentsRenderState(null);
  String columnResizeScript=getColumnResizeScript();
  if (columnResizeScript != null)   container.getHeaderResponse().renderOnDomReadyJavascript(columnResizeScript);
}
Program: 143718
Project: 143718
Buggy source:
public void updateComponentsRenderState(AjaxRequestTarget target,boolean isSelected){
  Iterator<? extends Component> it=iterator();
  while (it.hasNext()) {
    Component component=it.next();
    if (component.isVisibleInHierarchy()) {
      Object c=component instanceof CellContainer ? ((CellContainer)component).iterator().next() : component;
      if (updateComponentRenderState(c,isSelected) && target != null && c instanceof Component) {
        Component innerComponent=(Component)c;
        target.addComponent(innerComponent);
        WebEventExecutor.generateDragAttach(innerComponent,target.getHeaderResponse());
        if (!innerComponent.isVisible()) {
          ((IProviderStylePropertyChanges)innerComponent).getStylePropertyChanges().setRendered();
        }
      }
    }
  }
}

Fixed version (ground truth):
public void updateComponentsRenderState(AjaxRequestTarget target,String bgColor,String fgColor,String compFont,boolean isSelected){
  Iterator<? extends Component> it=iterator();
  while (it.hasNext()) {
    Component component=it.next();
    if (component.isVisibleInHierarchy()) {
      Object c=component instanceof CellContainer ? ((CellContainer)component).iterator().next() : component;
      if (c instanceof Component) {
        Component innerComponent=(Component)c;
        WebCellBasedView.this.applyStyleOnComponent(innerComponent,bgColor,fgColor,compFont);
        boolean innerComponentChanged=innerComponent instanceof IProviderStylePropertyChanges && ((IProviderStylePropertyChanges)innerComponent).getStylePropertyChanges().isChanged();
        if ((updateComponentRenderState(c,isSelected) || innerComponentChanged) && target != null) {
          target.addComponent(innerComponent);
          WebEventExecutor.generateDragAttach(innerComponent,target.getHeaderResponse());
          if (!innerComponent.isVisible()) {
            ((IProviderStylePropertyChanges)innerComponent).getStylePropertyChanges().setRendered();
          }
        }
      }
    }
  }
}
Program: 143719
Project: 143719
Buggy source:
@Override protected void setDefaultRenderProperties(ISupportOnRenderCallback display){
  IScriptRenderMethods scriptable=null;
  if (display instanceof IScriptableProvider) {
    scriptable=(IScriptRenderMethods)((IScriptableProvider)display).getScriptObject();
  }
 else {
    scriptable=(IScriptRenderMethods)display;
  }
  scriptable.js_setBgcolor(PersistHelper.createColorString(renderDefaultBgColor));
  if (renderDefaultBorder != null)   scriptable.js_setBorder(ComponentFactoryHelper.createBorderString(renderDefaultBorder));
  scriptable.js_setEnabled(renderDefaultEnabled);
  scriptable.js_setFgcolor(PersistHelper.createColorString(renderDefaultFgColor));
  scriptable.js_setFont(PersistHelper.createFontString(renderDefaultFont));
  scriptable.js_setToolTipText(renderDefaultTooltipText);
  if (isUseDefaultTransparent())   scriptable.js_setTransparent(!renderDefaultOpaque);
  scriptable.js_setVisible(renderDefaultVisible);
}

Fixed version (ground truth):
@Override protected void setDefaultRenderProperties(ISupportOnRenderCallback display){
  IScriptRenderMethods scriptable=null;
  if (display instanceof IScriptableProvider) {
    scriptable=(IScriptRenderMethods)((IScriptableProvider)display).getScriptObject();
  }
 else {
    scriptable=(IScriptRenderMethods)display;
  }
  if (isUseDefaultBackground())   scriptable.js_setBgcolor(PersistHelper.createColorString(renderDefaultBgColor));
  if (renderDefaultBorder != null)   scriptable.js_setBorder(ComponentFactoryHelper.createBorderString(renderDefaultBorder));
  scriptable.js_setEnabled(renderDefaultEnabled);
  if (isUseDefaultForeground())   scriptable.js_setFgcolor(PersistHelper.createColorString(renderDefaultFgColor));
  if (isUseDefaultFont())   scriptable.js_setFont(PersistHelper.createFontString(renderDefaultFont));
  scriptable.js_setToolTipText(renderDefaultTooltipText);
  if (isUseDefaultTransparent())   scriptable.js_setTransparent(!renderDefaultOpaque);
  scriptable.js_setVisible(renderDefaultVisible);
}
Program: 143720
Project: 143720
Buggy source:
/** 
 * @deprecated Use "typeof" operator instead.
 */
@Deprecated @Override public boolean js_isServoyException(){
  return false;
}

Fixed version (ground truth):
/** 
 * @sameas com.servoy.j2db.util.ServoyException#js_isServoyException()
 * @deprecated Use "typeof" operator instead.
 */
@Deprecated @Override public boolean js_isServoyException(){
  return false;
}
Program: 143721
Project: 143721
Buggy source:
/** 
 * Get an element of the form by its name.
 * @sampleas allnames
 */
public String js_getIndex_name(){
  return null;
}

Fixed version (ground truth):
/** 
 * Get an element of the form by its name.
 * @sampleas js_getAllnames()
 */
public String js_getIndex_name(){
  return null;
}
Program: 143722
Project: 143722
Buggy source:
/** 
 * Get an element of the form by its index.
 * @sampleas length
 */
public Number js_getIndex_index(){
  return null;
}

Fixed version (ground truth):
/** 
 * Get an element of the form by its index.
 * @sampleas js_getLength()
 */
public Number js_getIndex_index(){
  return null;
}
Program: 143723
Project: 143723
Buggy source:
/** 
 * @sameas com.servoy.j2db.scripting.solutionmodel.JSGraphicalComponent#js_setOnActionMethod()
 */
@Deprecated public void js_setOnActionMethod(Function function){
  ScriptMethod scriptMethod=JSForm.getScriptMethod(function,application.getFlattenedSolution());
  if (scriptMethod != null) {
    getBaseComponent(true).setOnActionMethodID(scriptMethod.getID());
  }
 else {
    getBaseComponent(true).setOnActionMethodID(0);
  }
}

Fixed version (ground truth):
/** 
 * @sameas com.servoy.j2db.scripting.solutionmodel.JSGraphicalComponent#js_setOnActionMethod(Function)
 */
@Deprecated public void js_setOnActionMethod(Function function){
  ScriptMethod scriptMethod=JSForm.getScriptMethod(function,application.getFlattenedSolution());
  if (scriptMethod != null) {
    getBaseComponent(true).setOnActionMethodID(scriptMethod.getID());
  }
 else {
    getBaseComponent(true).setOnActionMethodID(0);
  }
}
Program: 143727
Project: 143727
Buggy source:
public String getDataProviderID(){
  if (dataprovider_id == null) {
    dataprovider_id=Utils.generateNormalizedName(plainSQLName);
    if (Ident.checkIfKeyword(dataprovider_id)) {
      dataprovider_id=RESERVED_NAME_PREFIX + dataprovider_id;
    }
  }
  return dataprovider_id;
}

Fixed version (ground truth):
public String getDataProviderID(){
  if (dataprovider_id == null) {
    dataprovider_id=Utils.generateNormalizedNonReservedName(plainSQLName);
  }
  return dataprovider_id;
}
Program: 143729
Project: 143729
Buggy source:
public WebDataHtmlView(IApplication application,AbstractRuntimeTextEditor<IFieldComponent,JEditorPane> scriptable,String id){
  super(application,scriptable,id);
  setEscapeModelStrings(false);
}

Fixed version (ground truth):
public WebDataHtmlView(IApplication application,AbstractRuntimeTextEditor<IFieldComponent,JEditorPane> scriptable,String id){
  super(application,scriptable,id);
  setHorizontalAlignment(SwingConstants.LEFT);
  setEscapeModelStrings(false);
}
Program: 143730
Project: 143730
Buggy source:
public Insets getMargin(AttributeSet a){
  if (hasMargin(a)) {
    float top=getLength(a.getAttribute(CSS.Attribute.MARGIN_TOP));
    float bottom=getLength(a.getAttribute(CSS.Attribute.MARGIN_BOTTOM));
    float left=getLength(a.getAttribute(CSS.Attribute.MARGIN_LEFT));
    float right=getLength(a.getAttribute(CSS.Attribute.MARGIN_RIGHT));
    return new Insets((int)top,(int)left,(int)bottom,(int)right);
  }
  return null;
}

Fixed version (ground truth):
public Insets getMargin(AttributeSet a){
  if (hasMargin(a)) {
    float top=getLength(a.getAttribute(CSS.Attribute.MARGIN_TOP));
    float bottom=getLength(a.getAttribute(CSS.Attribute.MARGIN_BOTTOM));
    float left=getLength(a.getAttribute(CSS.Attribute.MARGIN_LEFT));
    float right=getLength(a.getAttribute(CSS.Attribute.MARGIN_RIGHT));
    return new Insets(top < 0 ? 0 : (int)top,left < 0 ? 0 : (int)left,bottom < 0 ? 0 : (int)bottom,right < 0 ? 0 : (int)right);
  }
  return null;
}
Program: 143731
Project: 143731
Buggy source:
public DataChoice(IApplication app,AbstractRuntimeScrollableValuelistComponent<IFieldComponent,JComponent> scriptable,IValueList vl,boolean isRadioList){
  super();
  application=app;
  this.vl=vl;
  this.isRadioList=isRadioList;
  list=new ComboModelListModelWrapper(vl,true);
  enclosedComponent=new JNavigableEditList();
  eventExecutor=new EventExecutor(this,enclosedComponent);
  enclosedComponent.addKeyListener(eventExecutor);
  enclosedComponent.setModel(list);
  if (isRadioList) {
    enclosedComponent.setCellRenderer(new NavigableCellRenderer(new RadioCell()));
    enclosedComponent.setCellEditor(new NavigableCellEditor(new RadioCell()));
    list.setMultiValueSelect(false);
  }
 else {
    enclosedComponent.setCellRenderer(new NavigableCellRenderer(new CheckBoxCell()));
    enclosedComponent.setCellEditor(new NavigableCellEditor(new CheckBoxCell()));
    list.setMultiValueSelect(true);
  }
  this.scriptable=scriptable;
  scriptable.setField(enclosedComponent);
  scriptable.setList(list);
  getViewport().setView(enclosedComponent);
}

Fixed version (ground truth):
public DataChoice(IApplication app,AbstractRuntimeScrollableValuelistComponent<IFieldComponent,JComponent> scriptable,IValueList vl,boolean isRadioList){
  super();
  setHorizontalAlignment(SwingConstants.LEFT);
  setBorder(null);
  application=app;
  this.vl=vl;
  this.isRadioList=isRadioList;
  list=new ComboModelListModelWrapper(vl,true);
  enclosedComponent=new JNavigableEditList();
  eventExecutor=new EventExecutor(this,enclosedComponent);
  enclosedComponent.addKeyListener(eventExecutor);
  enclosedComponent.setModel(list);
  if (isRadioList) {
    enclosedComponent.setCellRenderer(new NavigableCellRenderer(new RadioCell()));
    enclosedComponent.setCellEditor(new NavigableCellEditor(new RadioCell()));
    list.setMultiValueSelect(false);
  }
 else {
    enclosedComponent.setCellRenderer(new NavigableCellRenderer(new CheckBoxCell()));
    enclosedComponent.setCellEditor(new NavigableCellEditor(new CheckBoxCell()));
    list.setMultiValueSelect(true);
  }
  this.scriptable=scriptable;
  scriptable.setField(enclosedComponent);
  scriptable.setList(list);
  getViewport().setView(enclosedComponent);
}
Program: 143733
Project: 143733
Buggy source:
public boolean isDeprecated(){
  return isDeprecated;
}

Fixed version (ground truth):
public boolean isDeprecated(){
  return deprecatedMoveContentID != 0;
}
Program: 143734
Project: 143734
Buggy source:
public void flagAsDeprecated(){
  isDeprecated=true;
}

Fixed version (ground truth):
public void flagAsDeprecated(int moveContentID){
  this.deprecatedMoveContentID=moveContentID;
}
Program: 143736
Project: 143736
Buggy source:
public Enumeration<Applet> getApplets(){
  return ((Hashtable<String,Applet>)applets).elements();
}

Fixed version (ground truth):
public Enumeration<Applet> getApplets(){
  return Collections.enumeration(applets.values());
}
Program: 143740
Project: 143740
Buggy source:
/** 
 * @see com.servoy.j2db.dataprocessing.IDisplayRelatedData#setFoundSet(com.servoy.j2db.dataprocessing.IRecordInternal,com.servoy.j2db.dataprocessing.IFoundSetInternal,boolean)
 */
public void setRecord(IRecordInternal parentState,boolean stopEditing){
  if (this.parentState == parentState)   return;
  this.parentState=parentState;
  if (list instanceof LookupValueList || list instanceof GlobalMethodValueList) {
    int index=getDataProviderID().lastIndexOf('.');
    if (index == -1 || parentState == null) {
      list.fill(parentState);
    }
 else {
      IFoundSetInternal relatedFoundSet=parentState.getRelatedFoundSet(getDataProviderID().substring(0,index));
      if (relatedFoundSet == null || relatedFoundSet.getSize() == 0) {
        list.fill(null);
      }
 else {
        IRecordInternal relatedRecord=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
        list.fill(relatedRecord);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see com.servoy.j2db.dataprocessing.IDisplayRelatedData#setFoundSet(com.servoy.j2db.dataprocessing.IRecordInternal,com.servoy.j2db.dataprocessing.IFoundSetInternal,boolean)
 */
public void setRecord(IRecordInternal parentState,boolean stopEditing){
  if (this.parentState == parentState)   return;
  this.parentState=parentState;
  if (list instanceof LookupValueList || list instanceof GlobalMethodValueList) {
    int index=-1;
    if (!getDataProviderID().startsWith(ScriptVariable.GLOBAL_DOT_PREFIX)) {
      index=getDataProviderID().lastIndexOf('.');
    }
    if (index == -1 || parentState == null) {
      list.fill(parentState);
    }
 else {
      IFoundSetInternal relatedFoundSet=parentState.getRelatedFoundSet(getDataProviderID().substring(0,index));
      if (relatedFoundSet == null || relatedFoundSet.getSize() == 0) {
        list.fill(null);
      }
 else {
        IRecordInternal relatedRecord=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
        list.fill(relatedRecord);
      }
    }
  }
}
Program: 143742
Project: 143742
Buggy source:
/** 
 * @param dataProviderID the dataProviderID to set
 */
public void setDataProviderID(String dataProviderID){
  int index=dataProviderID == null ? -1 : dataProviderID.lastIndexOf('.');
  if (index != -1) {
    this.relatedFoundsetLookup=dataProviderID.substring(0,index);
  }
 else {
    this.relatedFoundsetLookup=null;
  }
}

Fixed version (ground truth):
/** 
 * @param dataProviderID the dataProviderID to set
 */
public void setDataProviderID(String dataProviderID){
  int index=(dataProviderID == null || dataProviderID.startsWith(ScriptVariable.GLOBAL_DOT_PREFIX)) ? -1 : dataProviderID.lastIndexOf('.');
  if (index != -1) {
    this.relatedFoundsetLookup=dataProviderID.substring(0,index);
  }
 else {
    this.relatedFoundsetLookup=null;
  }
}
Program: 143743
Project: 143743
Buggy source:
public void dependencyChanged(IRecordInternal record){
  this.parentState=record;
  if (list instanceof LookupValueList || list instanceof GlobalMethodValueList) {
    Object o=getValue();
    int index=dataProviderID.lastIndexOf('.');
    if (index == -1 || parentState == null) {
      list.fill(parentState);
    }
 else {
      IFoundSetInternal relatedFoundSet=parentState.getRelatedFoundSet(dataProviderID.substring(0,index));
      if (relatedFoundSet == null || relatedFoundSet.getSize() == 0) {
        list.fill(null);
      }
 else {
        IRecordInternal relatedRecord=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
        list.fill(relatedRecord);
      }
    }
    if (editProvider != null) {
      editProvider.setAdjusting(true);
    }
    try {
      setValue(null);
      setValue(o);
    }
  finally {
      if (editProvider != null) {
        editProvider.setAdjusting(false);
      }
    }
  }
}

Fixed version (ground truth):
public void dependencyChanged(IRecordInternal record){
  this.parentState=record;
  if (list instanceof LookupValueList || list instanceof GlobalMethodValueList) {
    Object o=getValue();
    int index=-1;
    if (!dataProviderID.startsWith(ScriptVariable.GLOBAL_DOT_PREFIX)) {
      index=dataProviderID.lastIndexOf('.');
    }
    if (index == -1 || parentState == null) {
      list.fill(parentState);
    }
 else {
      IFoundSetInternal relatedFoundSet=parentState.getRelatedFoundSet(dataProviderID.substring(0,index));
      if (relatedFoundSet == null || relatedFoundSet.getSize() == 0) {
        list.fill(null);
      }
 else {
        IRecordInternal relatedRecord=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
        list.fill(relatedRecord);
      }
    }
    if (editProvider != null) {
      editProvider.setAdjusting(true);
    }
    try {
      setValue(null);
      setValue(o);
    }
  finally {
      if (editProvider != null) {
        editProvider.setAdjusting(false);
      }
    }
  }
}
Program: 143745
Project: 143745
Buggy source:
@Override protected void onBeforeRender(){
  super.onBeforeRender();
  if (eventExecutor != null) {
    boolean isFocused=false;
    IMainContainer currentContainer=((FormManager)application.getFormManager()).getCurrentContainer();
    if (currentContainer instanceof MainPage) {
      isFocused=this.equals(((MainPage)currentContainer).getFocusedComponent());
    }
    eventExecutor.fireOnRender(this,isFocused);
  }
}

Fixed version (ground truth):
@Override protected void onBeforeRender(){
  super.onBeforeRender();
  if (!isIgnoreOnRender && eventExecutor != null) {
    boolean isFocused=false;
    IMainContainer currentContainer=((FormManager)application.getFormManager()).getCurrentContainer();
    if (currentContainer instanceof MainPage) {
      isFocused=this.equals(((MainPage)currentContainer).getFocusedComponent());
    }
    eventExecutor.fireOnRender(this,isFocused);
  }
}
Program: 143746
Project: 143746
Buggy source:
public DataCalendar(IApplication app){
  application=app;
  setLayout(new BorderLayout());
  enclosedComponent=new DataField(app){
    @Override public void setFormat(    int dataType,    String format){
      if (format == null || format.length() == 0) {
        format=new SimpleDateFormat().toPattern();
      }
      super.setFormat(Types.DATE,format);
    }
  }
;
  enclosedComponent.setBorder(BorderFactory.createEmptyBorder());
  enclosedComponent.setOpaque(false);
  add(enclosedComponent,BorderLayout.CENTER);
  showCal=new AbstractScriptButton(app);
  showCal.setText("String_Node_Str");
  showCal.addActionListener(this);
  showCal.setPreferredSize(new Dimension(20,15));
  showCal.setRequestFocusEnabled(false);
  add(showCal,BorderLayout.EAST);
  setOpaque(true);
  setBackground(Color.white);
  setBorder(BorderFactory.createEtchedBorder());
}

Fixed version (ground truth):
public DataCalendar(IApplication app){
  application=app;
  setLayout(new BorderLayout());
  enclosedComponent=new DataField(app){
    @Override public void setFormat(    int dataType,    String format){
      if (format == null || format.length() == 0) {
        format=new SimpleDateFormat().toPattern();
      }
      super.setFormat(Types.DATE,format);
    }
  }
;
  enclosedComponent.setIgnoreOnRender(true);
  enclosedComponent.setBorder(BorderFactory.createEmptyBorder());
  enclosedComponent.setOpaque(false);
  add(enclosedComponent,BorderLayout.CENTER);
  showCal=new AbstractScriptButton(app);
  showCal.setText("String_Node_Str");
  showCal.addActionListener(this);
  showCal.setPreferredSize(new Dimension(20,15));
  showCal.setRequestFocusEnabled(false);
  add(showCal,BorderLayout.EAST);
  setOpaque(true);
  setBackground(Color.white);
  setBorder(BorderFactory.createEtchedBorder());
}
Program: 143747
Project: 143747
Buggy source:
@Override protected void paintComponent(Graphics g){
  if (eventExecutor != null)   eventExecutor.fireOnRender(this,hasFocus());
  super.paintComponent(g);
}

Fixed version (ground truth):
@Override protected void paintComponent(Graphics g){
  if (!isIgnoreOnRender && eventExecutor != null)   eventExecutor.fireOnRender(this,hasFocus());
  super.paintComponent(g);
}
Program: 143748
Project: 143748
Buggy source:
@Override public void repaint(){
  if (eventExecutor != null && eventExecutor.isOnRenderRunningOnComponentPaint())   return;
  super.repaint();
}

Fixed version (ground truth):
@Override public void repaint(){
  if (!isIgnoreOnRender && eventExecutor != null && eventExecutor.isOnRenderRunningOnComponentPaint())   return;
  super.repaint();
}
Program: 143749
Project: 143749
Buggy source:
public JSDNDEvent createScriptEvent(EventType type,IComponent dragSource,Point xy){
  JSDNDEvent jsEvent=new JSDNDEvent();
  jsEvent.setType(type);
  jsEvent.setFormName(getDragFormName());
  if (dragSource instanceof IDataRenderer) {
    IDataRenderer dr=(IDataRenderer)dragSource;
    FormController fct=dr.getDataAdapterList().getFormController();
    jsEvent.setSource(fct.getFormScope());
    jsEvent.setElementName(fct.getName());
  }
 else {
    jsEvent.setSource(dragSource);
    if (dragSource != null) {
      if (dragSource instanceof Component) {
        WebCellBasedViewListItem listItem=((Component)dragSource).findParent(WebCellBasedViewListItem.class);
        if (listItem != null) {
          IRecordInternal dragRecord=listItem.getModelObject();
          if (dragRecord instanceof Record)           jsEvent.setRecord((Record)dragRecord);
        }
      }
      String dragSourceName=dragSource.getName();
      if (dragSourceName == null)       dragSourceName=dragSource.getId();
      jsEvent.setElementName(dragSourceName);
    }
  }
  if (xy != null)   jsEvent.setLocation(xy);
  return jsEvent;
}

Fixed version (ground truth):
public JSDNDEvent createScriptEvent(EventType type,IComponent dragSource,Point xy){
  JSDNDEvent jsEvent=new JSDNDEvent();
  jsEvent.setType(type);
  jsEvent.setFormName(getDragFormName());
  if (dragSource instanceof IDataRenderer) {
    IDataRenderer dr=(IDataRenderer)dragSource;
    FormController fct=dr.getDataAdapterList().getFormController();
    jsEvent.setSource(fct.getFormScope());
  }
 else {
    jsEvent.setSource(dragSource);
    if (dragSource != null) {
      if (dragSource instanceof Component) {
        WebCellBasedViewListItem listItem=((Component)dragSource).findParent(WebCellBasedViewListItem.class);
        if (listItem != null) {
          IRecordInternal dragRecord=listItem.getModelObject();
          if (dragRecord instanceof Record)           jsEvent.setRecord((Record)dragRecord);
        }
      }
      String dragSourceName=dragSource.getName();
      if (dragSourceName == null)       dragSourceName=dragSource.getId();
      jsEvent.setElementName(dragSourceName);
    }
  }
  if (xy != null)   jsEvent.setLocation(xy);
  return jsEvent;
}
Program: 143750
Project: 143750
Buggy source:
@Override protected void onDragEnd(String id,int x,int y,AjaxRequestTarget ajaxRequestTarget){
  JSDNDEvent event=WebCellBasedView.this.createScriptEvent(EventType.onDragEnd,getDragComponent(),null);
  event.setData(getDragData());
  event.setDataMimeType(getDragDataMimeType());
  event.setDragResult(getDropResult() ? getCurrentDragOperation() : DRAGNDROP.NONE);
  WebCellBasedView.this.onDragEnd(event);
  super.onDragEnd(id,x,y,ajaxRequestTarget);
}

Fixed version (ground truth):
@Override protected void onDragEnd(String id,int x,int y,AjaxRequestTarget ajaxRequestTarget){
  if (getCurrentDragOperation() != DRAGNDROP.NONE) {
    JSDNDEvent event=WebCellBasedView.this.createScriptEvent(EventType.onDragEnd,getDragComponent(),null);
    event.setData(getDragData());
    event.setDataMimeType(getDragDataMimeType());
    event.setDragResult(getDropResult() ? getCurrentDragOperation() : DRAGNDROP.NONE);
    WebCellBasedView.this.onDragEnd(event);
  }
  super.onDragEnd(id,x,y,ajaxRequestTarget);
}
Program: 143752
Project: 143752
Buggy source:
@Override protected void onDragEnd(String id,int x,int y,AjaxRequestTarget ajaxRequestTarget){
  JSDNDEvent event=WebDataRenderer.this.createScriptEvent(EventType.onDragEnd,getDragComponent(),null);
  event.setData(getDragData());
  event.setDataMimeType(getDragDataMimeType());
  event.setDragResult(getDropResult() ? getCurrentDragOperation() : DRAGNDROP.NONE);
  WebDataRenderer.this.onDragEnd(event);
  super.onDragEnd(id,x,y,ajaxRequestTarget);
}

Fixed version (ground truth):
@Override protected void onDragEnd(String id,int x,int y,AjaxRequestTarget ajaxRequestTarget){
  if (getCurrentDragOperation() != DRAGNDROP.NONE) {
    JSDNDEvent event=WebDataRenderer.this.createScriptEvent(EventType.onDragEnd,getDragComponent(),null);
    event.setData(getDragData());
    event.setDataMimeType(getDragDataMimeType());
    event.setDragResult(getDropResult() ? getCurrentDragOperation() : DRAGNDROP.NONE);
    WebDataRenderer.this.onDragEnd(event);
  }
  super.onDragEnd(id,x,y,ajaxRequestTarget);
}
Program: 143754
Project: 143754
Buggy source:
private JSDNDEvent createScriptEvent(EventType type,IComponent dragSource,Point xy){
  JSDNDEvent jsEvent=new JSDNDEvent();
  jsEvent.setType(type);
  jsEvent.setFormName(getDragFormName());
  IRecordInternal dragRecord=getDragRecord(xy);
  if (dragRecord instanceof Record)   jsEvent.setRecord((Record)dragRecord);
  if (dragSource instanceof IDataRenderer) {
    IDataRenderer dr=(IDataRenderer)dragSource;
    FormController fct=dr.getDataAdapterList().getFormController();
    jsEvent.setSource(fct.getFormScope());
    jsEvent.setElementName(fct.getName());
  }
 else {
    jsEvent.setSource(dragSource);
    if (dragSource != null) {
      String dragSourceName=dragSource.getName();
      if (dragSourceName == null)       dragSourceName=dragSource.getId();
      jsEvent.setElementName(dragSourceName);
    }
  }
  if (xy != null)   jsEvent.setLocation(xy);
  return jsEvent;
}

Fixed version (ground truth):
private JSDNDEvent createScriptEvent(EventType type,IComponent dragSource,Point xy){
  JSDNDEvent jsEvent=new JSDNDEvent();
  jsEvent.setType(type);
  jsEvent.setFormName(getDragFormName());
  IRecordInternal dragRecord=getDragRecord(xy);
  if (dragRecord instanceof Record)   jsEvent.setRecord((Record)dragRecord);
  if (dragSource instanceof IDataRenderer) {
    IDataRenderer dr=(IDataRenderer)dragSource;
    FormController fct=dr.getDataAdapterList().getFormController();
    jsEvent.setSource(fct.getFormScope());
  }
 else {
    jsEvent.setSource(dragSource);
    if (dragSource != null) {
      String dragSourceName=dragSource.getName();
      if (dragSourceName == null)       dragSourceName=dragSource.getId();
      jsEvent.setElementName(dragSourceName);
    }
  }
  if (xy != null)   jsEvent.setLocation(xy);
  return jsEvent;
}
Program: 143757
Project: 143757
Buggy source:
/** 
 * @see javax.swing.TransferHandler#exportDone(javax.swing.JComponent,java.awt.datatransfer.Transferable,int)
 */
@Override protected void exportDone(JComponent source,Transferable data,int action){
  super.exportDone(source,data,action);
  JComponent cmp=getDragComponent(source);
  if (cmp instanceof ICompositeDragNDrop) {
    ICompositeDragNDrop ddComp=(ICompositeDragNDrop)cmp;
    JSDNDEvent onDragEndEvent=createScriptEvent(EventType.onDragEnd,ddComp,inputEvent);
    int dragResult=action == COPY ? DRAGNDROP.COPY : action == MOVE ? DRAGNDROP.MOVE : DRAGNDROP.NONE;
    onDragEndEvent.setDragResult(dragResult);
    try {
      DataFlavor[] transferableFlavors=data.getTransferDataFlavors();
      if (transferableFlavors.length > 0) {
        onDragEndEvent.setDataMimeType(transferableFlavors[0].getMimeType());
        if (transferableFlavors[0].isRepresentationClassInputStream() || transferableFlavors[0].isRepresentationClassReader())         onDragEndEvent.setData(null);
 else         onDragEndEvent.setData(data.getTransferData(transferableFlavors[0]));
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
    ((ICompositeDragNDrop)source).onDragEnd(onDragEndEvent);
  }
  customTransferable=null;
  inputEvent=null;
}

Fixed version (ground truth):
/** 
 * @see javax.swing.TransferHandler#exportDone(javax.swing.JComponent,java.awt.datatransfer.Transferable,int)
 */
@Override protected void exportDone(JComponent source,Transferable data,int action){
  super.exportDone(source,data,action);
  JComponent cmp=getDragComponent(source);
  if (cmp instanceof ICompositeDragNDrop && data != null) {
    ICompositeDragNDrop ddComp=(ICompositeDragNDrop)cmp;
    JSDNDEvent onDragEndEvent=createScriptEvent(EventType.onDragEnd,ddComp,inputEvent);
    int dragResult=action == COPY ? DRAGNDROP.COPY : action == MOVE ? DRAGNDROP.MOVE : DRAGNDROP.NONE;
    onDragEndEvent.setDragResult(dragResult);
    try {
      DataFlavor[] transferableFlavors=data.getTransferDataFlavors();
      if (transferableFlavors.length > 0) {
        onDragEndEvent.setDataMimeType(transferableFlavors[0].getMimeType());
        if (transferableFlavors[0].isRepresentationClassInputStream() || transferableFlavors[0].isRepresentationClassReader())         onDragEndEvent.setData(null);
 else         onDragEndEvent.setData(data.getTransferData(transferableFlavors[0]));
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
    ((ICompositeDragNDrop)source).onDragEnd(onDragEndEvent);
  }
  customTransferable=null;
  inputEvent=null;
}
Program: 143758
Project: 143758
Buggy source:
@Override protected JSDNDEvent createScriptEvent(EventType type,ICompositeDragNDrop ddComponent,Object event){
  JSDNDEvent jsEvent=super.createScriptEvent(type,ddComponent,event);
  if (ddComponent instanceof IFormDataDragNDrop) {
    IFormDataDragNDrop formDataDDComponent=(IFormDataDragNDrop)ddComponent;
    jsEvent.setFormName(formDataDDComponent.getDragFormName());
    Point location=getEventXY(event);
    if (location != null) {
      Object dragSource=ddComponent.getDragSource(location);
      if (dragSource instanceof IDataRenderer) {
        IDataRenderer dr=(IDataRenderer)dragSource;
        FormController fc=dr.getDataAdapterList().getFormController();
        jsEvent.setSource(fc.getFormScope());
        jsEvent.setElementName(fc.getName());
      }
 else       if (dragSource instanceof IComponent) {
        jsEvent.setSource(dragSource);
        if (dragSource != null) {
          String name=((IComponent)dragSource).getName();
          if (name != null && name.startsWith(ComponentFactory.WEB_ID_PREFIX)) {
            name=null;
          }
          jsEvent.setElementName(name);
        }
      }
      IRecordInternal dragRecord=formDataDDComponent.getDragRecord(location);
      if (dragRecord instanceof Record)       jsEvent.setRecord((Record)dragRecord);
    }
  }
  return jsEvent;
}

Fixed version (ground truth):
@Override protected JSDNDEvent createScriptEvent(EventType type,ICompositeDragNDrop ddComponent,Object event){
  JSDNDEvent jsEvent=super.createScriptEvent(type,ddComponent,event);
  if (ddComponent instanceof IFormDataDragNDrop) {
    IFormDataDragNDrop formDataDDComponent=(IFormDataDragNDrop)ddComponent;
    jsEvent.setFormName(formDataDDComponent.getDragFormName());
    Point location=getEventXY(event);
    if (location != null) {
      Object dragSource=ddComponent.getDragSource(location);
      if (dragSource instanceof IDataRenderer) {
        IDataRenderer dr=(IDataRenderer)dragSource;
        FormController fc=dr.getDataAdapterList().getFormController();
        jsEvent.setSource(fc.getFormScope());
      }
 else       if (dragSource instanceof IComponent) {
        jsEvent.setSource(dragSource);
        if (dragSource != null) {
          String name=((IComponent)dragSource).getName();
          if (name != null && name.startsWith(ComponentFactory.WEB_ID_PREFIX)) {
            name=null;
          }
          jsEvent.setElementName(name);
        }
      }
      IRecordInternal dragRecord=formDataDDComponent.getDragRecord(location);
      if (dragRecord instanceof Record)       jsEvent.setRecord((Record)dragRecord);
    }
  }
  return jsEvent;
}
Program: 143759
Project: 143759
Buggy source:
/** 
 * The method that is triggered when (non Design Mode) dragging occurs.
 * @templatedescription Handle start of a drag, it can set the data that should be transfered and should return a constant which dragndrop mode/modes is/are supported Should return a DRAGNDROP constant or a combination of 2 constants: DRAGNDROP.MOVE if only a move can happen, DRAGNDROP.COPY if only a copy can happen, DRAGNDROP.MOVE|DRAGNDROP.COPY if a move or copy can happen, DRAGNDROP.NONE if nothing is supported (drag should start).
 * @templatename onDrag
 * @templatetype Number
 * @templateparam JSDNDEvent event the event that triggered the action
 * @templateaddtodo
 * @templatecode return DRAGNDROP.NONE
 */
public int getOnDragMethodID(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_ONDRAGMETHODID).intValue();
}

Fixed version (ground truth):
/** 
 * The method that is triggered when (non Design Mode) dragging occurs.
 * @templatedescription Handle start of a drag, it can set the data that should be transfered and should return a constant which dragndrop mode/modes is/are supported Should return a DRAGNDROP constant or a combination of 2 constants: DRAGNDROP.MOVE if only a move can happen, DRAGNDROP.COPY if only a copy can happen, DRAGNDROP.MOVE|DRAGNDROP.COPY if a move or copy can happen, DRAGNDROP.NONE if nothing is supported (drag should not start).
 * @templatename onDrag
 * @templatetype Number
 * @templateparam JSDNDEvent event the event that triggered the action
 * @templateaddtodo
 * @templatecode return DRAGNDROP.NONE
 */
public int getOnDragMethodID(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_ONDRAGMETHODID).intValue();
}
Program: 143763
Project: 143763
Buggy source:
public static boolean needsWrapperDivForAnchoring(Field field){
  return (field.getDisplayType() == Field.PASSWORD) || (field.getDisplayType() == Field.TEXT_AREA) || (field.getDisplayType() == Field.COMBOBOX)|| (field.getDisplayType() == Field.TYPE_AHEAD)|| (field.getDisplayType() == Field.TEXT_FIELD);
}

Fixed version (ground truth):
public static boolean needsWrapperDivForAnchoring(Field field){
  return (field.getDisplayType() == Field.PASSWORD) || (field.getDisplayType() == Field.TEXT_AREA) || (field.getDisplayType() == Field.COMBOBOX)|| (field.getDisplayType() == Field.TYPE_AHEAD)|| (field.getDisplayType() == Field.TEXT_FIELD)|| (field.getDisplayType() == Field.HTML_AREA && field.getEditable());
}
Program: 143764
Project: 143764
Buggy source:
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  replaceComponentTagBody(markupStream,openTag,instrumentBodyText(bodyText,halign,valign));
}

Fixed version (ground truth):
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  replaceComponentTagBody(markupStream,openTag,instrumentBodyText(bodyText,halign,valign,false,false));
}