nus-yam/ex-repair huggingface dataset:
Program: 156224
Project: 156224
Buggy source:
@Test public void testDecode() throws Exception {
  Gps103ProtocolDecoder decoder=new Gps103ProtocolDecoder(null);
  decoder.setDataManager(new TestDataManager());
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testDecode() throws Exception {
  Gps103ProtocolDecoder decoder=new Gps103ProtocolDecoder(null);
  decoder.setDataManager(new TestDataManager());
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
  assertNotNull(decoder.decode(null,null,"String_Node_Str"));
}
Program: 156225
Project: 156225
Buggy source:
/** 
 * Request archive messages
 */
private void requestArchive(Channel channel,long newIndex){
  if (lastIndex == 0) {
    lastIndex=newIndex;
  }
 else   if (newIndex > lastIndex) {
    ChannelBuffer request=ChannelBuffers.directBuffer(ByteOrder.BIG_ENDIAN,12);
    request.writeShort(MSG_LOG_SYNC);
    request.writeShort(4);
    request.writeInt((int)lastIndex);
    request.writeInt(0);
    channel.write(request);
  }
}

Fixed version (ground truth):
/** 
 * Request archive messages
 */
private void requestArchive(Channel channel){
  if (lastIndex == 0) {
    lastIndex=newIndex;
  }
 else   if (newIndex > lastIndex) {
    ChannelBuffer request=ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN,12);
    request.writeShort(MSG_LOG_SYNC);
    request.writeShort(4);
    request.writeInt((int)lastIndex);
    request.writeInt(0);
    channel.write(request);
  }
}
Program: 156228
Project: 156228
Buggy source:
@Override public List<Event> getEventsSinceId(String workflowId,int eventId) throws IOException {
  WorkflowId id=WorkflowId.parseString(workflowId);
  FlowEventKey flowEventKey=new FlowEventKey(toFlowKey(id),eventId);
  List<FlowEvent> flowEventList=flowEventService.getFlowEventsSince(flowEventKey);
  List<Event> workflowEvents=new ArrayList<Event>();
  for (  FlowEvent flowEvent : flowEventList) {
    String eventDataJson=flowEvent.getEventDataJSON();
    try {
      Event event=Event.fromJson(eventDataJson);
      workflowEvents.add(event);
    }
 catch (    JsonMappingException e) {
      LOG.error("String_Node_Str" + eventDataJson,e);
    }
  }
  return workflowEvents;
}

Fixed version (ground truth):
@Override public List<Event> getEventsSinceId(String workflowId,int eventId,int maxEvents) throws IOException {
  Preconditions.checkArgument(maxEvents > 0);
  WorkflowId id=WorkflowId.parseString(workflowId);
  FlowEventKey flowEventKey=new FlowEventKey(toFlowKey(id),eventId);
  List<FlowEvent> flowEventList=flowEventService.getFlowEventsSince(flowEventKey);
  int numElems=0;
  List<Event> workflowEvents=new ArrayList<Event>();
  for (  FlowEvent flowEvent : flowEventList) {
    if (numElems >= maxEvents) {
      break;
    }
    String eventDataJson=flowEvent.getEventDataJSON();
    try {
      Event event=Event.fromJson(eventDataJson);
      numElems++;
      workflowEvents.add(event);
    }
 catch (    JsonMappingException e) {
      LOG.error("String_Node_Str" + eventDataJson,e);
    }
  }
  return workflowEvents;
}
Program: 156229
Project: 156229
Buggy source:
/** 
 * The onStarting event is fired when a Flow instance receives the start() message. -a Flow is cut down into executing units called stepFlow -stepFlow contains a stepFlowJob which represents the mapreduce job to be submitted to Hadoop -the DAG graph is constructed from the step graph found in flow object
 * @param flow
 */
@Override public void onStarting(Flow flow){
  List<BaseFlowStep> steps=flow.getFlowSteps();
  totalNumberOfJobs=steps.size();
  runnigJobs=0;
  currentFlowId=flow.getID();
  AmbroseCascadingGraphConverter convertor=new AmbroseCascadingGraphConverter((SimpleDirectedGraph)Flows.getStepGraphFrom(flow),dagNodeNameMap);
  convertor.convert();
  AmbroseUtils.sendDagNodeNameMap(statsWriteService,null,this.dagNodeNameMap);
}

Fixed version (ground truth):
/** 
 * The onStarting event is fired when a Flow instance receives the start() message. -a Flow is cut down into executing units called stepFlow -stepFlow contains a stepFlowJob which represents the mapreduce job to be submitted to Hadoop -the DAG graph is constructed from the step graph found in flow object
 * @param flow
 */
@Override public void onStarting(Flow flow){
  List<BaseFlowStep> steps=flow.getFlowSteps();
  totalNumberOfJobs=steps.size();
  runnigJobs=0;
  currentFlowId=flow.getID();
  Properties props=new Properties();
  props.putAll(flow.getConfigAsProperties());
  statsWriteService.initialize(props);
  AmbroseCascadingGraphConverter convertor=new AmbroseCascadingGraphConverter((SimpleDirectedGraph)Flows.getStepGraphFrom(flow),dagNodeNameMap);
  convertor.convert();
  AmbroseUtils.sendDagNodeNameMap(statsWriteService,null,this.dagNodeNameMap);
}
Program: 156230
Project: 156230
Buggy source:
@Override public void sendDagNodeNameMap(String workflowId,Map dagNodeMap) throws IOException {
  Preconditions.checkNotNull(dagNodeMap);
  this.dagNodeNameMap=dagNodeMap;
  lazyInitWorkflow();
  updateFlowQueue(flowQueueKey);
}

