nus-yam/ex-repair huggingface dataset:
Program: 98582
Project: 98582
Buggy source:
protected BusinessCard createBusinessCard(String name,long heartBeat,List<Command> commands,String description){
  BusinessCard card=new BusinessCard(name,name);
  card.setPeriod(heartBeat);
  card.setCommandsIn(commands);
  card.setDescription(description);
  card.setIssuedBy(ID);
  return card;
}

Fixed version (ground truth):
protected BusinessCard createBusinessCard(String id,String name,long heartBeat,List<Command> commands,String description){
  BusinessCard card=new BusinessCard(name,name);
  card.setPeriod(heartBeat);
  card.setCommandsIn(commands);
  card.setDescription(description);
  card.setIssuedBy(id);
  return card;
}
Program: 98583
Project: 98583
Buggy source:
@Override public BusinessCard getBusinessCard(){
  if (card == null) {
    card=createBusinessCard(getName(),getHeartbeat(),getCommands(),getDescription());
  }
  return card.touch();
}

Fixed version (ground truth):
@Override public BusinessCard getBusinessCard(){
  if (card == null) {
    card=createBusinessCard(getID(),getName(),getHeartbeat(),getCommands(),getDescription());
  }
  return card.touch();
}
Program: 98584
Project: 98584
Buggy source:
/** 
 * @param context the context to set
 */
public void setContext(CamelContext context){
  this.context=context;
}

Fixed version (ground truth):
/** 
 * @param context the context to set
 */
@Override public void setContext(CamelContext context){
  this.context=context;
}
Program: 98585
Project: 98585
Buggy source:
/** 
 * @return the context
 */
public CamelContext getContext(){
  return context;
}

Fixed version (ground truth):
/** 
 * @return the context
 */
@Override public CamelContext getContext(){
  return context;
}
Program: 98586
Project: 98586
Buggy source:
/** 
 * Test method for   {@link org.hbird.business.core.StartableEntity#createBusinessCard(String,long,java.util.List)}.
 */
@Test public void testCreateBusinessCard(){
  BusinessCard card=part.createBusinessCard(NAME,PERIOD,commands,DESCRIPTION);
  assertNotNull(card);
  assertEquals(NAME,card.getName());
  assertEquals(NAME,card.getIssuedBy());
  assertEquals(PERIOD,card.getPeriod());
  assertEquals(DESCRIPTION,card.getDescription());
  Map<String,Command> map=card.getCommandsIn();
  assertNotNull(map);
  assertEquals(2,map.size());
  assertTrue(map.containsKey(CMD_1));
  assertEquals(cmd1,map.get(CMD_1));
  assertTrue(map.containsKey(CMD_2));
  assertEquals(cmd2,map.get(CMD_2));
  inOrder.verify(cmd1,times(1)).getName();
  inOrder.verify(cmd2,times(1)).getName();
}

Fixed version (ground truth):
/** 
 * Test method for   {@link org.hbird.business.core.StartableEntity#createBusinessCard(String,long,java.util.List)}.
 */
@Test public void testCreateBusinessCard(){
  BusinessCard card=part.createBusinessCard(ID,NAME,PERIOD,commands,DESCRIPTION);
  assertNotNull(card);
  assertEquals(NAME,card.getName());
  assertEquals(ID,card.getIssuedBy());
  assertEquals(PERIOD,card.getPeriod());
  assertEquals(DESCRIPTION,card.getDescription());
  Map<String,Command> map=card.getCommandsIn();
  assertNotNull(map);
  assertEquals(2,map.size());
  assertTrue(map.containsKey(CMD_1));
  assertEquals(cmd1,map.get(CMD_1));
  assertTrue(map.containsKey(CMD_2));
  assertEquals(cmd2,map.get(CMD_2));
  inOrder.verify(cmd1,times(1)).getName();
  inOrder.verify(cmd2,times(1)).getName();
}
Program: 98587
Project: 98587
Buggy source:
/** 
 * Test method for   {@link org.hbird.business.core.StartableEntity#getBusinessCard()}.
 */
@Test public void testGetBusinessCard(){
  assertNull(part.card);
  BusinessCard card=part.getBusinessCard();
  assertNotNull(card);
  assertEquals(NAME,card.getName());
  assertEquals(NAME,card.getIssuedBy());
  assertEquals(StartableEntity.DEFAULT_HEARTBEAT,card.getPeriod());
  Map<String,Command> map=card.getCommandsIn();
  assertNotNull(map);
  assertEquals(2,map.size());
  assertTrue(map.containsKey(StartComponent.class.getSimpleName()));
  assertNotNull(map.get(StartComponent.class.getSimpleName()));
  assertTrue(map.containsKey(StopComponent.class.getSimpleName()));
  assertNotNull(map.get(StopComponent.class.getSimpleName()));
  assertEquals(card,part.card);
  assertEquals(card,part.getBusinessCard());
}

Fixed version (ground truth):
/** 
 * Test method for   {@link org.hbird.business.core.StartableEntity#getBusinessCard()}.
 */
@Test public void testGetBusinessCard(){
  assertNull(part.card);
  BusinessCard card=part.getBusinessCard();
  assertNotNull(card);
  assertEquals(NAME,card.getName());
  assertEquals(ID,card.getIssuedBy());
  assertEquals(StartableEntity.DEFAULT_HEARTBEAT,card.getPeriod());
  Map<String,Command> map=card.getCommandsIn();
  assertNotNull(map);
  assertEquals(2,map.size());
  assertTrue(map.containsKey(StartComponent.class.getSimpleName()));
  assertNotNull(map.get(StartComponent.class.getSimpleName()));
  assertTrue(map.containsKey(StopComponent.class.getSimpleName()));
  assertNotNull(map.get(StopComponent.class.getSimpleName()));
  assertEquals(card,part.card);
  assertEquals(card,part.getBusinessCard());
}
Program: 98588
Project: 98588
Buggy source:
/** 
 * @param configuration
 * @param failOldRequests
 * @param dataAccess
 * @param orbitPrediction
 * @param optimizer
 */
public TrackingSupport(C configuration,ICatalogue catalogue,IOrbitPrediction orbitPrediction,IPointingDataOptimizer<C> optimizer){
  this.configuration=configuration;
  this.catalogue=catalogue;
  this.orbitPrediction=orbitPrediction;
  this.optimizer=optimizer;
}

