nus-yam/ex-repair huggingface dataset:
Program: 89544
Project: 89544
Buggy source:
protected static String buildName(){
  if (s_logger.isDebugEnabled()) {
    final StackTraceElement[] stacks=Thread.currentThread().getStackTrace();
    final StringBuilder str=new StringBuilder();
    int i=3, j=3;
    while (j < 7 && j < stacks.length) {
      StackTraceElement element=stacks[i];
      String filename=element.getFileName();
      String method=element.getMethodName();
      if ((filename != null && filename.equals("String_Node_Str")) || (method != null && method.equals("String_Node_Str"))) {
        i++;
        continue;
      }
      str.append("String_Node_Str").append(stacks[i].getClassName().substring(stacks[i].getClassName().lastIndexOf("String_Node_Str") + 1)).append("String_Node_Str").append(stacks[i].getMethodName()).append("String_Node_Str").append(stacks[i].getLineNumber());
      j++;
      i++;
    }
    return str.toString();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected static String buildName(){
  if (s_logger.isDebugEnabled()) {
    final StackTraceElement[] stacks=Thread.currentThread().getStackTrace();
    final StringBuilder str=new StringBuilder();
    int i=3, j=3;
    while (j < 7 && i < stacks.length) {
      StackTraceElement element=stacks[i];
      String filename=element.getFileName();
      String method=element.getMethodName();
      if ((filename != null && filename.equals("String_Node_Str")) || (method != null && method.equals("String_Node_Str"))) {
        i++;
        continue;
      }
      str.append("String_Node_Str").append(stacks[i].getClassName().substring(stacks[i].getClassName().lastIndexOf("String_Node_Str") + 1)).append("String_Node_Str").append(stacks[i].getMethodName()).append("String_Node_Str").append(stacks[i].getLineNumber());
      j++;
      i++;
    }
    return str.toString();
  }
  return "String_Node_Str";
}
Program: 89546
Project: 89546
Buggy source:
@Override public Long checkAccessAndSpecifyAuthority(Account caller,Long zoneId){
  if (isResourceDomainAdmin(caller.getType())) {
    if (zoneId == null)     return getZoneIdForAccount(caller);
 else     if (getZoneIdForAccount(caller) != zoneId)     throw new PermissionDeniedException("String_Node_Str" + caller + "String_Node_Str"+ zoneId);
 else     return zoneId;
  }
 else   return zoneId;
}

Fixed version (ground truth):
@Override public Long checkAccessAndSpecifyAuthority(Account caller,Long zoneId){
  if (isResourceDomainAdmin(caller.getType())) {
    if (zoneId == null)     return getZoneIdForAccount(caller);
 else     if (zoneId.compareTo(getZoneIdForAccount(caller)) != 0)     throw new PermissionDeniedException("String_Node_Str" + caller + "String_Node_Str"+ zoneId);
 else     return zoneId;
  }
 else   return zoneId;
}
Program: 89553
Project: 89553
Buggy source:
public void testTags(){
  NetworkDaoImpl dao=ComponentLocator.inject(NetworkDaoImpl.class);
  dao.expunge(1001l);
  NetworkVO network=new NetworkVO(1001,TrafficType.Control,GuestIpType.Direct,Mode.Dhcp,BroadcastDomainType.Native,1,1,1,1,1001,"String_Node_Str","String_Node_Str",false,true,true);
  network.setGuruName("String_Node_Str");
  List<String> tags=new ArrayList<String>();
  tags.add("String_Node_Str");
  tags.add("String_Node_Str");
  network.setTags(tags);
  network=dao.persist(network);
  List<String> saveTags=network.getTags();
  Assert.assertTrue(saveTags.size() == 2 && saveTags.contains("String_Node_Str") && saveTags.contains("String_Node_Str"));
  NetworkVO retrieved=dao.findById(1001l);
  List<String> retrievedTags=retrieved.getTags();
  Assert.assertTrue(retrievedTags.size() == 2 && retrievedTags.contains("String_Node_Str") && retrievedTags.contains("String_Node_Str"));
  List<String> updateTags=new ArrayList<String>();
  updateTags.add("String_Node_Str");
  updateTags.add("String_Node_Str");
  retrieved.setTags(updateTags);
  dao.update(retrieved.getId(),retrieved);
  retrieved=dao.findById(1001l);
  retrievedTags=retrieved.getTags();
  Assert.assertTrue("String_Node_Str",retrievedTags.size() == 2 && retrievedTags.contains("String_Node_Str") && retrievedTags.contains("String_Node_Str"));
  dao.expunge(1001l);
}

Fixed version (ground truth):
public void testTags(){
  NetworkDaoImpl dao=ComponentLocator.inject(NetworkDaoImpl.class);
  dao.expunge(1001l);
  NetworkVO network=new NetworkVO(1001,TrafficType.Control,GuestIpType.Direct,Mode.Dhcp,BroadcastDomainType.Native,1,1,1,1,1001,"String_Node_Str","String_Node_Str",false,true,true,null);
  network.setGuruName("String_Node_Str");
  List<String> tags=new ArrayList<String>();
  tags.add("String_Node_Str");
  tags.add("String_Node_Str");
  network.setTags(tags);
  network=dao.persist(network);
  List<String> saveTags=network.getTags();
  Assert.assertTrue(saveTags.size() == 2 && saveTags.contains("String_Node_Str") && saveTags.contains("String_Node_Str"));
  NetworkVO retrieved=dao.findById(1001l);
  List<String> retrievedTags=retrieved.getTags();
  Assert.assertTrue(retrievedTags.size() == 2 && retrievedTags.contains("String_Node_Str") && retrievedTags.contains("String_Node_Str"));
  List<String> updateTags=new ArrayList<String>();
  updateTags.add("String_Node_Str");
  updateTags.add("String_Node_Str");
  retrieved.setTags(updateTags);
  dao.update(retrieved.getId(),retrieved);
  retrieved=dao.findById(1001l);
  retrievedTags=retrieved.getTags();
  Assert.assertTrue("String_Node_Str",retrievedTags.size() == 2 && retrievedTags.contains("String_Node_Str") && retrievedTags.contains("String_Node_Str"));
  dao.expunge(1001l);
}
Program: 89558
Project: 89558
Buggy source:
private void updateVmStateForFailedVmCreation(Long vmId){
  UserVmVO vm=_vmDao.findById(vmId);
  if (vm != null) {
    if (vm.getState().equals(State.Stopped)) {
      _itMgr.stateTransitTo(vm,VirtualMachine.Event.OperationFailed,null);
      List<VolumeVO> volumesForThisVm=_volsDao.findByInstance(vm.getId());
      for (      VolumeVO volume : volumesForThisVm) {
        try {
          if (volume.getState() != Volume.State.Destroy) {
            _storageMgr.destroyVolume(volume);
          }
          if (volume.getState() == Volume.State.Ready) {
            UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE,volume.getAccountId(),volume.getDataCenterId(),volume.getId(),volume.getName());
            _usageEventDao.persist(usageEvent);
          }
        }
 catch (        ConcurrentOperationException e) {
          s_logger.warn("String_Node_Str" + volume.getId() + "String_Node_Str"+ vmId+ "String_Node_Str");
        }
      }
      UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VM_DESTROY,vm.getAccountId(),vm.getDataCenterIdToDeployIn(),vm.getId(),vm.getHostName());
      _usageEventDao.persist(usageEvent);
    }
  }
}

