Program: 15494
Project: 15494
Buggy source:
public DescribeComponentsResponseType listComponents(DescribeComponentsType request) throws EucalyptusCloudException {
  DescribeComponentsResponseType reply=(DescribeComponentsResponseType)request.getReply();
  List<ComponentInfoType> listConfigs=reply.getRegistered();
  if (DescribeComponentsType.class.equals(request.getClass())) {
    for (    Component c : Components.list()) {
      if (c.lookupServices().isEmpty()) {
        listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",c.getComponentId().name().toUpperCase()),c.getComponentId().name(),"String_Node_Str",c.getState().toString(),"String_Node_Str"));
      }
 else {
        for (        Service s : c.lookupServices()) {
          ServiceConfiguration conf=s.getServiceConfiguration();
          listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",conf.getComponentId().name().toUpperCase()) + (conf.getPartition() != null ? conf.getPartition() : "String_Node_Str"),conf.getName(),conf.getHostName(),s.getState().toString(),"String_Node_Str"));
          for (          String d : s.getDetails()) {
            listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",conf.getComponentId().name().toUpperCase()) + (conf.getPartition() != null ? conf.getPartition() : "String_Node_Str"),conf.getName(),"String_Node_Str",d,"String_Node_Str"));
          }
        }
      }
    }
  }
 else {
    for (    ServiceConfiguration conf : ServiceBuilderRegistry.handles(request.getClass()).list()) {
      try {
        Service s=Components.lookup(conf.getComponentId()).lookupService(conf);
        listConfigs.add(new ComponentInfoType(conf.getPartition(),conf.getName(),conf.getHostName(),s.getState().toString(),s.getDetails()));
      }
 catch (      NoSuchElementException ex) {
        listConfigs.add(new ComponentInfoType(conf.getPartition(),conf.getName(),conf.getHostName(),Component.State.NOTREADY.toString(),"String_Node_Str"));
        LOG.error(ex,ex);
      }
    }
  }
  return reply;
}

Fixed version (ground truth):
public DescribeComponentsResponseType listComponents(DescribeComponentsType request) throws EucalyptusCloudException {
  DescribeComponentsResponseType reply=(DescribeComponentsResponseType)request.getReply();
  List<ComponentInfoType> listConfigs=reply.getRegistered();
  if (DescribeComponentsType.class.equals(request.getClass())) {
    for (    Component c : Components.list()) {
      if (c.lookupServices().isEmpty()) {
        listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",c.getComponentId().name().toUpperCase()),c.getComponentId().name(),"String_Node_Str",c.getState().toString(),"String_Node_Str"));
      }
 else {
        for (        Service s : c.lookupServices()) {
          ServiceConfiguration conf=s.getServiceConfiguration();
          try {
            listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",conf.getComponentId().name().toUpperCase()) + (conf.getPartition() != null ? conf.getPartition() : "String_Node_Str"),conf.getFullName().toString(),conf.getHostName(),s.getState().toString(),"String_Node_Str"));
          }
 catch (          Exception ex) {
            LOG.error(ex,ex);
            listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",conf.getComponentId().name().toUpperCase()) + (conf.getPartition() != null ? conf.getPartition() : "String_Node_Str"),conf.getFullName().toString(),conf.getHostName(),"String_Node_Str","String_Node_Str"));
          }
          for (          String d : s.getDetails()) {
            listConfigs.add(new ComponentInfoType(String.format("String_Node_Str",conf.getComponentId().name().toUpperCase()) + (conf.getPartition() != null ? conf.getPartition() : "String_Node_Str"),conf.getName(),"String_Node_Str",d,"String_Node_Str"));
          }
        }
      }
    }
  }
 else {
    for (    ServiceConfiguration conf : ServiceBuilderRegistry.handles(request.getClass()).list()) {
      try {
        Service s=Components.lookup(conf.getComponentId()).lookupService(conf);
        listConfigs.add(new ComponentInfoType(conf.getPartition(),conf.getName(),conf.getHostName(),s.getState().toString(),s.getDetails()));
      }
 catch (      NoSuchElementException ex) {
        listConfigs.add(new ComponentInfoType(conf.getPartition(),conf.getName(),conf.getHostName(),Component.State.NOTREADY.toString(),"String_Node_Str"));
        LOG.error(ex,ex);
      }
    }
  }
  return reply;
}