Fixed version (ground truth):
/** 
 * @param configuration
 * @param failOldRequests
 * @param dataAccess
 * @param orbitPrediction
 * @param optimizer
 */
public TrackingSupport(C configuration,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<C> optimizer){
  this.configuration=configuration;
  this.catalogue=catalogue;
  this.calculator=calculator;
  this.optimizer=optimizer;
}
Program: 98590
Project: 98590
Buggy source:
protected abstract TrackingSupport<C> createTrackingSupport(C config,ICatalogue catalogue,IOrbitPrediction prediction,IPointingDataOptimizer<C> optimizer);

Fixed version (ground truth):
protected abstract TrackingSupport<C> createTrackingSupport(C config,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<C> optimizer);
Program: 98592
Project: 98592
Buggy source:
/** 
 * @see org.hbird.business.groundstation.hamlib.HamlibDriver#createTrackingSupport(org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration,org.hbird.business.api.ICatalogue,org.hbird.business.api.IOrbitPrediction,org.hbird.exchange.groundstation.IPointingDataOptimizer)
 */
@Override protected TrackingSupport<RadioDriverConfiguration> createTrackingSupport(RadioDriverConfiguration config,ICatalogue catalogue,IOrbitPrediction prediction,IPointingDataOptimizer<RadioDriverConfiguration> optimizer){
  return new HamlibRadioTracker(config,catalogue,prediction,optimizer);
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.hamlib.HamlibDriver#createTrackingSupport(org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration,org.hbird.business.api.ICatalogue,org.hbird.business.api.IOrbitPrediction,org.hbird.exchange.groundstation.IPointingDataOptimizer)
 */
@Override protected TrackingSupport<RadioDriverConfiguration> createTrackingSupport(RadioDriverConfiguration config,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<RadioDriverConfiguration> optimizer){
  return new HamlibRadioTracker(config,catalogue,calculator,optimizer);
}
Program: 98593
Project: 98593
Buggy source:
public HamlibRadioTracker(RadioDriverConfiguration configuration,ICatalogue catalogue,IOrbitPrediction prediction,IPointingDataOptimizer<RadioDriverConfiguration> optimizer){
  super(configuration,catalogue,prediction,optimizer);
}

Fixed version (ground truth):
public HamlibRadioTracker(RadioDriverConfiguration configuration,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<RadioDriverConfiguration> optimizer){
  super(configuration,catalogue,calculator,optimizer);
}
Program: 98594
Project: 98594
Buggy source:
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RadioDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    TypeConverter typeConverter=driverContext.getTypeConverter();
    String linkName=getLinkName(driverContext);
    String parameterName=String.format("String_Node_Str",linkName,PARAMETER);
    String description=String.format("String_Node_Str",linkName);
    Parameter param=new Parameter(driverContext.getPart().getID() + "String_Node_Str" + parameterName,parameterName);
    param.setDescription(description);
    param.setValue(typeConverter.convertTo(Long.class,HamlibProtocolHelper.toMap(response).get(PARAMETER)));
    param.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(1);
    result.add(param);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RadioDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    TypeConverter typeConverter=driverContext.getTypeConverter();
    String linkName=getLinkName(driverContext);
    String parameterName=String.format("String_Node_Str",linkName,PARAMETER);
    String description=String.format("String_Node_Str",linkName);
    String id=driverContext.getPart().getID();
    Parameter param=new Parameter(id + "String_Node_Str" + parameterName,parameterName);
    param.setIssuedBy(id);
    param.setDescription(description);
    param.setValue(typeConverter.convertTo(Long.class,HamlibProtocolHelper.toMap(response).get(PARAMETER)));
    param.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(1);
    result.add(param);
  }
  return result;
}
Program: 98595
Project: 98595
Buggy source:
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RadioDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    TypeConverter converter=driverContext.getTypeConverter();
    String linkName=GetFrequency.getLinkName(driverContext);
    String name=String.format("String_Node_Str",linkName);
    String description=String.format("String_Node_Str",linkName);
    Parameter param=new Parameter(driverContext.getPart().getID() + "String_Node_Str" + name,name);
    param.setDescription(description);
    param.setValue(converter.convertTo(Long.class,HamlibProtocolHelper.toMap(response).get(KEY)));
    param.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(1);
    result.add(param);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RadioDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    TypeConverter converter=driverContext.getTypeConverter();
    String linkName=GetFrequency.getLinkName(driverContext);
    String name=String.format("String_Node_Str",linkName);
    String description=String.format("String_Node_Str",linkName);
    String id=driverContext.getPart().getID();
    Parameter param=new Parameter(id + "String_Node_Str" + name,name);
    param.setIssuedBy(id);
    param.setDescription(description);
    param.setValue(converter.convertTo(Long.class,HamlibProtocolHelper.toMap(response).get(KEY)));
    param.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(1);
    result.add(param);
  }
  return result;
}
Program: 98596
Project: 98596
Buggy source:
/** 
 * @see org.hbird.business.groundstation.hamlib.HamlibDriver#createTrackingSupport(org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration,org.hbird.business.api.ICatalogue,org.hbird.business.api.IOrbitPrediction,org.hbird.exchange.groundstation.IPointingDataOptimizer)
 */