Fixed version (ground truth):
private void updateVmStateForFailedVmCreation(Long vmId){
  UserVmVO vm=_vmDao.findById(vmId);
  if (vm != null) {
    if (vm.getState().equals(State.Stopped)) {
      try {
        _itMgr.stateTransitTo(vm,VirtualMachine.Event.OperationFailed,null);
      }
 catch (      NoTransitionException e1) {
        s_logger.warn(e1.getMessage());
      }
      List<VolumeVO> volumesForThisVm=_volsDao.findByInstance(vm.getId());
      for (      VolumeVO volume : volumesForThisVm) {
        try {
          if (volume.getState() != Volume.State.Destroy) {
            _storageMgr.destroyVolume(volume);
          }
          if (volume.getState() == Volume.State.Ready) {
            UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE,volume.getAccountId(),volume.getDataCenterId(),volume.getId(),volume.getName());
            _usageEventDao.persist(usageEvent);
          }
        }
 catch (        ConcurrentOperationException e) {
          s_logger.warn("String_Node_Str" + volume.getId() + "String_Node_Str"+ vmId+ "String_Node_Str");
        }
      }
      UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VM_DESTROY,vm.getAccountId(),vm.getDataCenterIdToDeployIn(),vm.getId(),vm.getHostName());
      _usageEventDao.persist(usageEvent);
    }
  }
}
Program: 89559
Project: 89559
Buggy source:
boolean stateTransitTo(VMInstanceVO vm,VirtualMachine.Event e,Long hostId);

Fixed version (ground truth):
boolean stateTransitTo(VMInstanceVO vm,VirtualMachine.Event e,Long hostId) throws NoTransitionException ;
Program: 89562
Project: 89562
Buggy source:
protected void clear(){
  _changes.clear();
  if (_collectionChanges != null) {
    _collectionChanges.clear();
    _collectionChanges=null;
  }
}

Fixed version (ground truth):
public void clear(){
  _changes.clear();
  if (_collectionChanges != null) {
    _collectionChanges.clear();
    _collectionChanges=null;
  }
}
Program: 89563
Project: 89563
Buggy source:
public boolean transitTo(V vo,E e,Long id,StateDao<S,E,V> dao) throws NoTransitionException {
  S currentState=vo.getState();
  S nextState=getNextState(currentState,e);
  boolean transitionStatus=true;
  if (nextState == null) {
    transitionStatus=false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.preStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,id);
  }
  Long oldHostId=vo.getHostId();
  transitionStatus=dao.updateState(currentState,e,nextState,vo,id);
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.postStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,oldHostId);
  }
  return transitionStatus;
}

Fixed version (ground truth):
public boolean transitTo(V vo,E e,Long id,StateDao<S,E,V> dao) throws NoTransitionException {
  S currentState=vo.getState();
  S nextState=getNextState(currentState,e);
  boolean transitionStatus=true;
  if (nextState == null) {
    transitionStatus=false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.preStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,id);
  }
  Long oldHostId=vo.getHostId();
  transitionStatus=dao.updateState(currentState,e,nextState,vo,id);
  if (!transitionStatus) {
    return false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.postStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,oldHostId);
  }
  return true;
}
Program: 89564
Project: 89564
Buggy source:
@Override public JsonElement serialize(List<PortConfig> src,Type typeOfSrc,JsonSerializationContext context){
  if (src.size() == 0) {
    s_logger.info("String_Node_Str");
    return new JsonNull();
  }
  s_logger.debug("String_Node_Str");
  JsonArray array=new JsonArray();
  for (  PortConfig pc : src) {
    array.add(s_gson.toJsonTree(pc));
  }
  return array;
}

