CommentsWithPaginationJsonBean commentsWithPaginationJsonBean = new CommentsWithPaginationJsonBean();
commentsWithPaginationJsonBean.setMaxResults(comments.size());
commentsWithPaginationJsonBean.setTotal(comments.size());
commentsWithPaginationJsonBean.setStartAt(0);
commentsWithPaginationJsonBean.setComments(CommentJsonBean.shortBeans(comments, jiraBaseUrls, projectRoleManager, authenticationContext.getUser(), emailFormatter));
FieldJsonRepresentation fieldJsonRepresentation = new FieldJsonRepresentation(new JsonData(commentsWithPaginationJsonBean));
CommentsWithPaginationJsonBean renderedBean = new CommentsWithPaginationJsonBean();
renderedBean.setMaxResults(comments.size());
renderedBean.setTotal(comments.size());
renderedBean.setStartAt(0);
renderedBean.setComments(CommentJsonBean.renderedShortBeans(comments, jiraBaseUrls, projectRoleManager, dateTimeFormatterFactory, rendererManager,
fieldLayoutItem == null ? null : fieldLayoutItem.getRendererType(), issue.getIssueRenderContext(), authenticationContext.getUser(), emailFormatter));
fieldJsonRepresentation.setRenderedData(new JsonData(renderedBean));