if (!sbmt.getReportId().isInIssuezilla()){
LOG.fine("Not in issuezilla");
return false;
}
Integer issueId = sbmt.getReportId().getIssueId();
Issue issue = BugReporterFactory.getDefaultReporter().getIssue(issueId);
if (issue == null){
LOG.log(Level.SEVERE, "Impossible to find issue for issueId = {0}", issueId);
return false;
} else {
LOG.fine("Issue is not null");
}
if ((issue.isFixed()||issue.isWorksForMe()) && !Utils.isGuest(sbmt.getNbuserId().getName())) {
if (sbmt.getCommentCollection() == null || sbmt.getCommentCollection().isEmpty()){
LOG.fine("No comments");
return false;
}
Long fixedBuildNumber = BuildProvider.getInstance().getBuild(issueId);
if (org.netbeans.modules.exceptions.utils.Utils.isDailyBuild(sbmt.getLogfileId().getProductVersionId()) && fixedBuildNumber != null){
Long excBuildNumber = sbmt.getLogfileId().getBuildnumber();
if ((excBuildNumber != null) && (fixedBuildNumber <= excBuildNumber)){
Object[] params = new Object[]{sbmt.getId(), excBuildNumber, fixedBuildNumber};
LOG.log(Level.INFO, "Calling reopen of issue {0} excBuild: {1}; fixed build: {2}", params);
handleReopen(sbmt);
return true;
}
}
Date date = issue.getLastResolutionChange();
if ((date != null) && (sbmt.isBuildNewerThan(date)) && isIssueTMBeforeExcProductVersion(sbmt, issue)){
Object[] params = new Object[]{sbmt.getId(), sbmt.getBuild(), date, sbmt.getLogfileId().getProductVersionId().getProductVersion(), issue.getTMNumber()};
LOG.log(Level.INFO, "Calling reopen of issue {0} excBuild: {1}; date: {2} ; excVersion: {3}; issueTM: {4}", params);
handleReopen(sbmt);
return true;
} else {
LOG.log(Level.FINE, "Is not newer {0}, {1},{2}", new Object[]{date, issue.getTMNumber(), issue.getTargetMilestone()});
}
} else {
LOG.fine("Not fixed or is guest");
}
return false;