Program: 14352
Project: 14352
Buggy source:
public DeleteTagsResponseType deleteTags(final DeleteTagsType request) throws EucalyptusCloudException {
  final DeleteTagsResponseType reply=request.getReply();
  reply.set_return(false);
  final Context context=Contexts.lookup();
  final OwnerFullName ownerFullName=context.getUserFullName().asAccountFullName();
  final List<String> resourceIds=Objects.firstNonNull(request.getResourcesSet(),Collections.<String>emptyList());
  final List<DeleteResourceTag> resourceTags=Objects.firstNonNull(request.getTagSet(),Collections.<DeleteResourceTag>emptyList());
  for (  final DeleteResourceTag resourceTag : resourceTags) {
    final String key=resourceTag.getKey();
    if (Strings.isNullOrEmpty(key) || key.trim().length() > 128 || isReserved(key)) {
      throw new InvalidParameterValueException("String_Node_Str" + reservedPrefixes + "String_Node_Str"+ key);
    }
  }
  if (resourceIds.size() > 0 && resourceIds.size() > 0) {
    final Predicate<Void> delete=new Predicate<Void>(){
      @Override public boolean apply(      final Void v){
        final Iterable<CloudMetadata> resources=Iterables.filter(Iterables.transform(resourceIds,resourceLookup()),Predicates.notNull());
        for (        final CloudMetadata resource : resources) {
          for (          final DeleteResourceTag resourceTag : resourceTags) {
            try {
              final Tag example=TagSupport.fromResource(resource).example(resource,ownerFullName,resourceTag.getKey(),resourceTag.getValue());
              if (example != null && Permissions.isAuthorized(PolicySpec.VENDOR_EC2,PolicySpec.EC2_RESOURCE_TAG,example.getResourceType() + "String_Node_Str" + example.getResourceId()+ "String_Node_Str"+ example.getKey(),context.getAccount(),PolicySpec.EC2_DELETETAGS,context.getUser())) {
                Tags.delete(example);
              }
            }
 catch (            NoSuchMetadataException e) {
              log.debug(e,e);
            }
catch (            MetadataException e) {
              throw Exceptions.toUndeclared(e);
            }
          }
        }
        return true;
      }
    }
;
    reply.set_return(Entities.asTransaction(Tag.class,delete).apply(null));
  }
  return reply;
}

Fixed version (ground truth):
public DeleteTagsResponseType deleteTags(final DeleteTagsType request) throws EucalyptusCloudException {
  final DeleteTagsResponseType reply=request.getReply();
  reply.set_return(false);
  final Context context=Contexts.lookup();
  final OwnerFullName ownerFullName=context.getUserFullName().asAccountFullName();
  final List<String> resourceIds=Objects.firstNonNull(request.getResourcesSet(),Collections.<String>emptyList());
  final List<DeleteResourceTag> resourceTags=Objects.firstNonNull(request.getTagSet(),Collections.<DeleteResourceTag>emptyList());
  for (  final DeleteResourceTag resourceTag : resourceTags) {
    final String key=resourceTag.getKey();
    if (Strings.isNullOrEmpty(key) || key.trim().length() > 128 || isReserved(key)) {
      throw new InvalidParameterValueException("String_Node_Str" + reservedPrefixes + "String_Node_Str"+ key);
    }
  }
  if (resourceIds.size() > 0 && resourceIds.size() > 0) {
    final Predicate<Void> delete=new Predicate<Void>(){
      @Override public boolean apply(      final Void v){
        final Iterable<CloudMetadata> resources=Iterables.filter(Iterables.transform(resourceIds,resourceLookup()),Predicates.notNull());
        for (        final CloudMetadata resource : resources) {
          for (          final DeleteResourceTag resourceTag : resourceTags) {
            try {
              final Tag example=TagSupport.fromResource(resource).example(resource,ownerFullName,resourceTag.getKey(),resourceTag.getValue());
              if (example != null && Permissions.isAuthorized(PolicySpec.VENDOR_EC2,PolicySpec.EC2_RESOURCE_TAG,example.getResourceType() + "String_Node_Str" + example.getResourceId()+ "String_Node_Str"+ example.getKey(),context.getAccount(),PolicySpec.EC2_DELETETAGS,context.getUser())) {
                Tags.delete(example,TagSupport.fromResource(resource).exampleCriterion(example),Collections.<String,String>emptyMap());
              }
            }
 catch (            NoSuchMetadataException e) {
              log.debug(e,e);
            }
catch (            MetadataException e) {
              throw Exceptions.toUndeclared(e);
            }
          }
        }
        return true;
      }
    }
;
    reply.set_return(Entities.asTransaction(Tag.class,delete).apply(null));
  }
  return reply;
}