nus-yam/ex-repair huggingface dataset:
Program: 143646
Project: 143646
Buggy source:
protected void processInstalledExtensions(){
  allInstalledLibs=new HashMap<String,List<LibDependencyDeclaration>>();
  allInstalledExtensions=new HashMap<String,String>();
  if (installedExtensions == null)   installedExtensions=new DependencyMetadata[0];
  for (  DependencyMetadata extension : installedExtensions) {
    allInstalledExtensions.put(extension.id,extension.version);
    if (extension.libDependencies != null) {
      addToLibsMap(extension.libDependencies,allInstalledLibs);
    }
  }
}

Fixed version (ground truth):
protected void processInstalledExtensions(){
  allInstalledLibs=new HashMap<String,List<LibDependencyDeclaration>>();
  allInstalledExtensions=new HashMap<String,DependencyMetadata>();
  if (installedExtensions == null)   installedExtensions=new DependencyMetadata[0];
  for (  DependencyMetadata extension : installedExtensions) {
    allInstalledExtensions.put(extension.id,extension);
    if (extension.libDependencies != null) {
      addToLibsMap(extension.libDependencies,allInstalledLibs);
    }
  }
}
Program: 143648
Project: 143648
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#max()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.max(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate max(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.MAX);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#max()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.max(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate max(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.MAX);
}
Program: 143649
Project: 143649
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#count()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate count(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.COUNT);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#count()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate count(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.COUNT);
}
Program: 143650
Project: 143650
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#sum()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.sum(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate sum(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.SUM);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#sum()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.sum(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate sum(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.SUM);
}
Program: 143651
Project: 143651
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#asc()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.asc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSort asc(){
  return new QBSort(getRoot(),this,true);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#asc()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.asc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSort asc(){
  return new QBSort(getRoot(),this,true);
}
Program: 143652
Project: 143652
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#avg()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.avg.eq(1)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate avg(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.AVG);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#avg()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.avg.eq(1)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate avg(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.AVG);
}
Program: 143653
Project: 143653
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#min()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.min(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate min(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.MIN);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#min()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.min(10)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBAggregate min(){
  return new QBAggregate(getRoot(),getParent(),queryColumn,QueryAggregate.MIN);
}
Program: 143654
Project: 143654
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#desc()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.desc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSort desc(){
  return new QBSort(getRoot(),this,false);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderColumn#desc()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.desc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSort desc(){
  return new QBSort(getRoot(),this,false);
}
Program: 143655
Project: 143655
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderGroupby#add(IQueryBuilderColumn)
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.add(query.columns.orderid) // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
public QBGroupBy js_add(QBColumn column) throws RepositoryException {
  return add(column);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderGroupby#add(IQueryBuilderColumn)
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.add(query.columns.orderid) // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
public QBGroupBy js_add(QBColumn column) throws RepositoryException {
  return add(column);
}
Program: 143656
Project: 143656
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderGroupby#addPk()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSFunction public QBGroupBy addPk() throws RepositoryException {
  Iterator<String> rowIdentColumnNames=getParent().getTable().getRowIdentColumnNames();
  while (rowIdentColumnNames.hasNext()) {
    add(rowIdentColumnNames.next());
  }
  return this;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderGroupby#addPk()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSFunction public QBGroupBy addPk() throws RepositoryException {
  Iterator<String> rowIdentColumnNames=getParent().getTable().getRowIdentColumnNames();
  while (rowIdentColumnNames.hasNext()) {
    add(rowIdentColumnNames.next());
  }
  return this;
}
Program: 143657
Project: 143657
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderJoin#on()
 * @sample var query = databaseManager.createSelect('db:/example_data/person') var join1 = query.joins.add('db:/example_data/person') join1.on.add(query.columns.parent_person_id.eq(join1.columns.person_id)) var join2 = query.joins.add('db:/example_data/person') join2.on.add(join1.columns.parent_person_id.eq(join2.columns.person_id)) query.where.add(join2.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBLogicalCondition on(){
  if (on == null) {
    on=new QBLogicalCondition(getRoot(),this,join.getCondition());
  }
  return on;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderJoin#on()
 * @sample /** @type {QBSelect<db:/example_data/person>} *&#47; var query = databaseManager.createSelect('db:/example_data/person') /** @type {QBJoin<db:/example_data/person>} *&#47; var join1 = query.joins.add('db:/example_data/person') join1.on.add(query.columns.parent_person_id.eq(join1.columns.person_id)) /** @type {QBJoin<db:/example_data/person>} *&#47; var join2 = query.joins.add('db:/example_data/person') join2.on.add(join1.columns.parent_person_id.eq(join2.columns.person_id)) query.where.add(join2.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBLogicalCondition on(){
  if (on == null) {
    on=new QBLogicalCondition(getRoot(),this,join.getCondition());
  }
  return on;
}
Program: 143658
Project: 143658
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getParent()
 * @sample var query = databaseManager.createSelect('db:/example_data/person') query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBTableClause getParent(){
  return parent;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getParent()
 * @sample /** @type {QBSelect<db:/example_data/person>} *&#47; var query = databaseManager.createSelect('db:/example_data/person') query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBTableClause getParent(){
  return parent;
}
Program: 143659
Project: 143659
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getRoot()
 * @sample var subquery = databaseManager.createSelect('db:/example_data/order_details') var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query .or  .add(query.columns.order_id.not.isin([1, 2, 3])) .add(query.exists( subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root )) ) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSelect getRoot(){
  return root;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getRoot()
 * @sample /** @type {QBSelect<db:/example_data/order_details>} *&#47; var subquery = databaseManager.createSelect('db:/example_data/order_details') /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query .or  .add(query.columns.order_id.not.isin([1, 2, 3])) .add(query.exists( subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root )) ) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSelect getRoot(){
  return root;
}
Program: 143660
Project: 143660
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderLogicalCondition#add(IQueryBuilderCondition)
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query.columns.orderdate.isNull)
 */
public QBLogicalCondition js_add(QBCondition condition){
  return add(condition);
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderLogicalCondition#add(IQueryBuilderCondition)
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query.columns.orderdate.isNull)
 */
public QBLogicalCondition js_add(QBCondition condition){
  return add(condition);
}
Program: 143661
Project: 143661
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getParent()
 * @sample var query = databaseManager.createSelect('db:/example_data/person') query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBTableClause getParent(){
  return parent;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getParent()
 * @sample /** @type {QBSelect<db:/example_data/person>} *&#47; var query = databaseManager.createSelect('db:/example_data/person') query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john')) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBTableClause getParent(){
  return parent;
}
Program: 143662
Project: 143662
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getRoot()
 * @sample var subquery = databaseManager.createSelect('db:/example_data/order_details') var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query .or  .add(query.columns.order_id.not.isin([1, 2, 3])) .add(query.exists( subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root )) ) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSelect getRoot(){
  return root;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilderPart#getRoot()
 * @sample /** @type {QBSelect<db:/example_data/order_details>} *&#47; var subquery = databaseManager.createSelect('db:/example_data/order_details') /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query .or  .add(query.columns.order_id.not.isin([1, 2, 3])) .add(query.exists( subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root )) ) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSelect getRoot(){
  return root;
}
Program: 143663
Project: 143663
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#having()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)	 
 */
@JSReadonlyProperty public QBLogicalCondition having() throws RepositoryException {
  if (having == null) {
    ISQLCondition c=getQuery().getHaving();
    if (!(c instanceof AndOrCondition)) {
      getQuery().setHaving(null,c=AndCondition.and(c,new AndCondition()));
    }
    where=new QBLogicalCondition(this,this,(AndOrCondition)c);
  }
  return where;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#having()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)	 
 */
@JSReadonlyProperty public QBLogicalCondition having() throws RepositoryException {
  if (having == null) {
    ISQLCondition c=getQuery().getHaving();
    if (!(c instanceof AndOrCondition)) {
      getQuery().setHaving(null,c=AndCondition.and(c,new AndCondition()));
    }
    where=new QBLogicalCondition(this,this,(AndOrCondition)c);
  }
  return where;
}
Program: 143664
Project: 143664
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#sort()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.desc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSorts sort(){
  if (sort == null) {
    sort=new QBSorts(this);
  }
  return sort;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#sort()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.sort .add(query.joins.orders_to_order_details.columns.quantity.desc) .add(query.columns.companyid) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBSorts sort(){
  if (sort == null) {
    sort=new QBSorts(this);
  }
  return sort;
}
Program: 143665
Project: 143665
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#groupBy()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBGroupBy groupBy(){
  if (groupBy == null) {
    groupBy=new QBGroupBy(this);
  }
  return groupBy;
}

Fixed version (ground truth):
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#groupBy()
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries .root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0)) foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBGroupBy groupBy(){
  if (groupBy == null) {
    groupBy=new QBGroupBy(this);
  }
  return groupBy;
}
Program: 143666
Project: 143666
Buggy source:
/** 
 * @clonedesc com.servoy.j2db.querybuilder.IQueryBuilder#params()
 * @sample var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query.columns.contact_id.eq(query.getParameter('mycontactid'))) // load orders where contact_id = 100 query.params['mycontactid'] = 100 foundset.loadRecords(query) // load orders where contact_id = 200 query.params['mycontactid'] = 200 foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBParameters params(){
  if (params == null) {
    params=new QBParameters(getScriptableParent(),this);
  }
  return params;
}

Fixed version (ground truth):
/** 
 * Get the named parameters from a query.
 * @sample /** @type {QBSelect<db:/example_data/orders>} *&#47; var query = databaseManager.createSelect('db:/example_data/orders') query.where.add(query.columns.contact_id.eq(query.getParameter('mycontactid'))) // load orders where contact_id = 100 query.params['mycontactid'] = 100 foundset.loadRecords(query) // load orders where contact_id = 200 query.params['mycontactid'] = 200 foundset.loadRecords(query)
 */
