Program: 48525
Project: 48525
Buggy source:
@Override public Map<String,Object> call() throws Exception {
  Map<String,Object> result=new HashMap<String,Object>();
  ClusterReportQueue queue=new ClusterReportQueue();
  Thread progressThread=null;
  ExternalProgressMonitor monitor=new ExternalProgressMonitor(targetName,queue,statusUpdater,lockedClusterEntityManager);
  progressThread=new Thread(monitor,"String_Node_Str" + targetName);
  progressThread.setDaemon(true);
  progressThread.start();
  boolean success=false;
  try {
switch (managementOperation) {
case CREATE:
      success=softwareManager.createCluster(clusterBlueprint,queue);
    break;
case CONFIGURE:
  success=softwareManager.reconfigCluster(clusterBlueprint,queue);
break;
case PRE_DESTROY:
success=softwareManager.onDeleteCluster(clusterBlueprint,queue);
break;
case DESTROY:
success=softwareManager.deleteCluster(clusterBlueprint,queue);
case START:
success=softwareManager.startCluster(clusterBlueprint,queue);
break;
case STOP:
success=softwareManager.onStopCluster(clusterBlueprint,queue);
break;
case START_NODES:
List<NodeInfo> nodes=new ArrayList<NodeInfo>();
for (NodeGroupInfo group : clusterBlueprint.getNodeGroups()) {
if (group != null) {
for (NodeInfo node : group.getNodes()) {
if (node.getName().equals(targetName)) {
nodes.add(node);
break;
}
}
if (!nodes.isEmpty()) {
break;
}
}
}
success=softwareManager.startNodes(clusterBlueprint.getName(),nodes,queue);
break;
case QUERY:
ClusterReport report=softwareManager.queryClusterStatus(clusterBlueprint);
queue.addClusterReport(report);
success=true;
break;
case RESIZE:
AuAssert.check(chunkContext != null);
List<String> addedNodes=getResizedVmNames(chunkContext,clusterBlueprint);
success=softwareManager.scaleOutCluster(clusterBlueprint,addedNodes,queue);
break;
default :
success=true;
}
}
 catch (Throwable t) {
logger.error("String_Node_Str" + managementOperation.name() + "String_Node_Str"+ targetName,t);
result.put("String_Node_Str",t.getMessage());
}
 finally {
if (progressThread != null) {
monitor.setStop(true);
progressThread.interrupt();
progressThread.join();
}
}
result.put("String_Node_Str",success);
if (!success) {
logger.error("String_Node_Str" + result.get("String_Node_Str"));
}
return result;
}

Fixed version (ground truth):
@Override public Map<String,Object> call() throws Exception {
  Map<String,Object> result=new HashMap<String,Object>();
  ClusterReportQueue queue=new ClusterReportQueue();
  Thread progressThread=null;
  ExternalProgressMonitor monitor=new ExternalProgressMonitor(targetName,queue,statusUpdater,lockedClusterEntityManager);
  progressThread=new Thread(monitor,"String_Node_Str" + targetName);
  progressThread.setDaemon(true);
  progressThread.start();
  boolean success=false;
  try {
switch (managementOperation) {
case CREATE:
      success=softwareManager.createCluster(clusterBlueprint,queue);
    break;
case CONFIGURE:
  success=softwareManager.reconfigCluster(clusterBlueprint,queue);
break;
case PRE_DESTROY:
if (softwareManager == null) {
logger.warn("String_Node_Str" + clusterBlueprint.getName() + "String_Node_Str");
logger.warn("String_Node_Str");
success=true;
}
 else {
success=softwareManager.onDeleteCluster(clusterBlueprint,queue);
}
break;
case DESTROY:
success=softwareManager.deleteCluster(clusterBlueprint,queue);
case START:
success=softwareManager.startCluster(clusterBlueprint,queue);
break;
case STOP:
success=softwareManager.onStopCluster(clusterBlueprint,queue);
break;
case START_NODES:
List<NodeInfo> nodes=new ArrayList<NodeInfo>();
for (NodeGroupInfo group : clusterBlueprint.getNodeGroups()) {
if (group != null) {
for (NodeInfo node : group.getNodes()) {
if (node.getName().equals(targetName)) {
nodes.add(node);
break;
}
}
if (!nodes.isEmpty()) {
break;
}
}
}
success=softwareManager.startNodes(clusterBlueprint.getName(),nodes,queue);
break;
case QUERY:
ClusterReport report=softwareManager.queryClusterStatus(clusterBlueprint);
queue.addClusterReport(report);
success=true;
break;
case RESIZE:
AuAssert.check(chunkContext != null);
List<String> addedNodes=getResizedVmNames(chunkContext,clusterBlueprint);
success=softwareManager.scaleOutCluster(clusterBlueprint,addedNodes,queue);
break;
default :
success=true;
}
}
 catch (Throwable t) {
logger.error("String_Node_Str" + managementOperation.name() + "String_Node_Str"+ targetName,t);
result.put("String_Node_Str",t.getMessage());
}
 finally {
if (progressThread != null) {
monitor.setStop(true);
progressThread.interrupt();
progressThread.join();
}
}
result.put("String_Node_Str",success);
if (!success) {
logger.error("String_Node_Str" + result.get("String_Node_Str"));
}
return result;
}