Program: 14686
Project: 14686
Buggy source:
public DescribeSnapshotsResponseType describe(DescribeSnapshotsType request) throws EucalyptusCloudException {
  DescribeSnapshotsResponseType reply=(DescribeSnapshotsResponseType)request.getReply();
  Context ctx=Contexts.lookup();
  EntityWrapper<Snapshot> db=EntityWrapper.get(Snapshot.class);
  try {
    List<Snapshot> snapshots=db.query(Snapshot.named(AccountFullName.getInstance(ctx.getAccount()),null));
    for (    Snapshot snap : Iterables.filter(snapshots,RestrictedTypes.filterPrivileged())) {
      DescribeStorageSnapshotsType scRequest=new DescribeStorageSnapshotsType(Lists.newArrayList(snap.getDisplayName()));
      if (request.getSnapshotSet().isEmpty() || request.getSnapshotSet().contains(snap.getDisplayName())) {
        try {
          ServiceConfiguration sc=Partitions.lookupService(Storage.class,snap.getPartition());
          DescribeStorageSnapshotsResponseType snapshotInfo=ServiceDispatcher.lookup(sc).send(scRequest);
          for (          StorageSnapshot storageSnapshot : snapshotInfo.getSnapshotSet()) {
            snap.setMappedState(storageSnapshot.getStatus());
            edu.ucsb.eucalyptus.msgs.Snapshot snapReply=snap.morph(new edu.ucsb.eucalyptus.msgs.Snapshot());
            if (storageSnapshot.getProgress() != null)             snapReply.setProgress(storageSnapshot.getProgress());
            snapReply.setVolumeId(storageSnapshot.getVolumeId());
            snapReply.setOwnerId(snap.getOwnerAccountNumber());
            reply.getSnapshotSet().add(snapReply);
          }
        }
 catch (        NoSuchElementException e) {
          LOG.warn("String_Node_Str" + e);
          LOG.debug(e,e);
        }
catch (        EucalyptusCloudException e) {
          LOG.warn("String_Node_Str" + e);
          LOG.debug(e,e);
        }
      }
    }
    db.commit();
  }
 catch (  Exception e) {
    db.rollback();
  }
  return reply;
}

Fixed version (ground truth):
public DescribeSnapshotsResponseType describe(DescribeSnapshotsType request) throws EucalyptusCloudException {
  DescribeSnapshotsResponseType reply=(DescribeSnapshotsResponseType)request.getReply();
  Context ctx=Contexts.lookup();
  EntityWrapper<Snapshot> db=EntityWrapper.get(Snapshot.class);
  try {
    List<Snapshot> snapshots=db.query(Snapshot.named(AccountFullName.getInstance(ctx.getAccount()),null));
    for (    Snapshot snap : Iterables.filter(snapshots,RestrictedTypes.filterPrivileged())) {
      DescribeStorageSnapshotsType scRequest=new DescribeStorageSnapshotsType(Lists.newArrayList(snap.getDisplayName()));
      if (request.getSnapshotSet().isEmpty() || request.getSnapshotSet().contains(snap.getDisplayName())) {
        try {
          ServiceConfiguration sc=Topology.lookup(Storage.class,Partitions.lookupByName(snap.getPartition()));
          DescribeStorageSnapshotsResponseType snapshotInfo=ServiceDispatcher.lookup(sc).send(scRequest);
          for (          StorageSnapshot storageSnapshot : snapshotInfo.getSnapshotSet()) {
            snap.setMappedState(storageSnapshot.getStatus());
            edu.ucsb.eucalyptus.msgs.Snapshot snapReply=snap.morph(new edu.ucsb.eucalyptus.msgs.Snapshot());
            if (storageSnapshot.getProgress() != null)             snapReply.setProgress(storageSnapshot.getProgress());
            snapReply.setVolumeId(storageSnapshot.getVolumeId());
            snapReply.setOwnerId(snap.getOwnerAccountNumber());
            reply.getSnapshotSet().add(snapReply);
          }
        }
 catch (        NoSuchElementException e) {
          LOG.warn("String_Node_Str" + e);
          LOG.debug(e,e);
        }
catch (        EucalyptusCloudException e) {
          LOG.warn("String_Node_Str" + e);
          LOG.debug(e,e);
        }
      }
    }
    db.commit();
  }
 catch (  Exception e) {
    db.rollback();
  }
  return reply;
}