nus-yam/ex-repair huggingface dataset:
Program: 50768
Project: 50768
Buggy source:
/** 
 * This method identifies whether processing should be postponed  based on the current activity type.
 * @param state The state
 * @param au The activity unit
 * @param topLevel The top level units
 * @param cur The current activity type
 * @return Whether the processing of this unit should be postponed
 */
protected static boolean shouldPostpone(CTState state,ActivityUnit au,java.util.List<ActivityUnit> topLevel,ActivityType cur){
  boolean ret=false;
  Call call=(state.getCallStack().size() > 0 ? state.getCallStack().peek() : null);
  if (cur instanceof RequestReceived && call == null && !topLevel.contains(au)) {
    if (LOG.isLoggable(Level.FINEST)) {
      LOG.finest("String_Node_Str");
    }
    ret=true;
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method identifies whether processing should be postponed  based on the current activity type.
 * @param state The state
 * @param au The activity unit
 * @param topLevel The top level units
 * @param cur The current activity type
 * @return Whether the processing of this unit should be postponed
 */
protected static boolean shouldPostpone(CTState state,ActivityUnit au,java.util.List<ActivityUnit> topLevel,ActivityType cur){
  boolean ret=false;
  Call call=(state.getCallStack().size() > 0 ? state.getCallStack().peek() : null);
  if (cur instanceof RequestReceived && call == null && !topLevel.contains(au)) {
    if (LOG.isLoggable(Level.FINEST)) {
      LOG.finest("String_Node_Str");
    }
    ret=true;
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + au + "String_Node_Str"+ cur+ "String_Node_Str"+ ret);
  }
  return (ret);
}
Program: 50770
Project: 50770
Buggy source:
/** 
 * This method returns a call node associated with the supplied activity event.
 * @param at The activity event
 * @return The Call node
 */
protected static Call createCall(RPCActivityType at){
  Call call=new Call();
  call.setComponent(at.getServiceType());
  call.setOperation(at.getOperation());
  call.getProperties().putAll(at.getProperties());
  return (call);
}

Fixed version (ground truth):
/** 
 * This method returns a call node associated with the supplied activity event.
 * @param at The activity event
 * @return The Call node
 */
protected static Call createCall(RPCActivityType at){
  Call call=new Call();
  call.setComponent(at.getServiceType());
  call.setOperation(at.getOperation());
  call.getProperties().putAll(at.getProperties());
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + call);
  }
  return (call);
}
Program: 50771
Project: 50771
Buggy source:
/** 
 * This method deserializes a call trace from a JSON representation.
 * @param act The JSON representation of the call trace
 * @return The call trace
 * @throws Exception Failed to deserialize
 */