@JSReadonlyProperty public QBParameters params(){
  if (params == null) {
    params=new QBParameters(getScriptableParent(),this);
  }
  return params;
}
Program: 143668
Project: 143668
Buggy source:
public void componentHidden(ComponentEvent e){
}

Fixed version (ground truth):
public void componentHidden(ComponentEvent e){
  Map<JComponent,int[][]> selection=selectionHandler.getSelection(DesignPanel.this);
  if (selection.containsKey(e.getComponent())) {
    selection.remove(e.getComponent());
    DesignPanel.this.repaint();
  }
}
Program: 143671
Project: 143671
Buggy source:
/** 
 * The type of display used by the field. Can be one of CALENDAR, CHECKS, COMBOBOX, HTML_AREA, IMAGE_MEDIA, PASSWORD, RADIOS, RTF_AREA, TEXT_AREA, TEXT_FIELD or TYPE_AHEAD.
 */
public int getDisplayType(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_DISPLAYTYPE).intValue();
}

Fixed version (ground truth):
/** 
 * The type of display used by the field. Can be one of CALENDAR, CHECKS, COMBOBOX, HTML_AREA, IMAGE_MEDIA, PASSWORD, RADIOS, RTF_AREA, TEXT_AREA, TEXT_FIELD, TYPE_AHEAD, LIST_BOX, MULTI_SELECTION_LIST_BOX or SPINNER.
 */
