Program: 28914
Project: 28914
Buggy source:
@Override public String getContent(ActionReportResult proxy){
  RestActionReporter ar=(RestActionReporter)proxy.getActionReport();
  StringBuilder result=new StringBuilder(ProviderUtil.getHtmlHeader(getBaseUri()));
  String message=ar.getCombinedMessage();
  if (message != null) {
    result.append("String_Node_Str").append(message).append("String_Node_Str");
  }
  if (proxy.isError()) {
    result.append("String_Node_Str").append(ar.getActionDescription()).append("String_Node_Str").append(proxy.getErrorMessage());
  }
 else {
    final Map<String,String> childResources=(Map<String,String>)ar.getExtraProperties().get("String_Node_Str");
    final List<Map<String,String>> commands=(List<Map<String,String>>)ar.getExtraProperties().get("String_Node_Str");
    final MethodMetaData postMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final MethodMetaData deleteMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final MethodMetaData getMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final ConfigBean entity=proxy.getEntity();
    if ((proxy.getCommandDisplayName() != null) && (getMetaData != null)) {
      if (entity == null) {
        result.append(processReport(ar));
      }
    }
    if ((postMetaData != null) && (entity == null)) {
      String postCommand=getHtmlRespresentationsForCommand(postMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(postCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if ((deleteMetaData != null) && (entity == null)) {
      String deleteCommand=getHtmlRespresentationsForCommand(deleteMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(deleteCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if ((getMetaData != null) && (entity == null) && (proxy.getCommandDisplayName() != null)) {
      String getCommand=getHtmlRespresentationsForCommand(getMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(getCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if (entity != null) {
      String attributes=ProviderUtil.getHtmlRepresentationForAttributes(proxy.getEntity(),uriInfo.get());
      result.append(ProviderUtil.getHtmlForComponent(attributes,ar.getActionDescription() + "String_Node_Str","String_Node_Str"));
      String deleteCommand=ProviderUtil.getHtmlRespresentationsForCommand(proxy.getMetaData().getMethodMetaData("String_Node_Str"),"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(ProviderUtil.getHtmlForComponent(deleteCommand,"String_Node_Str" + entity.model.getTagName(),"String_Node_Str"));
    }
 else     if (proxy.getLeafContent() != null) {
      String content="String_Node_Str" + uriInfo.get().getAbsolutePath().toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ proxy.getLeafContent().value+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      result.append(content);
    }
 else {
      final Map vals=(Map)ar.getExtraProperties().get("String_Node_Str");
      if ((vals != null) && (!vals.isEmpty())) {
        result.append("String_Node_Str");
        for (        Map.Entry entry : (Set<Map.Entry>)vals.entrySet()) {
          Object object=entry.getValue();
          if (object == null) {
          }
 else           if (object instanceof Collection) {
            if (!((Collection)object).isEmpty()) {
              Collection c=((Collection)object);
              Iterator i=c.iterator();
              result.append("String_Node_Str").append(entry.getKey());
              result.append("String_Node_Str");
              while (i.hasNext()) {
                result.append("String_Node_Str").append(getHtmlRepresentation(i.next())).append("String_Node_Str");
              }
              result.append("String_Node_Str");
              result.append("String_Node_Str");
            }
          }
 else           if (object instanceof Map) {
            if (!((Map)object).isEmpty()) {
              Map m=(Map)object;
              if (vals.size() != 1) {
                result.append("String_Node_Str").append("String_Node_Str" + uriInfo.get().getAbsolutePath().toString() + "String_Node_Str"+ entry.getKey()+ "String_Node_Str"+ entry.getKey()+ "String_Node_Str");
              }
 else {
                result.append("String_Node_Str").append(entry.getKey());
              }
              result.append("String_Node_Str");
              for (              Map.Entry anEntry : (Set<Map.Entry>)m.entrySet()) {
                final String htmlRepresentation=getHtmlRepresentation(anEntry.getValue());
                if (htmlRepresentation != null) {
                  result.append("String_Node_Str").append(anEntry.getKey()).append("String_Node_Str").append(htmlRepresentation).append("String_Node_Str");
                }
              }
              result.append("String_Node_Str");
              result.append("String_Node_Str");
            }
          }
 else {
            result.append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(object.toString()).append("String_Node_Str");
          }
        }
        result.append("String_Node_Str");
      }
 else {
        if ((childResources == null) || (childResources.isEmpty())) {
          if ((uriInfo != null) && (uriInfo.get().getPath().equalsIgnoreCase("String_Node_Str"))) {
            result.append(getHint(uriInfo.get(),MediaType.TEXT_HTML));
          }
        }
      }
    }
    if ((childResources != null) && (!childResources.isEmpty())) {
      String childResourceLinks=getResourcesLinks(childResources);
      result.append(ProviderUtil.getHtmlForComponent(childResourceLinks,"String_Node_Str","String_Node_Str"));
    }
    if ((commands != null) && (!commands.isEmpty())) {
      String commandLinks=getCommandLinks(commands);
      result.append(ProviderUtil.getHtmlForComponent(commandLinks,"String_Node_Str","String_Node_Str"));
    }
  }
  return result.append("String_Node_Str").toString();
}

Fixed version (ground truth):
@Override public String getContent(ActionReportResult proxy){
  RestActionReporter ar=(RestActionReporter)proxy.getActionReport();
  StringBuilder result=new StringBuilder(ProviderUtil.getHtmlHeader(getBaseUri()));
  final String message=ResourceUtil.encodeString(ar.getCombinedMessage());
  if (!message.isEmpty()) {
    result.append("String_Node_Str").append(message).append("String_Node_Str");
  }
  if (proxy.isError()) {
    result.append("String_Node_Str").append(ar.getActionDescription()).append("String_Node_Str").append(proxy.getErrorMessage());
  }
 else {
    final Map<String,String> childResources=(Map<String,String>)ar.getExtraProperties().get("String_Node_Str");
    final List<Map<String,String>> commands=(List<Map<String,String>>)ar.getExtraProperties().get("String_Node_Str");
    final MethodMetaData postMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final MethodMetaData deleteMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final MethodMetaData getMetaData=proxy.getMetaData().getMethodMetaData("String_Node_Str");
    final ConfigBean entity=proxy.getEntity();
    if ((proxy.getCommandDisplayName() != null) && (getMetaData != null)) {
      if (entity == null) {
        result.append(processReport(ar));
      }
    }
    if ((postMetaData != null) && (entity == null)) {
      String postCommand=getHtmlRespresentationsForCommand(postMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(postCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if ((deleteMetaData != null) && (entity == null)) {
      String deleteCommand=getHtmlRespresentationsForCommand(deleteMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(deleteCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if ((getMetaData != null) && (entity == null) && (proxy.getCommandDisplayName() != null)) {
      String getCommand=getHtmlRespresentationsForCommand(getMetaData,"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(getHtmlForComponent(getCommand,"String_Node_Str" + ar.getActionDescription(),"String_Node_Str"));
    }
    if (entity != null) {
      String attributes=ProviderUtil.getHtmlRepresentationForAttributes(proxy.getEntity(),uriInfo.get());
      result.append(ProviderUtil.getHtmlForComponent(attributes,ar.getActionDescription() + "String_Node_Str","String_Node_Str"));
      String deleteCommand=ProviderUtil.getHtmlRespresentationsForCommand(proxy.getMetaData().getMethodMetaData("String_Node_Str"),"String_Node_Str",(proxy.getCommandDisplayName() == null) ? "String_Node_Str" : proxy.getCommandDisplayName(),uriInfo.get());
      result.append(ProviderUtil.getHtmlForComponent(deleteCommand,"String_Node_Str" + entity.model.getTagName(),"String_Node_Str"));
    }
 else     if (proxy.getLeafContent() != null) {
      String content="String_Node_Str" + uriInfo.get().getAbsolutePath().toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ proxy.getLeafContent().name+ "String_Node_Str"+ proxy.getLeafContent().value+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      result.append(content);
    }
 else {
      final Map vals=(Map)ar.getExtraProperties().get("String_Node_Str");
      if ((vals != null) && (!vals.isEmpty())) {
        result.append("String_Node_Str");
        for (        Map.Entry entry : (Set<Map.Entry>)vals.entrySet()) {
          Object object=entry.getValue();
          if (object == null) {
          }
 else           if (object instanceof Collection) {
            if (!((Collection)object).isEmpty()) {
              Collection c=((Collection)object);
              Iterator i=c.iterator();
              result.append("String_Node_Str").append(entry.getKey());
              result.append("String_Node_Str");
              while (i.hasNext()) {
                result.append("String_Node_Str").append(getHtmlRepresentation(i.next())).append("String_Node_Str");
              }
              result.append("String_Node_Str");
              result.append("String_Node_Str");
            }
          }
 else           if (object instanceof Map) {
            if (!((Map)object).isEmpty()) {
              Map m=(Map)object;
              if (vals.size() != 1) {
                result.append("String_Node_Str").append("String_Node_Str" + uriInfo.get().getAbsolutePath().toString() + "String_Node_Str"+ entry.getKey()+ "String_Node_Str"+ entry.getKey()+ "String_Node_Str");
              }
 else {
                result.append("String_Node_Str").append(entry.getKey());
              }
              result.append("String_Node_Str");
              for (              Map.Entry anEntry : (Set<Map.Entry>)m.entrySet()) {
                final String htmlRepresentation=getHtmlRepresentation(anEntry.getValue());
                if (htmlRepresentation != null) {
                  result.append("String_Node_Str").append(anEntry.getKey()).append("String_Node_Str").append(htmlRepresentation).append("String_Node_Str");
                }
              }
              result.append("String_Node_Str");
              result.append("String_Node_Str");
            }
          }
 else {
            result.append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(object.toString()).append("String_Node_Str");
          }
        }
        result.append("String_Node_Str");
      }
 else {
        if ((childResources == null) || (childResources.isEmpty())) {
          if ((uriInfo != null) && (uriInfo.get().getPath().equalsIgnoreCase("String_Node_Str"))) {
            result.append(getHint(uriInfo.get(),MediaType.TEXT_HTML));
          }
        }
      }
    }
    if ((childResources != null) && (!childResources.isEmpty())) {
      String childResourceLinks=getResourcesLinks(childResources);
      result.append(ProviderUtil.getHtmlForComponent(childResourceLinks,"String_Node_Str","String_Node_Str"));
    }
    if ((commands != null) && (!commands.isEmpty())) {
      String commandLinks=getCommandLinks(commands);
      result.append(ProviderUtil.getHtmlForComponent(commandLinks,"String_Node_Str","String_Node_Str"));
    }
  }
  return result.append("String_Node_Str").toString();
}