nus-yam/ex-repair huggingface dataset:
Program: 105863
Project: 105863
Buggy source:
protected LoadBalancerConfigCommand generateLoadBalancerConfigCommand1(){
  List<LoadBalancerTO> lbs=new ArrayList<>();
  List<LbDestination> dests=new ArrayList<>();
  dests.add(new LbDestination(80,8080,"String_Node_Str",false));
  dests.add(new LbDestination(80,8080,"String_Node_Str",true));
  lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(),"String_Node_Str",80,"String_Node_Str","String_Node_Str",false,false,false,dests));
  LoadBalancerTO[] arrayLbs=new LoadBalancerTO[lbs.size()];
  lbs.toArray(arrayLbs);
  NicTO nic=new NicTO();
  LoadBalancerConfigCommand cmd=new LoadBalancerConfigCommand(arrayLbs,"String_Node_Str","String_Node_Str","String_Node_Str",nic,null,"String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected LoadBalancerConfigCommand generateLoadBalancerConfigCommand1(){
  List<LoadBalancerTO> lbs=new ArrayList<>();
  List<LbDestination> dests=new ArrayList<>();
  dests.add(new LbDestination(80,8080,"String_Node_Str",false));
  dests.add(new LbDestination(80,8080,"String_Node_Str",true));
  lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(),"String_Node_Str",80,"String_Node_Str","String_Node_Str",false,false,false,dests));
  LoadBalancerTO[] arrayLbs=new LoadBalancerTO[lbs.size()];
  lbs.toArray(arrayLbs);
  NicTO nic=new NicTO();
  LoadBalancerConfigCommand cmd=new LoadBalancerConfigCommand(arrayLbs,"String_Node_Str","String_Node_Str","String_Node_Str",nic,null,"String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105864
Project: 105864
Buggy source:
protected SetMonitorServiceCommand generateSetMonitorServiceCommand(){
  List<MonitorServiceTO> services=new ArrayList<>();
  services.add(new MonitorServiceTO("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",true));
  services.add(new MonitorServiceTO("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",false));
  SetMonitorServiceCommand cmd=new SetMonitorServiceCommand(services);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected SetMonitorServiceCommand generateSetMonitorServiceCommand(){
  List<MonitorServiceTO> services=new ArrayList<>();
  services.add(new MonitorServiceTO("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",true));
  services.add(new MonitorServiceTO("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",false));
  SetMonitorServiceCommand cmd=new SetMonitorServiceCommand(services);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105865
Project: 105865
Buggy source:
protected DhcpEntryCommand generateDhcpEntryCommand1(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str","String_Node_Str","String_Node_Str",null,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected DhcpEntryCommand generateDhcpEntryCommand1(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str","String_Node_Str","String_Node_Str",null,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105866
Project: 105866
Buggy source:
protected LoadBalancerConfigCommand generateLoadBalancerConfigCommand2(){
  List<LoadBalancerTO> lbs=new ArrayList<>();
  List<LbDestination> dests=new ArrayList<>();
  dests.add(new LbDestination(80,8080,"String_Node_Str",false));
  dests.add(new LbDestination(80,8080,"String_Node_Str",true));
  lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(),"String_Node_Str",80,"String_Node_Str","String_Node_Str",false,false,false,dests));
  LoadBalancerTO[] arrayLbs=new LoadBalancerTO[lbs.size()];
  lbs.toArray(arrayLbs);
  NicTO nic=new NicTO();
  nic.setIp("String_Node_Str");
  LoadBalancerConfigCommand cmd=new LoadBalancerConfigCommand(arrayLbs,"String_Node_Str","String_Node_Str","String_Node_Str",nic,Long.valueOf(1),"String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected LoadBalancerConfigCommand generateLoadBalancerConfigCommand2(){
  List<LoadBalancerTO> lbs=new ArrayList<>();
  List<LbDestination> dests=new ArrayList<>();
  dests.add(new LbDestination(80,8080,"String_Node_Str",false));
  dests.add(new LbDestination(80,8080,"String_Node_Str",true));
  lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(),"String_Node_Str",80,"String_Node_Str","String_Node_Str",false,false,false,dests));
  LoadBalancerTO[] arrayLbs=new LoadBalancerTO[lbs.size()];
  lbs.toArray(arrayLbs);
  NicTO nic=new NicTO();
  nic.setIp("String_Node_Str");
  LoadBalancerConfigCommand cmd=new LoadBalancerConfigCommand(arrayLbs,"String_Node_Str","String_Node_Str","String_Node_Str",nic,Long.valueOf(1),"String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105867
Project: 105867
Buggy source:
protected RemoteAccessVpnCfgCommand generateRemoteAccessVpnCfgCommand1(){
  RemoteAccessVpnCfgCommand cmd=new RemoteAccessVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  cmd.setLocalCidr("String_Node_Str");
  return cmd;
}

Fixed version (ground truth):
protected RemoteAccessVpnCfgCommand generateRemoteAccessVpnCfgCommand1(){
  RemoteAccessVpnCfgCommand cmd=new RemoteAccessVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  cmd.setLocalCidr("String_Node_Str");
  return cmd;
}
Program: 105868
Project: 105868
Buggy source:
protected DhcpEntryCommand generateDhcpEntryCommand2(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str",null,"String_Node_Str","String_Node_Str",true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  cmd.setDuid(NetUtils.getDuidLL(cmd.getVmMac()));
  return cmd;
}

Fixed version (ground truth):
protected DhcpEntryCommand generateDhcpEntryCommand2(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str",null,"String_Node_Str","String_Node_Str",true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  cmd.setDuid(NetUtils.getDuidLL(cmd.getVmMac()));
  return cmd;
}
Program: 105869
Project: 105869
Buggy source:
protected DhcpEntryCommand generateDhcpEntryCommand3(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  cmd.setDuid(NetUtils.getDuidLL(cmd.getVmMac()));
  return cmd;
}

Fixed version (ground truth):
protected DhcpEntryCommand generateDhcpEntryCommand3(){
  DhcpEntryCommand cmd=new DhcpEntryCommand("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  cmd.setDuid(NetUtils.getDuidLL(cmd.getVmMac()));
  return cmd;
}
Program: 105870
Project: 105870
Buggy source:
protected CreateIpAliasCommand generateCreateIpAliasCommand(){
  List<IpAliasTO> aliases=new ArrayList<>();
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  CreateIpAliasCommand cmd=new CreateIpAliasCommand("String_Node_Str",aliases);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected CreateIpAliasCommand generateCreateIpAliasCommand(){
  List<IpAliasTO> aliases=new ArrayList<>();
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  CreateIpAliasCommand cmd=new CreateIpAliasCommand("String_Node_Str",aliases);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105871
Project: 105871
Buggy source:
@Override public ExecutionResult executeInVR(String routerIp,String script,String args){
  assertEquals(routerIp,ROUTER_IP);
  verifyCommand(_currentCmd,script,args);
  return new ExecutionResult(true,null);
}

Fixed version (ground truth):
@Override public ExecutionResult executeInVR(String routerIp,String script,String args){
  assertEquals(routerIp,ROUTERIP);
  verifyCommand(_currentCmd,script,args);
  return new ExecutionResult(true,null);
}
Program: 105872
Project: 105872
Buggy source:
protected IpAssocVpcCommand generateIpAssocVpcCommand(){
  List<IpAddressTO> ips=new ArrayList<IpAddressTO>();
  ips.add(new IpAddressTO(1,"String_Node_Str",true,true,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(2,"String_Node_Str",false,false,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(3,"String_Node_Str",true,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  IpAddressTO[] ipArray=ips.toArray(new IpAddressTO[ips.size()]);
  IpAssocVpcCommand cmd=new IpAssocVpcCommand(ipArray);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  assertEquals(cmd.getAnswersCount(),6);
  return cmd;
}

Fixed version (ground truth):
protected IpAssocVpcCommand generateIpAssocVpcCommand(){
  List<IpAddressTO> ips=new ArrayList<IpAddressTO>();
  ips.add(new IpAddressTO(1,"String_Node_Str",true,true,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(2,"String_Node_Str",false,false,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(3,"String_Node_Str",true,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  IpAddressTO[] ipArray=ips.toArray(new IpAddressTO[ips.size()]);
  IpAssocVpcCommand cmd=new IpAssocVpcCommand(ipArray);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  assertEquals(cmd.getAnswersCount(),6);
  return cmd;
}
Program: 105873
Project: 105873
Buggy source:
protected SetFirewallRulesCommand generateSetFirewallRulesCommand(){
  List<FirewallRuleTO> rules=new ArrayList<>();
  List<String> sourceCidrs=new ArrayList<>();
  sourceCidrs.add("String_Node_Str");
  sourceCidrs.add("String_Node_Str");
  rules.add(new FirewallRuleTO(1,"String_Node_Str","String_Node_Str",22,80,false,false,Purpose.Firewall,sourceCidrs,0,0));
  rules.add(new FirewallRuleTO(2,"String_Node_Str","String_Node_Str",0,0,false,false,Purpose.Firewall,sourceCidrs,-1,-1));
  rules.add(new FirewallRuleTO(3,"String_Node_Str","String_Node_Str",0,0,true,true,Purpose.Firewall,sourceCidrs,-1,-1));
  SetFirewallRulesCommand cmd=new SetFirewallRulesCommand(rules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected SetFirewallRulesCommand generateSetFirewallRulesCommand(){
  List<FirewallRuleTO> rules=new ArrayList<>();
  List<String> sourceCidrs=new ArrayList<>();
  sourceCidrs.add("String_Node_Str");
  sourceCidrs.add("String_Node_Str");
  rules.add(new FirewallRuleTO(1,"String_Node_Str","String_Node_Str",22,80,false,false,Purpose.Firewall,sourceCidrs,0,0));
  rules.add(new FirewallRuleTO(2,"String_Node_Str","String_Node_Str",0,0,false,false,Purpose.Firewall,sourceCidrs,-1,-1));
  rules.add(new FirewallRuleTO(3,"String_Node_Str","String_Node_Str",0,0,true,true,Purpose.Firewall,sourceCidrs,-1,-1));
  SetFirewallRulesCommand cmd=new SetFirewallRulesCommand(rules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105874
Project: 105874
Buggy source:
@Override public ExecutionResult prepareCommand(NetworkElementCommand cmd){
  cmd.setRouterAccessIp(ROUTER_IP);
  _currentCmd=cmd;
  if (cmd instanceof IpAssocVpcCommand) {
    return prepareNetworkElementCommand((IpAssocVpcCommand)cmd);
  }
 else   if (cmd instanceof IpAssocCommand) {
    return prepareNetworkElementCommand((IpAssocCommand)cmd);
  }
 else   if (cmd instanceof SetupGuestNetworkCommand) {
    return prepareNetworkElementCommand((SetupGuestNetworkCommand)cmd);
  }
 else   if (cmd instanceof SetSourceNatCommand) {
    return prepareNetworkElementCommand((SetSourceNatCommand)cmd);
  }
 else   if (cmd instanceof SetNetworkACLCommand) {
    return prepareNetworkElementCommand((SetNetworkACLCommand)cmd);
  }
  return new ExecutionResult(true,null);
}

Fixed version (ground truth):
@Override public ExecutionResult prepareCommand(NetworkElementCommand cmd){
  cmd.setRouterAccessIp(ROUTERIP);
  _currentCmd=cmd;
  if (cmd instanceof IpAssocVpcCommand) {
    return prepareNetworkElementCommand((IpAssocVpcCommand)cmd);
  }
 else   if (cmd instanceof IpAssocCommand) {
    return prepareNetworkElementCommand((IpAssocCommand)cmd);
  }
 else   if (cmd instanceof SetupGuestNetworkCommand) {
    return prepareNetworkElementCommand((SetupGuestNetworkCommand)cmd);
  }
 else   if (cmd instanceof SetSourceNatCommand) {
    return prepareNetworkElementCommand((SetSourceNatCommand)cmd);
  }
 else   if (cmd instanceof SetNetworkACLCommand) {
    return prepareNetworkElementCommand((SetNetworkACLCommand)cmd);
  }
  return new ExecutionResult(true,null);
}
Program: 105875
Project: 105875
Buggy source:
protected SetPortForwardingRulesVpcCommand generateSetPortForwardingRulesVpcCommand(){
  List<PortForwardingRuleTO> pfRules=new ArrayList<>();
  pfRules.add(new PortForwardingRuleTO(1,"String_Node_Str",22,80,"String_Node_Str",22,80,"String_Node_Str",false,false));
  pfRules.add(new PortForwardingRuleTO(2,"String_Node_Str",8080,8080,"String_Node_Str",8080,8080,"String_Node_Str",true,false));
  SetPortForwardingRulesVpcCommand cmd=new SetPortForwardingRulesVpcCommand(pfRules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  assertEquals(cmd.getAnswersCount(),2);
  return cmd;
}

Fixed version (ground truth):
protected SetPortForwardingRulesVpcCommand generateSetPortForwardingRulesVpcCommand(){
  List<PortForwardingRuleTO> pfRules=new ArrayList<>();
  pfRules.add(new PortForwardingRuleTO(1,"String_Node_Str",22,80,"String_Node_Str",22,80,"String_Node_Str",false,false));
  pfRules.add(new PortForwardingRuleTO(2,"String_Node_Str",8080,8080,"String_Node_Str",8080,8080,"String_Node_Str",true,false));
  SetPortForwardingRulesVpcCommand cmd=new SetPortForwardingRulesVpcCommand(pfRules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  assertEquals(cmd.getAnswersCount(),2);
  return cmd;
}
Program: 105876
Project: 105876
Buggy source:
protected SetNetworkACLCommand generateSetNetworkACLCommand(){
  List<NetworkACLTO> acls=new ArrayList<>();
  List<String> cidrs=new ArrayList<>();
  cidrs.add("String_Node_Str");
  cidrs.add("String_Node_Str");
  acls.add(new NetworkACLTO(1,"String_Node_Str","String_Node_Str",20,80,false,false,cidrs,0,0,TrafficType.Ingress,true,1));
  acls.add(new NetworkACLTO(2,"String_Node_Str","String_Node_Str",0,0,false,false,cidrs,-1,-1,TrafficType.Ingress,false,2));
  acls.add(new NetworkACLTO(3,"String_Node_Str","String_Node_Str",0,0,false,false,cidrs,-1,-1,TrafficType.Egress,true,3));
  NicTO nic=new NicTO();
  nic.setMac("String_Node_Str");
  nic.setIp("String_Node_Str");
  nic.setNetmask("String_Node_Str");
  SetNetworkACLCommand cmd=new SetNetworkACLCommand(acls,nic);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected SetNetworkACLCommand generateSetNetworkACLCommand(){
  List<NetworkACLTO> acls=new ArrayList<>();
  List<String> cidrs=new ArrayList<>();
  cidrs.add("String_Node_Str");
  cidrs.add("String_Node_Str");
  acls.add(new NetworkACLTO(1,"String_Node_Str","String_Node_Str",20,80,false,false,cidrs,0,0,TrafficType.Ingress,true,1));
  acls.add(new NetworkACLTO(2,"String_Node_Str","String_Node_Str",0,0,false,false,cidrs,-1,-1,TrafficType.Ingress,false,2));
  acls.add(new NetworkACLTO(3,"String_Node_Str","String_Node_Str",0,0,false,false,cidrs,-1,-1,TrafficType.Egress,true,3));
  NicTO nic=new NicTO();
  nic.setMac("String_Node_Str");
  nic.setIp("String_Node_Str");
  nic.setNetmask("String_Node_Str");
  SetNetworkACLCommand cmd=new SetNetworkACLCommand(acls,nic);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105877
Project: 105877
Buggy source:
@Test public void testSite2SiteVpnCfgCommand(){
  _count=0;
  Site2SiteVpnCfgCommand cmd=new Site2SiteVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),true,false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  Answer answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
  cmd=new Site2SiteVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),false,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
  cmd=new Site2SiteVpnCfgCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),false,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
}

Fixed version (ground truth):
@Test public void testSite2SiteVpnCfgCommand(){
  _count=0;
  Site2SiteVpnCfgCommand cmd=new Site2SiteVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),true,false);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  Answer answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
  cmd=new Site2SiteVpnCfgCommand(true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),false,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
  cmd=new Site2SiteVpnCfgCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",Long.valueOf(1800),Long.valueOf(1800),false,true);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  answer=_resource.executeRequest(cmd);
  assertTrue(answer.getResult());
}
Program: 105878
Project: 105878
Buggy source:
protected DeleteIpAliasCommand generateDeleteIpAliasCommand(){
  List<IpAliasTO> aliases=new ArrayList<>();
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  DeleteIpAliasCommand cmd=new DeleteIpAliasCommand("String_Node_Str",aliases,aliases);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected DeleteIpAliasCommand generateDeleteIpAliasCommand(){
  List<IpAliasTO> aliases=new ArrayList<>();
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  aliases.add(new IpAliasTO("String_Node_Str","String_Node_Str","String_Node_Str"));
  DeleteIpAliasCommand cmd=new DeleteIpAliasCommand("String_Node_Str",aliases,aliases);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105879
Project: 105879
Buggy source:
@Test public void testAggregationCommands(){
  List<NetworkElementCommand> cmds=new LinkedList<>();
  StartAggregationCommand startCmd=new StartAggregationCommand(ROUTER_NAME,ROUTER_IP,ROUTER_GUEST_IP);
  cmds.add(startCmd);
  cmds.add(generateIpAssocCommand());
  cmds.add(generateIpAssocVpcCommand());
  cmds.add(generateSetFirewallRulesCommand());
  cmds.add(generateSetPortForwardingRulesCommand());
  cmds.add(generateSetPortForwardingRulesVpcCommand());
  cmds.add(generateCreateIpAliasCommand());
  cmds.add(generateDeleteIpAliasCommand());
  cmds.add(generateDnsMasqConfigCommand());
  cmds.add(generateRemoteAccessVpnCfgCommand1());
  cmds.add(generateRemoteAccessVpnCfgCommand2());
  cmds.add(generateRemoteAccessVpnCfgCommand3());
  cmds.add(generateSetPortForwardingRulesCommand());
  cmds.add(generateSetPortForwardingRulesVpcCommand());
  cmds.add(generateDhcpEntryCommand1());
  cmds.add(generateDhcpEntryCommand2());
  cmds.add(generateDhcpEntryCommand3());
  cmds.add(generateSavePasswordCommand());
  cmds.add(generateVmDataCommand());
  FinishAggregationCommand finishCmd=new FinishAggregationCommand(ROUTER_NAME,ROUTER_IP,ROUTER_GUEST_IP);
  cmds.add(finishCmd);
  for (  NetworkElementCommand cmd : cmds) {
    Answer answer=_resource.executeRequest(cmd);
    if (!(cmd instanceof FinishAggregationCommand)) {
      assertTrue(answer.getResult());
    }
 else {
    }
  }
}

Fixed version (ground truth):
@Test public void testAggregationCommands(){
  List<NetworkElementCommand> cmds=new LinkedList<>();
  StartAggregationCommand startCmd=new StartAggregationCommand(ROUTERNAME,ROUTERIP,ROUTERGUESTIP);
  cmds.add(startCmd);
  cmds.add(generateIpAssocCommand());
  cmds.add(generateIpAssocVpcCommand());
  cmds.add(generateSetFirewallRulesCommand());
  cmds.add(generateSetPortForwardingRulesCommand());
  cmds.add(generateSetPortForwardingRulesVpcCommand());
  cmds.add(generateCreateIpAliasCommand());
  cmds.add(generateDeleteIpAliasCommand());
  cmds.add(generateDnsMasqConfigCommand());
  cmds.add(generateRemoteAccessVpnCfgCommand1());
  cmds.add(generateRemoteAccessVpnCfgCommand2());
  cmds.add(generateRemoteAccessVpnCfgCommand3());
  cmds.add(generateSetPortForwardingRulesCommand());
  cmds.add(generateSetPortForwardingRulesVpcCommand());
  cmds.add(generateDhcpEntryCommand1());
  cmds.add(generateDhcpEntryCommand2());
  cmds.add(generateDhcpEntryCommand3());
  cmds.add(generateSavePasswordCommand());
  cmds.add(generateVmDataCommand());
  FinishAggregationCommand finishCmd=new FinishAggregationCommand(ROUTERNAME,ROUTERIP,ROUTERGUESTIP);
  cmds.add(finishCmd);
  for (  NetworkElementCommand cmd : cmds) {
    Answer answer=_resource.executeRequest(cmd);
    if (!(cmd instanceof FinishAggregationCommand)) {
      assertTrue(answer.getResult());
    }
 else {
    }
  }
}
Program: 105880
Project: 105880
Buggy source:
protected SetPortForwardingRulesCommand generateSetPortForwardingRulesCommand(){
  List<PortForwardingRuleTO> pfRules=new ArrayList<>();
  pfRules.add(new PortForwardingRuleTO(1,"String_Node_Str",22,80,"String_Node_Str",22,80,"String_Node_Str",false,false));
  pfRules.add(new PortForwardingRuleTO(2,"String_Node_Str",8080,8080,"String_Node_Str",8080,8080,"String_Node_Str",true,false));
  SetPortForwardingRulesCommand cmd=new SetPortForwardingRulesCommand(pfRules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  assertEquals(cmd.getAnswersCount(),2);
  return cmd;
}

Fixed version (ground truth):
protected SetPortForwardingRulesCommand generateSetPortForwardingRulesCommand(){
  List<PortForwardingRuleTO> pfRules=new ArrayList<>();
  pfRules.add(new PortForwardingRuleTO(1,"String_Node_Str",22,80,"String_Node_Str",22,80,"String_Node_Str",false,false));
  pfRules.add(new PortForwardingRuleTO(2,"String_Node_Str",8080,8080,"String_Node_Str",8080,8080,"String_Node_Str",true,false));
  SetPortForwardingRulesCommand cmd=new SetPortForwardingRulesCommand(pfRules);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  assertEquals(cmd.getAnswersCount(),2);
  return cmd;
}
Program: 105881
Project: 105881
Buggy source:
@Override public ExecutionResult createFileInVR(String routerIp,String path,String filename,String content){
  assertEquals(routerIp,ROUTER_IP);
  verifyFile(_currentCmd,path,filename,content);
  return new ExecutionResult(true,null);
}

Fixed version (ground truth):
@Override public ExecutionResult createFileInVR(String routerIp,String path,String filename,String content){
  assertEquals(routerIp,ROUTERIP);
  verifyFile(_currentCmd,path,filename,content);
  return new ExecutionResult(true,null);
}
Program: 105882
Project: 105882
Buggy source:
protected VmDataCommand generateVmDataCommand(){
  VmDataCommand cmd=new VmDataCommand("String_Node_Str","String_Node_Str",true);
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected VmDataCommand generateVmDataCommand(){
  VmDataCommand cmd=new VmDataCommand("String_Node_Str","String_Node_Str",true);
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.addVmData("String_Node_Str","String_Node_Str","String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105883
Project: 105883
Buggy source:
protected IpAssocCommand generateIpAssocCommand(){
  List<IpAddressTO> ips=new ArrayList<>();
  ips.add(new IpAddressTO(1,"String_Node_Str",true,true,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(2,"String_Node_Str",false,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(3,"String_Node_Str",true,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  IpAddressTO[] ipArray=ips.toArray(new IpAddressTO[ips.size()]);
  IpAssocCommand cmd=new IpAssocCommand(ipArray);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  assertEquals(cmd.getAnswersCount(),3);
  return cmd;
}

Fixed version (ground truth):
protected IpAssocCommand generateIpAssocCommand(){
  List<IpAddressTO> ips=new ArrayList<>();
  ips.add(new IpAddressTO(1,"String_Node_Str",true,true,true,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(2,"String_Node_Str",false,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  ips.add(new IpAddressTO(3,"String_Node_Str",true,false,false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",1000,false));
  IpAddressTO[] ipArray=ips.toArray(new IpAddressTO[ips.size()]);
  IpAssocCommand cmd=new IpAssocCommand(ipArray);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  assertEquals(cmd.getAnswersCount(),3);
  return cmd;
}
Program: 105884
Project: 105884
Buggy source:
protected SetupGuestNetworkCommand generateSetupGuestNetworkCommand(){
  NicTO nic=new NicTO();
  nic.setMac("String_Node_Str");
  nic.setIp("String_Node_Str");
  nic.setNetmask("String_Node_Str");
  SetupGuestNetworkCommand cmd=new SetupGuestNetworkCommand("String_Node_Str","String_Node_Str",false,0,"String_Node_Str","String_Node_Str",true,nic);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.GUEST_NETWORK_GATEWAY,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTER_NAME);
  return cmd;
}

Fixed version (ground truth):
protected SetupGuestNetworkCommand generateSetupGuestNetworkCommand(){
  NicTO nic=new NicTO();
  nic.setMac("String_Node_Str");
  nic.setIp("String_Node_Str");
  nic.setNetmask("String_Node_Str");
  SetupGuestNetworkCommand cmd=new SetupGuestNetworkCommand("String_Node_Str","String_Node_Str",false,0,"String_Node_Str","String_Node_Str",true,nic);
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.GUEST_NETWORK_GATEWAY,"String_Node_Str");
  cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME,ROUTERNAME);
  return cmd;
}
Program: 105885
Project: 105885
Buggy source:
@Override public Long getPermissionScopeId(String scope,String entityType,String scopeId){
  if (scopeId.equals("String_Node_Str")) {
    return -1L;
  }
  PermissionScope permScope=PermissionScope.valueOf(scope);
  InternalIdentity entity=null;
switch (permScope) {
case DOMAIN:
    entity=_domainDao.findByUuid(scopeId);
  break;
case ACCOUNT:
entity=_accountDao.findByUuid(scopeId);
break;
case RESOURCE:
Class<?> clazz=s_typeMap.get(entityType);
entity=(InternalIdentity)_entityMgr.findByUuid(clazz,scopeId);
}
if (entity != null) {
return entity.getId();
}
throw new InvalidParameterValueException("String_Node_Str" + scopeId + "String_Node_Str"+ scope+ "String_Node_Str"+ entityType);
}

Fixed version (ground truth):
@Override public Long getPermissionScopeId(String scope,String entityType,String scopeId){
  if (scopeId.equals("String_Node_Str")) {
    return -1L;
  }
  PermissionScope permScope=PermissionScope.valueOf(scope);
  InternalIdentity entity=null;
switch (permScope) {
case DOMAIN:
    entity=_domainDao.findByUuid(scopeId);
  break;
case ACCOUNT:
entity=_accountDao.findByUuid(scopeId);
break;
case RESOURCE:
Class<?> clazz=s_typeMap.get(IAMEntityType.valueOf(entityType));
entity=(InternalIdentity)_entityMgr.findByUuid(clazz,scopeId);
}
if (entity != null) {
return entity.getId();
}
throw new InvalidParameterValueException("String_Node_Str" + scopeId + "String_Node_Str"+ scope+ "String_Node_Str"+ entityType);
}
Program: 105886
Project: 105886
Buggy source:
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  super.configure(name,params);
  ListByAccountId=createSearchBuilder();
  ListByAccountId.and("String_Node_Str",ListByAccountId.entity().getAccountId(),SearchCriteria.Op.EQ);
  ListByAccountId.done();
  ListByPolicyId=createSearchBuilder();
  ListByPolicyId.and("String_Node_Str",ListByPolicyId.entity().getIAMPolicyId(),SearchCriteria.Op.EQ);
  ListByPolicyId.done();
  findByPolicyAccountId=createSearchBuilder();
  findByPolicyAccountId.and("String_Node_Str",findByPolicyAccountId.entity().getIAMPolicyId(),SearchCriteria.Op.EQ);
  findByPolicyAccountId.and("String_Node_Str",findByPolicyAccountId.entity().getAccountId(),SearchCriteria.Op.EQ);
  findByPolicyAccountId.done();
  return true;
}

Fixed version (ground truth):
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  super.configure(name,params);
  ListByAccountId=createSearchBuilder();
  ListByAccountId.and("String_Node_Str",ListByAccountId.entity().getAccountId(),SearchCriteria.Op.EQ);
  ListByAccountId.done();
  ListByPolicyId=createSearchBuilder();
  ListByPolicyId.and("String_Node_Str",ListByPolicyId.entity().getIamPolicyId(),SearchCriteria.Op.EQ);
  ListByPolicyId.done();
  findByPolicyAccountId=createSearchBuilder();
  findByPolicyAccountId.and("String_Node_Str",findByPolicyAccountId.entity().getIamPolicyId(),SearchCriteria.Op.EQ);
  findByPolicyAccountId.and("String_Node_Str",findByPolicyAccountId.entity().getAccountId(),SearchCriteria.Op.EQ);
  findByPolicyAccountId.done();
  return true;
}
Program: 105887
Project: 105887
Buggy source:
@Override public void removeIAMPolicyFromAccounts(final Long policyId,final List<Long> acctIds){
  IAMPolicy policy=_aclPolicyDao.findById(policyId);
  if (policy == null) {
    throw new InvalidParameterValueException("String_Node_Str" + policyId + "String_Node_Str");
  }
  Transaction.execute(new TransactionCallbackNoReturn(){
    @Override public void doInTransactionWithoutResult(    TransactionStatus status){
      for (      Long acctId : acctIds) {
        IAMAccountPolicyMapVO acctMap=_aclAccountPolicyMapDao.findByAccountAndPolicy(acctId,policyId);
        if (acctMap == null) {
          acctMap=new IAMAccountPolicyMapVO(acctId,policyId);
          _aclAccountPolicyMapDao.remove(acctMap.getId());
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void removeIAMPolicyFromAccounts(final Long policyId,final List<Long> acctIds){
  IAMPolicy policy=_aclPolicyDao.findById(policyId);
  if (policy == null) {
    throw new InvalidParameterValueException("String_Node_Str" + policyId + "String_Node_Str");
  }
  Transaction.execute(new TransactionCallbackNoReturn(){
    @Override public void doInTransactionWithoutResult(    TransactionStatus status){
      for (      Long acctId : acctIds) {
        IAMAccountPolicyMapVO acctMap=_aclAccountPolicyMapDao.findByAccountAndPolicy(acctId,policyId);
        if (acctMap != null) {
          _aclAccountPolicyMapDao.remove(acctMap.getId());
        }
      }
    }
  }
);
}
Program: 105889
Project: 105889
Buggy source:
public static AsyncJobExecutionContext getCurrentExecutionContext(){
  AsyncJobExecutionContext context=s_currentExectionContext.get();
  if (context == null) {
    s_logger.warn("String_Node_Str");
    context=registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),CallContext.current().getCallingUserId());
  }
  return context;
}

Fixed version (ground truth):
public static AsyncJobExecutionContext getCurrentExecutionContext(){
  AsyncJobExecutionContext context=s_currentExectionContext.get();
  if (context == null) {
    s_logger.warn("String_Node_Str");
    if (CallContext.current() != null)     context=registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),CallContext.current().getCallingUserId());
 else     context=registerPseudoExecutionContext(Account.ACCOUNT_ID_SYSTEM,User.UID_SYSTEM);
  }
  return context;
}
Program: 105891
Project: 105891
Buggy source:
@Override public int compare(Object o1,Object o2){
  long seq1=((Request)o1).getSequence();
  long seq2=(Long)o2;
  if (seq1 < seq2) {
    return -1;
  }
 else   if (seq1 > seq2) {
    return 1;
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
@Override public int compare(final Object o1,final Object o2){
  long seq1=((Request)o1).getSequence();
  long seq2=(Long)o2;
  if (seq1 < seq2) {
    return -1;
  }
 else   if (seq1 > seq2) {
    return 1;
  }
 else {
    return 0;
  }
}
Program: 105892
Project: 105892
Buggy source:
protected AgentAttache(AgentManagerImpl agentMgr,final long id,final String name,boolean maintenance){
  _id=id;
  _name=name;
  _waitForList=new ConcurrentHashMap<Long,Listener>();
  _currentSequence=null;
  _maintenance=maintenance;
  _requests=new LinkedList<Request>();
  _agentMgr=agentMgr;
  _nextSequence=new Long(s_rand.nextInt(Short.MAX_VALUE)) << 48;
  _outstandingTaskCount=new AtomicInteger(0);
}

Fixed version (ground truth):
protected AgentAttache(final AgentManagerImpl agentMgr,final long id,final String name,final boolean maintenance){
  _id=id;
  _name=name;
  _waitForList=new ConcurrentHashMap<Long,Listener>();
  _currentSequence=null;
  _maintenance=maintenance;
  _requests=new LinkedList<Request>();
  _agentMgr=agentMgr;
  _nextSequence=new Long(s_rand.nextInt(Short.MAX_VALUE)) << 48;
  _outstandingTaskCount=new AtomicInteger(0);
}
Program: 105893
Project: 105893
Buggy source:
protected synchronized void addRequest(Request req){
}

Fixed version (ground truth):
protected synchronized void addRequest(final Request req){
}
Program: 105894
Project: 105894
Buggy source:
public void process(Answer[] answers){
}

Fixed version (ground truth):
public void process(final Answer[] answers){
}
Program: 105895
Project: 105895
Buggy source:
protected synchronized int findRequest(long seq){
  return Collections.binarySearch(_requests,seq,s_seqComparator);
}

Fixed version (ground truth):
protected synchronized int findRequest(final long seq){
  return Collections.binarySearch(_requests,seq,s_seqComparator);
}
Program: 105896
Project: 105896
Buggy source:
@Override public boolean equals(Object obj){
}

Fixed version (ground truth):
@Override public boolean equals(final Object obj){
  if (obj == null) {
    return false;
  }
  if (this.getClass() != obj.getClass()) {
    return false;
  }
  AgentAttache that=(AgentAttache)obj;
  return _id == that._id;
}
Program: 105897
Project: 105897
Buggy source:
public Alarm(long seq){
  _seq=seq;
}

Fixed version (ground truth):
public Alarm(final long seq){
  _seq=seq;
}
Program: 105898
Project: 105898
Buggy source:
@Override public void cancel(long seq){
  if (forForward()) {
    Listener listener=getListener(seq);
    if (listener != null && listener instanceof SynchronousListener) {
      SynchronousListener synchronous=(SynchronousListener)listener;
      String peerName=synchronous.getPeer();
      if (peerName != null) {
        if (s_clusteredAgentMgr != null) {
          s_logger.debug(log(seq,"String_Node_Str"));
          s_clusteredAgentMgr.cancel(peerName,_id,seq,"String_Node_Str");
        }
 else {
          s_logger.error("String_Node_Str");
        }
      }
    }
  }
  super.cancel(seq);
}

Fixed version (ground truth):
@Override public void cancel(final long seq){
  if (forForward()) {
    Listener listener=getListener(seq);
    if (listener != null && listener instanceof SynchronousListener) {
      SynchronousListener synchronous=(SynchronousListener)listener;
      String peerName=synchronous.getPeer();
      if (peerName != null) {
        if (s_clusteredAgentMgr != null) {
          s_logger.debug(log(seq,"String_Node_Str"));
          s_clusteredAgentMgr.cancel(peerName,_id,seq,"String_Node_Str");
        }
 else {
          s_logger.error("String_Node_Str");
        }
      }
    }
  }
  super.cancel(seq);
}
Program: 105899
Project: 105899
Buggy source:
public boolean getTransferMode(){
  return _transferMode;
}

Fixed version (ground truth):
public synchronized boolean getTransferMode(){
  return _transferMode;
}
Program: 105900
Project: 105900
Buggy source:
@Override public void routeToAgent(byte[] data) throws AgentUnavailableException {
  if (s_logger.isDebugEnabled()) {
    s_logger.debug(log(Request.getSequence(data),"String_Node_Str" + Request.getManagementServerId(data)));
  }
  if (_link == null) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
  try {
    _link.send(data);
  }
 catch (  ClosedChannelException e) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
catch (  NullPointerException e) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
}

Fixed version (ground truth):
@Override public void routeToAgent(final byte[] data) throws AgentUnavailableException {
  if (s_logger.isDebugEnabled()) {
    s_logger.debug(log(Request.getSequence(data),"String_Node_Str" + Request.getManagementServerId(data)));
  }
  if (_link == null) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
  try {
    _link.send(data);
  }
 catch (  ClosedChannelException e) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
catch (  NullPointerException e) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(Request.getSequence(data),"String_Node_Str"));
    }
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
}
Program: 105901
Project: 105901
Buggy source:
public ClusteredAgentAttache(AgentManagerImpl agentMgr,long id,String name,Link link,boolean maintenance){
  super(agentMgr,id,name,link,maintenance);
  _forward=link == null;
  _transferRequests=new LinkedList<Request>();
}

Fixed version (ground truth):
public ClusteredAgentAttache(final AgentManagerImpl agentMgr,final long id,final String name,final Link link,final boolean maintenance){
  super(agentMgr,id,name,link,maintenance);
  _forward=link == null;
  _transferRequests=new LinkedList<Request>();
}
Program: 105902
Project: 105902
Buggy source:
protected synchronized int findTransferRequest(Request req){
  return Collections.binarySearch(_transferRequests,req,s_reqComparator);
}

Fixed version (ground truth):
protected synchronized int findTransferRequest(final Request req){
  return Collections.binarySearch(_transferRequests,req,s_reqComparator);
}
Program: 105903
Project: 105903
Buggy source:
protected synchronized void addRequestToTransfer(Request req){
}

Fixed version (ground truth):
protected synchronized void addRequestToTransfer(final Request req){
}
Program: 105904
Project: 105904
Buggy source:
static public void initialize(ClusteredAgentManagerImpl agentMgr){
  s_clusteredAgentMgr=agentMgr;
}

Fixed version (ground truth):
static public void initialize(final ClusteredAgentManagerImpl agentMgr){
  s_clusteredAgentMgr=agentMgr;
}
Program: 105906
Project: 105906
Buggy source:
public ConnectedAgentAttache(AgentManagerImpl agentMgr,final long id,final String name,final Link link,boolean maintenance){
  super(agentMgr,id,name,maintenance);
  _link=link;
}

Fixed version (ground truth):
public ConnectedAgentAttache(final AgentManagerImpl agentMgr,final long id,final String name,final Link link,final boolean maintenance){
  super(agentMgr,id,name,maintenance);
  _link=link;
}
Program: 105907
Project: 105907
Buggy source:
@Override public boolean equals(Object obj){
}

Fixed version (ground truth):
@Override public boolean equals(final Object obj){
  if (obj == null) {
    return false;
  }
  if (this.getClass() != obj.getClass()) {
    return false;
  }
  if (_link == null) {
    return false;
  }
  ConnectedAgentAttache that=(ConnectedAgentAttache)obj;
  return super.equals(obj) && _link == that._link;
}
Program: 105908
Project: 105908
Buggy source:
@Override public synchronized void send(Request req) throws AgentUnavailableException {
  try {
    _link.send(req.toBytes());
  }
 catch (  ClosedChannelException e) {
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
}

Fixed version (ground truth):
@Override public synchronized void send(final Request req) throws AgentUnavailableException {
  try {
    _link.send(req.toBytes());
  }
 catch (  ClosedChannelException e) {
    throw new AgentUnavailableException("String_Node_Str",_id);
  }
}
Program: 105909
Project: 105909
Buggy source:
@Override public StorageEntity registerStorage(String name,List<String> tags,Map<String,String> details){
  return null;
}

Fixed version (ground truth):
@Override public StorageEntity registerStorage(final String name,final List<String> tags,final Map<String,String> details){
  return null;
}
Program: 105910
Project: 105910
Buggy source:
@Override public void deregisterHost(String uuid){
  HostEntityImpl hostEntity=new HostEntityImpl(uuid,manager);
  hostEntity.disable();
}

Fixed version (ground truth):
@Override public void deregisterHost(final String uuid){
  HostEntityImpl hostEntity=new HostEntityImpl(uuid,manager);
  hostEntity.disable();
}
Program: 105911
Project: 105911
Buggy source:
@Override public ZoneEntity getZone(String uuid){
  ZoneEntityImpl impl=new ZoneEntityImpl(uuid,manager);
  return impl;
}

Fixed version (ground truth):
@Override public ZoneEntity getZone(final String uuid){
  ZoneEntityImpl impl=new ZoneEntityImpl(uuid,manager);
  return impl;
}
Program: 105912
Project: 105912
Buggy source:
@Override public ClusterEntity registerCluster(String clusterUuid,String name,String owner,List<String> tags,Map<String,String> details){
  ClusterEntityImpl clusterEntity=new ClusterEntityImpl(clusterUuid,manager);
  clusterEntity.setOwner(owner);
  clusterEntity.setName(name);
  clusterEntity.persist();
  return clusterEntity;
}

Fixed version (ground truth):
@Override public ClusterEntity registerCluster(final String clusterUuid,final String name,final String owner,final List<String> tags,final Map<String,String> details){
  ClusterEntityImpl clusterEntity=new ClusterEntityImpl(clusterUuid,manager);
  clusterEntity.setOwner(owner);
  clusterEntity.setName(name);
  clusterEntity.persist();
  return clusterEntity;
}
Program: 105913
Project: 105913
Buggy source:
@Override public void deregisterStorage(String uuid){
}

Fixed version (ground truth):
@Override public void deregisterStorage(final String uuid){
}
Program: 105914
Project: 105914
Buggy source:
@Override public ZoneEntity registerZone(String zoneUuid,String name,String owner,List<String> tags,Map<String,String> details){
  ZoneEntityImpl zoneEntity=new ZoneEntityImpl(zoneUuid,manager);
  zoneEntity.setName(name);
  zoneEntity.setOwner(owner);
  zoneEntity.setDetails(details);
  zoneEntity.persist();
  return zoneEntity;
}

Fixed version (ground truth):
@Override public ZoneEntity registerZone(final String zoneUuid,final String name,final String owner,final List<String> tags,final Map<String,String> details){
  ZoneEntityImpl zoneEntity=new ZoneEntityImpl(zoneUuid,manager);
  zoneEntity.setName(name);
  zoneEntity.setOwner(owner);
  zoneEntity.setDetails(details);
  zoneEntity.persist();
  return zoneEntity;
}
Program: 105915
Project: 105915
Buggy source:
@Override public void deregisterCluster(String uuid){
  ClusterEntityImpl clusterEntity=new ClusterEntityImpl(uuid,manager);
  clusterEntity.disable();
}

Fixed version (ground truth):
@Override public void deregisterCluster(final String uuid){
  ClusterEntityImpl clusterEntity=new ClusterEntityImpl(uuid,manager);
  clusterEntity.disable();
}
Program: 105916
Project: 105916
Buggy source:
@Override public void changeState(String type,String entity,Status state){
}

Fixed version (ground truth):
@Override public void changeState(final String type,final String entity,final Status state){
}