public int getDisplayType(){
  return getTypedProperty(StaticContentSpecLoader.PROPERTY_DISPLAYTYPE).intValue();
}
Program: 143673
Project: 143673
Buggy source:
public void giveMeFoundSet(IFoundSetListener l) throws ServoyException {
  IFoundSetInternal set=null;
  if (l.getDataSource() == null || inMemDataSources.get(l.getDataSource()) != null || l.wantSharedFoundSet()) {
    String wantedGlobalRelationName=l.getGlobalRelationNamedFoundset();
    if (wantedGlobalRelationName != null) {
      set=getGlobalRelatedFoundSet(wantedGlobalRelationName);
      if (set == null) {
        throw new RepositoryException("String_Node_Str" + wantedGlobalRelationName + "String_Node_Str");
      }
    }
 else {
      set=getSharedFoundSet(l.getDataSource(),l.getDefaultSortColumns());
    }
  }
 else {
    set=getSeparateFoundSet(l,l.getDefaultSortColumns());
  }
  l.newValue(new FoundSetEvent(set,FoundSetEvent.NEW_FOUNDSET,FoundSetEvent.CHANGE_UPDATE));
}

Fixed version (ground truth):
public void giveMeFoundSet(IFoundSetListener l) throws ServoyException {
  IFoundSetInternal set=null;
  if (l.getDataSource() == null || inMemDataSources.get(l.getDataSource()) != null || l.wantSharedFoundSet()) {
    String wantedGlobalRelationName=l.getGlobalRelationNamedFoundset();
    if (wantedGlobalRelationName != null) {
      set=getGlobalRelatedFoundSet(wantedGlobalRelationName);
      if (set == null || !Utils.stringSafeEquals(set.getDataSource(),l.getDataSource())) {
        throw new RepositoryException("String_Node_Str" + wantedGlobalRelationName + "String_Node_Str");
      }
    }
 else {
      set=getSharedFoundSet(l.getDataSource(),l.getDefaultSortColumns());
    }
  }
 else {
    set=getSeparateFoundSet(l,l.getDefaultSortColumns());
  }
  l.newValue(new FoundSetEvent(set,FoundSetEvent.NEW_FOUNDSET,FoundSetEvent.CHANGE_UPDATE));
}
Program: 143674
Project: 143674
Buggy source:
/** 
 * Get relations based on the table. When basedOnTable is null and isPrimaryTable is true only global relations are returned.
 * @param childs
 * @param basedOnTable
 * @param isPrimaryTable
 * @param sort
 * @param globals
 * @throws RepositoryException
 */
