nus-yam/ex-repair huggingface dataset:
Program: 54062
Project: 54062
Buggy source:
private boolean resolveChanges(){
  if (newSelectedObject == null) {
    return false;
  }
  Object key=getKey(newSelectedObject);
  boolean sameKey=curKey == null ? key == null : curKey.equals(key);
  boolean changed=false;
  if (newSelected) {
    changed=!sameKey;
    curSelection=newSelectedObject;
    curKey=key;
  }
 else   if (sameKey) {
    changed=true;
    curSelection=null;
    curKey=null;
  }
  newSelectedObject=null;
  return changed;
}

Fixed version (ground truth):
private void resolveChanges(){
  if (newSelectedObject == null) {
    return;
  }
  Object key=getKey(newSelectedObject);
  boolean sameKey=curKey == null ? key == null : curKey.equals(key);
  boolean changed=false;
  if (newSelected) {
    changed=!sameKey;
    curSelection=newSelectedObject;
    curKey=key;
  }
 else   if (sameKey) {
    changed=true;
    curSelection=null;
    curKey=null;
  }
  newSelectedObject=null;
  if (changed) {
    SelectionChangeEvent.fire(this);
  }
}
Program: 54063
Project: 54063
Buggy source:
public void setSelected(T object,boolean selected){
}

Fixed version (ground truth):
public void setSelected(T object,boolean selected){
  scheduleSelectionChangeEvent();
}
Program: 54065
Project: 54065
Buggy source:
private void setValue(Layer layer,String prop,double value,Unit unit,boolean vertical,boolean noNegative){
switch (unit) {
case PX:
case PCT:
    break;
default :
  value=value * (int)getUnitSizeInPixels(layer.container,unit,vertical);
unit=Unit.PX;
break;
}
if (noNegative) {
if (value < 0) {
value=0;
}
}
layer.getContainerElement().getStyle().setProperty(prop,value,unit);
}

Fixed version (ground truth):
private void setValue(Layer layer,String prop,double value,Unit unit,boolean vertical,boolean noNegative){
switch (unit) {
case PX:
case PCT:
    break;
default :
  value=value * getUnitSizeInPixels(layer.container,unit,vertical);
unit=Unit.PX;
break;
}
if (noNegative) {
if (value < 0) {
value=0;
}
}
layer.getContainerElement().getStyle().setProperty(prop,(int)(value + 0.5),unit);
}
Program: 54066
Project: 54066
Buggy source:
/** 
 * Get the columns displayed in the expense table.
 */
private Collection<Property<?>> getExpenseColumns(){
  List<Property<?>> columns=new ArrayList<Property<?>>();
  columns.add(ExpenseRecord.amount);
  columns.add(ExpenseRecord.approval);
  columns.add(ExpenseRecord.category);
  columns.add(ExpenseRecord.created);
  columns.add(ExpenseRecord.description);
  columns.add(ExpenseRecord.reasonDenied);
  return columns;
}

Fixed version (ground truth):
/** 
 * Get the columns displayed in the expense table.
 */
private String[] getExpenseColumns(){
  return new String[]{ExpenseRecord.amount.getName(),ExpenseRecord.approval.getName(),ExpenseRecord.category.getName(),ExpenseRecord.created.getName(),ExpenseRecord.description.getName(),ExpenseRecord.reasonDenied.getName()};
}
Program: 54067
Project: 54067
Buggy source:
/** 
 * Request the expenses.
 */
private void requestExpenses(){
  refreshTimer.cancel();
  lastReceiver=new Receiver<List<ExpenseRecord>>(){
    public void onSuccess(    List<ExpenseRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastReceiver) {
        List<ExpenseRecord> list=new ArrayList<ExpenseRecord>(newValues);
        sortExpenses(list,lastComparator);
        items.setList(list);
        refreshCost();
        boolean isInitialData=knownExpenseKeys == null;
        if (knownExpenseKeys == null) {
          knownExpenseKeys=new HashMap<Object,ExpenseRecord>();
        }
        for (        ExpenseRecord value : newValues) {
          Object key=items.getKey(value);
          if (!isInitialData) {
            ExpenseRecord existing=knownExpenseKeys.get(key);
            if (existing == null || !value.getAmount().equals(existing.getAmount()) || !value.getDescription().equals(existing.getDescription()) || !value.getCategory().equals(existing.getCategory())) {
              (new PhaseAnimation.CellTablePhaseAnimation<ExpenseRecord>(table,value,items)).run();
            }
          }
          knownExpenseKeys.put(key,value);
        }
      }
      refreshTimer.schedule(REFRESH_INTERVAL);
    }
  }
;
  expensesRequestFactory.expenseRequest().findExpensesByReport(report.getRef(Record.id)).forProperties(getExpenseColumns()).fire(lastReceiver);
}

Fixed version (ground truth):
/** 
 * Request the expenses.
 */
private void requestExpenses(){
  refreshTimer.cancel();
  lastReceiver=new Receiver<List<ExpenseRecord>>(){
    public void onSuccess(    List<ExpenseRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastReceiver) {
        List<ExpenseRecord> list=new ArrayList<ExpenseRecord>(newValues);
        sortExpenses(list,lastComparator);
        items.setList(list);
        refreshCost();
        boolean isInitialData=knownExpenseKeys == null;
        if (knownExpenseKeys == null) {
          knownExpenseKeys=new HashMap<Object,ExpenseRecord>();
        }
        for (        ExpenseRecord value : newValues) {
          Object key=items.getKey(value);
          if (!isInitialData) {
            ExpenseRecord existing=knownExpenseKeys.get(key);
            if (existing == null || !value.getAmount().equals(existing.getAmount()) || !value.getDescription().equals(existing.getDescription()) || !value.getCategory().equals(existing.getCategory())) {
              (new PhaseAnimation.CellTablePhaseAnimation<ExpenseRecord>(table,value,items)).run();
            }
          }
          knownExpenseKeys.put(key,value);
        }
      }
      refreshTimer.schedule(REFRESH_INTERVAL);
    }
  }