Fixed version (ground truth):
@Override public JsonElement serialize(List<PortConfig> src,Type typeOfSrc,JsonSerializationContext context){
  if (src.size() == 0) {
    return new JsonNull();
  }
  JsonArray array=new JsonArray();
  for (  PortConfig pc : src) {
    array.add(s_gson.toJsonTree(pc));
  }
  return array;
}
Program: 89565
Project: 89565
Buggy source:
protected VIF getCorrectVif(Connection conn,VM router,String vlanId){
  try {
    Set<VIF> routerVIFs=router.getVIFs(conn);
    for (    VIF vif : routerVIFs) {
      Network vifNetwork=vif.getNetwork(conn);
      if (vlanId.equalsIgnoreCase(Vlan.UNTAGGED)) {
        if (vifNetwork.getUuid(conn).equals(_host.publicNetwork)) {
          return vif;
        }
      }
 else {
        if (vifNetwork.getNameLabel(conn).equals("String_Node_Str" + vlanId)) {
          return vif;
        }
      }
    }
  }
 catch (  XmlRpcException e) {
    String msg="String_Node_Str" + e.getMessage();
    s_logger.warn(msg,e);
  }
catch (  XenAPIException e) {
    String msg="String_Node_Str" + e.toString();
    s_logger.warn(msg,e);
  }
  return null;
}

Fixed version (ground truth):
protected VIF getCorrectVif(Connection conn,VM router,Network network) throws XmlRpcException, XenAPIException {
  Set<VIF> routerVIFs=router.getVIFs(conn);
  for (  VIF vif : routerVIFs) {
    Network vifNetwork=vif.getNetwork(conn);
    if (vifNetwork.getUuid(conn).equals(network.getUuid(conn))) {
      return vif;
    }
  }
  return null;
}
Program: 89570
Project: 89570
Buggy source:
protected void clear(){
  _changes.clear();
  if (_collectionChanges != null) {
    _collectionChanges.clear();
    _collectionChanges=null;
  }
}

Fixed version (ground truth):
public void clear(){
  _changes.clear();
  if (_collectionChanges != null) {
    _collectionChanges.clear();
    _collectionChanges=null;
  }
}
Program: 89571
Project: 89571
Buggy source:
public boolean transitTo(V vo,E e,Long id,StateDao<S,E,V> dao) throws NoTransitionException {
  S currentState=vo.getState();
  S nextState=getNextState(currentState,e);
  boolean transitionStatus=true;
  if (nextState == null) {
    transitionStatus=false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.preStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,id);
  }
  Long oldHostId=vo.getHostId();
  transitionStatus=dao.updateState(currentState,e,nextState,vo,id);
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.postStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,oldHostId);
  }
  return transitionStatus;
}

Fixed version (ground truth):
public boolean transitTo(V vo,E e,Long id,StateDao<S,E,V> dao) throws NoTransitionException {
  S currentState=vo.getState();
  S nextState=getNextState(currentState,e);
  boolean transitionStatus=true;
  if (nextState == null) {
    transitionStatus=false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.preStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,id);
  }
  Long oldHostId=vo.getHostId();
  transitionStatus=dao.updateState(currentState,e,nextState,vo,id);
  if (!transitionStatus) {
    return false;
  }
  for (  StateListener<S,E,V> listener : _listeners) {
    listener.postStateTransitionEvent(currentState,e,nextState,vo,transitionStatus,oldHostId);
  }
  return true;
}
Program: 89572
Project: 89572
Buggy source:
@Override public JsonElement serialize(List<PortConfig> src,Type typeOfSrc,JsonSerializationContext context){
  if (src.size() == 0) {
    s_logger.info("String_Node_Str");
    return new JsonNull();
  }
  s_logger.debug("String_Node_Str");
  JsonArray array=new JsonArray();
  for (  PortConfig pc : src) {
    array.add(s_gson.toJsonTree(pc));
  }
  return array;
}

Fixed version (ground truth):
@Override public JsonElement serialize(List<PortConfig> src,Type typeOfSrc,JsonSerializationContext context){
  if (src.size() == 0) {
    return new JsonNull();
  }
  JsonArray array=new JsonArray();
  for (  PortConfig pc : src) {
    array.add(s_gson.toJsonTree(pc));
  }
  return array;
}
Program: 89573
Project: 89573
Buggy source:
protected VIF getCorrectVif(Connection conn,VM router,String vlanId){
  try {
    Set<VIF> routerVIFs=router.getVIFs(conn);
    for (    VIF vif : routerVIFs) {
      Network vifNetwork=vif.getNetwork(conn);
      if (vlanId.equalsIgnoreCase(Vlan.UNTAGGED)) {
        if (vifNetwork.getUuid(conn).equals(_host.publicNetwork)) {
          return vif;
        }
      }
 else {
        if (vifNetwork.getNameLabel(conn).equals("String_Node_Str" + vlanId)) {
          return vif;
        }
      }
    }
  }
 catch (  XmlRpcException e) {
    String msg="String_Node_Str" + e.getMessage();
    s_logger.warn(msg,e);
  }
catch (  XenAPIException e) {
    String msg="String_Node_Str" + e.toString();
    s_logger.warn(msg,e);
  }
  return null;
}

Fixed version (ground truth):
protected VIF getCorrectVif(Connection conn,VM router,Network network) throws XmlRpcException, XenAPIException {
  Set<VIF> routerVIFs=router.getVIFs(conn);
  for (  VIF vif : routerVIFs) {
    Network vifNetwork=vif.getNetwork(conn);
    if (vifNetwork.getUuid(conn).equals(network.getUuid(conn))) {
      return vif;
    }
  }
  return null;
}
Program: 89578
Project: 89578
Buggy source:
private void updateVmStateForFailedVmCreation(Long vmId){
  UserVmVO vm=_vmDao.findById(vmId);
  if (vm != null) {
    if (vm.getState().equals(State.Stopped)) {
      _itMgr.stateTransitTo(vm,VirtualMachine.Event.OperationFailed,null);
      List<VolumeVO> volumesForThisVm=_volsDao.findByInstance(vm.getId());
      for (      VolumeVO volume : volumesForThisVm) {
        try {
          if (volume.getState() != Volume.State.Destroy) {
            _storageMgr.destroyVolume(volume);
          }
          if (volume.getState() == Volume.State.Ready) {
            UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE,volume.getAccountId(),volume.getDataCenterId(),volume.getId(),volume.getName());
            _usageEventDao.persist(usageEvent);
          }
        }
 catch (        ConcurrentOperationException e) {
          s_logger.warn("String_Node_Str" + volume.getId() + "String_Node_Str"+ vmId+ "String_Node_Str");
        }
      }
      UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VM_DESTROY,vm.getAccountId(),vm.getDataCenterIdToDeployIn(),vm.getId(),vm.getHostName());
      _usageEventDao.persist(usageEvent);
    }
  }
}

