if (count != 0) {
int errors = 0;
int warnings = 0;
int tasks = 0;
for (int i = 0; i < count; i++) {
CategorizedProblem problem = problems[i];
if (problem != null) {
currentMain.globalProblemsCount++;
logProblem(problem, localProblemCount, currentMain.globalProblemsCount, unitSource);
localProblemCount++;
if (problem.isError()) {
localErrorCount++;
errors++;
currentMain.globalErrorsCount++;
} else if (problem.getID() == IProblem.Task) {
currentMain.globalTasksCount++;
tasks++;
} else {
currentMain.globalWarningsCount++;
warnings++;
}
}
}
if ((this.tagBits & Logger.XML) != 0) {
if ((errors + warnings) != 0) {
startLoggingProblems(errors, warnings);
for (int i = 0; i < count; i++) {
CategorizedProblem problem = problems[i];
if (problem!= null) {
if (problem.getID() != IProblem.Task) {
logXmlProblem(problem, unitSource);
}
}
}
endLoggingProblems();
}
if (tasks != 0) {
startLoggingTasks(tasks);
for (int i = 0; i < count; i++) {
CategorizedProblem problem = problems[i];
if (problem!= null) {
if (problem.getID() == IProblem.Task) {
logXmlTask(problem, unitSource);
}
}
}
endLoggingTasks();