public static Iterator<Relation> getRelations(IRepository repository,List<IPersist> childs,ITable basedOnTable,boolean isPrimaryTable,boolean sort,boolean globals) throws RepositoryException {
  Iterator<Relation> retval=getRelations(childs,false);
  List<Relation> filtered=new ArrayList<Relation>();
  List<String> dataSources=getTableDataSources(repository,basedOnTable);
  if (dataSources == null)   dataSources=Collections.emptyList();
  while (retval.hasNext()) {
    Relation r=retval.next();
    if (isPrimaryTable) {
      if (r.isGlobal()) {
        if (globals)         filtered.add(r);
      }
 else       if (dataSources.contains(r.getPrimaryDataSource())) {
        filtered.add(r);
      }
    }
 else {
      if (dataSources.contains(r.getForeignDataSource())) {
        filtered.add(r);
      }
    }
  }
  if (sort) {
    Collections.sort(filtered,NameComparator.INSTANCE);
  }
  return filtered.iterator();
}

Fixed version (ground truth):
/** 
 * Get relations based on the table. When basedOnTable is null and isPrimaryTable is true only global relations are returned.
 * @param childs
 * @param basedOnTable
 * @param isPrimaryTable
 * @param sort
 * @param addGlobalsWhenPrimary
 * @throws RepositoryException
 */
public static Iterator<Relation> getRelations(IRepository repository,List<IPersist> childs,ITable basedOnTable,boolean isPrimaryTable,boolean sort,boolean addGlobalsWhenPrimary,boolean onlyGlobalsWhenForeign) throws RepositoryException {
  Iterator<Relation> retval=getRelations(childs,false);
  List<Relation> filtered=new ArrayList<Relation>();
  List<String> dataSources=getTableDataSources(repository,basedOnTable);
  if (dataSources == null)   dataSources=Collections.emptyList();
  while (retval.hasNext()) {
    Relation r=retval.next();
    if (isPrimaryTable) {
      if (r.isGlobal()) {
        if (addGlobalsWhenPrimary)         filtered.add(r);
      }
 else       if (dataSources.contains(r.getPrimaryDataSource())) {
        filtered.add(r);
      }
    }
 else {
      if (dataSources.contains(r.getForeignDataSource())) {
        if (!onlyGlobalsWhenForeign || r.isGlobal())         filtered.add(r);
      }
    }
  }
  if (sort) {
    Collections.sort(filtered,NameComparator.INSTANCE);
  }
  return filtered.iterator();
}
Program: 143675
Project: 143675
Buggy source:
/** 
 * @param propertyName
 * @param val
 */
private void setPropertyInternal(String propertyName,Object val){
  if (propertiesMap.containsKey(propertyName)) {
    if (!StaticContentSpecLoader.PROPERTY_NAME.getPropertyName().equals(propertyName)) {
      checkForChange(propertiesMap.get(propertyName),val);
    }
 else {
      checkForNameChange((String)propertiesMap.get(propertyName),(String)val);
    }
  }
 else {
    isChanged=true;
  }
  if (bufferPropertiesMap != null) {
    bufferPropertiesMap.put(propertyName,val);
  }
 else {
    if (!isOverrideElement()) {
      Element element=StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(),propertyName);
      if (element != null && Utils.equalObjects(val,element.getDefaultClassValue())) {
        propertiesMap.remove(propertyName);
        return;
      }
    }
    propertiesMap.put(propertyName,val);
  }
}

Fixed version (ground truth):
/** 
 * @param propertyName
 * @param val
 */