Fixed version (ground truth):
private void updateVmStateForFailedVmCreation(Long vmId){
  UserVmVO vm=_vmDao.findById(vmId);
  if (vm != null) {
    if (vm.getState().equals(State.Stopped)) {
      try {
        _itMgr.stateTransitTo(vm,VirtualMachine.Event.OperationFailed,null);
      }
 catch (      NoTransitionException e1) {
        s_logger.warn(e1.getMessage());
      }
      List<VolumeVO> volumesForThisVm=_volsDao.findByInstance(vm.getId());
      for (      VolumeVO volume : volumesForThisVm) {
        try {
          if (volume.getState() != Volume.State.Destroy) {
            _storageMgr.destroyVolume(volume);
          }
          if (volume.getState() == Volume.State.Ready) {
            UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE,volume.getAccountId(),volume.getDataCenterId(),volume.getId(),volume.getName());
            _usageEventDao.persist(usageEvent);
          }
        }
 catch (        ConcurrentOperationException e) {
          s_logger.warn("String_Node_Str" + volume.getId() + "String_Node_Str"+ vmId+ "String_Node_Str");
        }
      }
      UsageEventVO usageEvent=new UsageEventVO(EventTypes.EVENT_VM_DESTROY,vm.getAccountId(),vm.getDataCenterIdToDeployIn(),vm.getId(),vm.getHostName());
      _usageEventDao.persist(usageEvent);
    }
  }
}
Program: 89579
Project: 89579
Buggy source:
boolean stateTransitTo(VMInstanceVO vm,VirtualMachine.Event e,Long hostId);

Fixed version (ground truth):
boolean stateTransitTo(VMInstanceVO vm,VirtualMachine.Event e,Long hostId) throws NoTransitionException ;
Program: 89583
Project: 89583
Buggy source:
@Override public void execute() throws InsufficientCapacityException, ConcurrentOperationException {
  Network result=_networkService.updateNetwork(getId(),getNetworkName(),getDisplayText(),tags,UserContext.current().getCaller());
  if (result != null) {
    NetworkResponse response=_responseGenerator.createNetworkResponse(result);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute() throws InsufficientCapacityException, ConcurrentOperationException {
  Network result=_networkService.updateNetwork(getId(),getNetworkName(),getDisplayText(),tags,UserContext.current().getCaller(),getNetworkDomain());
  if (result != null) {
    NetworkResponse response=_responseGenerator.createNetworkResponse(result);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89584
Project: 89584
Buggy source:
Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId);

Fixed version (ground truth):
Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId,long zoneId);
Program: 89585
Project: 89585
Buggy source:
Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller);

Fixed version (ground truth):
Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller,String domainSuffix);
Program: 89586
Project: 89586
Buggy source:
public static Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId){
  return _networkMgr.getNetworkCapabilities(networkId);
}

Fixed version (ground truth):
public static Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkOfferingId,long zoneId){
  return _networkMgr.getNetworkCapabilities(networkOfferingId,zoneId);
}
Program: 89588
Project: 89588
Buggy source:
Map<Capability,String> getServiceCapabilities(long zoneId,Service service);

Fixed version (ground truth):
Map<Capability,String> getServiceCapabilities(long zoneId,Long networkOfferingId,Service service);
Program: 89589
Project: 89589
Buggy source:
@Override @ActionEvent(eventType=EventTypes.EVENT_NETWORK_UPDATE,eventDescription="String_Node_Str",async=false) public Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller){
  NetworkVO network=_networksDao.findById(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
  }
  if (tags != null && tags.size() > 1) {
    throw new InvalidParameterException("String_Node_Str");
  }
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (offering.isSystemOnly()) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  _accountMgr.checkAccess(caller,network);
  if (name != null) {
    network.setName(name);
  }
  if (displayText != null) {
    network.setDisplayText(displayText);
  }
  if (tags != null) {
    network.setTags(tags);
  }
  _networksDao.update(networkId,network);
  return network;
}

Fixed version (ground truth):
@Override @ActionEvent(eventType=EventTypes.EVENT_NETWORK_UPDATE,eventDescription="String_Node_Str",async=false) public Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller,String domainSuffix){
  NetworkVO network=_networksDao.findById(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
  }
  if (tags != null && tags.size() > 1) {
    throw new InvalidParameterException("String_Node_Str");
  }
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (offering.isSystemOnly()) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (domainSuffix != null) {
    Map<Network.Capability,String> dnsCapabilities=getServiceCapabilities(network.getDataCenterId(),network.getNetworkOfferingId(),Service.Dns);
    String isUpdateDnsSupported=dnsCapabilities.get(Capability.AllowDnsSuffixModification);
    if (isUpdateDnsSupported == null || !Boolean.valueOf(isUpdateDnsSupported)) {
      throw new InvalidParameterValueException("String_Node_Str" + network.getNetworkOfferingId() + "String_Node_Str"+ network.getDataCenterId());
    }
    List<DomainRouterVO> routers=_routerDao.listActive(networkId);
    if (!routers.isEmpty()) {
      throw new CloudRuntimeException("String_Node_Str" + networkId + "String_Node_Str");
    }
    network.setNetworkDomain(domainSuffix);
  }
  _accountMgr.checkAccess(caller,network);
  if (name != null) {
    network.setName(name);
  }
  if (displayText != null) {
    network.setDisplayText(displayText);
  }
  if (tags != null) {
    network.setTags(tags);
  }
  _networksDao.update(networkId,network);
  return network;
}
Program: 89591
Project: 89591
Buggy source:
@Override public Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId){
  Network network=getNetwork(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId);
  }
  Map<Service,Map<Capability,String>> zoneCapabilities=getZoneCapabilities(network.getDataCenterId());
  Map<Service,Map<Capability,String>> networkCapabilities=new HashMap<Service,Map<Capability,String>>();
  for (  Service service : zoneCapabilities.keySet()) {
    if (isServiceSupported(networkId,service)) {
      networkCapabilities.put(service,zoneCapabilities.get(service));
    }
  }
  return networkCapabilities;
}