@Override protected TrackingSupport<RotatorDriverConfiguration> createTrackingSupport(RotatorDriverConfiguration config,ICatalogue catalogue,IOrbitPrediction prediction,IPointingDataOptimizer<RotatorDriverConfiguration> optimizer){
  return new HamlibRotatorTracker(config,catalogue,prediction,optimizer);
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.hamlib.HamlibDriver#createTrackingSupport(org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration,org.hbird.business.api.ICatalogue,org.hbird.business.api.IOrbitPrediction,org.hbird.exchange.groundstation.IPointingDataOptimizer)
 */
@Override protected TrackingSupport<RotatorDriverConfiguration> createTrackingSupport(RotatorDriverConfiguration config,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<RotatorDriverConfiguration> optimizer){
  return new HamlibRotatorTracker(config,catalogue,calculator,optimizer);
}
Program: 98597
Project: 98597
Buggy source:
/** 
 * @see org.hbird.business.groundstation.base.HamlibDriver#createResponseHandlers() -     
 */
@Override protected List<ResponseHandler<RotatorDriverConfiguration,String,String>> createResponseHandlers(){
  List<ResponseHandler<RotatorDriverConfiguration,String,String>> list=new ArrayList<ResponseHandler<RotatorDriverConfiguration,String,String>>(4);
  list.add(new GetPosition());
  list.add(new Park());
  list.add(new Reset());
  list.add(new SetPosition());
  return list;
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.base.HamlibDriver#createResponseHandlers() -
 */
@Override protected List<ResponseHandler<RotatorDriverConfiguration,String,String>> createResponseHandlers(){
  List<ResponseHandler<RotatorDriverConfiguration,String,String>> list=new ArrayList<ResponseHandler<RotatorDriverConfiguration,String,String>>(4);
  list.add(new GetPosition());
  list.add(new Park());
  list.add(new Reset());
  list.add(new SetPosition());
  return list;
}
Program: 98598
Project: 98598
Buggy source:
public HamlibRotatorTracker(RotatorDriverConfiguration config,ICatalogue catalogue,IOrbitPrediction prediction,IPointingDataOptimizer<RotatorDriverConfiguration> optimizer){
  super(config,catalogue,prediction,optimizer);
}

Fixed version (ground truth):
public HamlibRotatorTracker(RotatorDriverConfiguration config,ICatalogue catalogue,PointingDataCalculator calculator,IPointingDataOptimizer<RotatorDriverConfiguration> optimizer){
  super(config,catalogue,calculator,optimizer);
}
Program: 98599
Project: 98599
Buggy source:
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RotatorDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    Map<String,String> responseParams=HamlibProtocolHelper.toMap(response);
    String issuedBy=driverContext.getPart().getID();
    TypeConverter typeConverter=driverContext.getTypeConverter();
    Parameter azimuth=new Parameter(issuedBy + "String_Node_Str" + PARAMETER_AZIMUTH,PARAMETER_AZIMUTH);
    azimuth.setDescription("String_Node_Str");
    azimuth.setValue(typeConverter.convertTo(Double.class,responseParams.get(PARAMETER_AZIMUTH)));
    azimuth.setUnit("String_Node_Str");
    Parameter elevation=new Parameter(issuedBy + "String_Node_Str" + PARAMETER_ELEVEATION,PARAMETER_ELEVEATION);
    elevation.setDescription("String_Node_Str");
    elevation.setValue(typeConverter.convertTo(Double.class,responseParams.get(PARAMETER_ELEVEATION)));
    elevation.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(2);
    result.add(azimuth);
    result.add(elevation);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(java.lang.Object,org.hbird.exchange.interfaces.IPart)
 */
@Override public List<IEntityInstance> handle(DriverContext<RotatorDriverConfiguration,String,String> driverContext,String response){
  List<IEntityInstance> result;
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    result=Collections.emptyList();
  }
 else {
    Map<String,String> responseParams=HamlibProtocolHelper.toMap(response);
    String id=driverContext.getPart().getID();
    TypeConverter typeConverter=driverContext.getTypeConverter();
    Parameter azimuth=new Parameter(id + "String_Node_Str" + PARAMETER_AZIMUTH,PARAMETER_AZIMUTH);
    azimuth.setIssuedBy(id);
    azimuth.setDescription("String_Node_Str");
    azimuth.setValue(typeConverter.convertTo(Double.class,responseParams.get(PARAMETER_AZIMUTH)));
    azimuth.setUnit("String_Node_Str");
    Parameter elevation=new Parameter(id + "String_Node_Str" + PARAMETER_ELEVEATION,PARAMETER_ELEVEATION);
    elevation.setIssuedBy(id);
    elevation.setDescription("String_Node_Str");
    elevation.setValue(typeConverter.convertTo(Double.class,responseParams.get(PARAMETER_ELEVEATION)));
    elevation.setUnit("String_Node_Str");
    result=new ArrayList<IEntityInstance>(2);
    result.add(azimuth);
    result.add(elevation);
  }
  return result;
}
Program: 98600
Project: 98600
Buggy source:
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(org.hbird.business.groundstation.DriverContext,java.lang.Object)
 */
@Override public List<IEntityInstance> handle(DriverContext<RotatorDriverConfiguration,String,String> driverContext,String response){
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    return Collections.emptyList();
  }
 else {
    List<IEntityInstance> result=new ArrayList<IEntityInstance>(2);
    TypeConverter converter=driverContext.getTypeConverter();
    String issuedBy=driverContext.getPart().getID();
    Map<String,String> map=HamlibProtocolHelper.toMap(response);
    String args=map.get(KEY);
    String azimuthValue=StringUtils.substringBefore(args,"String_Node_Str").trim();
    String elevationValue=StringUtils.substringAfter(args,"String_Node_Str").trim();
    Parameter azimuth=new Parameter(issuedBy + "String_Node_Str" + "String_Node_Str","String_Node_Str");
    azimuth.setDescription("String_Node_Str");
    azimuth.setValue(converter.convertTo(Double.class,azimuthValue));
    azimuth.setUnit("String_Node_Str");
    Parameter elevation=new Parameter(issuedBy + "String_Node_Str" + "String_Node_Str","String_Node_Str");
    elevation.setDescription("String_Node_Str");
    elevation.setValue(converter.convertTo(Double.class,elevationValue));
    elevation.setUnit("String_Node_Str");
    result.add(azimuth);
    result.add(elevation);
    return result;
  }
}

Fixed version (ground truth):
/** 
 * @see org.hbird.business.groundstation.device.response.ResponseHandler#handle(org.hbird.business.groundstation.DriverContext,java.lang.Object)
 */