;
  expensesRequestFactory.expenseRequest().findExpensesByReport(report.getRef(Record.id)).with(getExpenseColumns()).fire(lastReceiver);
}
Program: 54068
Project: 54068
Buggy source:
public void onReportChanged(ReportRecordChanged event){
  ReportRecord changed=event.getRecord();
  if (report != null && report.getId().equals(changed.getId())) {
    report=changed;
    setNotesEditState(false,false,changed.getNotes());
  }
}

Fixed version (ground truth):
public void onReportChanged(ReportRecordChanged event){
  ReportRecord changed=event.getRecord();
  if (report != null && report.getId().equals(changed.getId())) {
    expensesRequestFactory.reportRequest().findReport(report.getRef(ReportRecord.id)).with(ReportRecord.notes.getName()).fire(new Receiver<ReportRecord>(){
      @Override public void onSuccess(      ReportRecord response,      Set<SyncResult> syncResults){
        report=response;
        setNotesEditState(false,false,response.getNotes());
      }
    }
);
  }
}
Program: 54069
Project: 54069
Buggy source:
public ExpenseList(){
  reports.setKeyProvider(Expenses.REPORT_RECORD_KEY_PROVIDER);
  reportColumns=new ArrayList<Property<?>>();
  reportColumns.add(ReportRecord.created);
  reportColumns.add(ReportRecord.purpose);
  reportColumns.add(ReportRecord.notes);
  createTable();
  searchBox=new DefaultTextBox("String_Node_Str");
  initWidget(uiBinder.createAndBindUi(this));
  reports.addDataDisplay(table);
  searchBox.addKeyUpHandler(new KeyUpHandler(){
    public void onKeyUp(    KeyUpEvent event){
      if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
        search();
        return;
      }
      String text=searchBox.getText();
      if (text.length() > 0) {
        searchRegExp=RegExp.compile("String_Node_Str" + text + "String_Node_Str","String_Node_Str");
      }
 else {
        searchRegExp=null;
      }
      table.redraw();
    }
  }
);
  searchButton.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      search();
    }
  }
);
}

Fixed version (ground truth):
public ExpenseList(){
  reports.setKeyProvider(Expenses.REPORT_RECORD_KEY_PROVIDER);
  createTable();
  searchBox=new DefaultTextBox("String_Node_Str");
  initWidget(uiBinder.createAndBindUi(this));
  reports.addDataDisplay(table);
  searchBox.addKeyUpHandler(new KeyUpHandler(){
    public void onKeyUp(    KeyUpEvent event){
      if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
        search();
        return;
      }
      String text=searchBox.getText();
      if (text.length() > 0) {
        searchRegExp=RegExp.compile("String_Node_Str" + text + "String_Node_Str","String_Node_Str");
      }
 else {
        searchRegExp=null;
      }
      table.redraw();
    }
  }
);
  searchButton.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      search();
    }
  }
);
}
Program: 54071
Project: 54071
Buggy source:
@Override protected void onRangeChanged(HasData<EmployeeRecord> view){
  Range range=view.getVisibleRange();
  requestFactory.employeeRequest().findEmployeeEntriesByDepartment(department,range.getStart(),range.getLength()).forProperties(getEmployeeMenuProperties()).fire(this);
}

Fixed version (ground truth):
@Override protected void onRangeChanged(HasData<EmployeeRecord> view){
  Range range=view.getVisibleRange();
  requestFactory.employeeRequest().findEmployeeEntriesByDepartment(department,range.getStart(),range.getLength()).with(getEmployeeMenuProperties()).fire(this);
}
Program: 54072
Project: 54072
Buggy source:
public boolean isLeaf(Object value){
  return !isDepartment(value) || isAllDepartment(value);
}

Fixed version (ground truth):
public boolean isLeaf(Object value){
  return value != null && (!isDepartment(value) || isAllDepartment(value));
}
Program: 54073
Project: 54073
Buggy source:
private Collection<Property<?>> getEmployeeMenuProperties(){
  List<Property<?>> columns=new ArrayList<Property<?>>();
  columns.add(EmployeeRecord.displayName);
  columns.add(EmployeeRecord.userName);
  return columns;
}

Fixed version (ground truth):
private String[] getEmployeeMenuProperties(){
  return new String[]{EmployeeRecord.displayName.getName(),EmployeeRecord.userName.getName()};
}
Program: 54075
Project: 54075
Buggy source:
public void create(ReportRecord report){
  expense=(ExpenseRecord)requestFactory.create(ExpenseRecord.class);
  requestObject=requestFactory.expenseRequest().persist(expense);
  ExpenseRecord editableExpense=requestObject.edit(expense);
  editableExpense.setReport(report);
  displayExpense();
}

Fixed version (ground truth):
public void create(ReportRecord report){
  expense=requestFactory.create(ExpenseRecord.class);
  requestObject=requestFactory.expenseRequest().persist(expense);
  ExpenseRecord editableExpense=requestObject.edit(expense);
  editableExpense.setReport(report);
  displayExpense();
}
Program: 54076
Project: 54076
Buggy source:
private Collection<Property<?>> getExpenseColumns(){
  List<Property<?>> columns=new ArrayList<Property<?>>();
  columns.add(ExpenseRecord.description);
  columns.add(ExpenseRecord.amount);
  return columns;
}

Fixed version (ground truth):
private String[] getExpenseColumns(){
  return new String[]{ExpenseRecord.description.getName(),ExpenseRecord.amount.getName()};
}
Program: 54077
Project: 54077
Buggy source:
/** 
 * Request the expenses.
 */
private void requestExpenses(){
  refreshTimer.cancel();
  if (requestFactory == null || report == null) {
    return;
  }
  lastReceiver=new Receiver<List<ExpenseRecord>>(){
    public void onSuccess(    List<ExpenseRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastReceiver) {
        int size=newValues.size();
        expenseDataProvider.updateRowCount(size,true);
        expenseDataProvider.updateRowData(0,newValues);
        boolean isInitialData=knownDeniedKeys == null;
        if (knownDeniedKeys == null) {
          knownDeniedKeys=new HashSet<Object>();
        }
        for (        ExpenseRecord value : newValues) {
          Object key=expenseDataProvider.getKey(value);
          String approval=value.getApproval();
          if (Expenses.Approval.DENIED.getText().equals(approval)) {
            if (!isInitialData && !knownDeniedKeys.contains(key)) {
              (new PhaseAnimation.CellListPhaseAnimation<ExpenseRecord>(expenseList,value,expenseDataProvider)).run();
            }
            knownDeniedKeys.add(key);
          }
 else {
            knownDeniedKeys.remove(key);
          }
        }
        refreshTimer.schedule(REFRESH_INTERVAL);
      }
    }
  }