Fixed version (ground truth):
@Override public Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkOfferingId,long zoneId){
  Map<Service,Map<Capability,String>> zoneCapabilities=getZoneCapabilities(zoneId);
  Map<Service,Map<Capability,String>> networkCapabilities=new HashMap<Service,Map<Capability,String>>();
  for (  Service service : zoneCapabilities.keySet()) {
    if (isServiceSupported(networkOfferingId,service)) {
      networkCapabilities.put(service,zoneCapabilities.get(service));
    }
  }
  return networkCapabilities;
}
Program: 89593
Project: 89593
Buggy source:
@Override public Map<Capability,String> getServiceCapabilities(long zoneId,Service service){
  Map<Service,Map<Capability,String>> networkCapabilities=getZoneCapabilities(zoneId);
  if (networkCapabilities.get(service) == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ zoneId);
  }
  return networkCapabilities.get(service);
}

Fixed version (ground truth):
@Override public Map<Capability,String> getServiceCapabilities(long zoneId,Long networkOfferingId,Service service){
  if (!isServiceSupported(networkOfferingId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkOfferingId);
  }
  Map<Service,Map<Capability,String>> networkCapabilities=getZoneCapabilities(zoneId);
  if (networkCapabilities.get(service) == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ zoneId);
  }
  return networkCapabilities.get(service);
}
Program: 89594
Project: 89594
Buggy source:
@Override public boolean isServiceSupported(long networkId,Network.Service service){
  Network network=getNetwork(networkId);
  NetworkOffering offering=_configMgr.getNetworkOffering(network.getNetworkOfferingId());
  if (service == Service.Lb) {
    return offering.isLbService();
  }
 else   if (service == Service.Dhcp) {
    return offering.isDhcpService();
  }
 else   if (service == Service.Dns) {
    return offering.isDnsService();
  }
 else   if (service == Service.Firewall) {
    return offering.isFirewallService();
  }
 else   if (service == Service.UserData) {
    return offering.isUserdataService();
  }
 else   if (service == Service.Vpn) {
    return offering.isVpnService();
  }
 else   if (service == Service.Gateway) {
    return offering.isGatewayService();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isServiceSupported(long networkOfferingId,Network.Service service){
  NetworkOffering offering=_configMgr.getNetworkOffering(networkOfferingId);
  if (service == Service.Lb) {
    return offering.isLbService();
  }
 else   if (service == Service.Dhcp) {
    return offering.isDhcpService();
  }
 else   if (service == Service.Dns) {
    return offering.isDnsService();
  }
 else   if (service == Service.Firewall) {
    return offering.isFirewallService();
  }
 else   if (service == Service.UserData) {
    return offering.isUserdataService();
  }
 else   if (service == Service.Vpn) {
    return offering.isVpnService();
  }
 else   if (service == Service.Gateway) {
    return offering.isGatewayService();
  }
  return false;
}
Program: 89595
Project: 89595
Buggy source:
@Override public List<NetworkVO> listNetworksForAccount(long accountId,long zoneId,GuestIpType guestType,Boolean isDefault){
  List<NetworkVO> accountNetworks=new ArrayList<NetworkVO>();
  List<NetworkVO> zoneNetworks=_networksDao.listByZone(zoneId);
  for (  NetworkVO network : zoneNetworks) {
    NetworkOfferingVO no=_networkOfferingDao.findById(network.getNetworkOfferingId());
    if (!no.isSystemOnly()) {
      if (network.getIsShared() || !_networksDao.listBy(accountId,network.getId()).isEmpty()) {
        if ((guestType == null || guestType == network.getGuestType()) && (isDefault == null || isDefault == network.isDefault)) {
          accountNetworks.add(network);
        }
      }
    }
  }
  return accountNetworks;
}

Fixed version (ground truth):
@Override public List<NetworkVO> listNetworksForAccount(long accountId,long zoneId,GuestIpType guestType,Boolean isDefault){
  List<NetworkVO> accountNetworks=new ArrayList<NetworkVO>();
  List<NetworkVO> zoneNetworks=_networksDao.listByZone(zoneId);
  for (  NetworkVO network : zoneNetworks) {
    NetworkOfferingVO no=_networkOfferingDao.findById(network.getNetworkOfferingId());
    if (!no.isSystemOnly()) {
      if (network.getIsShared() || !_networksDao.listBy(accountId,network.getId()).isEmpty()) {
        if ((guestType == null || guestType == network.getGuestType()) && (isDefault == null || isDefault.booleanValue() == network.isDefault)) {
          accountNetworks.add(network);
        }
      }
    }
  }
  return accountNetworks;
}
Program: 89596
Project: 89596
Buggy source:
/** 
 * Constructor for the actual DAO object.
 * @param trafficType
 * @param mode
 * @param broadcastDomainType
 * @param networkOfferingId
 * @param dataCenterId
 * @param domainId
 * @param accountId
 * @param name
 * @param displayText
 * @param isShared
 * @param isDefault
 * @param isDomainSpecific
 */
public NetworkVO(long id,TrafficType trafficType,GuestIpType guestType,Mode mode,BroadcastDomainType broadcastDomainType,long networkOfferingId,long dataCenterId,long domainId,long accountId,long related,String name,String displayText,Boolean isShared,boolean isDefault,boolean isDomainSpecific){
  this(trafficType,guestType,mode,broadcastDomainType,networkOfferingId,dataCenterId,State.Allocated);
  this.domainId=domainId;
  this.accountId=accountId;
  this.related=related;
  this.id=id;
  this.name=name;
  this.displayText=displayText;
  this.isShared=isShared;
  this.isDefault=isDefault;
  this.isDomainSpecific=isDomainSpecific;
}

Fixed version (ground truth):
/** 
 * Constructor for the actual DAO object.
 * @param trafficType
 * @param mode
 * @param broadcastDomainType
 * @param networkOfferingId
 * @param dataCenterId
 * @param domainId
 * @param accountId
 * @param name
 * @param displayText
 * @param isShared
 * @param isDefault
 * @param isDomainSpecific
 * @param networkDomain
 */
public NetworkVO(long id,TrafficType trafficType,GuestIpType guestType,Mode mode,BroadcastDomainType broadcastDomainType,long networkOfferingId,long dataCenterId,long domainId,long accountId,long related,String name,String displayText,Boolean isShared,boolean isDefault,boolean isDomainSpecific,String networkDomain){
  this(trafficType,guestType,mode,broadcastDomainType,networkOfferingId,dataCenterId,State.Allocated);
  this.domainId=domainId;
  this.accountId=accountId;
  this.related=related;
  this.id=id;
  this.name=name;
  this.displayText=displayText;
  this.isShared=isShared;
  this.isDefault=isDefault;
  this.isDomainSpecific=isDomainSpecific;
  this.networkDomain=networkDomain;
}
Program: 89597
Project: 89597
Buggy source:
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  capabilities.put(Service.Dns,null);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  return capabilities;
}

Fixed version (ground truth):
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  Map<Capability,String> dnsCapabilities=new HashMap<Capability,String>();
  dnsCapabilities.put(Capability.AllowDnsSuffixModification,"String_Node_Str");
  capabilities.put(Service.Dns,dnsCapabilities);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  return capabilities;
}
Program: 89598
Project: 89598
Buggy source:
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  Map<Capability,String> lbCapabilities=new HashMap<Capability,String>();
  lbCapabilities.put(Capability.SupportedLBAlgorithms,"String_Node_Str");
  lbCapabilities.put(Capability.SupportedProtocols,"String_Node_Str");
  capabilities.put(Service.Lb,lbCapabilities);
  Map<Capability,String> firewallCapabilities=new HashMap<Capability,String>();
  firewallCapabilities.put(Capability.PortForwarding,"String_Node_Str");
  firewallCapabilities.put(Capability.TrafficStatistics,"String_Node_Str");
  firewallCapabilities.put(Capability.StaticNat,"String_Node_Str");
  firewallCapabilities.put(Capability.SupportedProtocols,"String_Node_Str");
  firewallCapabilities.put(Capability.MultipleIps,"String_Node_Str");
  firewallCapabilities.put(Capability.SupportedSourceNatTypes,"String_Node_Str");
  capabilities.put(Service.Firewall,firewallCapabilities);
  Map<Capability,String> vpnCapabilities=new HashMap<Capability,String>();
  vpnCapabilities.put(Capability.SupportedVpnTypes,"String_Node_Str");
  capabilities.put(Service.Vpn,vpnCapabilities);
  capabilities.put(Service.Dns,null);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  capabilities.put(Service.Gateway,null);
  return capabilities;
}