@Override public List<IEntityInstance> handle(DriverContext<RotatorDriverConfiguration,String,String> driverContext,String response){
  if (HamlibProtocolHelper.isErrorResponse(response)) {
    return Collections.emptyList();
  }
 else {
    List<IEntityInstance> result=new ArrayList<IEntityInstance>(2);
    TypeConverter converter=driverContext.getTypeConverter();
    String id=driverContext.getPart().getID();
    Map<String,String> map=HamlibProtocolHelper.toMap(response);
    String args=map.get(KEY);
    String azimuthValue=StringUtils.substringBefore(args,"String_Node_Str").trim();
    String elevationValue=StringUtils.substringAfter(args,"String_Node_Str").trim();
    Parameter azimuth=new Parameter(id + "String_Node_Str" + "String_Node_Str","String_Node_Str");
    azimuth.setIssuedBy(id);
    azimuth.setDescription("String_Node_Str");
    azimuth.setValue(converter.convertTo(Double.class,azimuthValue));
    azimuth.setUnit("String_Node_Str");
    Parameter elevation=new Parameter(id + "String_Node_Str" + "String_Node_Str","String_Node_Str");
    elevation.setIssuedBy(id);
    elevation.setDescription("String_Node_Str");
    elevation.setValue(converter.convertTo(Double.class,elevationValue));
    elevation.setUnit("String_Node_Str");
    result.add(azimuth);
    result.add(elevation);
    return result;
  }
}
Program: 98603
Project: 98603
Buggy source:
/** 
 * @param minFrequency
 * @param maxFrequency
 * @param isUplink
 * @param isDownlink
 * @param gain
 */
public HamlibRadioPart(String ID,String name,long minFrequency,long maxFrequency,boolean isUplink,boolean isDownlink,long gain,long port,String host){
  super(ID,name,minFrequency,maxFrequency,isUplink,isDownlink,gain,HamlibDriver.class.getName());
  this.port=port;
  this.host=host;
}

Fixed version (ground truth):
/** 
 * @param minFrequency
 * @param maxFrequency
 * @param isUplink
 * @param isDownlink
 * @param gain
 */
