Cloud cloud = bugCollection.getCloudLazily();
if (cloud != null && cloud.communicationInitiated()) {
long firstSeen = cloud.getFirstSeen(this);
attributeList.addAttribute("firstSeen", firstSeenXMLFormat().format(firstSeen));
int reviews = cloud.getNumberReviewers(this);
UserDesignation consensus = cloud.getConsensusDesignation(this);
if (!cloud.isInCloud(this)) {
attributeList.addAttribute("isInCloud", "false");
}
if (reviews > 0) {
attributeList.addAttribute("reviews", Integer.toString(reviews));
if (consensus != UserDesignation.UNCLASSIFIED) {
attributeList.addAttribute("consensus", consensus.toString());
}
}
if (addMessages) {
int ageInDays = ageInDays(bugCollection, firstSeen);
attributeList.addAttribute("ageInDays", Integer.toString(ageInDays));
if (reviews > 0 && consensus != UserDesignation.UNCLASSIFIED) {
if (consensus.score() < 0) {
attributeList.addAttribute("notAProblem", "true");
}
if (consensus.score() > 0) {
attributeList.addAttribute("shouldFix", "true");
}
}
}
} else if (hasXmlProps()) {
XmlProps props = getXmlProps();
if (props.firstSeen != null) {
attributeList.addOptionalAttribute("firstSeen", firstSeenXMLFormat().format(props.firstSeen));
}
if (props.reviewCount > 0) {
if (props.consensus != null) {
attributeList.addOptionalAttribute("consensus", props.consensus);
}
attributeList.addAttribute("reviews", Integer.toString(props.reviewCount));
}
if (!props.isInCloud()) {
attributeList.addAttribute("isInCloud", "false");
}
if (addMessages) {
UserDesignation consesus = UserDesignation.valueOf(props.consensus);
if (consesus.shouldFix()) {
attributeList.addAttribute("shouldFix", "true");
} else if (consesus.notAProblem()) {
attributeList.addAttribute("notAProblem", "true");
}
if (props.firstSeen != null) {
int ageInDays = ageInDays(bugCollection, props.firstSeen.getTime());