Fixed version (ground truth):
@Override public void sendDagNodeNameMap(String workflowId,Map dagNodeMap) throws IOException {
  Preconditions.checkNotNull(dagNodeMap);
  this.dagNodeNameMap=dagNodeMap;
  updateFlowQueue(flowQueueKey);
}
Program: 156231
Project: 156231
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void pushEvent(String workflowId,Event event) throws IOException {
  lazyInitWorkflow();
  String eventDataJson=event.toJson();
switch (event.getType()) {
case WORKFLOW_PROGRESS:
    updateWorkflowProgress((Map<Event.WorkflowProgressField,String>)event.getPayload());
  break;
case JOB_STARTED:
updateJobStarted((DAGNode)event.getPayload());
break;
case JOB_FAILED:
case JOB_FINISHED:
updateJobComplete((DAGNode)event.getPayload(),event.getType());
break;
default :
break;
}
Preconditions.checkNotNull(flowKey,String.format("String_Node_Str",event.getType()));
FlowEventKey eventKey=new FlowEventKey(flowKey,event.getId());
FlowEvent flowEvent=new FlowEvent(eventKey);
flowEvent.setTimestamp(event.getTimestamp());
flowEvent.setFramework(JobDescFactory.getFramework(jobConf));
flowEvent.setType(event.getType().name());
if (eventDataJson != null) {
flowEvent.setEventDataJSON(eventDataJson);
}
hRavenPool.submit(new HRavenEventRunnable(flowEventService,flowEvent));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void pushEvent(String workflowId,Event event) throws IOException {
  String eventDataJson=event.toJson();
switch (event.getType()) {
case WORKFLOW_PROGRESS:
    updateWorkflowProgress((Map<Event.WorkflowProgressField,String>)event.getPayload());
  break;
case JOB_STARTED:
updateJobStarted((DAGNode)event.getPayload());
break;
case JOB_FAILED:
case JOB_FINISHED:
updateJobComplete((DAGNode)event.getPayload(),event.getType());
break;
default :
break;
}
Preconditions.checkNotNull(flowKey,String.format("String_Node_Str",event.getType()));
FlowEventKey eventKey=new FlowEventKey(flowKey,event.getId());
FlowEvent flowEvent=new FlowEvent(eventKey);
flowEvent.setTimestamp(event.getTimestamp());
flowEvent.setFramework(JobDescFactory.getFramework(jobConf));
flowEvent.setType(event.getType().name());
if (eventDataJson != null) {
flowEvent.setEventDataJSON(eventDataJson);
}
hRavenPool.submit(new HRavenEventRunnable(flowEventService,flowEvent));
}
Program: 156232
Project: 156232
Buggy source:
public HRavenStatsWriteService(JobConf jobConf){
  this.runningJobs=Sets.newHashSet();
  this.completedJobs=Sets.newHashSet();
  this.failedJobs=Sets.newHashSet();
  this.username=System.getProperty("String_Node_Str");
  this.jobConf=jobConf;
  this.hRavenPool=Executors.newFixedThreadPool(1);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      shutdown();
    }
  }
);
}

Fixed version (ground truth):
public HRavenStatsWriteService(){
  this.runningJobs=Sets.newHashSet();
  this.completedJobs=Sets.newHashSet();
  this.failedJobs=Sets.newHashSet();
  this.username=System.getProperty("String_Node_Str");
  this.hRavenPool=Executors.newFixedThreadPool(1);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      shutdown();
    }
  }
);
}
Program: 156234
Project: 156234
Buggy source:
public APIHandler(StatsReadService statsReadService){
  this.statsReadService=statsReadService;
}

Fixed version (ground truth):
public APIHandler(WorkflowIndexReadService workflowIndexReadService,StatsReadService<Job> statsReadService){
  this.workflowIndexReadService=workflowIndexReadService;
  this.statsReadService=statsReadService;
}
Program: 156235
Project: 156235
Buggy source:
@Override public void handle(String target,HttpServletRequest request,HttpServletResponse response,int dispatch) throws IOException, ServletException {
  if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_JSON);
    response.setStatus(HttpServletResponse.SC_OK);
    Collection<DAGNode> nodes=statsReadService.getDagNodeNameMap(request.getParameter(QUERY_PARAM_WORKFLOW_ID)).values();
    sendJson(request,response,nodes.toArray(new DAGNode[nodes.size()]));
  }
 else   if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_JSON);
    response.setStatus(HttpServletResponse.SC_OK);
    Integer sinceId=request.getParameter(QUERY_PARAM_LAST_EVENT_ID) != null ? Integer.parseInt(request.getParameter(QUERY_PARAM_LAST_EVENT_ID)) : -1;
    Collection<Event> events=statsReadService.getEventsSinceId(request.getParameter(QUERY_PARAM_WORKFLOW_ID),sinceId);
    sendJson(request,response,events.toArray(new Event[events.size()]));
  }
 else   if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_HTML);
  }
}

Fixed version (ground truth):
@Override public void handle(String target,HttpServletRequest request,HttpServletResponse response,int dispatch) throws IOException, ServletException {
  if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_JSON);
    response.setStatus(HttpServletResponse.SC_OK);
    String cluster=request.getParameter(QUERY_PARAM_CLUSTER);
    String userId=request.getParameter(QUERY_PARAM_USER_ID);
    String status=request.getParameter(QUERY_PARAM_STATUS);
    String startKey=request.getParameter(QUERY_PARAM_START_KEY);
    PaginatedList<WorkflowSummary> workflows=workflowIndexReadService.getWorkflows(cluster,status != null ? WorkflowSummary.Status.valueOf(status) : null,userId,10,startKey != null ? startKey.getBytes(Charsets.UTF_8) : null);
    sendJson(request,response,workflows);
  }
 else   if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_JSON);
    response.setStatus(HttpServletResponse.SC_OK);
    Map<String,DAGNode<Job>> dagNodeNameMap=statsReadService.getDagNodeNameMap(request.getParameter(QUERY_PARAM_WORKFLOW_ID));
    Collection<DAGNode<Job>> nodes=dagNodeNameMap.values();
    sendJson(request,response,nodes.toArray(new DAGNode[nodes.size()]));
  }
 else   if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_JSON);
    response.setStatus(HttpServletResponse.SC_OK);
    Integer sinceId=request.getParameter(QUERY_PARAM_LAST_EVENT_ID) != null ? Integer.parseInt(request.getParameter(QUERY_PARAM_LAST_EVENT_ID)) : -1;
    Collection<Event> events=statsReadService.getEventsSinceId(request.getParameter(QUERY_PARAM_WORKFLOW_ID),sinceId);
    sendJson(request,response,events.toArray(new Event[events.size()]));
  }
 else   if (target.endsWith("String_Node_Str")) {
    response.setContentType(MIME_TYPE_HTML);
  }
}
Program: 156236
Project: 156236
Buggy source:
public ScriptStatusServer(StatsReadService statsReadService){
  this.statsReadService=statsReadService;
  this.port=getConfiguredPort();
}