private void setPropertyInternal(String propertyName,Object val){
  if (propertiesMap.containsKey(propertyName)) {
    if (!StaticContentSpecLoader.PROPERTY_NAME.getPropertyName().equals(propertyName)) {
      checkForChange(propertiesMap.get(propertyName),val);
    }
 else {
      checkForNameChange((String)propertiesMap.get(propertyName),(String)val);
    }
  }
 else {
    isChanged=true;
  }
  if (bufferPropertiesMap != null) {
    bufferPropertiesMap.put(propertyName,val);
  }
 else {
    if (!hasProperty(StaticContentSpecLoader.PROPERTY_EXTENDSID.getPropertyName()) || Utils.equalObjects(getExtendsID(),StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(),StaticContentSpecLoader.PROPERTY_EXTENDSID.getPropertyName()).getDefaultClassValue())) {
      Element element=StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(),propertyName);
      if (element != null && Utils.equalObjects(val,element.getDefaultClassValue())) {
        propertiesMap.remove(propertyName);
        return;
      }
    }
    propertiesMap.put(propertyName,val);
  }
}
Program: 143676
Project: 143676
Buggy source:
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  replaceComponentTagBody(markupStream,openTag,instrumentBodyText(bodyText,halign,valign,false,margin,null,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",getImageDisplayURL(this),size == null ? 0 : size.height,true,designMode ? null : cursor,false));
}

Fixed version (ground truth):
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  Insets padding=null;
  boolean isEmptyBorder=false;
  if (border == null) {
    padding=margin;
  }
 else   if (border instanceof EmptyBorder) {
    isEmptyBorder=true;
    padding=border.getBorderInsets(null);
  }
 else   if (border instanceof CompoundBorder) {
    Border inside=((CompoundBorder)border).getInsideBorder();
    if (inside instanceof EmptyBorder) {
      isEmptyBorder=true;
      padding=inside.getBorderInsets(null);
    }
  }
 else   if (!(border instanceof TitledBorder) && !(border instanceof BevelBorder) && !(border instanceof EtchedBorder)) {
    padding=border.getBorderInsets(null);
  }
  replaceComponentTagBody(markupStream,openTag,instrumentBodyText(bodyText,halign,valign,false,padding,isEmptyBorder,null,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",getImageDisplayURL(this),size == null ? 0 : size.height,true,designMode ? null : cursor,false));
}
Program: 143678
Project: 143678
Buggy source:
@SuppressWarnings("String_Node_Str") protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  Insets m=null;
  if (border instanceof CompoundBorder) {
    Border inside=((CompoundBorder)border).getInsideBorder();
    if (inside instanceof EmptyBorder) {
      m=inside.getBorderInsets(null);
    }
  }
 else   if (!(border instanceof TitledBorder) && !(border instanceof BevelBorder) && !(border instanceof EtchedBorder)&& border != null) {
    m=border.getBorderInsets(null);
  }
  boolean hasHtml=hasHtml();
  String cssid=hasHtml ? getMarkupId() + "String_Node_Str" : null;
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtml,m,cssid,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,false));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  Insets m=null;
  boolean isEmptyBorder=false;
  if (border instanceof EmptyBorder) {
    isEmptyBorder=true;
    m=border.getBorderInsets(null);
  }
 else   if (border instanceof CompoundBorder) {
    Border inside=((CompoundBorder)border).getInsideBorder();
    if (inside instanceof EmptyBorder) {
      isEmptyBorder=true;
      m=inside.getBorderInsets(null);
    }
  }
 else   if (!(border instanceof TitledBorder) && !(border instanceof BevelBorder) && !(border instanceof EtchedBorder)&& border != null) {
    m=border.getBorderInsets(null);
  }
  boolean hasHtml=hasHtml();
  String cssid=hasHtml ? getMarkupId() + "String_Node_Str" : null;
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtml,m,isEmptyBorder,cssid,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,false));
}
Program: 143679
Project: 143679
Buggy source:
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  Insets padding=null;
  if (border == null) {
    padding=margin;
  }
 else   if (border instanceof CompoundBorder) {
    padding=((CompoundBorder)border).getInsideBorder().getBorderInsets(null);
  }
  boolean hasHtml=hasHtml();
  String cssid=getCSSId();
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtml,padding,cssid,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,isAnchored()));
}

