int problemCount = this.compilationResult.problemCount;
IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
CompilerOptions options = this.scope.compilerOptions();
boolean hasMandatoryErrors = false;
nextProblem: for (int iProblem = 0, length = problemCount; iProblem < length; iProblem++) {
CategorizedProblem problem = problems[iProblem];
int problemID = problem.getID();
int irritant = ProblemReporter.getIrritant(problemID);
boolean isError = problem.isError();
if (isError) {
if (irritant == 0) {
// tolerate unused warning tokens when mandatory errors
hasMandatoryErrors = true;
continue;
}
if (!options.suppressOptionalErrors) {
continue;
}
}
int start = problem.getSourceStart();
int end = problem.getSourceEnd();
nextSuppress: for (int iSuppress = 0, suppressCount = this.suppressWarningsCount; iSuppress < suppressCount; iSuppress++) {
long position = this.suppressWarningScopePositions[iSuppress];
int startSuppress = (int) (position >>> 32);
int endSuppress = (int) position;
if (start < startSuppress) continue nextSuppress;
if (end > endSuppress) continue nextSuppress;
if (!this.suppressWarningIrritants[iSuppress].isSet(irritant))
continue nextSuppress;
// discard suppressed warning
removed++;
problems[iProblem] = null;
this.compilationResult.removeProblem(problem);
if (foundIrritants[iSuppress] == null){
foundIrritants[iSuppress] = new IrritantSet(irritant);
} else {
foundIrritants[iSuppress].set(irritant);
}
continue nextProblem;
}
}
// compact remaining problems
if (removed > 0) {
for (int i = 0, index = 0; i < problemCount; i++) {
CategorizedProblem problem;
if ((problem = problems[i]) != null) {
if (i > index) {
problems[index++] = problem;
} else {
index++;