Fixed version (ground truth):
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  Map<Capability,String> lbCapabilities=new HashMap<Capability,String>();
  lbCapabilities.put(Capability.SupportedLBAlgorithms,"String_Node_Str");
  lbCapabilities.put(Capability.SupportedProtocols,"String_Node_Str");
  capabilities.put(Service.Lb,lbCapabilities);
  Map<Capability,String> firewallCapabilities=new HashMap<Capability,String>();
  firewallCapabilities.put(Capability.PortForwarding,"String_Node_Str");
  firewallCapabilities.put(Capability.TrafficStatistics,"String_Node_Str");
  firewallCapabilities.put(Capability.StaticNat,"String_Node_Str");
  firewallCapabilities.put(Capability.SupportedProtocols,"String_Node_Str");
  firewallCapabilities.put(Capability.MultipleIps,"String_Node_Str");
  firewallCapabilities.put(Capability.SupportedSourceNatTypes,"String_Node_Str");
  capabilities.put(Service.Firewall,firewallCapabilities);
  Map<Capability,String> vpnCapabilities=new HashMap<Capability,String>();
  vpnCapabilities.put(Capability.SupportedVpnTypes,"String_Node_Str");
  capabilities.put(Service.Vpn,vpnCapabilities);
  Map<Capability,String> dnsCapabilities=new HashMap<Capability,String>();
  dnsCapabilities.put(Capability.AllowDnsSuffixModification,"String_Node_Str");
  capabilities.put(Service.Dns,dnsCapabilities);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  capabilities.put(Service.Gateway,null);
  return capabilities;
}
Program: 89601
Project: 89601
Buggy source:
@Override public void execute() throws InsufficientCapacityException, ConcurrentOperationException {
  Network result=_networkService.updateNetwork(getId(),getNetworkName(),getDisplayText(),tags,UserContext.current().getCaller());
  if (result != null) {
    NetworkResponse response=_responseGenerator.createNetworkResponse(result);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute() throws InsufficientCapacityException, ConcurrentOperationException {
  Network result=_networkService.updateNetwork(getId(),getNetworkName(),getDisplayText(),tags,UserContext.current().getCaller(),getNetworkDomain());
  if (result != null) {
    NetworkResponse response=_responseGenerator.createNetworkResponse(result);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89602
Project: 89602
Buggy source:
Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId);

Fixed version (ground truth):
Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId,long zoneId);
Program: 89603
Project: 89603
Buggy source:
Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller);

Fixed version (ground truth):
Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller,String domainSuffix);
Program: 89604
Project: 89604
Buggy source:
public static Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId){
  return _networkMgr.getNetworkCapabilities(networkId);
}