Fixed version (ground truth):
public ScriptStatusServer(WorkflowIndexReadService workflowIndexReadService,StatsReadService<Job> statsReadService){
  this.workflowIndexReadService=workflowIndexReadService;
  this.statsReadService=statsReadService;
  this.port=getConfiguredPort();
}
Program: 156237
Project: 156237
Buggy source:
/** 
 * Run the server in the current thread.
 */
@Override public void run(){
  Connector connector=new SocketConnector(){
    @Override protected ServerSocket newServerSocket(    String host,    int port,    int backlog) throws IOException {
      ServerSocket ss=super.newServerSocket(host,port,backlog);
      int localPort=ss.getLocalPort();
      LOG.info("String_Node_Str",localPort);
      LOG.info("String_Node_Str",localPort);
      return ss;
    }
  }
;
  connector.setPort(port);
  server=new Server();
  server.setConnectors(new Connector[]{connector});
  URL resourcesUrl=this.getClass().getClassLoader().getResource(ROOT_PATH);
  HandlerList handler=new HandlerList();
  handler.setHandlers(new Handler[]{new APIHandler(statsReadService),new WebAppContext(resourcesUrl.toExternalForm(),SLASH)});
  server.setHandler(handler);
  server.setStopAtShutdown(false);
  try {
    server.start();
    server.join();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Run the server in the current thread.
 */
@Override public void run(){
  Connector connector=new SocketConnector(){
    @Override protected ServerSocket newServerSocket(    String host,    int port,    int backlog) throws IOException {
      ServerSocket ss=super.newServerSocket(host,port,backlog);
      int localPort=ss.getLocalPort();
      LOG.info("String_Node_Str",localPort);
      LOG.info("String_Node_Str",localPort);
      return ss;
    }
  }
;
  connector.setPort(port);
  server=new Server();
  server.setConnectors(new Connector[]{connector});
  URL resourcesUrl=this.getClass().getClassLoader().getResource(ROOT_PATH);
  HandlerList handler=new HandlerList();
  handler.setHandlers(new Handler[]{new APIHandler(workflowIndexReadService,statsReadService),new WebAppContext(resourcesUrl.toExternalForm(),SLASH)});
  server.setHandler(handler);
  server.setStopAtShutdown(false);
  try {
    server.start();
    server.join();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 156238
Project: 156238
Buggy source:
@Override public synchronized void pushEvent(String workflowId,Event event) throws IOException {
  eventMap.put(event.getId(),event);
  if (event.getType() == Event.Type.WORKFLOW_PROGRESS) {
    Event.WorkflowProgressEvent workflowProgressEvent=(Event.WorkflowProgressEvent)event;
    String progressString=workflowProgressEvent.getPayload().get(Event.WorkflowProgressField.workflowProgress);
    summary.setProgress(Integer.parseInt(progressString));
  }
  writeJsonEventToDisk(event);
}

Fixed version (ground truth):
@Override public synchronized void pushEvent(String workflowId,Event event) throws IOException {
  eventMap.put(event.getId(),event);
switch (event.getType()) {
case WORKFLOW_PROGRESS:
    Event.WorkflowProgressEvent workflowProgressEvent=(Event.WorkflowProgressEvent)event;
  String progressString=workflowProgressEvent.getPayload().get(Event.WorkflowProgressField.workflowProgress);
int progress=Integer.parseInt(progressString);
summary.setProgress(progress);
if (progress == 100) {
summary.setStatus(jobFailed ? WorkflowSummary.Status.FAILED : WorkflowSummary.Status.SUCCEEDED);
}
break;
case JOB_FAILED:
jobFailed=true;
default :
}
writeJsonEventToDisk(event);
}
Program: 156239
Project: 156239
Buggy source:
@JsonIgnore public synchronized Collection<DAGNode<? extends Job>> getSuccessors(){
  return successors;
}

Fixed version (ground truth):
public synchronized Collection<DAGNode<? extends Job>> getSuccessors(){
  return successors;
}
Program: 156240
Project: 156240
Buggy source:
@JsonCreator public DAGNode(@JsonProperty("String_Node_Str") String name,@JsonProperty("String_Node_Str") T job,@JsonProperty("String_Node_Str") Collection<String> successorNames){
  this.name=name;
  this.successorNames=successorNames;
}

Fixed version (ground truth):
public DAGNode(){
  this(null,null);
}
Program: 156241
Project: 156241
Buggy source:
@JsonCreator public Job(@JsonProperty("String_Node_Str") String runtime,@JsonProperty("String_Node_Str") String id,@JsonProperty("String_Node_Str") Map<String,Number> metrics,@JsonProperty("String_Node_Str") Properties configuration){
  this.runtime=runtime;
  this.id=id;
  this.metrics=metrics;
  this.configuration=configuration;
}

Fixed version (ground truth):
public Job(String id,Map<String,Number> metrics,Properties configuration){
  this.id=id;
  this.metrics=metrics;
  this.configuration=configuration;
}
Program: 156242
Project: 156242
Buggy source:
@Test public void testRoundTrip() throws IOException {
  DAGNode<Job> node=new DAGNode<Job>("String_Node_Str",new Job("String_Node_Str","String_Node_Str",null,null));
  testRoundTrip(node);
}

Fixed version (ground truth):
@Test public void testRoundTrip() throws IOException {
  DAGNode<Job> node=new DAGNode<Job>("String_Node_Str",new Job("String_Node_Str",null,null));
  testRoundTrip(node);
}
Program: 156243
Project: 156243
Buggy source:
@Test public void testRoundTrip() throws IOException {
  Map<String,Number> metrics=new HashMap<String,Number>();
  metrics.put("String_Node_Str",6);
  Properties properties=new Properties();
  properties.setProperty("String_Node_Str","String_Node_Str");
  Job job=new Job("String_Node_Str","String_Node_Str",metrics,properties);
  testRoundTrip(job);
}

Fixed version (ground truth):
@Test public void testRoundTrip() throws IOException {
  Map<String,Number> metrics=new HashMap<String,Number>();
  metrics.put("String_Node_Str",6);
  Properties properties=new Properties();
  properties.setProperty("String_Node_Str","String_Node_Str");
  Job job=new Job("String_Node_Str",metrics,properties);
  testRoundTrip(job);
}
Program: 156244
Project: 156244
Buggy source:
public static void assertJobEquals(Job expected,Job found){
  assertEquals(expected.getRuntime(),found.getRuntime());
  assertEquals(expected.getId(),found.getId());
  assertEquals(expected.getMetrics(),found.getMetrics());
  assertEquals(expected.getConfiguration(),found.getConfiguration());
}

Fixed version (ground truth):
public static void assertJobEquals(Job expected,Job found){
  assertEquals(expected.getId(),found.getId());
  assertEquals(expected.getMetrics(),found.getMetrics());
  assertEquals(expected.getConfiguration(),found.getConfiguration());
}
Program: 156245
Project: 156245
Buggy source:
@JsonCreator public PigJob(@JsonProperty("String_Node_Str") String id,@JsonProperty("String_Node_Str") String[] aliases,@JsonProperty("String_Node_Str") String[] features){
  super(RUNTIME);
  this.aliases=aliases;
  this.features=features;
  this.mapReduceJobState=mapReduceJobState;
  this.counterGroupMap=counterGroupMap;
  this.inputInfoList=inputInfoList;
  this.outputInfoList=outputInfoList;
}

Fixed version (ground truth):
@JsonCreator public PigJob(@JsonProperty("String_Node_Str") String id,@JsonProperty("String_Node_Str") String[] aliases,@JsonProperty("String_Node_Str") String[] features){
  super(id,null,null);
  this.aliases=aliases;
  this.features=features;
  this.mapReduceJobState=mapReduceJobState;
  this.counterGroupMap=counterGroupMap;
  this.inputInfoList=inputInfoList;
  this.outputInfoList=outputInfoList;
}
Program: 156246
Project: 156246
Buggy source:
public static void assertJobEquals(PigJob expected,PigJob found){
  assertEquals(expected.getRuntime(),found.getRuntime());
  assertEquals(expected.getId(),found.getId());
  assertArrayEquals(expected.getAliases(),found.getAliases());
  assertArrayEquals(expected.getFeatures(),found.getFeatures());
  assertEquals(expected.getMetrics(),found.getMetrics());
  assertEquals(expected.getConfiguration(),found.getConfiguration());
}

Fixed version (ground truth):
public static void assertJobEquals(PigJob expected,PigJob found){
  assertEquals(expected.getId(),found.getId());
  assertArrayEquals(expected.getAliases(),found.getAliases());
  assertArrayEquals(expected.getFeatures(),found.getFeatures());
  assertEquals(expected.getMetrics(),found.getMetrics());
  assertEquals(expected.getConfiguration(),found.getConfiguration());
}
Program: 156247
Project: 156247
Buggy source:
@Test public void testGetEventsSince(){
  for (  WorkflowEvent event : testEvents) {
    service.pushEvent(workflowId,event);
  }
  Collection<WorkflowEvent> allEvents=service.getEventsSinceId(workflowId,-1);
  int sinceId=allEvents.iterator().next().getEventId();
  Collection<WorkflowEvent> events=service.getEventsSinceId(workflowId,sinceId);
  Iterator<WorkflowEvent> foundEvents=events.iterator();
  assertEquals("String_Node_Str",testEvents.length - 1,events.size());
  for (  WorkflowEvent sentEvent : testEvents) {
    if (sentEvent.getEventId() <= sinceId) {
      continue;
    }
    assertEqualWorkflows(sentEvent,foundEvents.next());
  }
  assertFalse("String_Node_Str",foundEvents.hasNext());
}

Fixed version (ground truth):
@Test public void testGetEventsSince() throws IOException {
  for (  WorkflowEvent event : testEvents) {
    service.pushEvent(workflowId,event);
  }
  Collection<WorkflowEvent> allEvents=service.getEventsSinceId(workflowId,-1);
  int sinceId=allEvents.iterator().next().getEventId();
  Collection<WorkflowEvent> events=service.getEventsSinceId(workflowId,sinceId);
  Iterator<WorkflowEvent> foundEvents=events.iterator();
  assertEquals("String_Node_Str",testEvents.length - 1,events.size());
  for (  WorkflowEvent sentEvent : testEvents) {
    if (sentEvent.getEventId() <= sinceId) {
      continue;
    }
    assertEqualWorkflows(sentEvent,foundEvents.next());
  }
  assertFalse("String_Node_Str",foundEvents.hasNext());
}
Program: 156248
Project: 156248
Buggy source:
@Test public void testGetAllEvents(){
  for (  WorkflowEvent event : testEvents) {
    service.pushEvent(workflowId,event);
  }
  Collection<WorkflowEvent> events=service.getEventsSinceId(workflowId,-1);
  Iterator<WorkflowEvent> foundEvents=events.iterator();
  assertTrue("String_Node_Str",foundEvents.hasNext());
  for (  WorkflowEvent sentEvent : testEvents) {
    assertEqualWorkflows(sentEvent,foundEvents.next());
  }
  assertFalse("String_Node_Str",foundEvents.hasNext());
}

Fixed version (ground truth):
@Test public void testGetAllEvents() throws IOException {
  for (  WorkflowEvent event : testEvents) {
    service.pushEvent(workflowId,event);
  }
  Collection<WorkflowEvent> events=service.getEventsSinceId(workflowId,-1);
  Iterator<WorkflowEvent> foundEvents=events.iterator();
  assertTrue("String_Node_Str",foundEvents.hasNext());
  for (  WorkflowEvent sentEvent : testEvents) {
    assertEqualWorkflows(sentEvent,foundEvents.next());
  }
  assertFalse("String_Node_Str",foundEvents.hasNext());
}
Program: 156249
Project: 156249
Buggy source:
/** 
 * Called whenever the block holding this tile is exploded. Called by  {@link Block#onBlockExploded(World,BlockPos,Explosion)} 
 */
public void onExplode(Explosion explosion){
  onRemove();
}

Fixed version (ground truth):
/** 
 * Called whenever the block holding this tile is exploded. Called by  {@link Block#onBlockExploded(World,BlockPos,Explosion)} 
 */
public void onExplode(Explosion explosion){
}
Program: 156251
Project: 156251
Buggy source:
/** 
 * @return A list of itemstacks that are dropped from the block, or null if the block is air
 */
@Nullable public static NonNullList<ItemStack> getItemStackFromBlock(WorldServer world,BlockPos pos,GameProfile owner){
  IBlockState state=world.getBlockState(pos);
  Block block=state.getBlock();
  if (block.isAir(state,world,pos)) {
    return null;
  }
  NonNullList<ItemStack> dropsList=NonNullList.create();
  block.getDrops(dropsList,world,pos,state,0);
  EntityPlayer fakePlayer=BuildCraftAPI.fakePlayerProvider.getFakePlayer(world,owner,pos);
  float dropChance=ForgeEventFactory.fireBlockHarvesting(dropsList,world,pos,state,0,1.0F,false,fakePlayer);
  NonNullList<ItemStack> returnList=NonNullList.create();
  for (  ItemStack s : dropsList) {
    if (world.rand.nextFloat() <= dropChance) {
      returnList.add(s);
    }
  }
  return returnList;
}

Fixed version (ground truth):
/** 
 * @return A list of itemstacks that are dropped from the block, or null if the block is air
 */
@Nullable public static NonNullList<ItemStack> getItemStackFromBlock(WorldServer world,BlockPos pos,GameProfile owner){
  IBlockState state=world.getBlockState(pos);
  Block block=state.getBlock();
  if (block.isAir(state,world,pos)) {
    return null;
  }
  List<ItemStack> drops=block.getDrops(world,pos,state,0);
  EntityPlayer fakePlayer=BuildCraftAPI.fakePlayerProvider.getFakePlayer(world,owner,pos);
  float dropChance=ForgeEventFactory.fireBlockHarvesting(drops,world,pos,state,0,1.0F,false,fakePlayer);
  NonNullList<ItemStack> returnList=NonNullList.create();
  for (  ItemStack s : drops) {
    if (world.rand.nextFloat() <= dropChance) {
      returnList.add(s);
    }
  }
  return returnList;
}
Program: 156252
Project: 156252
Buggy source:
public static void init(){
  PipeConnectionAPI.registerConnection(Blocks.BREWING_STAND,(world,pos,face,state) -> face.getAxis().getPlane() == EnumFacing.Plane.HORIZONTAL ? 4 / 16F : 0);
  PipeApi.stripeRegistry.addHandler(StripesHandlerPlant.INSTANCE);
  PipeApi.stripeRegistry.addHandler(StripesHandlerShears.INSTANCE);
  PipeApi.stripeRegistry.addHandler(new StripesHandlerPipes());
  PipeApi.stripeRegistry.addHandler(StripesHandlerEntityInteract.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerHoe.INSTANCE);
  PipeApi.stripeRegistry.addHandler(StripesHandlerDispenser.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerPlaceBlock.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerUse.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerMinecartDestroy.INSTANCE);
  BCTransportRegistries.extensionManager.registerRetractionPipe(BCTransportPipes.voidItem);
}

Fixed version (ground truth):
public static void init(){
  PipeConnectionAPI.registerConnection(Blocks.BREWING_STAND,(world,pos,face,state) -> face.getAxis().getPlane() == EnumFacing.Plane.HORIZONTAL ? 4 / 16F : 0);
  PipeApi.stripeRegistry.addHandler(StripesHandlerPlant.INSTANCE);
  PipeApi.stripeRegistry.addHandler(StripesHandlerShears.INSTANCE);
  PipeApi.stripeRegistry.addHandler(new StripesHandlerPipes());
  PipeApi.stripeRegistry.addHandler(StripesHandlerEntityInteract.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerHoe.INSTANCE);
  PipeApi.stripeRegistry.addHandler(StripesHandlerDispenser.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerPlaceBlock.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerUse.INSTANCE,EnumHandlerPriority.LOW);
  PipeApi.stripeRegistry.addHandler(StripesHandlerMinecartDestroy.INSTANCE);
  PipeApi.extensionManager.registerRetractionPipe(BCTransportPipes.voidItem);
}
Program: 156253
Project: 156253
Buggy source:
public static void preInit(){
  FacadeAPI.registry=FacadeStateManager.INSTANCE;
  PipeApi.pipeRegistry=PipeRegistry.INSTANCE;
  PipeApi.pluggableRegistry=PluggableRegistry.INSTANCE;
  PipeApi.stripeRegistry=StripesRegistry.INSTANCE;
  BCTransportRegistries.extensionManager=PipeExtensionManager.INSTANCE;
  MinecraftForge.EVENT_BUS.register(PipeExtensionManager.INSTANCE);
  PipeApi.flowItems=new PipeFlowType(PipeFlowItems::new,PipeFlowItems::new);
  PipeApi.flowFluids=new PipeFlowType(PipeFlowFluids::new,PipeFlowFluids::new);
  PipeApi.flowPower=new PipeFlowType(PipeFlowPower::new,PipeFlowPower::new);
  PipeApi.flowStructure=new PipeFlowType(PipeFlowStructure::new,PipeFlowStructure::new);
}

Fixed version (ground truth):
public static void preInit(){
  FacadeAPI.registry=FacadeStateManager.INSTANCE;
  PipeApi.pipeRegistry=PipeRegistry.INSTANCE;
  PipeApi.pluggableRegistry=PluggableRegistry.INSTANCE;
  PipeApi.stripeRegistry=StripesRegistry.INSTANCE;
  PipeApi.extensionManager=PipeExtensionManager.INSTANCE;
  MinecraftForge.EVENT_BUS.register(PipeExtensionManager.INSTANCE);
  PipeApi.flowItems=new PipeFlowType(PipeFlowItems::new,PipeFlowItems::new);
  PipeApi.flowFluids=new PipeFlowType(PipeFlowFluids::new,PipeFlowFluids::new);
  PipeApi.flowPower=new PipeFlowType(PipeFlowPower::new,PipeFlowPower::new);
  PipeApi.flowStructure=new PipeFlowType(PipeFlowStructure::new,PipeFlowStructure::new);
}
Program: 156254
Project: 156254
Buggy source:
@Override public List<ItemStack> getDrops(IBlockAccess world,BlockPos pos,IBlockState state,int fortune){
  NonNullList<ItemStack> toDrop=NonNullList.create();
  TilePipeHolder tile=getPipe(world,pos,false);
  for (  EnumFacing face : EnumFacing.VALUES) {
    PipePluggable pluggable=tile.getPluggable(face);
    if (pluggable != null) {
      pluggable.addDrops(toDrop,fortune);
    }
  }
  for (  EnumDyeColor color : tile.wireManager.parts.values()) {
    toDrop.add(new ItemStack(BCTransportItems.wire,1,color.getMetadata()));
  }
  Pipe pipe=tile.getPipe();
  if (pipe != null) {
    pipe.addDrops(toDrop,fortune);
  }
  return toDrop;
}

Fixed version (ground truth):
@Override public void getDrops(NonNullList<ItemStack> toDrop,IBlockAccess world,BlockPos pos,IBlockState state,int fortune){
  TilePipeHolder tile=getPipe(world,pos,false);
  for (  EnumFacing face : EnumFacing.VALUES) {
    PipePluggable pluggable=tile.getPluggable(face);
    if (pluggable != null) {
      pluggable.addDrops(toDrop,fortune);
    }
  }
  for (  EnumDyeColor color : tile.wireManager.parts.values()) {
    toDrop.add(new ItemStack(BCTransportItems.wire,1,color.getMetadata()));
  }
  Pipe pipe=tile.getPipe();
  if (pipe != null) {
    pipe.addDrops(toDrop,fortune);
  }
}
Program: 156255
Project: 156255
Buggy source:
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  if (!(stack.getItem() instanceof IItemPipe)) {
    return false;
  }
  PipeDefinition pipeDefinition=((IItemPipe)stack.getItem()).getDefinition();
  if (pipeDefinition.flowType == PipeApi.flowItems) {
    if (BCTransportRegistries.extensionManager.requestPipeExtension(world,pos,direction,activator,stack.copy())) {
      player.inventory.clear();
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean handle(World world,BlockPos pos,EnumFacing direction,ItemStack stack,EntityPlayer player,IStripesActivator activator){
  if (!(stack.getItem() instanceof IItemPipe)) {
    return false;
  }
  PipeDefinition pipeDefinition=((IItemPipe)stack.getItem()).getDefinition();
  if (pipeDefinition.flowType == PipeApi.flowItems) {
    if (PipeApi.extensionManager.requestPipeExtension(world,pos,direction,activator,stack.copy())) {
      player.inventory.clear();
      return true;
    }
  }
  return false;
}
Program: 156256
Project: 156256
Buggy source:
@Override public boolean load(IResourceManager manager,ResourceLocation location,Function<ResourceLocation,TextureAtlasSprite> textureGetter){
  ResourceLocation from=SpriteUtil.transformLocation(fromName);
  AtlasSpriteDirect sprite=loadSprite(manager,from.toString(),from,true);
  if (sprite == null) {
    BCLog.logger.warn("String_Node_Str" + from + "String_Node_Str");
    return true;
  }
  for (int f=0; f < sprite.getFrameCount(); f++) {
    recolourFrame(sprite,f);
  }
  swapWith(sprite);
  return false;
}

Fixed version (ground truth):
@Override public boolean load(IResourceManager manager,ResourceLocation location,Function<ResourceLocation,TextureAtlasSprite> textureGetter){
  ResourceLocation from=SpriteUtil.transformLocation(fromName);
  TextureAtlasSprite sprite=loadSprite(manager,from.toString(),from,true);
  if (sprite == null) {
    BCLog.logger.warn("String_Node_Str" + from + "String_Node_Str");
    return true;
  }
  for (int f=0; f < sprite.getFrameCount(); f++) {
    recolourFrame(sprite,f);
  }
  swapWith(sprite);
  return false;
}
Program: 156258
Project: 156258
Buggy source:
@Nullable public static IDebuggable getDebuggableObject(RayTraceResult mouseOver){
  Minecraft mc=Minecraft.getMinecraft();
  if (mc.gameSettings.reducedDebugInfo || mc.player.hasReducedDebug() || !mc.player.capabilities.isCreativeMode|| !mc.gameSettings.showDebugInfo) {
    return null;
  }
  if (mouseOver == null) {
    return null;
  }
  RayTraceResult.Type type=mouseOver.typeOfHit;
  WorldClient world=mc.world;
  if (world == null) {
    return null;
  }
  if (type == RayTraceResult.Type.BLOCK) {
    BlockPos pos=mouseOver.getBlockPos();
    TileEntity tile=world.getTileEntity(pos);
    if (tile instanceof IDebuggable) {
      return (IDebuggable)tile;
    }
  }
 else   if (type == RayTraceResult.Type.ENTITY) {
    Entity entity=mouseOver.entityHit;
    if (entity instanceof IDebuggable) {
      return (IDebuggable)entity;
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable public static IDebuggable getDebuggableObject(RayTraceResult mouseOver){
  Minecraft mc=Minecraft.getMinecraft();
  if (mc.gameSettings.reducedDebugInfo || mc.player.hasReducedDebug() || !mc.gameSettings.showDebugInfo|| !ItemDebugger.isShowDebugInfo(mc.player)) {
    return null;
  }
  if (mouseOver == null) {
    return null;
  }
  RayTraceResult.Type type=mouseOver.typeOfHit;
  WorldClient world=mc.world;
  if (world == null) {
    return null;
  }
  if (type == RayTraceResult.Type.BLOCK) {
    BlockPos pos=mouseOver.getBlockPos();
    TileEntity tile=world.getTileEntity(pos);
    if (tile instanceof IDebuggable) {
      return (IDebuggable)tile;
    }
  }
 else   if (type == RayTraceResult.Type.ENTITY) {
    Entity entity=mouseOver.entityHit;
    if (entity instanceof IDebuggable) {
      return (IDebuggable)entity;
    }
  }
  return null;
}
Program: 156259
Project: 156259
Buggy source:
public void drawBackgroundLayer(float partialTicks,int mouseX,int mouseY){
}

Fixed version (ground truth):
public void drawBackgroundLayer(float partialTicks,int mouseX,int mouseY,Runnable menuBackgroundRenderer){
}
Program: 156260
Project: 156260
Buggy source:
public void onMouseClicked(int mouseX,int mouseY,int mouseButton){
  mouse.setMousePosition(mouseX,mouseY);
  if (isDebuggingShown.evaluate()) {
    GuiRectangle debugRect=new GuiRectangle(0,0,16,16);
    if (debugRect.contains(mouse)) {
      isDebuggingEnabled.set(!isDebuggingEnabled.evaluate());
    }
  }
  IMenuElement m=currentMenu;
  if (m != null) {
    m.onMouseClicked(mouseButton);
    if (m.shouldFullyOverride()) {
      return;
    }
  }
  for (  IGuiElement element : shownElements) {
    if (element instanceof IInteractionElement) {
      ((IInteractionElement)element).onMouseClicked(mouseButton);
    }
  }
}

Fixed version (ground truth):
/** 
 * @return True if the {@link #currentMenu} {@link IMenuElement#shouldFullyOverride() fully overrides} other mouseclicks, false otherwise. 
 */
public boolean onMouseClicked(int mouseX,int mouseY,int mouseButton){
  mouse.setMousePosition(mouseX,mouseY);
  if (isDebuggingShown.evaluate()) {
    GuiRectangle debugRect=new GuiRectangle(0,0,16,16);
    if (debugRect.contains(mouse)) {
      isDebuggingEnabled.set(!isDebuggingEnabled.evaluate());
    }
  }
  IMenuElement m=currentMenu;
  if (m != null) {
    m.onMouseClicked(mouseButton);
    if (m.shouldFullyOverride()) {
      return true;
    }
  }
  for (  IGuiElement element : shownElements) {
    if (element instanceof IInteractionElement) {
      ((IInteractionElement)element).onMouseClicked(mouseButton);
    }
  }
  return false;
}
Program: 156261
Project: 156261
Buggy source:
@Override protected final void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  mainGui.mouse.setMousePosition(mouseX,mouseY);
  mainGui.preDrawForeground();
  drawForegroundLayer();
  mainGui.drawElementForegrounds(this::drawDefaultBackground);
  drawForegroundLayerAboveElements();
  mainGui.postDrawForeground();
}

Fixed version (ground truth):
@Override protected final void drawGuiContainerForegroundLayer(int mouseX,int mouseY){
  mainGui.preDrawForeground();
  drawForegroundLayer();
  mainGui.drawElementForegrounds(this::drawDefaultBackground);
  drawForegroundLayerAboveElements();
  mainGui.postDrawForeground();
}
Program: 156262
Project: 156262
Buggy source:
@Override protected final void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  mainGui.drawBackgroundLayer(partialTicks,mouseX,mouseY);
  drawBackgroundLayer(partialTicks);
  mainGui.drawElementBackgrounds();
}

Fixed version (ground truth):
@Override protected final void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  mainGui.drawBackgroundLayer(partialTicks,mouseX,mouseY,this::drawDefaultBackground);
  drawBackgroundLayer(partialTicks);
  mainGui.drawElementBackgrounds();
}
Program: 156263
Project: 156263
Buggy source:
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  boolean drawEverything=mainGui.currentMenu == null || !mainGui.currentMenu.shouldFullyOverride();
  if (drawEverything) {
    this.drawDefaultBackground();
  }
  super.drawScreen(mouseX,mouseY,partialTicks);
  if (drawEverything) {
    this.renderHoveredToolTip(mouseX,mouseY);
  }
}

Fixed version (ground truth):
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  super.drawScreen(mouseX,mouseY,partialTicks);
  if (mainGui.currentMenu == null || !mainGui.currentMenu.shouldFullyOverride()) {
    this.renderHoveredToolTip(mouseX,mouseY);
  }
}
Program: 156264
Project: 156264
Buggy source:
@Override public void drawBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  time.value=timeOpen + partialTicks;
  varData.refresh();
  super.drawBackgroundLayer(partialTicks,mouseX,mouseY);
}

Fixed version (ground truth):
@Override public void drawBackgroundLayer(float partialTicks,int mouseX,int mouseY,Runnable backgroundRenderer){
  time.value=timeOpen + partialTicks;
  varData.refresh();
  super.drawBackgroundLayer(partialTicks,mouseX,mouseY,backgroundRenderer);
}
Program: 156265
Project: 156265
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    colour=EnumDyeColor.byMetadata(buffer.readUnsignedByte());
  }
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    colour=EnumDyeColor.byMetadata(buffer.readUnsignedByte());
  }
}
Program: 156266
Project: 156266
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  currentDir=PacketBufferBC.asPacketBufferBc(buffer).readEnumValue(EnumPipePart.class);
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  currentDir=PacketBufferBC.asPacketBufferBc(buffer).readEnumValue(EnumPipePart.class);
}
Program: 156267
Project: 156267
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    for (    SlotIndex index : SlotIndex.VALUES) {
      EnumDyeColor colour=MessageUtil.readEnumOrNull(buffer,EnumDyeColor.class);
      if (colour == null) {
        slotColours.remove(index);
      }
 else {
        slotColours.put(index,colour);
      }
    }
    activeSlots.clear();
    activeSlots.addAll(MessageUtil.readEnumSet(buffer,SlotIndex.class));
    currentSlot=MessageUtil.readEnumOrNull(buffer,SlotIndex.class);
  }
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    for (    SlotIndex index : SlotIndex.VALUES) {
      EnumDyeColor colour=MessageUtil.readEnumOrNull(buffer,EnumDyeColor.class);
      if (colour == null) {
        slotColours.remove(index);
      }
 else {
        slotColours.put(index,colour);
      }
    }
    activeSlots.clear();
    activeSlots.addAll(MessageUtil.readEnumSet(buffer,SlotIndex.class));
    currentSlot=MessageUtil.readEnumOrNull(buffer,SlotIndex.class);
  }
}
Program: 156268
Project: 156268
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    colour=EnumDyeColor.byMetadata(buffer.readUnsignedByte());
  }
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    colour=EnumDyeColor.byMetadata(buffer.readUnsignedByte());
  }
}
Program: 156269
Project: 156269
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  direction=MessageUtil.readEnumOrNull(buffer,EnumFacing.class);
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  direction=MessageUtil.readEnumOrNull(buffer,EnumFacing.class);
}
Program: 156270
Project: 156270
Buggy source:
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx){
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    filterMode=FilterMode.get(buffer.readUnsignedByte());
    currentFilter=buffer.readUnsignedByte() % filters.getSlots();
    filterValid=buffer.readBoolean();
  }
}