public HamlibRadioPart(String ID,String name,long minFrequency,long maxFrequency,boolean isUplink,boolean isDownlink,long gain,long port,String host){
  super(ID,name,minFrequency,maxFrequency,isUplink,isDownlink,gain,HamlibRadioDriver.class.getName());
  this.port=port;
  this.host=host;
}
Program: 98604
Project: 98604
Buggy source:
@Handler public void process() throws InterruptedException {
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str");
  publishApi.publish(new StartComponent("String_Node_Str",new CelestrackComponent()));
  Thread.sleep(500000);
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
@Handler public void process() throws InterruptedException {
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str");
  startMonitoringArchive();
  azzert(accessApi.retrieveTleFor("String_Node_Str") == null,"String_Node_Str");
  azzert(accessApi.retrieveTleFor("String_Node_Str") == null,"String_Node_Str");
  azzert(accessApi.retrieveTleFor("String_Node_Str") == null,"String_Node_Str");
  publishApi.publish(new StartComponent("String_Node_Str",new CelestrackComponent()));
  Thread.sleep(10000);
  azzert(accessApi.retrieveTleFor("String_Node_Str") != null,"String_Node_Str");
  azzert(accessApi.retrieveTleFor("String_Node_Str") != null,"String_Node_Str");
  azzert(accessApi.retrieveTleFor("String_Node_Str") != null,"String_Node_Str");
  LOG.info("String_Node_Str");
}
Program: 98605
Project: 98605
Buggy source:
/** 
 * Test method for  {@link eu.estcube.common.helper.TncFrameToLabel#process(java.lang.Long,java.lang.String,eu.estcube.domain.transport.tnc.TncFrame)}.
 */
@Test public void testProcess(){
  Label label=toLabel.process(NOW,ISSUED_BY,frame);
  assertNotNull(label);
  assertEquals(ISSUED_BY,label.getIssuedBy());
  assertEquals(NOW.longValue(),label.getTimestamp());
  assertEquals(new DefaultNaming().createAbsoluteName(Base.GROUND_STATION,GROUND_STATION_NAME,TncFrameToLabel.RELATIVE_PARAMETER_NAME),label.getName());
  assertEquals(TncFrameToLabel.DESCRIPTION,label.getDescription());
  assertEquals("String_Node_Str",label.getValue());
  assertEquals(TncFrame.class.getSimpleName(),label.getType());
  inOrder.verify(frame,times(1)).getData();
  inOrder.verify(frame,times(1)).getTarget();
  inOrder.verifyNoMoreInteractions();
}

Fixed version (ground truth):
/** 
 * Test method for  {@link eu.estcube.common.helper.TncFrameToLabel#process(java.lang.Long,java.lang.String,eu.estcube.domain.transport.tnc.TncFrame)}.
 */
@Test public void testProcess(){
  Label label=toLabel.process(NOW,ISSUED_BY,frame);
  assertNotNull(label);
  assertEquals(ISSUED_BY,label.getIssuedBy());
  assertEquals(NOW.longValue(),label.getTimestamp());
  assertEquals(new DefaultNaming().createAbsoluteName(Base.GROUND_STATION,GROUND_STATION_NAME,TncFrameToLabel.RELATIVE_PARAMETER_NAME),label.getName());
  assertEquals(TncFrameToLabel.DESCRIPTION,label.getDescription());
  assertEquals("String_Node_Str",label.getValue());
  assertEquals(Parameter.class.getSimpleName(),label.getType());
  inOrder.verify(frame,times(1)).getData();
  inOrder.verifyNoMoreInteractions();
}
Program: 98606
Project: 98606
Buggy source:
public PrepareResponse processPrepareRequest(PrepareRequest prepareRequest){
  if (prepareRequest.getNumber().getValue() > this.maxNumberPrepared.getValue()) {
    this.maxNumberPrepared=prepareRequest.getNumber();
  }
  PrepareResponse prepareResponse=new PrepareResponse(this.hostIdentifier,prepareRequest,this.maxNumberPrepared.clone());
  if (this.serialization != null) {
    this.serialization.saveState("String_Node_Str",this.maxNumberPrepared);
  }
  return prepareResponse;
}

Fixed version (ground truth):
public PrepareResponse processPrepareRequest(PrepareRequest prepareRequest){
  if (prepareRequest.getNumber().getValue() > this.maxNumberPrepared.getValue()) {
    this.maxNumberPrepared=prepareRequest.getNumber();
  }
  LearnedValue learnedValue=this.learnedValues.getAt(prepareRequest.getSlotNumber());
  PrepareResponse prepareResponse=new PrepareResponse(this.hostIdentifier,prepareRequest,this.maxNumberPrepared.clone(),learnedValue != null ? learnedValue.getContent() : null);
  if (this.serialization != null) {
    this.serialization.saveState("String_Node_Str",this.maxNumberPrepared);
  }
  return prepareResponse;
}
Program: 98607
Project: 98607
Buggy source:
public static String getErrorMessage(int errorCode){
switch (errorCode) {
case PREVIOUS_SEQUENCE_NUMBER_HIGHER_THAN_CURRENT:
    return "String_Node_Str";
case PREVIOUS_SLOT_NUMBER_DIFFERENT_THAN_CURRENT:
  return "String_Node_Str";
case CONTENT_IS_NULL:
return "String_Node_Str";
case VALUE_IS_NULL:
return "String_Node_Str";
case PREVIOUS_VALUE_DIFFERENT_THAN_CURRENT:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_REQUEST_WITH_PENDING_RESPONSES:
return "String_Node_Str";
case ALREADY_RECEIVED_RESPONSE_FROM_THIS_ACCEPTOR:
return "String_Node_Str";
case INVALID_STATE_NOT_WAITING_FOR_REPARE_RESPONSE:
return "String_Node_Str";
case REQUEST_NUMBER_DIDNT_MATCH:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_REQUEST_WITHOUT_PENDING_RESPONSES:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_RESEND_WITHOUT_PENDING_RESPONSES:
return "String_Node_Str";
case CANNOT_CREATE_ACCEPT_REQUEST:
return "String_Node_Str";
case VALUE_WAS_NOT_LEARNED:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
public static String getErrorMessage(int errorCode){
switch (errorCode) {
case PREVIOUS_SEQUENCE_NUMBER_HIGHER_THAN_CURRENT:
    return "String_Node_Str";
case PREVIOUS_SLOT_NUMBER_DIFFERENT_THAN_CURRENT:
  return "String_Node_Str";
case CONTENT_IS_NULL:
return "String_Node_Str";
case VALUE_IS_NULL:
return "String_Node_Str";
case PREVIOUS_VALUE_DIFFERENT_THAN_CURRENT:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_REQUEST_WITH_PENDING_RESPONSES:
return "String_Node_Str";
case ALREADY_RECEIVED_RESPONSE_FROM_THIS_ACCEPTOR:
return "String_Node_Str";
case INVALID_STATE_NOT_WAITING_FOR_REPARE_RESPONSE:
return "String_Node_Str";
case REQUEST_NUMBER_DIDNT_MATCH:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_REQUEST_WITHOUT_PENDING_RESPONSES:
return "String_Node_Str";
case CANNOT_CREATE_PREPARE_RESEND_WITHOUT_PENDING_RESPONSES:
return "String_Node_Str";
case CANNOT_CREATE_ACCEPT_REQUEST:
return "String_Node_Str";
case VALUE_WAS_NOT_LEARNED:
return "String_Node_Str";
case CANNOT_ACCEPT_WITH_DIFFERENT_VALUE:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 98608
Project: 98608
Buggy source:
public PrepareResponse(byte hostIdentifier,PrepareRequest prepareRequest,PrepareNumber maxNumberPreparedSoFar){
  this.hostIdentifier=hostIdentifier;
  this.prepareRequest=prepareRequest;
  this.maxNumberPreparedSoFar=maxNumberPreparedSoFar;
}

Fixed version (ground truth):
public PrepareResponse(byte hostIdentifier,PrepareRequest prepareRequest,PrepareNumber maxNumberPreparedSoFar,Object content){
  this.hostIdentifier=hostIdentifier;
  this.prepareRequest=prepareRequest;
  this.maxNumberPreparedSoFar=maxNumberPreparedSoFar;
  this.content=content;
}
Program: 98609
Project: 98609
Buggy source:
private int getAcceptCount(PrepareState proposalState){
  int acceptCount=0;
  PrepareNumber prepareNumber=proposalState.getPrepareRequest().getNumber();
  for (  PrepareResponse prepareResponse : proposalState.getProposalResponses()) {
    if (prepareNumber.compareTo(prepareResponse.getMaxNumberPreparedSoFar()) >= 0) {
      acceptCount++;
    }
  }
  return acceptCount;
}

Fixed version (ground truth):
private int getAcceptCount(PrepareState proposalState){
  int acceptCount=0;
  PrepareNumber prepareNumber=proposalState.getPrepareRequest().getNumber();
  for (  PrepareResponse prepareResponse : proposalState.getProposalResponses()) {
    if (prepareNumber.compareTo(prepareResponse.getMaxNumberPreparedSoFar()) >= 0 && prepareResponse.getContent() == null) {
      acceptCount++;
    }
  }
  return acceptCount;
}
Program: 98610
Project: 98610
Buggy source:
public AcceptRequest createAcceptRequest(int slotNumber,Object value){
  PrepareState prepareState=this.responses.get(slotNumber);
  if (this.canProposeValue(prepareState)) {
    return new AcceptRequest(prepareState.getPrepareRequest(),value);
  }
 else {
    throw new PaxosException(PaxosException.CANNOT_CREATE_ACCEPT_REQUEST);
  }
}

Fixed version (ground truth):
public AcceptRequest createAcceptRequest(int slotNumber,Object value){
  PrepareState prepareState=this.responses.get(slotNumber);
  if (this.canProposeValue(prepareState)) {
    Object alreadyAcceptedValue=this.getAnyAcceptedValue(prepareState);
    if (alreadyAcceptedValue != null && !alreadyAcceptedValue.equals(value)) {
      throw new PaxosException(PaxosException.CANNOT_ACCEPT_WITH_DIFFERENT_VALUE);
    }
    return new AcceptRequest(prepareState.getPrepareRequest(),value);
  }
 else {
    throw new PaxosException(PaxosException.CANNOT_CREATE_ACCEPT_REQUEST);
  }
}
Program: 98611
Project: 98611
Buggy source:
private static void processPrepareResponseSunnyPathTest(){
  byte hostIdentifier=0;
  Proposer proposer=new Proposer(hostIdentifier,4);
  PrepareRequest prepareRequest=proposer.createPrepareRequest(0);
  PrepareResponse response1=new PrepareResponse((byte)1,prepareRequest,new PrepareNumber((byte)1,0));
  PrepareResponse response2=new PrepareResponse((byte)2,prepareRequest,new PrepareNumber((byte)2,0));
  PrepareResponse response3=new PrepareResponse((byte)3,prepareRequest,new PrepareNumber((byte)3,0));
  PrepareResponse response4=new PrepareResponse((byte)4,prepareRequest,new PrepareNumber((byte)4,0));
  Assert.isFalse(proposer.processPrepareResponse(response1));
  Assert.isFalse(proposer.processPrepareResponse(response2));
  Assert.isTrue(proposer.processPrepareResponse(response3));
  Assert.isTrue(proposer.processPrepareResponse(response4));
  print("String_Node_Str");
}

Fixed version (ground truth):
private static void processPrepareResponseSunnyPathTest(){
  byte hostIdentifier=0;
  Proposer proposer=new Proposer(hostIdentifier,4);
  PrepareRequest prepareRequest=proposer.createPrepareRequest(0);
  PrepareResponse response1=new PrepareResponse((byte)1,prepareRequest,new PrepareNumber((byte)1,0),null);
  PrepareResponse response2=new PrepareResponse((byte)2,prepareRequest,new PrepareNumber((byte)2,0),null);
  PrepareResponse response3=new PrepareResponse((byte)3,prepareRequest,new PrepareNumber((byte)3,0),null);
  PrepareResponse response4=new PrepareResponse((byte)4,prepareRequest,new PrepareNumber((byte)4,0),null);
  Assert.isFalse(proposer.processPrepareResponse(response1));
  Assert.isFalse(proposer.processPrepareResponse(response2));
  Assert.isTrue(proposer.processPrepareResponse(response3));
  Assert.isTrue(proposer.processPrepareResponse(response4));
  print("String_Node_Str");
}
Program: 98613
Project: 98613
Buggy source:
private static void processPrepareResponseRainyPathTest(){
  byte hostIdentifier=0;
  Proposer proposer=new Proposer(hostIdentifier,4);
  PrepareRequest prepareRequest=proposer.createPrepareRequest(0);
  PrepareResponse response1=new PrepareResponse((byte)1,prepareRequest,new PrepareNumber((byte)2,2));
  PrepareResponse response2=new PrepareResponse((byte)2,prepareRequest,new PrepareNumber((byte)2,2));
  PrepareResponse response3=new PrepareResponse((byte)3,prepareRequest,new PrepareNumber((byte)2,2));
  PrepareResponse response4=new PrepareResponse((byte)4,prepareRequest,new PrepareNumber((byte)2,2));
  Assert.isFalse(proposer.processPrepareResponse(response1));
  Assert.isFalse(proposer.processPrepareResponse(response2));
  Assert.isFalse(proposer.processPrepareResponse(response3));
  Assert.isFalse(proposer.processPrepareResponse(response4));
  print("String_Node_Str");
}

Fixed version (ground truth):
private static void processPrepareResponseRainyPathTest(){
  byte hostIdentifier=0;
  Proposer proposer=new Proposer(hostIdentifier,4);
  PrepareRequest prepareRequest=proposer.createPrepareRequest(0);
  PrepareResponse response1=new PrepareResponse((byte)1,prepareRequest,new PrepareNumber((byte)2,2),null);
  PrepareResponse response2=new PrepareResponse((byte)2,prepareRequest,new PrepareNumber((byte)2,2),null);
  PrepareResponse response3=new PrepareResponse((byte)3,prepareRequest,new PrepareNumber((byte)2,2),null);
  PrepareResponse response4=new PrepareResponse((byte)4,prepareRequest,new PrepareNumber((byte)2,2),null);
  Assert.isFalse(proposer.processPrepareResponse(response1));
  Assert.isFalse(proposer.processPrepareResponse(response2));
  Assert.isFalse(proposer.processPrepareResponse(response3));
  Assert.isFalse(proposer.processPrepareResponse(response4));
  print("String_Node_Str");
}
Program: 98614
Project: 98614
Buggy source:
public Acceptor(byte hostIdentifier){
  this.hostIdentifier=hostIdentifier;
  this.maxNumberPrepared=new PrepareNumber((byte)0,0);
  this.proposedValues=new AcceptedValues();
}

Fixed version (ground truth):
public Acceptor(byte hostIdentifier,ISerialization serialization){
  this.hostIdentifier=hostIdentifier;
  this.serialization=serialization;
  if (this.serialization != null) {
    this.maxNumberPrepared=(PrepareNumber)this.serialization.restoreState("String_Node_Str");
    this.proposedValues=(AcceptedValues)this.serialization.restoreState("String_Node_Str");
  }
 else {
    this.maxNumberPrepared=new PrepareNumber((byte)0,0);
    this.proposedValues=new AcceptedValues();
  }
}
Program: 98615
Project: 98615
Buggy source:
public boolean processAccept(AcceptRequest acceptRequest){
  PrepareRequest prepareRequest=acceptRequest.getPrepareRequest();
  if (prepareRequest.getNumber().getValue() >= this.maxNumberPrepared.getValue()) {
    this.proposedValues.setAt(prepareRequest.getSlotNumber(),new AcceptedValue(prepareRequest.getSlotNumber(),acceptRequest.getValue(),prepareRequest.getNumber()));
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public AcceptResponse processAccept(AcceptRequest acceptRequest){
  PrepareRequest prepareRequest=acceptRequest.getPrepareRequest();
  boolean success;
  if (prepareRequest.getNumber().getValue() >= this.maxNumberPrepared.getValue()) {
    this.proposedValues.setAt(prepareRequest.getSlotNumber(),new AcceptedValue(prepareRequest.getSlotNumber(),acceptRequest.getValue(),prepareRequest.getNumber()));
    if (this.serialization != null) {
      this.serialization.saveState("String_Node_Str",this.proposedValues);
    }
    success=true;
  }
 else {
    success=false;
  }
  return new AcceptResponse(prepareRequest,this.maxNumberPrepared.clone(),success);
}
Program: 98616
Project: 98616
Buggy source:
public PrepareResponse processPrepareRequest(PrepareRequest prepareRequest){
  PrepareResponse prepareResponse=new PrepareResponse(this.hostIdentifier,prepareRequest,maxNumberPrepared);
  if (prepareRequest.getNumber().getValue() > this.maxNumberPrepared.getValue()) {
    this.maxNumberPrepared=prepareRequest.getNumber();
  }
  return prepareResponse;
}

Fixed version (ground truth):
public PrepareResponse processPrepareRequest(PrepareRequest prepareRequest){
  if (prepareRequest.getNumber().getValue() > this.maxNumberPrepared.getValue()) {
    this.maxNumberPrepared=prepareRequest.getNumber();
  }
  PrepareResponse prepareResponse=new PrepareResponse(this.hostIdentifier,prepareRequest,this.maxNumberPrepared.clone());
  if (this.serialization != null) {
    this.serialization.saveState("String_Node_Str",this.maxNumberPrepared);
  }
  return prepareResponse;
}
Program: 98617
Project: 98617
Buggy source:
@Override public int compareTo(PrepareNumber prepareNumber){
  if (prepareNumber == null) {
    return -1;
  }
 else {
    if (this.getValue() > prepareNumber.getValue()) {
      return +1;
    }
 else     if (this.getValue() < prepareNumber.getHostIdentifier()) {
      return -1;
    }
 else {
      return 0;
    }
  }
}

Fixed version (ground truth):
@Override public int compareTo(PrepareNumber prepareNumber){
  if (prepareNumber == null) {
    return -1;
  }
 else {
    if (this.getValue() > prepareNumber.getValue()) {
      return +1;
    }
 else     if (this.getValue() < prepareNumber.getValue()) {
      return -1;
    }
 else {
      return 0;
    }
  }
}
Program: 98618
Project: 98618
Buggy source:
private int getAcceptCount(PrepareState proposalState){
  int acceptCount=0;
  PrepareNumber prepareNumber=proposalState.getPrepareRequest().getNumber();
  for (  PrepareResponse prepareResponse : proposalState.getProposalResponses()) {
    if (prepareNumber.compareTo(prepareResponse.getMaxNumberPreparedSoFar()) > 0) {
      acceptCount++;
    }
  }
  return acceptCount;
}

Fixed version (ground truth):
private int getAcceptCount(PrepareState proposalState){
  int acceptCount=0;
  PrepareNumber prepareNumber=proposalState.getPrepareRequest().getNumber();
  for (  PrepareResponse prepareResponse : proposalState.getProposalResponses()) {
    if (prepareNumber.compareTo(prepareResponse.getMaxNumberPreparedSoFar()) >= 0) {
      acceptCount++;
    }
  }
  return acceptCount;
}
Program: 98619
Project: 98619
Buggy source:
public TestDriver(int numberOfProposers,int numberOfAcceptors){
  this.proposers=new Vector<Proposer>();
  this.acceptors=new Vector<Acceptor>();
  byte hostIdentifier=0;
  for (int i=0; i < numberOfProposers; i++) {
    this.proposers.add(new Proposer(hostIdentifier++,numberOfAcceptors));
  }
  for (int i=0; i < numberOfAcceptors; i++) {
    this.acceptors.add(new Acceptor(hostIdentifier++));
  }
}

Fixed version (ground truth):
public TestDriver(int numberOfProposers,int numberOfAcceptors){
  this.proposers=new Vector<Proposer>();
  this.acceptors=new Vector<Acceptor>();
  byte hostIdentifier=0;
  for (int i=0; i < numberOfProposers; i++) {
    this.proposers.add(new Proposer(hostIdentifier++,numberOfAcceptors));
  }
  for (int i=0; i < numberOfAcceptors; i++) {
    this.acceptors.add(new Acceptor(hostIdentifier++,null));
  }
}
Program: 98620
Project: 98620
Buggy source:
public boolean accept(int proposeServer,int slotNumber,Object value){
  Proposer proposer=this.proposers.get(proposeServer);
  AcceptRequest request=proposer.createAcceptRequest(slotNumber,value);
  boolean accepted=true;
  for (  Acceptor acceptor : this.acceptors) {
    accepted=accepted && acceptor.processAccept(request);
  }
  return accepted;
}

Fixed version (ground truth):
public boolean accept(int proposeServer,int slotNumber,Object value){
  Proposer proposer=this.proposers.get(proposeServer);
  AcceptRequest request=proposer.createAcceptRequest(slotNumber,value);
  boolean accepted=true;
  for (  Acceptor acceptor : this.acceptors) {
    AcceptResponse acceptResponse=acceptor.processAccept(request);
    accepted=accepted && acceptResponse.getSuccess();
    proposer.processAcceptResponse(acceptResponse);
  }
  return accepted;
}
Program: 98621
Project: 98621
Buggy source:
public void recoverFromCrash(){
  this.m_uncommitedState=restoreState(FILE_NAME_TEMP);
}

Fixed version (ground truth):
public void recoverFromCrash(){
  this.m_state=restoreState(FILE_NAME);
  if (this.m_state == null) {
    this.m_state=new FacebookShardState();
  }
  this.m_uncommitedState=restoreState(FILE_NAME_TEMP);
}
Program: 98622
Project: 98622
Buggy source:
public Packet(){
  m_from=-1;
  m_to=-1;
  m_type=-1;
  m_connId=-1;
  m_seqNum=-1;
  m_payload=null;
}

Fixed version (ground truth):
public Packet(){
  m_from=-1;
  m_to=-1;
  m_type=-1;
  m_connId=-1;
  m_seqNum=-1;
  m_minSeq=-1;
  m_payload=null;
}
Program: 98623
Project: 98623
Buggy source:
public String stringize(){
  String content="String_Node_Str";
  int contentLength=0;
  if (m_payload != null) {
    content=Utility.byteArrayToString(m_payload);
    contentLength=m_payload.length;
  }
  return String.format("String_Node_Str",m_from,m_to,m_type,m_connId,m_seqNum,contentLength,content);
}

Fixed version (ground truth):
public String stringize(){
  String content="String_Node_Str";
  int contentLength=0;
  if (m_payload != null) {
    content=Utility.byteArrayToString(m_payload);
    contentLength=m_payload.length;
  }
  return String.format("String_Node_Str",m_from,m_to,m_type,m_connId,m_seqNum,m_minSeq,contentLength,content);
}
Program: 98624
Project: 98624
Buggy source:
/** 
 * Assembles individual field values into a Packet object
 * @param from - sender
 * @param to - receiver
 * @param ptype - packet type
 * @param connId - connection ID
 * @param seqNum - sequence number
 * @param payload - packet contents
 * @return Packet object
 */
public static Packet Create(int from,int to,int ptype,int connId,int seqNum,byte[] payload){
  Packet packet;
  packet=new Packet();
  packet.setFrom(from);
  packet.setTo(to);
  packet.setType(ptype);
  packet.setConnectionId(connId);
  packet.setSequence(seqNum);
  packet.setPayload(payload);
  return packet;
}

Fixed version (ground truth):
/** 
 * Assembles individual field values into a Packet object
 * @param from - sender
 * @param to - receiver
 * @param ptype - packet type
 * @param connId - connection ID
 * @param seqNum - sequence number
 * @param payload - packet contents
 * @return Packet object
 */
public static Packet Create(int from,int to,int ptype,int connId,int seqNum,byte[] payload){
  Packet packet;
  packet=new Packet();
  packet.setFrom(from);
  packet.setTo(to);
  packet.setType(ptype);
  packet.setConnectionId(connId);
  packet.setSequence(seqNum);
  packet.setMinSequence(0);
  packet.setPayload(payload);
  return packet;
}
Program: 98625
Project: 98625
Buggy source:
public byte[] toByteArray(){
  byte[] buffer;
  int length=20;
  if (m_payload != null) {
    length+=m_payload.length;
  }
  buffer=new byte[length];
  ByteManipulator.addInt(buffer,0,m_from);
  ByteManipulator.addInt(buffer,4,m_to);
  ByteManipulator.addInt(buffer,8,m_type);
  ByteManipulator.addInt(buffer,12,m_connId);
  ByteManipulator.addInt(buffer,16,m_seqNum);
  if (m_payload != null) {
    System.arraycopy(m_payload,0,buffer,20,m_payload.length);
  }
  return buffer;
}

Fixed version (ground truth):
public byte[] toByteArray(){
  byte[] buffer;
  int length=HEADER_LENGTH;
  if (m_payload != null) {
    length+=m_payload.length;
  }
  buffer=new byte[length];
  ByteManipulator.addInt(buffer,0,m_from);
  ByteManipulator.addInt(buffer,4,m_to);
  ByteManipulator.addInt(buffer,8,m_type);
  ByteManipulator.addInt(buffer,12,m_connId);
  ByteManipulator.addInt(buffer,16,m_seqNum);
  ByteManipulator.addInt(buffer,20,m_minSeq);
  if (m_payload != null) {
    System.arraycopy(m_payload,0,buffer,HEADER_LENGTH,m_payload.length);
  }
  return buffer;
}
Program: 98626
Project: 98626
Buggy source:
public String stringizeHeader(){
  int contentLength=0;
  if (m_payload != null) {
    contentLength=m_payload.length;
  }
  return String.format("String_Node_Str",m_from,m_to,m_type,m_connId,m_seqNum,contentLength);
}

Fixed version (ground truth):
public String stringizeHeader(){
  int contentLength=0;
  if (m_payload != null) {
    contentLength=m_payload.length;
  }
  return String.format("String_Node_Str",m_from,m_to,m_type,m_connId,m_seqNum,m_minSeq,contentLength);
}
Program: 98627
Project: 98627
Buggy source:
/** 
 * onReceive_HandleData
 * @param packet
 */
private void onReceive_HandleData(Packet packet){
  Session current=getInboundByNode(packet.getFrom());
  if (current != null && current.getConnectionId() == packet.getConnectionId()) {
    Packet orderedPacket=null;
    if (!current.didAlreadyReceiveSequence(packet.getSequence())) {
      info("String_Node_Str" + packet.stringizeHeader());
      current.markSequenceAsReceived(packet.getSequence());
      current.addToReceiveQueue(packet);
    }
 else {
      info("String_Node_Str" + packet.stringizeHeader());
    }
    this.internalSendAck(packet.getFrom(),packet.getConnectionId(),packet.getSequence());
    do {
      orderedPacket=current.getNextReceivePacket();
      if (orderedPacket != null) {
        info("String_Node_Str" + orderedPacket.stringize());
        this.onReliableMessageReceived(orderedPacket.getFrom(),orderedPacket.getPayload());
      }
    }
 while (orderedPacket != null);
  }
 else {
    info("String_Node_Str" + packet.stringizeHeader());
    this.internalSendReset(packet.getFrom(),packet.getConnectionId(),packet.getSequence());
  }
}

Fixed version (ground truth):
/** 
 * onReceive_HandleData
 * @param packet
 */
private void onReceive_HandleData(Packet packet){
  Session current=getInboundByNode(packet.getFrom());
  if (current != null && current.getConnectionId() == packet.getConnectionId()) {
    Packet orderedPacket=null;
    if (!current.didAlreadyReceiveSequence(packet.getSequence())) {
      info("String_Node_Str" + packet.stringizeHeader());
      current.markSequenceAsReceived(packet.getSequence());
      current.addToReceiveQueue(packet);
    }
 else {
      info("String_Node_Str" + packet.stringizeHeader());
    }
    this.internalSendAck(packet.getFrom(),packet.getConnectionId(),packet.getSequence());
    int minSeq=packet.getSequence();
    if (packet.getMinSequence() < minSeq)     minSeq=packet.getMinSequence();
    do {
      orderedPacket=current.getNextReceivePacket(minSeq);
      if (orderedPacket != null) {
        info("String_Node_Str" + orderedPacket.stringize());
        this.onReliableMessageReceived(orderedPacket.getFrom(),orderedPacket.getPayload());
      }
    }
 while (orderedPacket != null);
  }
 else {
    info("String_Node_Str" + packet.stringizeHeader());
    this.internalSendReset(packet.getFrom(),packet.getConnectionId(),packet.getSequence());
  }
}
Program: 98628
Project: 98628
Buggy source:
/** 
 * Attempts to send the given packet to the target node
 * @param packet
 */
private void internalSendPacket(Packet packet,int timeout){
  Callback cb=new Callback(this.m_timeoutMethod,this,new Object[]{packet,timeout});
  this.addTimeout(cb,timeout);
  info("String_Node_Str" + packet.stringize());
  this.send(packet.getTo(),PROTOCOLS.SCOP,packet.toByteArray());
}

Fixed version (ground truth):
/** 
 * Attempts to send the given packet to the target node
 * @param packet
 */
private void internalSendPacket(Session session,Packet packet,int timeout){
  Callback cb=new Callback(this.m_timeoutMethod,this,new Object[]{packet,timeout});
  this.addTimeout(cb,timeout);
  packet.setMinSequence(session.getMinimumPendingSequence());
  info("String_Node_Str" + packet.stringize());
  this.send(packet.getTo(),PROTOCOLS.SCOP,packet.toByteArray());
}