Fixed version (ground truth):
protected void instrumentAndReplaceBody(MarkupStream markupStream,ComponentTag openTag,CharSequence bodyText){
  Insets padding=null;
  boolean isEmptyBorder=false;
  if (border == null) {
    padding=margin;
  }
 else   if (border instanceof EmptyBorder) {
    isEmptyBorder=true;
    padding=border.getBorderInsets(null);
  }
 else   if (border instanceof CompoundBorder) {
    Border inside=((CompoundBorder)border).getInsideBorder();
    if (inside instanceof EmptyBorder) {
      isEmptyBorder=true;
      padding=inside.getBorderInsets(null);
    }
  }
 else   if (!(border instanceof TitledBorder) && !(border instanceof BevelBorder) && !(border instanceof EtchedBorder)) {
    padding=border.getBorderInsets(null);
  }
  boolean hasHtml=hasHtml();
  String cssid=getCSSId();
  boolean designMode=false;
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    designMode=true;
  }
  replaceComponentTagBody(markupStream,openTag,WebBaseButton.instrumentBodyText(bodyText,halign,valign,hasHtml,padding,isEmptyBorder,cssid,(char)getDisplayedMnemonic(),getMarkupId() + "String_Node_Str",WebBaseButton.getImageDisplayURL(this),size.height,false,designMode ? null : cursor,isAnchored()));
}
Program: 143683
Project: 143683
Buggy source:
public void setWidth(int width){
  int borderWidth=0;
  Iterator<IPersist> it2=cellview.getAllObjects();
  while (it2.hasNext()) {
    IPersist element=it2.next();
    if (id.equals(ComponentFactory.getWebID(form,element))) {
      GraphicalComponent gc=(GraphicalComponent)view.labelsFor.get(((ISupportName)element).getName());
      if (gc != null) {
        TextualStyle styleObj=new TextualStyle();
        BorderAndPadding ins=TemplateGenerator.applyBaseComponentProperties(gc,view.fc.getForm(),styleObj,(Insets)TemplateGenerator.DEFAULT_LABEL_PADDING.clone(),null,application);
        if (ins.border != null)         borderWidth=ins.border.left + ins.border.right;
      }
    }
  }
  if (view.labelsFor.size() == 0)   borderWidth+=TemplateGenerator.NO_LABELFOR_DEFAULT_BORDER_WIDTH;
  final int clientWidth=width - TemplateGenerator.SORTABLE_HEADER_PADDING - borderWidth;
  this.width=clientWidth;
  StyleAppendingModifier styleModifier=new StyleAppendingModifier(new Model<String>(){
    @Override public String getObject(){
      return "String_Node_Str" + clientWidth + "String_Node_Str";
    }
  }
);
  add(styleModifier);
  headerColumnTable.add(styleModifier);
  labelResolver.setWidth(clientWidth - SortableCellViewHeader.ARROW_WIDTH);
  getStylePropertyChanges().setChanged();
}

Fixed version (ground truth):
public void setWidth(int width){
  int borderWidth=0;
  Iterator<IPersist> it2=cellview.getAllObjects();
  while (it2.hasNext()) {
    IPersist element=it2.next();
    if (id.equals(ComponentFactory.getWebID(form,element))) {
      GraphicalComponent gc=(GraphicalComponent)view.labelsFor.get(((ISupportName)element).getName());
      if (gc != null) {
        TextualStyle styleObj=new TextualStyle();
        BorderAndPadding ins=TemplateGenerator.applyBaseComponentProperties(gc,view.fc.getForm(),styleObj,(Insets)TemplateGenerator.DEFAULT_LABEL_PADDING.clone(),null,application);
        if (ins.border != null)         borderWidth=ins.border.left + ins.border.right;
      }
    }
  }
  int headerPadding=TemplateGenerator.SORTABLE_HEADER_PADDING;
  if (view.labelsFor.size() == 0) {
    int extraWidth=TemplateGenerator.NO_LABELFOR_DEFAULT_BORDER_WIDTH;
    String headerBorder=view.getHeaderBorder();
    if (headerBorder != null) {
      Properties properties=new Properties();
      Insets borderIns=ComponentFactoryHelper.createBorderCSSProperties(headerBorder,properties);
      extraWidth=borderIns.left + borderIns.right;
      headerPadding=0;
    }
    borderWidth+=extraWidth;
  }
  final int clientWidth=width - headerPadding - borderWidth;
  this.width=clientWidth;
  StyleAppendingModifier styleModifier=new StyleAppendingModifier(new Model<String>(){
    @Override public String getObject(){
      return "String_Node_Str" + clientWidth + "String_Node_Str";
    }
  }
);
  add(styleModifier);
  headerColumnTable.add(styleModifier);
  labelResolver.setWidth(clientWidth - SortableCellViewHeader.ARROW_WIDTH);
  getStylePropertyChanges().setChanged();
}
Program: 143687
Project: 143687
Buggy source:
private void applyStyleOnComponent(Component comp,Object bgColor,Object fgColor,Object compFont,Object compBorder){
  if (comp instanceof IScriptableProvider) {
    IScriptable s=((IScriptableProvider)comp).getScriptObject();
    if (s instanceof IRuntimeComponent) {
      IRuntimeComponent sbm=(IRuntimeComponent)s;
      String newBgColor=bgColor != null ? bgColor.toString() : null;
      sbm.setBgcolor(newBgColor);
      String newFgColor=fgColor != null ? fgColor.toString() : null;
      sbm.setFgcolor(newFgColor);
      String newCompFont=compFont != null ? compFont.toString() : null;
      sbm.setFont(newCompFont);
    }
  }
}

