nus-yam/ex-repair huggingface dataset:
Program: 106918
Project: 106918
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: 106925
Project: 106925
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: 106932
Project: 106932
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: 106936
Project: 106936
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: 106937
Project: 106937
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: 106940
Project: 106940
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: 106941
Project: 106941
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: 106944
Project: 106944
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: 106945
Project: 106945
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: 106949
Project: 106949
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: 106950
Project: 106950
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: 106953
Project: 106953
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: 106954
Project: 106954
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: 106957
Project: 106957
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: 106958
Project: 106958
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: 106961
Project: 106961
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: 106962
Project: 106962
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: 106963
Project: 106963
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: 106964
Project: 106964
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: 106966
Project: 106966
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: 106967
Project: 106967
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: 106969
Project: 106969
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: 106971
Project: 106971
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: 106972
Project: 106972
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: 106973
Project: 106973
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: 106974
Project: 106974
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: 106975
Project: 106975
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: 106976
Project: 106976
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: 106979
Project: 106979
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: 106980
Project: 106980
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: 106981
Project: 106981
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: 106982
Project: 106982
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: 106984
Project: 106984
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: 106985
Project: 106985
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: 106987
Project: 106987
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: 106989
Project: 106989
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: 106990
Project: 106990
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: 106991
Project: 106991
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: 106992
Project: 106992
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: 106993
Project: 106993
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;
}