;
  requestFactory.expenseRequest().findExpensesByReport(report.getRef(ReportRecord.id)).forProperties(getExpenseColumns()).fire(lastReceiver);
}

Fixed version (ground truth):
/** 
 * Request the expenses.
 */
private void requestExpenses(){
  refreshTimer.cancel();
  if (requestFactory == null || report == null) {
    return;
  }
  lastReceiver=new Receiver<List<ExpenseRecord>>(){
    public void onSuccess(    List<ExpenseRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastReceiver) {
        int size=newValues.size();
        expenseDataProvider.updateRowCount(size,true);
        expenseDataProvider.updateRowData(0,newValues);
        boolean isInitialData=knownDeniedKeys == null;
        if (knownDeniedKeys == null) {
          knownDeniedKeys=new HashSet<Object>();
        }
        for (        ExpenseRecord value : newValues) {
          Object key=expenseDataProvider.getKey(value);
          String approval=value.getApproval();
          if (Expenses.Approval.DENIED.getText().equals(approval)) {
            if (!isInitialData && !knownDeniedKeys.contains(key)) {
              (new PhaseAnimation.CellListPhaseAnimation<ExpenseRecord>(expenseList,value,expenseDataProvider)).run();
            }
            knownDeniedKeys.add(key);
          }
 else {
            knownDeniedKeys.remove(key);
          }
        }
        refreshTimer.schedule(REFRESH_INTERVAL);
      }
    }
  }
;
  requestFactory.expenseRequest().findExpensesByReport(report.getRef(ReportRecord.id)).with(getExpenseColumns()).fire(lastReceiver);
}
Program: 54078
Project: 54078
Buggy source:
public void create(EmployeeRecord reporter){
  report=(ReportRecord)requestFactory.create(ReportRecord.class);
  requestObject=requestFactory.reportRequest().persist(report);
  ReportRecord editableReport=requestObject.edit(report);
  editableReport.setReporter(reporter);
  displayReport();
}

Fixed version (ground truth):
public void create(EmployeeRecord reporter){
  report=requestFactory.create(ReportRecord.class);
  requestObject=requestFactory.reportRequest().persist(report);
  ReportRecord editableReport=requestObject.edit(report);
  editableReport.setReporter(reporter);
  displayReport();
}
Program: 54079
Project: 54079
Buggy source:
private void requestReports(){
  if (requestFactory == null) {
    return;
  }
  lastReceiver=new Receiver<List<ReportRecord>>(){
    public void onSuccess(    List<ReportRecord> newValues,    Set<SyncResult> syncResults){
      int size=newValues.size();
      reportDataProvider.updateRowCount(size,true);
      reportDataProvider.updateRowData(0,newValues);
    }
  }
;
  requestFactory.reportRequest().findReportEntriesBySearch(employee.getId(),"String_Node_Str","String_Node_Str",ReportRecord.created.getName() + "String_Node_Str",0,25).forProperties(getReportColumns()).fire(lastReceiver);
}

Fixed version (ground truth):
private void requestReports(){
  if (requestFactory == null) {
    return;
  }
  lastReceiver=new Receiver<List<ReportRecord>>(){
    public void onSuccess(    List<ReportRecord> newValues,    Set<SyncResult> syncResults){
      int size=newValues.size();
      reportDataProvider.updateRowCount(size,true);
      reportDataProvider.updateRowData(0,newValues);
    }
  }
;
  requestFactory.reportRequest().findReportEntriesBySearch(employee.getId(),"String_Node_Str","String_Node_Str",ReportRecord.created.getName() + "String_Node_Str",0,25).with(getReportColumns()).fire(lastReceiver);
}
Program: 54080
Project: 54080
Buggy source:
private Collection<Property<?>> getReportColumns(){
  List<Property<?>> columns=new ArrayList<Property<?>>();
  columns.add(ReportRecord.created);
  columns.add(ReportRecord.purpose);
  return columns;
}

Fixed version (ground truth):
private String[] getReportColumns(){
  return new String[]{ReportRecord.created.getName(),ReportRecord.purpose.getName()};
}
Program: 54081
Project: 54081
Buggy source:
/** 
 * Create an instance with the given default value.
 * @param the value that will be returned by {@link #process} if{@link #setResult} is not called.
 */
public ExpensesEntityTypesProcessor(T defaultValue){
  this.defaultValue=defaultValue;
}

Fixed version (ground truth):
/** 
 * Create an instance with the given default value.
 * @param defaultValue the value that will be returned by {@link #process} if{@link #setResult} is not called.
 */
public ExpensesEntityTypesProcessor(T defaultValue){
  this.defaultValue=defaultValue;
}
Program: 54082
Project: 54082
Buggy source:
/** 
 * Flush pending list changes to the displays. By default,
 */
private void flushNow(){
  if (flushPending) {
    flushCancelled=true;
  }
  int newSize=list.size();
  if (curSize != newSize) {
    curSize=newSize;
    updateRowCount(curSize,true);
  }
  if (modified) {
    updateRowData(minModified,list.subList(minModified,maxModified));
    modified=false;
  }
  minModified=Integer.MAX_VALUE;
  maxModified=Integer.MIN_VALUE;
}

Fixed version (ground truth):
/** 
 * Flush pending list changes to the displays. By default,
 */
private void flushNow(){
  if (flushPending) {
    flushCancelled=true;
  }
  if (listWrapper != this) {
    return;
  }
  int newSize=list.size();
  if (curSize != newSize) {
    curSize=newSize;
    updateRowCount(curSize,true);
  }
  if (modified) {
    updateRowData(minModified,list.subList(minModified,maxModified));
    modified=false;
  }
  minModified=Integer.MAX_VALUE;
  maxModified=Integer.MIN_VALUE;
}
Program: 54083
Project: 54083
Buggy source:
public void testSetList(){
  ListDataProvider<String> provider=createListDataProvider(10);
  MockHasData<String> display=new MockHasData<String>();
  display.setVisibleRange(0,15);
  provider.addDataDisplay(display);
  provider.flush();
  display.clearLastRowDataAndRange();
  assertEquals("String_Node_Str",provider.getList().get(0));
  List<String> replace=new ArrayList<String>();
  replace.add("String_Node_Str");
  provider.setList(replace);
  assertEquals("String_Node_Str",provider.getList().get(0));
  assertEquals(1,display.getRowCount());
  assertEquals(replace,display.getLastRowData());
  assertEquals(new Range(0,1),display.getLastRowDataRange());
}