public static CallTrace deserializeCallTrace(byte[] node) throws Exception {
  CallTrace ret=null;
  java.io.ByteArrayInputStream bais=new java.io.ByteArrayInputStream(node);
  ret=MAPPER.readValue(bais,CallTrace.class);
  bais.close();
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method deserializes a call trace from a JSON representation.
 * @param node The JSON representation of the call trace
 * @return The call trace
 * @throws Exception Failed to deserialize
 */
public static CallTrace deserializeCallTrace(byte[] node) throws Exception {
  CallTrace ret=null;
  java.io.ByteArrayInputStream bais=new java.io.ByteArrayInputStream(node);
  ret=MAPPER.readValue(bais,CallTrace.class);
  bais.close();
  return (ret);
}
Program: 50772
Project: 50772
Buggy source:
@GET @Path("String_Node_Str") @Produces("String_Node_Str") public String getActivityTypes(@QueryParam("String_Node_Str") String context) throws Exception {
  String ret="String_Node_Str";
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + context);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  java.util.List<ActivityType> list=_activityServer.getActivityTypes(context);
  if (list != null) {
    byte[] b=ActivityUtil.serializeActivityTypeList(list);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method returns activity types (events) associated with the supplied context value.
 * @param context The context
 * @return The list of activity types
 * @throws Exception Failed to obtain activity types
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") public String getActivityTypes(@QueryParam("String_Node_Str") String context) throws Exception {
  String ret="String_Node_Str";
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + context);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  java.util.List<ActivityType> list=_activityServer.getActivityTypes(context);
  if (list != null) {
    byte[] b=ActivityUtil.serializeActivityTypeList(list);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}
Program: 50773
Project: 50773
Buggy source:
/** 
 * This method handles queries for activity events.
 * @param qspec The query spec
 * @return The list of activity events
 * @throws Exception Failed to query activity events
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") public String getActivityUnit(@QueryParam("String_Node_Str") String id) throws Exception {
  String ret="String_Node_Str";
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + id);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  ActivityUnit au=_activityServer.getActivityUnit(id);
  if (au != null) {
    byte[] b=ActivityUtil.serializeActivityUnit(au);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method handles queries for activity events.
 * @param id The id
 * @return The list of activity events
 * @throws Exception Failed to query activity events
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") public String getActivityUnit(@QueryParam("String_Node_Str") String id) throws Exception {
  String ret="String_Node_Str";
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + id);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  ActivityUnit au=_activityServer.getActivityUnit(id);
  if (au != null) {
    byte[] b=ActivityUtil.serializeActivityUnit(au);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}
Program: 50775
Project: 50775
Buggy source:
/** 
 * Copy constructor.
 */
public InvocationDefinition(InvocationDefinition id){
  _serviceType=id.getServiceType();
  _operation=id.getOperation();
  _fault=id.getFault();
  if (id.getMetrics() != null) {
    _metrics=new InvocationMetric(id.getMetrics());
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param id The invocation definition to copy
 */
public InvocationDefinition(InvocationDefinition id){
  _serviceType=id.getServiceType();
  _operation=id.getOperation();
  _fault=id.getFault();
  if (id.getMetrics() != null) {
    _metrics=new InvocationMetric(id.getMetrics());
  }
}
Program: 50776
Project: 50776
Buggy source:
/** 
 * Copy constructor.
 */
public MEPDefinition(MEPDefinition md){
  for (  InvocationDefinition id : md.getInvocations()) {
    _invocations.add(new InvocationDefinition(id));
  }
  if (md.getMetrics() != null) {
    _metrics=new InvocationMetric(md.getMetrics());
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param md The source to copy
 */
public MEPDefinition(MEPDefinition md){
  for (  InvocationDefinition id : md.getInvocations()) {
    _invocations.add(new InvocationDefinition(id));
  }
  if (md.getMetrics() != null) {
    _metrics=new InvocationMetric(md.getMetrics());
  }
}
Program: 50777
Project: 50777
Buggy source:
/** 
 * Copy constructor.
 */
public OperationDefinition(OperationDefinition od){
  _name=od.getName();
  if (od.getRequestResponse() != null) {
    _requestResponse=new RequestResponseDefinition(od.getRequestResponse());
  }
  for (  RequestFaultDefinition rfd : od.getRequestFaults()) {
    _requestFaults.add(new RequestFaultDefinition(rfd));
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param od The source to copy
 */
public OperationDefinition(OperationDefinition od){
  _name=od.getName();
  if (od.getRequestResponse() != null) {
    _requestResponse=new RequestResponseDefinition(od.getRequestResponse());
  }
  for (  RequestFaultDefinition rfd : od.getRequestFaults()) {
    _requestFaults.add(new RequestFaultDefinition(rfd));
  }
}
Program: 50778
Project: 50778
Buggy source:
/** 
 * Copy constructor.
 */
public RequestFaultDefinition(RequestFaultDefinition rfd){
  super(rfd);
  _fault=rfd.getFault();
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param rfd The source to copy
 */
public RequestFaultDefinition(RequestFaultDefinition rfd){
  super(rfd);
  _fault=rfd.getFault();
}
Program: 50779
Project: 50779
Buggy source:
/** 
 * Copy constructor.
 */
public RequestResponseDefinition(RequestResponseDefinition rrd){
  super(rrd);
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param rrd The source to copy
 */
public RequestResponseDefinition(RequestResponseDefinition rrd){
  super(rrd);
}
Program: 50780
Project: 50780
Buggy source:
/** 
 * Copy constructor.
 */
public ResponseTime(ResponseTime rt){
  _serviceType=rt.getServiceType();
  _operation=rt.getOperation();
  _fault=rt.getFault();
  _avg=rt.getAverage();
  _max=rt.getMax();
  _min=rt.getMin();
  _timestamp=rt.getTimestamp();
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param rt The source to copy
 */
public ResponseTime(ResponseTime rt){
  _serviceType=rt.getServiceType();
  _operation=rt.getOperation();
  _fault=rt.getFault();
  _avg=rt.getAverage();
  _max=rt.getMax();
  _min=rt.getMin();
  _timestamp=rt.getTimestamp();
}
Program: 50781
Project: 50781
Buggy source:
/** 
 * Copy constructor.
 */
public ServiceDefinition(ServiceDefinition sd){
  _serviceType=sd.getServiceType();
  for (  OperationDefinition op : sd.getOperations()) {
    _operations.add(new OperationDefinition(op));
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor.
 * @param sd The source to copy
 */
public ServiceDefinition(ServiceDefinition sd){
  _serviceType=sd.getServiceType();
  for (  OperationDefinition op : sd.getOperations()) {
    _operations.add(new OperationDefinition(op));
  }
}
Program: 50782
Project: 50782
Buggy source:
/** 
 * This method merges the supplied service definition snapshots.
 * @return The merged service definitions
 */
public static java.util.Map<String,ServiceDefinition> mergeSnapshots(java.util.List<java.util.Map<String,ServiceDefinition>> snapshots){
  java.util.Map<String,ServiceDefinition> ret=new java.util.HashMap<String,ServiceDefinition>();
  if (LOG.isLoggable(Level.FINER)) {
    LOG.finer("String_Node_Str" + snapshots);
  }
  java.util.Set<String> keys=new java.util.HashSet<String>();
  for (  java.util.Map<String,ServiceDefinition> sds : snapshots) {
    keys.addAll(sds.keySet());
  }
  for (  String key : keys) {
    ServiceDefinition sd=new ServiceDefinition();
    sd.setServiceType(key);
    for (    java.util.Map<String,ServiceDefinition> sds : snapshots) {
      if (sds.containsKey(key)) {
        try {
          sd.merge(sds.get(key));
        }
 catch (        Exception e) {
          LOG.log(Level.SEVERE,"String_Node_Str",e);
        }
      }
    }
    ret.put(key,sd);
  }
  if (LOG.isLoggable(Level.FINER)) {
    LOG.finer("String_Node_Str" + ret);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method merges the supplied service definition snapshots.
 * @param snapshots The snapshots to merge
 * @return The merged service definitions
 */
public static java.util.Map<String,ServiceDefinition> mergeSnapshots(java.util.List<java.util.Map<String,ServiceDefinition>> snapshots){
  java.util.Map<String,ServiceDefinition> ret=new java.util.HashMap<String,ServiceDefinition>();
  if (LOG.isLoggable(Level.FINER)) {
    LOG.finer("String_Node_Str" + snapshots);
  }
  java.util.Set<String> keys=new java.util.HashSet<String>();
  for (  java.util.Map<String,ServiceDefinition> sds : snapshots) {
    keys.addAll(sds.keySet());
  }
  for (  String key : keys) {
    ServiceDefinition sd=new ServiceDefinition();
    sd.setServiceType(key);
    for (    java.util.Map<String,ServiceDefinition> sds : snapshots) {
      if (sds.containsKey(key)) {
        try {
          sd.merge(sds.get(key));
        }
 catch (        Exception e) {
          LOG.log(Level.SEVERE,"String_Node_Str",e);
        }
      }
    }
    ret.put(key,sd);
  }
  if (LOG.isLoggable(Level.FINER)) {
    LOG.finer("String_Node_Str" + ret);
  }
  return (ret);
}
Program: 50783
Project: 50783
Buggy source:
/** 
 * This method sets the script location.
 * @param script The script location
 */
public void setScriptLocation(String location){
  _scriptLocation=location;
}

Fixed version (ground truth):
/** 
 * This method sets the script location.
 * @param location The script location
 */
public void setScriptLocation(String location){
  _scriptLocation=location;
}
Program: 50784
Project: 50784
Buggy source:
/** 
 * This method returns the cache associated with the supplied name.
 * @param name The name of the required cache
 * @return The cache, or null if not found
 */
public abstract <K,V>Map<K,V> getCache(String name);

Fixed version (ground truth):
/** 
 * This method returns the cache associated with the supplied name.
 * @param name The name of the required cache
 * @return The cache, or null if not found
 * @param < K > The key type
 * @param < V > The value type
 */
public abstract <K,V>Map<K,V> getCache(String name);
Program: 50785
Project: 50785
Buggy source:
/** 
 * {@inheritDoc}
 */
public void forward(Object result){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + this + "String_Node_Str"+ result);
  }
  _result.set(result);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void forward(Object result){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + this + "String_Node_Str"+ result);
  }
  RESULT.set(result);
}
Program: 50786
Project: 50786
Buggy source:
/** 
 * This method retrieves the result forwarded by the rule.
 * @return The result, or null if not defined
 */
public Object getResult(){
  Object ret=_result.get();
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + this + "String_Node_Str"+ ret);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method retrieves the result forwarded by the rule.
 * @return The result, or null if not defined
 */
public Object getResult(){
  Object ret=RESULT.get();
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + this + "String_Node_Str"+ ret);
  }
  return (ret);
}
Program: 50787
Project: 50787
Buggy source:
/** 
 * This method sets the count change (if applicable).
 * @param count The count change percentage
 */
public void setCountChange(int change){
  _countChange=change;
}

Fixed version (ground truth):
/** 
 * This method sets the count change (if applicable).
 * @param change The count change percentage
 */
public void setCountChange(int change){
  _countChange=change;
}
Program: 50788
Project: 50788
Buggy source:
/** 
 * This method sets the minimum duration change (if applicable).
 * @param time The minimum duration change percentage
 */
public void setMinChange(int change){
  _minChange=change;
}

Fixed version (ground truth):
/** 
 * This method sets the minimum duration change (if applicable).
 * @param change The minimum duration change percentage
 */
public void setMinChange(int change){
  _minChange=change;
}
Program: 50789
Project: 50789
Buggy source:
/** 
 * This method sets the maximum duration change (if applicable).
 * @param time The maximum duration change percentage
 */
public void setMaxChange(int change){
  _maxChange=change;
}

Fixed version (ground truth):
/** 
 * This method sets the maximum duration change (if applicable).
 * @param change The maximum duration change percentage
 */
public void setMaxChange(int change){
  _maxChange=change;
}
Program: 50790
Project: 50790
Buggy source:
/** 
 * This method sets the average duration change (if applicable).
 * @param time The average duration change percentage
 */
public void setAverageChange(int change){
  _avgChange=change;
}

Fixed version (ground truth):
/** 
 * This method sets the average duration change (if applicable).
 * @param change The average duration change percentage
 */
public void setAverageChange(int change){
  _avgChange=change;
}
Program: 50791
Project: 50791
Buggy source:
/** 
 * @return the severity
 */
public String getSeverity(){
  return _severity;
}

Fixed version (ground truth):
/** 
 * This method returns the severity value.
 * @return The severity
 */
public String getSeverity(){
  return _severity;
}
Program: 50792
Project: 50792
Buggy source:
/** 
 * @param severity the severity to set
 */
public void setSeverity(String severity){
  _severity=severity;
}

Fixed version (ground truth):
/** 
 * This method sets the severity value.
 * @param severity The severity value
 */
public void setSeverity(String severity){
  _severity=severity;
}
Program: 50793
Project: 50793
Buggy source:
/** 
 * This method handles queries for activity events.
 * @param qs The query spec
 * @return The list of activity events
 * @throws Exception Failed to query activity events
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") public String query(String qspec) throws Exception {
  String ret="String_Node_Str";
  QuerySpec qs=ActivityUtil.deserializeQuerySpec(qspec.getBytes());
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + qs);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  java.util.List<ActivityUnit> list=_activityServer.query(qs);
  if (list != null) {
    byte[] b=ActivityUtil.serializeActivityUnitList(list);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * This method handles queries for activity events.
 * @param qspec The query spec
 * @return The list of activity events
 * @throws Exception Failed to query activity events
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") public String query(String qspec) throws Exception {
  String ret="String_Node_Str";
  QuerySpec qs=ActivityUtil.deserializeQuerySpec(qspec.getBytes());
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + qs);
  }
  if (_activityServer == null) {
    throw new Exception("String_Node_Str");
  }
  java.util.List<ActivityUnit> list=_activityServer.query(qs);
  if (list != null) {
    byte[] b=ActivityUtil.serializeActivityUnitList(list);
    ret=new String(b);
  }
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + ret);
  }
  return (ret);
}
Program: 50794
Project: 50794
Buggy source:
/** 
 * The sub-expression constructor.
 */
public Expression(Operator operator,Expression... expr){
  _operator=operator;
  for (  Expression e : expr) {
    _expressions.add(e);
  }
}

Fixed version (ground truth):
/** 
 * The sub-expression constructor.
 * @param operator The operator
 * @param expr The list of sub-expressions
 */
public Expression(Operator operator,Expression... expr){
  _operator=operator;
  for (  Expression e : expr) {
    _expressions.add(e);
  }
}
Program: 50795
Project: 50795
Buggy source:
/** 
 * This method performs the cleanup task on the top level active collections.
 */
protected void cleanup(){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str");
  }
synchronized (_activeCollections) {
    for (    ActiveCollection ac : _activeCollections.values()) {
      ac.cleanup();
      if (ac.getHighWaterMark() > 0) {
        if (ac.getHighWaterMarkWarningIssued()) {
          if (ac.getSize() < ac.getHighWaterMark()) {
            LOG.info("String_Node_Str" + ac.getName() + "String_Node_Str"+ ac.getHighWaterMark()+ "String_Node_Str");
            ac.setHighWaterMarkWarningIssued(false);
          }
        }
 else         if (ac.getSize() > ac.getHighWaterMark()) {
          LOG.warning("String_Node_Str" + ac.getName() + "String_Node_Str"+ ac.getHighWaterMark()+ "String_Node_Str");
          ac.setHighWaterMarkWarningIssued(true);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This method performs the cleanup task on the top level active collections.
 */
protected void cleanup(){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str");
  }
synchronized (_activeCollections) {
    for (    ActiveCollection ac : _activeCollections.values()) {
      try {
        ac.cleanup();
      }
 catch (      Exception e) {
        LOG.log(Level.SEVERE,"String_Node_Str" + ac.getName() + "String_Node_Str",e);
      }
      if (ac.getHighWaterMark() > 0) {
        if (ac.getHighWaterMarkWarningIssued()) {
          if (ac.getSize() < ac.getHighWaterMark()) {
            LOG.info("String_Node_Str" + ac.getName() + "String_Node_Str"+ ac.getHighWaterMark()+ "String_Node_Str");
            ac.setHighWaterMarkWarningIssued(false);
          }
        }
 else         if (ac.getSize() > ac.getHighWaterMark()) {
          LOG.warning("String_Node_Str" + ac.getName() + "String_Node_Str"+ ac.getHighWaterMark()+ "String_Node_Str");
          ac.setHighWaterMarkWarningIssued(true);
        }
      }
    }
  }
}
Program: 50796
Project: 50796
Buggy source:
/** 
 * {@inheritDoc}
 */
protected void cleanup(){
  if (getMaxItems() > 0) {
synchronized (_list) {
      int num=getSize() - getMaxItems();
      if (num > 0) {
        for (int i=getSize() - 1; i >= getMaxItems(); i--) {
          remove(i,null);
        }
      }
    }
  }
  if (getItemExpiration() > 0) {
synchronized (_list) {
      long expiration=System.currentTimeMillis() - getItemExpiration();
      for (int i=getSize() - 1; i >= 0; i--) {
        if (_listTimestamps.get(i) < expiration) {
          remove(i,null);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected void cleanup(){
  if (getMaxItems() > 0) {
synchronized (_list) {
      int num=getSize() - getMaxItems();
      while (num > 0) {
        remove(0,null);
        num--;
      }
    }
  }
  if (getItemExpiration() > 0) {
synchronized (_list) {
      long expiration=System.currentTimeMillis() - getItemExpiration();
      for (int i=getSize() - 1; i >= 0; i--) {
        if (_listTimestamps.get(i) < expiration) {
          remove(i,null);
        }
      }
    }
  }
}
Program: 50797
Project: 50797
Buggy source:
/** 
 * {@inheritDoc}
 */
public void inserted(Object key,Object value){
  Notification notification=new Notification(_insertType,this,_sequenceNumber++,value.toString());
  for (  NotificationDetails n : _notificationDetails) {
    n.getListener().handleNotification(notification,n.getHandback());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void inserted(Object key,Object value){
  if (_insertType != null) {
    Notification notification=new Notification(_insertType,this,_sequenceNumber++,value.toString());
    for (    NotificationDetails n : _notificationDetails) {
      n.getListener().handleNotification(notification,n.getHandback());
    }
  }
}
Program: 50798
Project: 50798
Buggy source:
/** 
 * {@inheritDoc}
 */
public void removed(Object key,Object value){
  Notification notification=new Notification(_removeType,this,_sequenceNumber++,value.toString());
  for (  NotificationDetails n : _notificationDetails) {
    n.getListener().handleNotification(notification,n.getHandback());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void removed(Object key,Object value){
  if (_removeType != null) {
    Notification notification=new Notification(_removeType,this,_sequenceNumber++,value.toString());
    for (    NotificationDetails n : _notificationDetails) {
      n.getListener().handleNotification(notification,n.getHandback());
    }
  }
}
Program: 50799
Project: 50799
Buggy source:
/** 
 * {@inheritDoc}
 */
public void updated(Object key,Object value){
  Notification notification=new Notification(_updateType,this,_sequenceNumber++,value.toString());
  for (  NotificationDetails n : _notificationDetails) {
    n.getListener().handleNotification(notification,n.getHandback());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void updated(Object key,Object value){
  if (_updateType != null) {
    Notification notification=new Notification(_updateType,this,_sequenceNumber++,value.toString());
    for (    NotificationDetails n : _notificationDetails) {
      n.getListener().handleNotification(notification,n.getHandback());
    }
  }
}
Program: 50800
Project: 50800
Buggy source:
@Test public void testCleanupMaxItems(){
  ActiveList list=new ActiveList(TEST_ACTIVE_COLLECTION);
  TestActiveChangeListener l=new TestActiveChangeListener();
  list.addActiveChangeListener(l);
  list.setMaxItems(10);
  for (int i=0; i < 15; i++) {
    list.insert(null,new TestObject(i));
  }
  if (list.getSize() != 15) {
    fail("String_Node_Str" + list.getSize());
  }
  list.cleanup();
  if (list.getSize() != 10) {
    fail("String_Node_Str" + list.getSize());
  }
  if (l._removedKey.size() != 5) {
    fail("String_Node_Str" + l._removedKey.size());
  }
}

Fixed version (ground truth):
@Test public void testCleanupMaxItems(){
  ActiveList list=new ActiveList(TEST_ACTIVE_COLLECTION);
  TestActiveChangeListener l=new TestActiveChangeListener();
  list.addActiveChangeListener(l);
  list.setMaxItems(10);
  for (int i=0; i < 15; i++) {
    list.insert(null,new TestObject(i));
  }
  if (list.getSize() != 15) {
    fail("String_Node_Str" + list.getSize());
  }
  list.cleanup();
  if (list.getSize() != 10) {
    fail("String_Node_Str" + list.getSize());
  }
  TestObject to=(TestObject)list.iterator().next();
  if (to.getNumber() != 5) {
    fail("String_Node_Str");
  }
  if (l._removedKey.size() != 5) {
    fail("String_Node_Str" + l._removedKey.size());
  }
}
Program: 50801
Project: 50801
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_id);
  out.writeObject(_origin);
  int len=_context.size();
  out.writeInt(len);
  for (int i=0; i < len; i++) {
    out.writeObject(_context.get(i));
  }
  len=_activityTypes.size();
  out.writeInt(len);
  for (int i=0; i < len; i++) {
    out.writeObject(_activityTypes.get(i));
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_id);
  out.writeObject(_origin);
  int len=_contexts.size();
  out.writeInt(len);
  for (int i=0; i < len; i++) {
    out.writeObject(_contexts.get(i));
  }
  len=_activityTypes.size();
  out.writeInt(len);
  for (int i=0; i < len; i++) {
    out.writeObject(_activityTypes.get(i));
  }
}
Program: 50802
Project: 50802
Buggy source:
/** 
 * The copy constructor.
 * @param act The activity to copy.
 */
public ActivityUnit(ActivityUnit act){
  _id=act._id;
  if (act._origin != null) {
    _origin=new Origin(act._origin);
  }
  for (  Context context : act._context) {
    _context.add(new Context(context));
  }
  for (  ActivityType actType : _activityTypes) {
    try {
      Constructor<? extends ActivityType> con=actType.getClass().getConstructor(actType.getClass());
      if (con != null) {
        _activityTypes.add(con.newInstance(actType));
      }
 else {
        LOG.severe("String_Node_Str" + actType.getClass().getName() + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
/** 
 * The copy constructor.
 * @param act The activity to copy.
 */
public ActivityUnit(ActivityUnit act){
  _id=act._id;
  if (act._origin != null) {
    _origin=new Origin(act._origin);
  }
  for (  Context context : act._contexts) {
    _contexts.add(new Context(context));
  }
  for (  ActivityType actType : _activityTypes) {
    try {
      Constructor<? extends ActivityType> con=actType.getClass().getConstructor(actType.getClass());
      if (con != null) {
        _activityTypes.add(con.newInstance(actType));
      }
 else {
        LOG.severe("String_Node_Str" + actType.getClass().getName() + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
}
Program: 50803
Project: 50803
Buggy source:
/** 
 * This method sets the context.
 * @param context The context
 */
public void setContext(java.util.List<Context> context){
  _context=context;
}

Fixed version (ground truth):
/** 
 * This method sets the context.
 * @param context The context
 */
public void setContext(java.util.List<Context> context){
  _contexts=context;
}
Program: 50804
Project: 50804
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _id=(String)in.readObject();
  _origin=(Origin)in.readObject();
  int len=in.readInt();
  for (int i=0; i < len; i++) {
    _context.add((Context)in.readObject());
  }
  len=in.readInt();
  for (int i=0; i < len; i++) {
    _activityTypes.add((ActivityType)in.readObject());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _id=(String)in.readObject();
  _origin=(Origin)in.readObject();
  int len=in.readInt();
  for (int i=0; i < len; i++) {
    _contexts.add((Context)in.readObject());
  }
  len=in.readInt();
  for (int i=0; i < len; i++) {
    _activityTypes.add((ActivityType)in.readObject());
  }
}
Program: 50805
Project: 50805
Buggy source:
/** 
 * This method gets the context.
 * @return The context
 */
public java.util.List<Context> getContext(){
  return (_context);
}

Fixed version (ground truth):
/** 
 * This method gets the context.
 * @return The context
 */
public java.util.List<Context> getContext(){
  return (_contexts);
}
Program: 50806
Project: 50806
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_processType);
  out.writeObject(_instanceId);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_processType);
  out.writeObject(_instanceId);
}
Program: 50807
Project: 50807
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _processType=(String)in.readObject();
  _instanceId=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _processType=(String)in.readObject();
  _instanceId=(String)in.readObject();
}
Program: 50808
Project: 50808
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_status);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_status);
}
Program: 50809
Project: 50809
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _status=(Status)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _status=(Status)in.readObject();
}
Program: 50810
Project: 50810
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_version);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_version);
}
Program: 50811
Project: 50811
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _version=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _version=(String)in.readObject();
}
Program: 50812
Project: 50812
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_messageType);
  out.writeObject(_content);
  out.writeObject(_destination);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_messageType);
  out.writeObject(_content);
  out.writeObject(_destination);
}
Program: 50813
Project: 50813
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _messageType=(String)in.readObject();
  _content=(String)in.readObject();
  _destination=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _messageType=(String)in.readObject();
  _content=(String)in.readObject();
  _destination=(String)in.readObject();
}
Program: 50814
Project: 50814
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
}
Program: 50815
Project: 50815
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
}
Program: 50816
Project: 50816
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
}
Program: 50817
Project: 50817
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
}
Program: 50818
Project: 50818
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_serviceType);
  out.writeObject(_operation);
  out.writeObject(_fault);
  out.writeObject(_messageType);
  out.writeObject(_content);
  out.writeObject(_messageId);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_serviceType);
  out.writeObject(_operation);
  out.writeObject(_fault);
  out.writeObject(_messageType);
  out.writeObject(_content);
  out.writeObject(_messageId);
}
Program: 50819
Project: 50819
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _serviceType=(String)in.readObject();
  _operation=(String)in.readObject();
  _fault=(String)in.readObject();
  _messageType=(String)in.readObject();
  _content=(String)in.readObject();
  _messageId=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _serviceType=(String)in.readObject();
  _operation=(String)in.readObject();
  _fault=(String)in.readObject();
  _messageType=(String)in.readObject();
  _content=(String)in.readObject();
  _messageId=(String)in.readObject();
}
Program: 50820
Project: 50820
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
}
Program: 50821
Project: 50821
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
}
Program: 50822
Project: 50822
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
}
Program: 50823
Project: 50823
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
}
Program: 50824
Project: 50824
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_replyToId);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_replyToId);
}
Program: 50825
Project: 50825
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _replyToId=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _replyToId=(String)in.readObject();
}
Program: 50826
Project: 50826
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(VERSION);
  out.writeObject(_replyToId);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput out) throws IOException {
  super.writeExternal(out);
  out.writeInt(VERSION);
  out.writeObject(_replyToId);
}
Program: 50827
Project: 50827
Buggy source:
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  in.readInt();
  _replyToId=(String)in.readObject();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  super.readExternal(in);
  in.readInt();
  _replyToId=(String)in.readObject();
}
Program: 50828
Project: 50828
Buggy source:
@Test public void testJSONBinarySerialization(){
  ActivityUnit act=createTestActivityUnit("String_Node_Str");
  try {
    java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
    java.io.ObjectOutputStream oos=new java.io.ObjectOutputStream(os);
    oos.writeObject(act);
    oos.close();
    os.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
@Test public void testJSONBinarySerialization(){
  ActivityUnit act1=createTestActivityUnit("String_Node_Str");
  try {
    java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
    java.io.ObjectOutputStream oos=new java.io.ObjectOutputStream(os);
    oos.writeObject(act1);
    oos.close();
    os.close();
    java.io.ByteArrayInputStream is=new java.io.ByteArrayInputStream(os.toByteArray());
    java.io.ObjectInputStream ois=new java.io.ObjectInputStream(is);
    ActivityUnit act2=(ActivityUnit)ois.readObject();
    ois.close();
    is.close();
    String s1=new String(ActivityUtil.serialize(act1));
    String s2=new String(ActivityUtil.serialize(act2));
    if (!s1.equals(s2)) {
      fail("String_Node_Str" + s1 + "String_Node_Str"+ s2);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str" + e);
  }
}
Program: 50829
Project: 50829
Buggy source:
/** 
 * {@inheritDoc}
 */
protected void sendMessage() throws Exception {
  if (_activities != null) {
    _activityServer.store(_activities);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected void sendMessage() throws Exception {
  if (_activities != null) {
    _activityServer.store(_activities);
    _activities.clear();
  }
}
Program: 50830
Project: 50830
Buggy source:
/** 
 * {@inheritDoc}
 */
public void endTransaction(){
  _activityUnit.remove();
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void endTransaction(){
  ActivityUnit au=_activityUnit.get();
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str" + au);
  }
  if (au != null) {
    _activityLogger.log(au);
    _activityUnit.remove();
  }
}
Program: 50831
Project: 50831
Buggy source:
@PostConstruct public void init(){
  try {
    InitialContext ctx=new InitialContext();
    _transactionManager=(TransactionManager)ctx.lookup(TRANSACTION_MANAGER);
  }
 catch (  Exception e) {
    LOG.log(Level.SEVERE,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * This method initializes the collector context.
 */
@PostConstruct public void init(){
  try {
    InitialContext ctx=new InitialContext();
    _transactionManager=(TransactionManager)ctx.lookup(TRANSACTION_MANAGER);
  }
 catch (  Exception e) {
    LOG.log(Level.SEVERE,"String_Node_Str",e);
  }
}
Program: 50832
Project: 50832
Buggy source:
protected void startScope(ActivityUnit au){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str");
  }
  _activityUnit.set(au);
}

Fixed version (ground truth):
/** 
 * This method starts the scope associated with the supplied activity unit.
 * @param au The activity unit
 */
protected void startScope(ActivityUnit au){
  if (LOG.isLoggable(Level.FINEST)) {
    LOG.finest("String_Node_Str");
  }
  _activityUnit.set(au);
}
Program: 50833
Project: 50833
Buggy source:
/** 
 * This method returns the network version.
 * @return The network version
 */
protected String getVersion(){
  return (_version);
}

Fixed version (ground truth):
/** 
 * This method returns the network version.
 * @return The network version
 */
protected String getVersion(){
  return (_network.getVersion());
}
Program: 50834
Project: 50834
Buggy source:
/** 
 * This method returns the network name.
 * @return The network name
 */
protected String getNetworkName(){
  return (_networkName);
}

Fixed version (ground truth):
/** 
 * This method returns the network name.
 * @return The network name
 */
protected String getNetworkName(){
  return (_network.getName());
}
Program: 50835
Project: 50835
Buggy source:
/** 
 * This method registers the network's entry point against its list of subscription subjects.
 * @param network The network
 */
protected void registerEntryPoints(Network network){
synchronized (_entryPoints) {
    Node rootNode=network.getNodes().get(network.getRootNodeName());
    for (    String subject : network.getSubjects()) {
      java.util.List<EmbeddedChannel> channels=_entryPoints.get(subject);
      if (channels == null) {
        channels=new java.util.ArrayList<EmbeddedChannel>();
        _entryPoints.put(subject,channels);
      }
      channels.add(new EmbeddedChannel(network.getName(),network.getVersion(),network.getRootNodeName(),rootNode,null));
    }
  }
}

Fixed version (ground truth):
/** 
 * This method registers the network's entry point against its list of subscription subjects.
 * @param network The network
 */
protected void registerEntryPoints(Network network){
synchronized (_entryPoints) {
    Node rootNode=network.getNodes().get(network.getRootNodeName());
    for (    String subject : network.getSubjects()) {
      java.util.List<EmbeddedChannel> channels=_entryPoints.get(subject);
      if (channels == null) {
        channels=new java.util.ArrayList<EmbeddedChannel>();
        _entryPoints.put(subject,channels);
      }
      channels.add(new EmbeddedChannel(network,network.getRootNodeName(),rootNode,null));
    }
  }
}
Program: 50836
Project: 50836
Buggy source:
/** 
 * This is the constructor for the task.
 * @param networkName The network name
 * @param version The version
 * @param nodeName The node name
 * @param node The node
 * @param source The source node name
 * @param events The list of events
 * @param retriesLeft The number of retries left
 * @param channel The channel
 */
public EPNTask(String networkName,String version,String nodeName,Node node,String source,EventList events,int retriesLeft,EmbeddedChannel channel){
  _networkName=networkName;
  _version=version;
  _nodeName=nodeName;
  _node=node;
  _source=source;
  _events=events;
  _retriesLeft=retriesLeft;
  _channel=channel;
}

Fixed version (ground truth):
/** 
 * This is the constructor for the task.
 * @param network The network
 * @param nodeName The node name
 * @param node The node
 * @param source The source node name
 * @param events The list of events
 * @param retriesLeft The number of retries left
 * @param channel The channel
 */
public EPNTask(Network network,String nodeName,Node node,String source,EventList events,int retriesLeft,EmbeddedChannel channel){
  _networkName=network.getName();
  _version=network.getVersion();
  _nodeName=nodeName;
  _node=node;
  _source=source;
  _events=events;
  _retriesLeft=retriesLeft;
  _channel=channel;
}
Program: 50837
Project: 50837
Buggy source:
/** 
 * {@inheritDoc}
 */
public void send(EventList events,int retriesLeft) throws Exception {
  if (_subject != null) {
    publish(_subject,events);
  }
 else {
    if (retriesLeft == -1) {
      retriesLeft=_node.getMaxRetries();
    }
    _executor.execute(new EPNTask(_networkName,_version,_nodeName,_node,_source,events,retriesLeft,this));
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void send(EventList events,int retriesLeft) throws Exception {
  if (_subject != null) {
    publish(_subject,events);
  }
 else {
    if (retriesLeft == -1) {
      retriesLeft=_node.getMaxRetries();
    }
    _executor.execute(new EPNTask(_network,_nodeName,_node,_source,events,retriesLeft,this));
  }
}
Program: 50838
Project: 50838
Buggy source:
/** 
 * This method returns the version.
 * @return The version
 */
public String getVersion(){
  return (_version);
}

Fixed version (ground truth):
/** 
 * This method returns the version.
 * @return The version
 */
public String getVersion(){
  return (_network.getVersion());
}
Program: 50839
Project: 50839
Buggy source:
/** 
 * This method returns the network name.
 * @return The network name
 */
public String getNetworkName(){
  return (_networkName);
}

Fixed version (ground truth):
/** 
 * This method returns the network name.
 * @return The network name
 */
public String getNetworkName(){
  return (_network.getName());
}