Fixed version (ground truth):
private void applyStyleOnComponent(Component comp,Object bgColor,Object fgColor,Object compFont,Object compBorder){
  if (comp instanceof IScriptableProvider) {
    IScriptable s=((IScriptableProvider)comp).getScriptObject();
    if (s instanceof IRuntimeComponent) {
      IRuntimeComponent sbm=(IRuntimeComponent)s;
      String newBgColor=bgColor != null ? bgColor.toString() : null;
      sbm.setBgcolor(newBgColor);
      String newFgColor=fgColor != null ? fgColor.toString() : null;
      sbm.setFgcolor(newFgColor);
      String newCompFont=compFont != null ? compFont.toString() : null;
      sbm.setFont(newCompFont);
      String newBorder=compBorder != null ? compBorder.toString() : null;
      if (newBorder != null) {
        sbm.setBorder(newBorder);
        sbm.setSize(sbm.getWidth(),sbm.getHeight());
      }
    }
  }
}
Program: 143689
Project: 143689
Buggy source:
public WebBaseSelectBox(final IApplication application,AbstractRuntimeField<IFieldComponent> scriptable,String id,String text){
  super(id);
  this.scriptable=scriptable;
  this.application=application;
  selector=getSelector("String_Node_Str" + id);
  boolean useAJAX=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str"));
  eventExecutor=new WebEventExecutor(selector,useAJAX);
  setOutputMarkupPlaceholderTag(true);
  add(selector);
  add(new Label("String_Node_Str" + id,"String_Node_Str"){
    @Override protected void onComponentTag(    ComponentTag tag){
      super.onComponentTag(tag);
      if (tag.getName().compareToIgnoreCase("String_Node_Str") == 0) {
        tag.put("String_Node_Str",selector.getMarkupId());
      }
    }
    @Override protected void onBeforeRender(){
      super.onBeforeRender();
      String txt=getDefaultModelObjectAsString();
      if (HtmlUtils.startsWithHtml(txt)) {
        txt=StripHTMLTagsConverter.convertBodyText(this,txt,application.getFlattenedSolution()).getBodyTxt().toString();
        setDefaultModelObject(txt);
      }
    }
  }
);
  setText(Text.processTags(text,null));
  selector.add(new FocusIfInvalidAttributeModifier(selector));
  add(StyleAttributeModifierModel.INSTANCE);
  add(TooltipAttributeModifier.INSTANCE);
}

Fixed version (ground truth):
public WebBaseSelectBox(final IApplication application,AbstractRuntimeField<IFieldComponent> scriptable,String id,String text){
  super(id);
  this.scriptable=scriptable;
  this.application=application;
  selector=getSelector("String_Node_Str" + id);
  boolean useAJAX=Utils.getAsBoolean(application.getRuntimeProperties().get("String_Node_Str"));
  eventExecutor=new WebEventExecutor(selector,useAJAX);
  setOutputMarkupPlaceholderTag(true);
  add(selector);
  Label selectLabel=new Label("String_Node_Str" + id,"String_Node_Str"){
    @Override protected void onComponentTag(    ComponentTag tag){
      super.onComponentTag(tag);
      if (tag.getName().compareToIgnoreCase("String_Node_Str") == 0) {
        tag.put("String_Node_Str",selector.getMarkupId());
      }
    }
    @Override protected void onBeforeRender(){
      super.onBeforeRender();
      String txt=getDefaultModelObjectAsString();
      if (HtmlUtils.startsWithHtml(txt)) {
        txt=StripHTMLTagsConverter.convertBodyText(this,txt,application.getFlattenedSolution()).getBodyTxt().toString();
        setDefaultModelObject(txt);
      }
    }
  }
;
  selectLabel.setOutputMarkupId(true);
  add(selectLabel);
  setText(Text.processTags(text,null));
  selector.add(new FocusIfInvalidAttributeModifier(selector));
  add(StyleAttributeModifierModel.INSTANCE);
  add(TooltipAttributeModifier.INSTANCE);
}
Program: 143690
Project: 143690
Buggy source:
/** 
 * @see wicket.Component#isEnabled()
 */