Fixed version (ground truth):
public void testSetList(){
  ListDataProvider<String> provider=createListDataProvider(10);
  final MockHasData<String> display=new MockHasData<String>();
  display.setVisibleRange(0,15);
  provider.addDataDisplay(display);
  provider.flush();
  display.clearLastRowDataAndRange();
  List<String> oldList=provider.getList();
  assertEquals("String_Node_Str",oldList.get(0));
  List<String> replace=new ArrayList<String>();
  replace.add("String_Node_Str");
  provider.setList(replace);
  assertEquals("String_Node_Str",provider.getList().get(0));
  assertEquals(1,display.getRowCount());
  assertEquals(replace,display.getLastRowData());
  assertEquals(new Range(0,1),display.getLastRowDataRange());
  display.clearLastRowDataAndRange();
  oldList.set(0,"String_Node_Str");
  delayTestFinish(2000);
  Scheduler.get().scheduleDeferred(new ScheduledCommand(){
    public void execute(){
      assertNull(display.getLastRowData());
      finishTest();
    }
  }
);
}
Program: 54084
Project: 54084
Buggy source:
public Object encodePropertyValue(Object value){
  if (value == null) {
    return value;
  }
  Class<?> type=value.getClass();
  if (Boolean.class == type) {
    return value;
  }
  if (Date.class == type) {
    return String.valueOf(((Date)value).getTime());
  }
  if (Enum.class.isAssignableFrom(type)) {
    return Double.valueOf(((Enum<?>)value).ordinal());
  }
  if (BigDecimal.class == type || BigInteger.class == type || Long.class == type) {
    return String.valueOf(value);
  }
  if (Number.class.isAssignableFrom(type)) {
    return ((Number)value).doubleValue();
  }
  return String.valueOf(value);
}

Fixed version (ground truth):
public Object encodePropertyValue(Object value){
  if (value == null) {
    return value;
  }
  Class<?> type=value.getClass();
  if (Boolean.class == type) {
    return value;
  }
  if (Date.class.isAssignableFrom(type)) {
    return String.valueOf(((Date)value).getTime());
  }
  if (Enum.class.isAssignableFrom(type)) {
    return Double.valueOf(((Enum<?>)value).ordinal());
  }
  if (BigDecimal.class == type || BigInteger.class == type || Long.class == type) {
    return String.valueOf(value);
  }
  if (Number.class.isAssignableFrom(type)) {
    return ((Number)value).doubleValue();
  }
  return String.valueOf(value);
}
Program: 54085
Project: 54085
Buggy source:
public void testEndToEndSmartDiff_SomeChange(){
  com.google.gwt.valuestore.server.SimpleFoo.reset();
  try {
    JSONObject foo=fetchVerifyAndGetInitialObject();
    SimpleFoo fooResult=SimpleFoo.getSingleton();
    fooResult.setUserName("String_Node_Str");
    fooResult.setIntId(45);
    foo.put("String_Node_Str","String_Node_Str");
    foo.put("String_Node_Str",45);
    Date now=new Date();
    foo.put("String_Node_Str","String_Node_Str" + now.getTime());
    JSONObject result=getResultFromServer(foo);
    assertTrue(result.getJSONObject("String_Node_Str").has("String_Node_Str"));
    fooResult=SimpleFoo.getSingleton();
    assertEquals((int)45,(int)fooResult.getIntId());
    assertEquals("String_Node_Str",fooResult.getUserName());
    assertEquals(now,fooResult.getCreated());
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail(e.toString());
  }
}

Fixed version (ground truth):
public void testEndToEndSmartDiff_SomeChange(){
  com.google.gwt.valuestore.server.SimpleFoo.reset();
  try {
    JSONObject foo=fetchVerifyAndGetInitialObject();
    SimpleFoo fooResult=SimpleFoo.getSingleton();
    fooResult.setUserName("String_Node_Str");
    fooResult.setIntId(45);
    foo.put("String_Node_Str","String_Node_Str");
    foo.put("String_Node_Str",45);
    Date now=new Date();
    long newTime=now.getTime() + 10000;
    foo.put("String_Node_Str","String_Node_Str" + newTime);
    JSONObject result=getResultFromServer(foo);
    assertTrue(result.getJSONObject("String_Node_Str").has("String_Node_Str"));
    fooResult=SimpleFoo.getSingleton();
    assertEquals((int)45,(int)fooResult.getIntId());
    assertEquals("String_Node_Str",fooResult.getUserName());
    assertEquals(newTime,fooResult.getCreated().getTime());
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail(e.toString());
  }
}
Program: 54086
Project: 54086
Buggy source:
/** 
 * Handle a keyboard event to move focus away from the current item.
 */
void keyboardExit(){
  if (keyboardSelection == null) {
    return;
  }
  Element child=keyboardSelection.getFirstChildElement().getFirstChildElement();
  child.removeAttribute("String_Node_Str");
  child.removeClassName(tree.getStyle().keyboardSelectedItem());
  keyboardSelection=null;
  keyboardSelectedIndex=-1;
  keyboardFocused=false;
}

Fixed version (ground truth):
/** 
 * Handle a keyboard event to move focus away from the current item.
 */
void keyboardExit(){
  if (keyboardSelection == null) {
    return;
  }
  Element child=keyboardSelection.getFirstChildElement().getFirstChildElement();
  child.removeAttribute("String_Node_Str");
  child.removeClassName(tree.getStyle().keyboardSelectedItem());
  keyboardSelection=null;
  keyboardFocused=false;
}
Program: 54087
Project: 54087
Buggy source:
String toJson(){
  if (operations.size() > 1) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  return toJsonWithoutChecks();
}

