Program: 49104
Project: 49104
Buggy source:
@Test public void testGetCluster() throws Exception {
  CookieCache.put("String_Node_Str","String_Node_Str");
  ObjectMapper mapper=new ObjectMapper();
  StorageRead sr1=new StorageRead();
  sr1.setType("String_Node_Str");
  sr1.setSizeGB(100);
  StorageRead sr2=new StorageRead();
  sr2.setType("String_Node_Str");
  sr2.setSizeGB(200);
  NodeRead nr1=new NodeRead();
  nr1.setHostName("String_Node_Str");
  nr1.setIp("String_Node_Str");
  nr1.setName("String_Node_Str");
  nr1.setStatus("String_Node_Str");
  nr1.setRack("String_Node_Str");
  NodeRead nr2=new NodeRead();
  nr2.setHostName("String_Node_Str");
  nr2.setIp("String_Node_Str");
  nr2.setName("String_Node_Str");
  nr2.setStatus("String_Node_Str");
  nr2.setRack("String_Node_Str");
  NodeRead nr3=new NodeRead();
  nr3.setHostName("String_Node_Str");
  nr3.setIp("String_Node_Str");
  nr3.setName("String_Node_Str");
  nr3.setStatus("String_Node_Str");
  nr3.setRack("String_Node_Str");
  NodeRead nr4=new NodeRead();
  nr4.setHostName("String_Node_Str");
  nr4.setIp("String_Node_Str");
  nr4.setName("String_Node_Str");
  nr4.setStatus("String_Node_Str");
  nr4.setRack("String_Node_Str");
  List<NodeRead> instances1=new LinkedList<NodeRead>();
  instances1.add(nr1);
  instances1.add(nr2);
  List<NodeRead> instances2=new LinkedList<NodeRead>();
  instances2.add(nr3);
  instances2.add(nr4);
  List<String> roles1=new LinkedList<String>();
  roles1.add(Constants.ROLE_HADOOP_NAME_NODE);
  roles1.add(Constants.ROLE_HADOOP_JOB_TRACKER);
  List<String> roles2=new LinkedList<String>();
  roles2.add(Constants.ROLE_HADOOP_DATANODE);
  roles2.add(Constants.ROLE_HADOOP_TASKTRACKER);
  NodeGroupRead ngr1=new NodeGroupRead();
  ngr1.setName("String_Node_Str");
  ngr1.setCpuNum(6);
  ngr1.setMemCapacityMB(2048);
  ngr1.setStorage(sr1);
  ngr1.setInstanceNum(1);
  ngr1.setInstances(instances1);
  ngr1.setRoles(roles1);
  NodeGroupRead ngr2=new NodeGroupRead();
  ngr2.setName("String_Node_Str");
  ngr2.setCpuNum(12);
  ngr2.setMemCapacityMB(2048);
  ngr2.setStorage(sr2);
  ngr2.setInstanceNum(20);
  ngr2.setInstances(instances2);
  ngr2.setRoles(roles2);
  ClusterRead cr1=new ClusterRead();
  cr1.setName("String_Node_Str");
  cr1.setDistro("String_Node_Str");
  cr1.setInstanceNum(10);
  cr1.setStatus(ClusterRead.ClusterStatus.RUNNING);
  ClusterRead cr2=new ClusterRead();
  cr2.setName("String_Node_Str");
  cr2.setDistro("String_Node_Str");
  cr2.setInstanceNum(20);
  cr2.setStatus(ClusterRead.ClusterStatus.STOPPED);
  List<NodeGroupRead> nodeGroupRead1=new LinkedList<NodeGroupRead>();
  nodeGroupRead1.add(ngr1);
  nodeGroupRead1.add(ngr2);
  cr1.setNodeGroups(nodeGroupRead1);
  cr2.setNodeGroups(nodeGroupRead1);
  buildReqRespWithoutReqBody("String_Node_Str",HttpMethod.GET,HttpStatus.OK,mapper.writeValueAsString(new ClusterRead[]{cr1,cr2}));
  clusterCommands.getCluster(null,true);
  cr1.setTopologyPolicy(TopologyType.HVE);
  cr2.setTopologyPolicy(TopologyType.RACK_AS_RACK);
  setup();
  buildReqRespWithoutReqBody("String_Node_Str",HttpMethod.GET,HttpStatus.OK,mapper.writeValueAsString(new ClusterRead[]{cr1,cr2}));
  clusterCommands.getCluster(null,true);
  CookieCache.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testGetCluster() throws Exception {
  CookieCache.put("String_Node_Str","String_Node_Str");
  ObjectMapper mapper=new ObjectMapper();
  StorageRead sr1=new StorageRead();
  sr1.setType("String_Node_Str");
  sr1.setSizeGB(100);
  StorageRead sr2=new StorageRead();
  sr2.setType("String_Node_Str");
  sr2.setSizeGB(200);
  NodeRead nr1=new NodeRead();
  nr1.setHostName("String_Node_Str");
  nr1.setIp("String_Node_Str");
  nr1.setName("String_Node_Str");
  nr1.setStatus("String_Node_Str");
  nr1.setRack("String_Node_Str");
  NodeRead nr2=new NodeRead();
  nr2.setHostName("String_Node_Str");
  nr2.setIp("String_Node_Str");
  nr2.setName("String_Node_Str");
  nr2.setStatus("String_Node_Str");
  nr2.setRack("String_Node_Str");
  NodeRead nr3=new NodeRead();
  nr3.setHostName("String_Node_Str");
  nr3.setIp("String_Node_Str");
  nr3.setName("String_Node_Str");
  nr3.setStatus("String_Node_Str");
  nr3.setRack("String_Node_Str");
  NodeRead nr4=new NodeRead();
  nr4.setHostName("String_Node_Str");
  nr4.setIp("String_Node_Str");
  nr4.setName("String_Node_Str");
  nr4.setStatus("String_Node_Str");
  nr4.setRack("String_Node_Str");
  List<NodeRead> instances1=new LinkedList<NodeRead>();
  instances1.add(nr1);
  instances1.add(nr2);
  List<NodeRead> instances2=new LinkedList<NodeRead>();
  instances2.add(nr3);
  instances2.add(nr4);
  List<String> roles1=new LinkedList<String>();
  roles1.add(Constants.ROLE_HADOOP_NAME_NODE);
  roles1.add(Constants.ROLE_HADOOP_JOB_TRACKER);
  List<String> roles2=new LinkedList<String>();
  roles2.add(Constants.ROLE_HADOOP_DATANODE);
  roles2.add(Constants.ROLE_HADOOP_TASKTRACKER);
  NodeGroupRead ngr1=new NodeGroupRead();
  ngr1.setName("String_Node_Str");
  ngr1.setCpuNum(6);
  ngr1.setMemCapacityMB(2048);
  ngr1.setStorage(sr1);
  ngr1.setInstanceNum(1);
  ngr1.setInstances(instances1);
  ngr1.setRoles(roles1);
  NodeGroupRead ngr2=new NodeGroupRead();
  ngr2.setName("String_Node_Str");
  ngr2.setCpuNum(12);
  ngr2.setMemCapacityMB(2048);
  ngr2.setStorage(sr2);
  ngr2.setInstanceNum(20);
  ngr2.setInstances(instances2);
  ngr2.setRoles(roles2);
  ClusterRead cr1=new ClusterRead();
  cr1.setName("String_Node_Str");
  cr1.setDistro("String_Node_Str");
  cr1.setInstanceNum(10);
  cr1.setStatus(ClusterRead.ClusterStatus.RUNNING);
  ClusterRead cr2=new ClusterRead();
  cr2.setName("String_Node_Str");
  cr2.setDistro("String_Node_Str");
  cr2.setInstanceNum(20);
  cr2.setStatus(ClusterRead.ClusterStatus.STOPPED);
  List<NodeGroupRead> nodeGroupRead1=new LinkedList<NodeGroupRead>();
  nodeGroupRead1.add(ngr1);
  nodeGroupRead1.add(ngr2);
  cr1.setNodeGroups(nodeGroupRead1);
  cr2.setNodeGroups(nodeGroupRead1);
  buildReqRespWithoutReqBody("String_Node_Str",HttpMethod.GET,HttpStatus.OK,mapper.writeValueAsString(new ClusterRead[]{cr1,cr2}));
  clusterCommands.getCluster(null,true);
  cr1.setTopologyPolicy(TopologyType.HVE);
  cr2.setTopologyPolicy(TopologyType.RACK_AS_RACK);
  setup();
  buildReqRespWithoutReqBody("String_Node_Str",HttpMethod.GET,HttpStatus.OK,mapper.writeValueAsString(new ClusterRead[]{cr1,cr2}));
  clusterCommands.getCluster(null,true);
  CookieCache.clear();
}