Fixed version (ground truth):
public static Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkOfferingId,long zoneId){
  return _networkMgr.getNetworkCapabilities(networkOfferingId,zoneId);
}
Program: 89606
Project: 89606
Buggy source:
Map<Capability,String> getServiceCapabilities(long zoneId,Service service);

Fixed version (ground truth):
Map<Capability,String> getServiceCapabilities(long zoneId,Long networkOfferingId,Service service);
Program: 89607
Project: 89607
Buggy source:
@Override @ActionEvent(eventType=EventTypes.EVENT_NETWORK_UPDATE,eventDescription="String_Node_Str",async=false) public Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller){
  NetworkVO network=_networksDao.findById(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
  }
  if (tags != null && tags.size() > 1) {
    throw new InvalidParameterException("String_Node_Str");
  }
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (offering.isSystemOnly()) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  _accountMgr.checkAccess(caller,network);
  if (name != null) {
    network.setName(name);
  }
  if (displayText != null) {
    network.setDisplayText(displayText);
  }
  if (tags != null) {
    network.setTags(tags);
  }
  _networksDao.update(networkId,network);
  return network;
}

Fixed version (ground truth):
@Override @ActionEvent(eventType=EventTypes.EVENT_NETWORK_UPDATE,eventDescription="String_Node_Str",async=false) public Network updateNetwork(long networkId,String name,String displayText,List<String> tags,Account caller,String domainSuffix){
  NetworkVO network=_networksDao.findById(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
  }
  if (tags != null && tags.size() > 1) {
    throw new InvalidParameterException("String_Node_Str");
  }
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (offering.isSystemOnly()) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (domainSuffix != null) {
    Map<Network.Capability,String> dnsCapabilities=getServiceCapabilities(network.getDataCenterId(),network.getNetworkOfferingId(),Service.Dns);
    String isUpdateDnsSupported=dnsCapabilities.get(Capability.AllowDnsSuffixModification);
    if (isUpdateDnsSupported == null || !Boolean.valueOf(isUpdateDnsSupported)) {
      throw new InvalidParameterValueException("String_Node_Str" + network.getNetworkOfferingId() + "String_Node_Str"+ network.getDataCenterId());
    }
    List<DomainRouterVO> routers=_routerDao.listActive(networkId);
    if (!routers.isEmpty()) {
      throw new CloudRuntimeException("String_Node_Str" + networkId + "String_Node_Str");
    }
    network.setNetworkDomain(domainSuffix);
  }
  _accountMgr.checkAccess(caller,network);
  if (name != null) {
    network.setName(name);
  }
  if (displayText != null) {
    network.setDisplayText(displayText);
  }
  if (tags != null) {
    network.setTags(tags);
  }
  _networksDao.update(networkId,network);
  return network;
}
Program: 89609
Project: 89609
Buggy source:
@Override public Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkId){
  Network network=getNetwork(networkId);
  if (network == null) {
    throw new InvalidParameterValueException("String_Node_Str" + networkId);
  }
  Map<Service,Map<Capability,String>> zoneCapabilities=getZoneCapabilities(network.getDataCenterId());
  Map<Service,Map<Capability,String>> networkCapabilities=new HashMap<Service,Map<Capability,String>>();
  for (  Service service : zoneCapabilities.keySet()) {
    if (isServiceSupported(networkId,service)) {
      networkCapabilities.put(service,zoneCapabilities.get(service));
    }
  }
  return networkCapabilities;
}

Fixed version (ground truth):
@Override public Map<Service,Map<Capability,String>> getNetworkCapabilities(long networkOfferingId,long zoneId){
  Map<Service,Map<Capability,String>> zoneCapabilities=getZoneCapabilities(zoneId);
  Map<Service,Map<Capability,String>> networkCapabilities=new HashMap<Service,Map<Capability,String>>();
  for (  Service service : zoneCapabilities.keySet()) {
    if (isServiceSupported(networkOfferingId,service)) {
      networkCapabilities.put(service,zoneCapabilities.get(service));
    }
  }
  return networkCapabilities;
}
Program: 89611
Project: 89611
Buggy source:
@Override public Map<Capability,String> getServiceCapabilities(long zoneId,Service service){
  Map<Service,Map<Capability,String>> networkCapabilities=getZoneCapabilities(zoneId);
  if (networkCapabilities.get(service) == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ zoneId);
  }
  return networkCapabilities.get(service);
}