Fixed version (ground truth):
String toJson(){
}
Program: 54089
Project: 54089
Buggy source:
public void testCreate(){
  Record created=requestFactory.create(SimpleFooRecord.class);
  assertNotNull(created.getId());
  assertNotNull(created.getVersion());
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  assertFalse(deltaValueStore.isChanged());
  deltaValueStore.set(SimpleFooRecord.userName,created,"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.CREATE);
}

Fixed version (ground truth):
public void testCreate(){
  Record created=requestFactory.create(SimpleFooRecord.class);
  assertNotNull(created.getId());
  assertNotNull(created.getVersion());
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  String json=deltaValueStore.toJson();
  testAndGetChangeRecord(json,WriteOperation.CREATE);
}
Program: 54090
Project: 54090
Buggy source:
@Override public void gwtSetUp(){
  valueStore=new ValueStoreJsonImpl();
  requestFactory=new RequestFactoryJsonImpl(){
    public Record create(    Class token){
      return create(token,typeMap);
    }
    public RecordSchema getSchema(    String token){
      return typeMap.getType(token);
    }
    @Override public void init(    EventBus eventBus){
    }
    public LoggingRequest loggingRequest(){
      return null;
    }
    public Class<? extends Record> getClass(    String token){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    public Record getProxy(    String token){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    public String getToken(    Class<? extends Record> clazz){
      throw new UnsupportedOperationException("String_Node_Str");
    }
  }
;
  jso=RecordJsoImpl.fromJson("String_Node_Str");
  jso.set(SimpleFooRecord.id,42L);
  jso.set(SimpleFooRecord.version,1);
  jso.set(SimpleFooRecord.userName,"String_Node_Str");
  jso.set(SimpleFooRecord.password,"String_Node_Str");
  jso.set(SimpleFooRecord.intId,4);
  jso.set(SimpleFooRecord.created,new Date());
  jso.setSchema(SimpleFooRecordImpl.SCHEMA);
  valueStore.setRecord(jso,requestFactory);
}

Fixed version (ground truth):
@Override public void gwtSetUp(){
  valueStore=new ValueStoreJsonImpl();
  requestFactory=new RequestFactoryJsonImpl(){
    public Record create(    Class token){
      return create(token,typeMap);
    }
    @Override public RecordSchema getSchema(    String token){
      return typeMap.getType(token);
    }
    @Override public void init(    EventBus eventBus){
    }
    public LoggingRequest loggingRequest(){
      return null;
    }
    public Class<? extends Record> getClass(    String token){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    public Record getProxy(    String token){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    public String getToken(    Class<? extends Record> clazz){
      throw new UnsupportedOperationException("String_Node_Str");
    }
  }
;
  jso=RecordJsoImpl.fromJson("String_Node_Str");
  jso.set(SimpleFooRecord.id,42L);
  jso.set(SimpleFooRecord.version,1);
  jso.set(SimpleFooRecord.userName,"String_Node_Str");
  jso.set(SimpleFooRecord.password,"String_Node_Str");
  jso.set(SimpleFooRecord.intId,4);
  jso.set(SimpleFooRecord.created,new Date());
  jso.setSchema(SimpleFooRecordImpl.SCHEMA);
  valueStore.setRecord(jso,requestFactory);
}
Program: 54091
Project: 54091
Buggy source:
public RecordSchema getSchema(String token){
  return typeMap.getType(token);
}

Fixed version (ground truth):
@Override public RecordSchema getSchema(String token){
  return typeMap.getType(token);
}
Program: 54092
Project: 54092
Buggy source:
/** 
 * Returns the propertyValue in the right type, from the DataStore. The value is sent into the response.
 */
public Object encodePropertyValueFromDataStore(Object entityElement,Class<?> propertyType,String propertyName,RequestProperty propertyContext) throws SecurityException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, JSONException {
  String methodName=getMethodNameFromPropertyName(propertyName,"String_Node_Str");
  Method method=entityElement.getClass().getMethod(methodName);
  Object returnValue=method.invoke(entityElement);
  if (returnValue != null && Record.class.isAssignableFrom(propertyType)) {
    Method idMethod=entityElement.getClass().getMethod("String_Node_Str");
    Long id=(Long)idMethod.invoke(entityElement);
    String keyRef=operationRegistry.getSecurityProvider().encodeClassType(propertyType) + "String_Node_Str" + id;
    addRelatedObject(keyRef,returnValue,(Class<? extends Record>)propertyType,propertyContext.getProperty(propertyName));
    return keyRef;
  }
  return encodePropertyValue(returnValue);
}

Fixed version (ground truth):
/** 
 * Returns the propertyValue in the right type, from the DataStore. The value is sent into the response.
 */
public Object encodePropertyValueFromDataStore(Object entityElement,Class<?> propertyType,String propertyName,RequestProperty propertyContext) throws SecurityException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, JSONException {
  String methodName=getMethodNameFromPropertyName(propertyName,"String_Node_Str");
  Method method=entityElement.getClass().getMethod(methodName);
  Object returnValue=method.invoke(entityElement);
  if (returnValue != null && Record.class.isAssignableFrom(propertyType)) {
    Method idMethod=returnValue.getClass().getMethod("String_Node_Str");
    Long id=(Long)idMethod.invoke(returnValue);
    String keyRef=operationRegistry.getSecurityProvider().encodeClassType(propertyType) + "String_Node_Str" + id;
    addRelatedObject(keyRef,returnValue,(Class<? extends Record>)propertyType,propertyContext.getProperty(propertyName));
    return keyRef;
  }
  return encodePropertyValue(returnValue);
}
Program: 54093
Project: 54093
Buggy source:
public void onWindowResized(int width,int height){
  if (width == windowWidth || width < 1) {
    return;
  }
  windowWidth=width;
  onWindowResizedImpl(width);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void onWindowResized(int width,int height){
  if (width == windowWidth || width < 1) {
    return;
  }
  windowWidth=width;
  onWindowResizedImpl(width);
}
Program: 54094
Project: 54094
Buggy source:
/** 
 * Load the contents of a remote file into the specified widget.
 * @param url a partial path relative to the module base URL
 * @param target the target Widget to place the contents
 * @param callback the callback when the call completes
 */
private void requestSourceContents(String url,final HTML target,final RequestCallback callback){
  if (loadingImage == null) {
    loadingImage="String_Node_Str" + GWT.getModuleBaseURL() + "String_Node_Str";
  }
  target.setDirection(HasDirection.Direction.LTR);
  DOM.setStyleAttribute(target.getElement(),"String_Node_Str","String_Node_Str");
  target.setHTML("String_Node_Str" + loadingImage);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,GWT.getModuleBaseURL() + url);
  RequestCallback realCallback=new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      target.setHTML("String_Node_Str");
      if (callback != null) {
        callback.onError(request,exception);
      }
    }
    public void onResponseReceived(    Request request,    Response response){
      target.setHTML(response.getText());
      if (callback != null) {
        callback.onResponseReceived(request,response);
      }
    }
  }
;
  builder.setCallback(realCallback);
  try {
    builder.send();
  }
 catch (  RequestException e) {
    realCallback.onError(null,e);
  }
}

Fixed version (ground truth):
/** 
 * Load the contents of a remote file into the specified widget.
 * @param url a partial path relative to the module base URL
 * @param target the target Widget to place the contents
 * @param callback the callback when the call completes
 */
@SuppressWarnings("String_Node_Str") private void requestSourceContents(String url,final HTML target,final RequestCallback callback){
  if (loadingImage == null) {
    loadingImage="String_Node_Str" + GWT.getModuleBaseURL() + "String_Node_Str";
  }
  target.setDirection(HasDirection.Direction.LTR);
  DOM.setStyleAttribute(target.getElement(),"String_Node_Str","String_Node_Str");
  target.setHTML("String_Node_Str" + loadingImage);
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,GWT.getModuleBaseURL() + url);
  RequestCallback realCallback=new RequestCallback(){
    public void onError(    Request request,    Throwable exception){
      target.setHTML("String_Node_Str");
      if (callback != null) {
        callback.onError(request,exception);
      }
    }
    public void onResponseReceived(    Request request,    Response response){
      target.setHTML(response.getText());
      if (callback != null) {
        callback.onResponseReceived(request,response);
      }
    }
  }
;
  builder.setCallback(realCallback);
  try {
    builder.send();
  }
 catch (  RequestException e) {
    realCallback.onError(null,e);
  }
}
Program: 54095
Project: 54095
Buggy source:
/** 
 * Initialize this example.
 */
@ShowcaseSource @Override public Widget onInitialize(){
  DecoratedTabPanel tabPanel=new DecoratedTabPanel();
  tabPanel.setWidth("String_Node_Str");
  tabPanel.setAnimationEnabled(true);
  String[] tabTitles=constants.cwTabPanelTabs();
  HTML homeText=new HTML(constants.cwTabPanelTab0());
  tabPanel.add(homeText,tabTitles[0]);
  VerticalPanel vPanel=new VerticalPanel();
  vPanel.add(new Image(Showcase.images.gwtLogo()));
  tabPanel.add(vPanel,tabTitles[1]);
  HTML moreInfo=new HTML(constants.cwTabPanelTab2());
  tabPanel.add(moreInfo,tabTitles[2]);
  tabPanel.selectTab(0);
  tabPanel.ensureDebugId("String_Node_Str");
  return tabPanel;
}

Fixed version (ground truth):
/** 
 * Initialize this example.
 */
@SuppressWarnings("String_Node_Str") @ShowcaseSource @Override public Widget onInitialize(){
  DecoratedTabPanel tabPanel=new DecoratedTabPanel();
  tabPanel.setWidth("String_Node_Str");
  tabPanel.setAnimationEnabled(true);
  String[] tabTitles=constants.cwTabPanelTabs();
  HTML homeText=new HTML(constants.cwTabPanelTab0());
  tabPanel.add(homeText,tabTitles[0]);
  VerticalPanel vPanel=new VerticalPanel();
  vPanel.add(new Image(Showcase.images.gwtLogo()));
  tabPanel.add(vPanel,tabTitles[1]);
  HTML moreInfo=new HTML(constants.cwTabPanelTab2());
  tabPanel.add(moreInfo,tabTitles[2]);
  tabPanel.selectTab(0);
  tabPanel.ensureDebugId("String_Node_Str");
  return tabPanel;
}
Program: 54096
Project: 54096
Buggy source:
/** 
 * Initialize this example.
 */
@ShowcaseSource @Override public Widget onInitialize(){
  DatePicker datePicker=new DatePicker();
  final Label text=new Label();
  datePicker.addValueChangeHandler(new ValueChangeHandler<Date>(){
    public void onValueChange(    ValueChangeEvent<Date> event){
      Date date=event.getValue();
      String dateString=DateTimeFormat.getMediumDateFormat().format(date);
      text.setText(dateString);
    }
  }
);
  datePicker.setValue(new Date(),true);
  DateTimeFormat dateFormat=DateTimeFormat.getLongDateFormat();
  DateBox dateBox=new DateBox();
  dateBox.setFormat(new DateBox.DefaultFormat(dateFormat));
  VerticalPanel vPanel=new VerticalPanel();
  vPanel.add(new HTML(constants.cwDatePickerLabel()));
  vPanel.add(text);
  vPanel.add(datePicker);
  vPanel.add(new HTML(constants.cwDatePickerBoxLabel()));
  vPanel.add(dateBox);
  return vPanel;
}

Fixed version (ground truth):
/** 
 * Initialize this example.
 */
@SuppressWarnings("String_Node_Str") @ShowcaseSource @Override public Widget onInitialize(){
  DatePicker datePicker=new DatePicker();
  final Label text=new Label();
  datePicker.addValueChangeHandler(new ValueChangeHandler<Date>(){
    public void onValueChange(    ValueChangeEvent<Date> event){
      Date date=event.getValue();
      String dateString=DateTimeFormat.getMediumDateFormat().format(date);
      text.setText(dateString);
    }
  }
);
  datePicker.setValue(new Date(),true);
  DateTimeFormat dateFormat=DateTimeFormat.getLongDateFormat();
  DateBox dateBox=new DateBox();
  dateBox.setFormat(new DateBox.DefaultFormat(dateFormat));
  VerticalPanel vPanel=new VerticalPanel();
  vPanel.add(new HTML(constants.cwDatePickerLabel()));
  vPanel.add(text);
  vPanel.add(datePicker);
  vPanel.add(new HTML(constants.cwDatePickerBoxLabel()));
  vPanel.add(dateBox);
  return vPanel;
}
Program: 54097
Project: 54097
Buggy source:
@SuppressWarnings("String_Node_Str") public <P extends Record>P edit(P record){
  P returnRecordImpl=(P)((RecordImpl)record).getSchema().create(((RecordImpl)record).asJso());
  ((RecordImpl)returnRecordImpl).setDeltaValueStore(deltaValueStore);
  return returnRecordImpl;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <P extends Record>P edit(P record){
  P returnRecordImpl=(P)((RecordImpl)record).getSchema().create(((RecordImpl)record).asJso(),((RecordImpl)record).isFuture());
  ((RecordImpl)returnRecordImpl).setDeltaValueStore(deltaValueStore);
  return returnRecordImpl;
}
Program: 54098
Project: 54098
Buggy source:
public String toJson(){
  used=true;
  if (operations.size() > 1) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  StringBuffer jsonData=new StringBuffer("String_Node_Str");
  for (  WriteOperation writeOperation : WriteOperation.values()) {
    String jsonDataForOperation=getJsonForOperation(writeOperation);
    if (jsonDataForOperation.equals("String_Node_Str")) {
      continue;
    }
    if (jsonData.length() > 1) {
      jsonData.append("String_Node_Str");
    }
    jsonData.append(jsonDataForOperation);
  }
  jsonData.append("String_Node_Str");
  return jsonData.toString();
}

Fixed version (ground truth):
String toJson(){
  if (operations.size() > 1) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  return toJsonWithoutChecks();
}
Program: 54099
Project: 54099
Buggy source:
protected RecordKey(Long id,RecordSchema<?> schema){
}

Fixed version (ground truth):
protected RecordKey(Long id,RecordSchema<?> schema,boolean isFuture){
}
Program: 54100
Project: 54100
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + ((id == null) ? 0 : id.hashCode());
  result=prime * result + ((schema == null) ? 0 : schema.hashCode());
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=(isFuture ? 0 : 1);
  result=prime * result + ((id == null) ? 0 : id.hashCode());
  result=prime * result + ((schema == null) ? 0 : schema.hashCode());
  return result;
}
Program: 54101
Project: 54101
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + schema.getClass().getName() + "String_Node_Str"+ id+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + schema.getClass().getName() + "String_Node_Str"+ id+ "String_Node_Str"+ (isFuture ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str";
}
Program: 54102
Project: 54102
Buggy source:
private Record createFuture(RecordSchema<? extends Record> schema){
  Long futureId=futureIdGenerator.getFutureId();
  RecordJsoImpl newRecord=RecordJsoImpl.create(futureId,INITIAL_VERSION,schema);
  RecordKey recordKey=new RecordKey(newRecord);
  creates.put(recordKey,newRecord);
  return schema.create(newRecord);
}

Fixed version (ground truth):
private Record createFuture(RecordSchema<? extends Record> schema){
  Long futureId=++currentFutureId;
  RecordJsoImpl newRecord=RecordJsoImpl.create(futureId,INITIAL_VERSION,schema);
  RecordKey recordKey=new RecordKey(newRecord,IS_FUTURE);
  creates.put(recordKey,newRecord);
  return schema.create(newRecord,IS_FUTURE);
}
Program: 54104
Project: 54104
Buggy source:
/** 
 * @param newRecord
 * @param i
 * @param array
 */
private void setRecordInList(RecordJsoImpl newRecord,int i,JsArray<RecordJsoImpl> array){
  RecordKey recordKey=new RecordKey(newRecord);
  RecordJsoImpl oldRecord=records.get(recordKey);
  if (oldRecord == null) {
    records.put(recordKey,newRecord);
  }
 else {
    boolean changed=oldRecord.merge(newRecord);
    newRecord=oldRecord.cast();
    if (array != null) {
      array.set(i,newRecord);
    }
    if (changed) {
      eventBus.fireEvent(newRecord.getSchema().createChangeEvent(newRecord,WriteOperation.UPDATE));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param newRecord
 * @param i
 * @param array
 */
private void setRecordInList(RecordJsoImpl newRecord,int i,JsArray<RecordJsoImpl> array){
  RecordKey recordKey=new RecordKey(newRecord,RequestFactoryJsonImpl.NOT_FUTURE);
  RecordJsoImpl oldRecord=records.get(recordKey);
  if (oldRecord == null) {
    records.put(recordKey,newRecord);
  }
 else {
    boolean changed=oldRecord.merge(newRecord);
    newRecord=oldRecord.cast();
    if (array != null) {
      array.set(i,newRecord);
    }
    if (changed) {
      eventBus.fireEvent(newRecord.getSchema().createChangeEvent(newRecord,WriteOperation.UPDATE));
    }
  }
}
Program: 54105
Project: 54105
Buggy source:
public void init(HandlerManager eventBus){
}

Fixed version (ground truth):
@Override public void init(HandlerManager eventBus){
}
Program: 54106
Project: 54106
Buggy source:
@Override public void gwtSetUp(){
  valueStore=new ValueStoreJsonImpl(null);
  requestFactory=new RequestFactoryJsonImpl(){
    public Record create(    Class token){
      return create(token,typeMap);
    }
    public void init(    HandlerManager eventBus){
    }
    public LoggingRequest loggingRequest(){
      return null;
    }
  }
;
  jso=RecordJsoImpl.fromJson("String_Node_Str");
  jso.set(SimpleFooRecord.id,42L);
  jso.set(SimpleFooRecord.version,1);
  jso.set(SimpleFooRecord.userName,"String_Node_Str");
  jso.set(SimpleFooRecord.password,"String_Node_Str");
  jso.set(SimpleFooRecord.intId,4);
  jso.set(SimpleFooRecord.created,new Date());
  jso.setSchema(SimpleFooRecordImpl.SCHEMA);
  valueStore.setRecord(jso);
}

Fixed version (ground truth):
@Override public void gwtSetUp(){
  valueStore=new ValueStoreJsonImpl(null);
  requestFactory=new RequestFactoryJsonImpl(){
    public Record create(    Class token){
      return create(token,typeMap);
    }
    @Override public void init(    HandlerManager eventBus){
    }
    public LoggingRequest loggingRequest(){
      return null;
    }
  }
;
  jso=RecordJsoImpl.fromJson("String_Node_Str");
  jso.set(SimpleFooRecord.id,42L);
  jso.set(SimpleFooRecord.version,1);
  jso.set(SimpleFooRecord.userName,"String_Node_Str");
  jso.set(SimpleFooRecord.password,"String_Node_Str");
  jso.set(SimpleFooRecord.intId,4);
  jso.set(SimpleFooRecord.created,new Date());
  jso.setSchema(SimpleFooRecordImpl.SCHEMA);
  valueStore.setRecord(jso);
}
Program: 54107
Project: 54107
Buggy source:
public String getModuleName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getModuleName(){
  return "String_Node_Str";
}
Program: 54108
Project: 54108
Buggy source:
public void testDeleteUpdate(){
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  deltaValueStore.delete(new MyRecordImpl(jso));
  assertTrue(deltaValueStore.isChanged());
  deltaValueStore.set(SimpleFooRecord.userName,new MyRecordImpl(jso),"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.UPDATE);
  changeRecord.get(SimpleFooRecord.userName.getName());
}

Fixed version (ground truth):
public void testDeleteUpdate(){
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  deltaValueStore.delete(new MyRecordImpl(jso));
  assertTrue(deltaValueStore.isChanged());
  deltaValueStore.set(SimpleFooRecord.userName,new MyRecordImpl(jso),"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.UPDATE);
  assertEquals("String_Node_Str",changeRecord.get(SimpleFooRecord.userName.getName()).isString().stringValue());
}
Program: 54109
Project: 54109
Buggy source:
public void testCreateUpdate(){
  Record created=requestFactory.create(SimpleFooRecord.class);
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  assertFalse(deltaValueStore.isChanged());
  deltaValueStore.set(SimpleFooRecord.userName,created,"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.CREATE);
  changeRecord.get(SimpleFooRecord.userName.getName());
}

Fixed version (ground truth):
public void testCreateUpdate(){
  Record created=requestFactory.create(SimpleFooRecord.class);
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  assertFalse(deltaValueStore.isChanged());
  deltaValueStore.set(SimpleFooRecord.userName,created,"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.CREATE);
  assertEquals("String_Node_Str",changeRecord.get(SimpleFooRecord.userName.getName()).isString().stringValue());
}
Program: 54110
Project: 54110
Buggy source:
public void testUpdate(){
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  deltaValueStore.set(SimpleFooRecord.userName,new MyRecordImpl(jso),"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.UPDATE);
  changeRecord.get(SimpleFooRecord.userName.getName());
}

Fixed version (ground truth):
public void testUpdate(){
  DeltaValueStoreJsonImpl deltaValueStore=new DeltaValueStoreJsonImpl(valueStore,requestFactory);
  deltaValueStore.set(SimpleFooRecord.userName,new MyRecordImpl(jso),"String_Node_Str");
  assertTrue(deltaValueStore.isChanged());
  JSONObject changeRecord=testAndGetChangeRecord(deltaValueStore.toJson(),WriteOperation.UPDATE);
  assertEquals("String_Node_Str",changeRecord.get(SimpleFooRecord.userName.getName()).isString().stringValue());
}
Program: 54111
Project: 54111
Buggy source:
/** 
 * Called to fetch the string token needed to get a new record via  {@link DeltaValueStore#create}.
 */
protected abstract Class getRecordClass();

Fixed version (ground truth):
/** 
 * Called to fetch the string token needed to get a new record via  {@link DeltaValueStore#create}.
 */
protected abstract Class<? extends Record> getRecordClass();
Program: 54112
Project: 54112
Buggy source:
/** 
 * Ignore DevMode's normal WEB-INF classloader rules and just allow the system classloader to dominate. This makes JUnitHostImpl live in the right classloader (mine).
 */
@SuppressWarnings("String_Node_Str") @Override protected WebAppContext createWebAppContext(TreeLogger logger,File appRootDir){
  return new WebAppContext(appRootDir.getAbsolutePath(),"String_Node_Str"){
{
      getInitParams().put("String_Node_Str","String_Node_Str");
      setParentLoaderPriority(true);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Ignore DevMode's normal WEB-INF classloader rules and just allow the system classloader to dominate. This makes JUnitHostImpl live in the right classloader (mine).
 */
@Override protected WebAppContext createWebAppContext(TreeLogger logger,File appRootDir){
  return new WebAppContext(appRootDir.getAbsolutePath(),"String_Node_Str"){
{
      getInitParams().put("String_Node_Str","String_Node_Str");
      setParentLoaderPriority(true);
    }
  }
;
}
Program: 54113
Project: 54113
Buggy source:
@Override public void flush(){
  if (!closed) {
    for (    LogRecord record : records) {
      Receiver<Long> loggingReciever=new LoggingReceiver();
      requestFactory.loggingRequest().logMessage(record.getLevel().toString(),record.getLoggerName(),record.getMessage()).fire(loggingReciever);
    }
  }
}

Fixed version (ground truth):
@Override public void flush(){
  if (!closed) {
    for (    LogRecord record : records) {
      Receiver<Long> loggingReceiver=new LoggingReceiver();
      requestFactory.loggingRequest().logMessage(record.getLevel().toString(),record.getLoggerName(),record.getMessage()).fire(loggingReceiver);
    }
  }
}
Program: 54114
Project: 54114
Buggy source:
/** 
 * Generate an ID for a new record. The default behavior is to return null and let the data store generate the ID automatically.
 * @param key the key of the record field
 * @return the ID of the new record, or null to auto generate
 */
protected Long generateIdForCreate(@SuppressWarnings("String_Node_Str") String key){
  return null;
}

Fixed version (ground truth):
/** 
 * Generate an ID for a new record. The default behavior is to return null and let the data store generate the ID automatically.
 * @param key the key of the record field
 * @return the ID of the new record, or null to auto generate
 */
protected Long generateIdForCreate(String key){
  return null;
}