@Override public boolean isEnabled(){
  return WebDataCheckBox.this.isEnabled();
}

Fixed version (ground truth):
/** 
 * @see wicket.Component#isEnabled()
 */
@Override public boolean isEnabled(){
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    return false;
  }
  return WebDataCheckBox.this.isEnabled();
}
Program: 143692
Project: 143692
Buggy source:
/** 
 * @see org.apache.wicket.behavior.AbstractBehavior#isEnabled(org.apache.wicket.Component)
 */
@Override public boolean isEnabled(Component component){
  return super.isEnabled(component) && WebClientSession.get().useAjax();
}

Fixed version (ground truth):
/** 
 * @see org.apache.wicket.behavior.AbstractBehavior#isEnabled(org.apache.wicket.Component)
 */
@Override public boolean isEnabled(Component component){
  IFormUIInternal<?> formui=findParent(IFormUIInternal.class);
  if (formui != null && formui.isDesignMode()) {
    return false;
  }
  return super.isEnabled(component) && WebClientSession.get().useAjax();
}
Program: 143697
Project: 143697
Buggy source:
private void applyStyleOnComponent(Component comp,Object bgColor,Object fgColor,Object compFont,Object compBorder){
  if (comp instanceof IScriptableProvider) {
    IScriptable s=((IScriptableProvider)comp).getScriptObject();
    if (s instanceof IScriptBaseMethods) {
      IScriptBaseMethods sbm=(IScriptBaseMethods)s;
      String newBgColor=bgColor != null ? bgColor.toString() : null;
      sbm.js_setBgcolor(newBgColor);
      String newFgColor=fgColor != null ? fgColor.toString() : null;
      sbm.js_setFgcolor(newFgColor);
      String newCompFont=compFont != null ? compFont.toString() : null;
      sbm.js_setFont(newCompFont);
      String newBorder=compBorder != null ? compBorder.toString() : null;
      if (newBorder != null)       sbm.js_setBorder(newBorder);
    }
  }
}

Fixed version (ground truth):
private void applyStyleOnComponent(Component comp,Object bgColor,Object fgColor,Object compFont,Object compBorder){
  if (comp instanceof IScriptableProvider) {
    IScriptable s=((IScriptableProvider)comp).getScriptObject();
    if (s instanceof IScriptBaseMethods) {
      IScriptBaseMethods sbm=(IScriptBaseMethods)s;
      String newBgColor=bgColor != null ? bgColor.toString() : null;
      sbm.js_setBgcolor(newBgColor);
      String newFgColor=fgColor != null ? fgColor.toString() : null;
      sbm.js_setFgcolor(newFgColor);
      String newCompFont=compFont != null ? compFont.toString() : null;
      sbm.js_setFont(newCompFont);
    }
  }
}
Program: 143698
Project: 143698
Buggy source:
/** 
 * returns the contents of the database error message if an error occurred
 * @deprecated As of release 5.0, replaced by {@link #getException()}
 * @sample 
 */
@Deprecated public String js_getExceptionMsg(){
  return (exception == null ? null : exception.getMessage());
}

Fixed version (ground truth):
/** 
 * returns the contents of the database error message if an error occurred
 * @deprecated As of release 5.0, replaced by {@link #getException()}
 */
@Deprecated public String js_getExceptionMsg(){
  return (exception == null ? null : exception.getMessage());
}
Program: 143699
Project: 143699
Buggy source:
/** 
 * Returns the result of the drag action. 
 * @sample function onDragEnd(event) { var dragResult = event.getDragResult(); if(dragResult == DRAGNDROP.NONE) { // the drag was canceled } else if(dragResult == DRAGNDROP.COPY) { // the drag ended with a copy action } else if(dragResult == DRAGNDROP.MOVE) { // the drag ended with a move action }
 * @return a DRAGNDROP constant, representing the result of the drag action
 */
public int js_getDragResult(){
  return this.dragResult;
}

Fixed version (ground truth):
/** 
 * Returns the result of the drag action. 
 * @sample function onDragEnd(event) { var dragResult = event.getDragResult(); if(dragResult == DRAGNDROP.NONE) { // the drag was canceled } else if(dragResult == DRAGNDROP.COPY) { // the drag ended with a copy action } else if(dragResult == DRAGNDROP.MOVE) { // the drag ended with a move action } }
 * @return a DRAGNDROP constant, representing the result of the drag action
 */
public int js_getDragResult(){
  return this.dragResult;
}