Fixed version (ground truth):
@Override public Map<Capability,String> getServiceCapabilities(long zoneId,Long networkOfferingId,Service service){
  if (!isServiceSupported(networkOfferingId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkOfferingId);
  }
  Map<Service,Map<Capability,String>> networkCapabilities=getZoneCapabilities(zoneId);
  if (networkCapabilities.get(service) == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ zoneId);
  }
  return networkCapabilities.get(service);
}
Program: 89612
Project: 89612
Buggy source:
@Override public boolean isServiceSupported(long networkId,Network.Service service){
  Network network=getNetwork(networkId);
  NetworkOffering offering=_configMgr.getNetworkOffering(network.getNetworkOfferingId());
  if (service == Service.Lb) {
    return offering.isLbService();
  }
 else   if (service == Service.Dhcp) {
    return offering.isDhcpService();
  }
 else   if (service == Service.Dns) {
    return offering.isDnsService();
  }
 else   if (service == Service.Firewall) {
    return offering.isFirewallService();
  }
 else   if (service == Service.UserData) {
    return offering.isUserdataService();
  }
 else   if (service == Service.Vpn) {
    return offering.isVpnService();
  }
 else   if (service == Service.Gateway) {
    return offering.isGatewayService();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isServiceSupported(long networkOfferingId,Network.Service service){
  NetworkOffering offering=_configMgr.getNetworkOffering(networkOfferingId);
  if (service == Service.Lb) {
    return offering.isLbService();
  }
 else   if (service == Service.Dhcp) {
    return offering.isDhcpService();
  }
 else   if (service == Service.Dns) {
    return offering.isDnsService();
  }
 else   if (service == Service.Firewall) {
    return offering.isFirewallService();
  }
 else   if (service == Service.UserData) {
    return offering.isUserdataService();
  }
 else   if (service == Service.Vpn) {
    return offering.isVpnService();
  }
 else   if (service == Service.Gateway) {
    return offering.isGatewayService();
  }
  return false;
}
Program: 89613
Project: 89613
Buggy source:
@Override public List<NetworkVO> listNetworksForAccount(long accountId,long zoneId,GuestIpType guestType,Boolean isDefault){
  List<NetworkVO> accountNetworks=new ArrayList<NetworkVO>();
  List<NetworkVO> zoneNetworks=_networksDao.listByZone(zoneId);
  for (  NetworkVO network : zoneNetworks) {
    NetworkOfferingVO no=_networkOfferingDao.findById(network.getNetworkOfferingId());
    if (!no.isSystemOnly()) {
      if (network.getIsShared() || !_networksDao.listBy(accountId,network.getId()).isEmpty()) {
        if ((guestType == null || guestType == network.getGuestType()) && (isDefault == null || isDefault == network.isDefault)) {
          accountNetworks.add(network);
        }
      }
    }
  }
  return accountNetworks;
}

Fixed version (ground truth):
@Override public List<NetworkVO> listNetworksForAccount(long accountId,long zoneId,GuestIpType guestType,Boolean isDefault){
  List<NetworkVO> accountNetworks=new ArrayList<NetworkVO>();
  List<NetworkVO> zoneNetworks=_networksDao.listByZone(zoneId);
  for (  NetworkVO network : zoneNetworks) {
    NetworkOfferingVO no=_networkOfferingDao.findById(network.getNetworkOfferingId());
    if (!no.isSystemOnly()) {
      if (network.getIsShared() || !_networksDao.listBy(accountId,network.getId()).isEmpty()) {
        if ((guestType == null || guestType == network.getGuestType()) && (isDefault == null || isDefault.booleanValue() == network.isDefault)) {
          accountNetworks.add(network);
        }
      }
    }
  }
  return accountNetworks;
}
Program: 89614
Project: 89614
Buggy source:
/** 
 * Constructor for the actual DAO object.
 * @param trafficType
 * @param mode
 * @param broadcastDomainType
 * @param networkOfferingId
 * @param dataCenterId
 * @param domainId
 * @param accountId
 * @param name
 * @param displayText
 * @param isShared
 * @param isDefault
 * @param isDomainSpecific
 */
public NetworkVO(long id,TrafficType trafficType,GuestIpType guestType,Mode mode,BroadcastDomainType broadcastDomainType,long networkOfferingId,long dataCenterId,long domainId,long accountId,long related,String name,String displayText,Boolean isShared,boolean isDefault,boolean isDomainSpecific){
  this(trafficType,guestType,mode,broadcastDomainType,networkOfferingId,dataCenterId,State.Allocated);
  this.domainId=domainId;
  this.accountId=accountId;
  this.related=related;
  this.id=id;
  this.name=name;
  this.displayText=displayText;
  this.isShared=isShared;
  this.isDefault=isDefault;
  this.isDomainSpecific=isDomainSpecific;
}

Fixed version (ground truth):
/** 
 * Constructor for the actual DAO object.
 * @param trafficType
 * @param mode
 * @param broadcastDomainType
 * @param networkOfferingId
 * @param dataCenterId
 * @param domainId
 * @param accountId
 * @param name
 * @param displayText
 * @param isShared
 * @param isDefault
 * @param isDomainSpecific
 * @param networkDomain
 */
public NetworkVO(long id,TrafficType trafficType,GuestIpType guestType,Mode mode,BroadcastDomainType broadcastDomainType,long networkOfferingId,long dataCenterId,long domainId,long accountId,long related,String name,String displayText,Boolean isShared,boolean isDefault,boolean isDomainSpecific,String networkDomain){
  this(trafficType,guestType,mode,broadcastDomainType,networkOfferingId,dataCenterId,State.Allocated);
  this.domainId=domainId;
  this.accountId=accountId;
  this.related=related;
  this.id=id;
  this.name=name;
  this.displayText=displayText;
  this.isShared=isShared;
  this.isDefault=isDefault;
  this.isDomainSpecific=isDomainSpecific;
  this.networkDomain=networkDomain;
}
Program: 89615
Project: 89615
Buggy source:
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  capabilities.put(Service.Dns,null);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  return capabilities;
}

Fixed version (ground truth):
private static Map<Service,Map<Capability,String>> setCapabilities(){
  Map<Service,Map<Capability,String>> capabilities=new HashMap<Service,Map<Capability,String>>();
  Map<Capability,String> dnsCapabilities=new HashMap<Capability,String>();
  dnsCapabilities.put(Capability.AllowDnsSuffixModification,"String_Node_Str");
  capabilities.put(Service.Dns,dnsCapabilities);
  capabilities.put(Service.UserData,null);
  capabilities.put(Service.Dhcp,null);
  return capabilities;
}