Fixed version (ground truth):
@Override public void readPayload(PacketBuffer buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(buffer,side,ctx);
  if (side == Side.CLIENT) {
    filterMode=FilterMode.get(buffer.readUnsignedByte());
    currentFilter=buffer.readUnsignedByte() % filters.getSlots();
    filterValid=buffer.readBoolean();
  }
}
Program: 156271
Project: 156271
Buggy source:
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  super.getDebugInfo(left,right,side);
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tank1.getContentsString());
  left.add("String_Node_Str" + tank2.getContentsString());
}

Fixed version (ground truth):
@Override public void getDebugInfo(List<String> left,List<String> right,EnumFacing side){
  left.add("String_Node_Str");
  left.add("String_Node_Str" + tank1.getContentsString());
  left.add("String_Node_Str" + tank2.getContentsString());
}
Program: 156272
Project: 156272
Buggy source:
public static void reloadConfig(EnumRestartRequirement restarted){
  if (EnumRestartRequirement.WORLD.hasBeenRestarted(restarted)) {
    addBiomeNames(propExcludedBiomes,excessiveBiomes);
    addBiomeNames(propExcessiveBiomes,excessiveBiomes);
    addBiomeNames(propSurfaceDepositBiomes,surfaceDepositBiomes);
    excludedDimensions.clear();
    excludedDimensions.addAll(propExcludedDimensions.getIntList());
    if (EnumRestartRequirement.GAME.hasBeenRestarted(restarted)) {
      enableOilGeneration=propEnableOilGeneration.getBoolean();
    }
 else {
      validateBiomeNames();
    }
  }
}

Fixed version (ground truth):
public static void reloadConfig(EnumRestartRequirement restarted){
  if (EnumRestartRequirement.WORLD.hasBeenRestarted(restarted)) {
    addBiomeNames(propExcludedBiomes,excludedBiomes);
    addBiomeNames(propExcessiveBiomes,excessiveBiomes);
    addBiomeNames(propSurfaceDepositBiomes,surfaceDepositBiomes);
    excludedDimensions.clear();
    excludedDimensions.addAll(propExcludedDimensions.getIntList());
    if (EnumRestartRequirement.GAME.hasBeenRestarted(restarted)) {
      enableOilGeneration=propEnableOilGeneration.getBoolean();
    }
 else {
      validateBiomeNames();
    }
  }
}
Program: 156273
Project: 156273
Buggy source:
/** 
 * Attempts to craft a single item. Assumes that   {@link #canCraft()} has been called in the same tick, without anymodifications happening to the
 * @return True if the crafting happened, false otherwise. 
 * @throws IllegalStateException if {@link #canCraft()} hasn't been called before, or something changed in themeantime. 
 */
public boolean craft() throws IllegalStateException {
  if (isBlueprintDirty) {
    return false;
  }
switch (recipeType) {
case INGREDIENTS:
{
    }
case EXACT_STACKS:
{
    return craftExact();
  }
default :
{
  throw new IllegalStateException("String_Node_Str" + recipeType);
}
}
}

Fixed version (ground truth):
/** 
 * Attempts to craft a single item. Assumes that   {@link #canCraft()} has been called in the same tick, without anymodifications happening to the
 * @return True if the crafting happened, false otherwise. 
 * @throws IllegalStateException if {@link #canCraft()} hasn't been called before, or something changed in themeantime. 
 */
public boolean craft() throws IllegalStateException {
  if (isBlueprintDirty) {
    return false;
  }
switch (recipeType) {
case INGREDIENTS:
case EXACT_STACKS:
{
      return craftExact();
    }
default :
{
    throw new IllegalStateException("String_Node_Str" + recipeType);
  }
}
}