public int computeSeverity(int problemID){
 	

	/*
	 * If semantic validation is not enabled and this is anything but a
	 * syntax, documentation, or task problem, ignore.
	 */
	if (!this.options.enableSemanticValidation && (problemID & IProblem.Syntax) == 0 && (problemID & IProblem.Javadoc) == 0 && problemID != IProblem.Task) {
		return ProblemSeverities.Ignore;
	}
	
	switch (problemID) {
		case IProblem.Task :
			return ProblemSeverities.Warning;
 		case IProblem.TypeCollidesWithPackage :
			return ProblemSeverities.Warning;

		/*
		 * JS Type mismatch is set to default as Warning
		 */
 		case IProblem.NotAFunction:
 		case IProblem.TypeMismatch:
 			return ProblemSeverities.Warning;

// 		case IProblem.UndefinedName:
// 		case IProblem.UndefinedFunction:
// 		case IProblem.UndefinedMethod:
// 		case IProblem.UndefinedField:
// 		case IProblem.UndefinedConstructor:
// 			break;
		/*
		 * Javadoc tags resolved references errors
		 */
		case IProblem.JavadocInvalidParamName:
		case IProblem.JavadocDuplicateParamName:
		case IProblem.JavadocMissingParamName:
		case IProblem.JavadocMissingIdentifier:
		case IProblem.JavadocInvalidMemberTypeQualification:
		case IProblem.JavadocInvalidThrowsClassName:
		case IProblem.JavadocDuplicateThrowsClassName:
		case IProblem.JavadocMissingThrowsClassName:
		case IProblem.JavadocMissingSeeReference:
		case IProblem.JavadocUndefinedField:
		case IProblem.JavadocAmbiguousField:
		case IProblem.JavadocUndefinedConstructor:
		case IProblem.JavadocAmbiguousConstructor:
		case IProblem.JavadocUndefinedMethod:
		case IProblem.JavadocAmbiguousMethod:
		case IProblem.JavadocParameterMismatch:
		case IProblem.JavadocUndefinedType:
		case IProblem.JavadocAmbiguousType:
		case IProblem.JavadocInternalTypeNameProvided:
		case IProblem.JavadocNoMessageSendOnArrayType:
		case IProblem.JavadocNoMessageSendOnBaseType:
		case IProblem.JavadocInheritedMethodHidesEnclosingName:
		case IProblem.JavadocInheritedFieldHidesEnclosingName:
		case IProblem.JavadocInheritedNameHidesEnclosingTypeName:
		case IProblem.JavadocNonStaticTypeFromStaticInvocation:
		case IProblem.JavadocEmptyReturnTag:
			if (!this.options.reportInvalidJavadocTags) {
				return ProblemSeverities.Ignore;
			}
			break;
		/*
		 * Javadoc invalid tags due to deprecated references
		 */
		case IProblem.JavadocUsingDeprecatedField:
		case IProblem.JavadocUsingDeprecatedConstructor:
		case IProblem.JavadocUsingDeprecatedMethod:
		case IProblem.JavadocUsingDeprecatedType:
			if (!(this.options.reportInvalidJavadocTags && this.options.reportInvalidJavadocTagsDeprecatedRef)) {
				return ProblemSeverities.Ignore;
			}
			break;
		/*
		 * Javadoc invalid tags due to non-visible references
		 */
		case IProblem.JavadocNotVisibleField:
		case IProblem.JavadocNotVisibleConstructor:
		case IProblem.JavadocNotVisibleMethod:
		case IProblem.JavadocNotVisibleType:
		case IProblem.JavadocHiddenReference:
			if (!(this.options.reportInvalidJavadocTags && this.options.reportInvalidJavadocTagsNotVisibleRef)) {
				return ProblemSeverities.Ignore;
			}
			break;
	}
	long irritant = getIrritant(problemID);
	if (irritant != 0) {
		if ((problemID & IProblem.Javadoc) != 0 && !this.options.docCommentSupport)
			return ProblemSeverities.Ignore;
		return this.options.getSeverity(irritant);
	}
	return ProblemSeverities.Error | ProblemSeverities.Fatal;
}
//public void constantOutOfFormat(NumberLiteral literal) {
//	// the literal is not in a correct format
//	// this code is called on IntLiteral
//	// example 000811 ...the 8 is uncorrect.
//
//	if (literal instanceof IntLiteral) {
//		char[] source = literal.source();
//		try {
//			final String Radix;
//			final int radix;
//			if ((source[1] == 'x') || (source[1] == 'X')) {
//				radix = 16;
//				Radix = "Hex"; //$NON-NLS-1$
//			} else {
//				radix = 8;
//				Radix = "Octal"; //$NON-NLS-1$
//			}
//			//look for the first digit that is incorrect
//			int place = -1;
//			label : for (int i = radix == 8 ? 1 : 2; i < source.length; i++) {
//				if (ScannerHelper.digit(source[i], radix) == -1) {
//					place = i;
//					break label;
//				}
//			}
//			String[] arguments = new String[] {
//				new String(literal.literalType(null).readableName()), // numeric literals do not need scope to reach type
//				Radix + " " + new String(source) + " (digit " + new String(new char[] {source[place]}) + ")"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//
//			this.handle(
//				IProblem.NumericValueOutOfRange,
//				arguments,
//				arguments,
//				ProblemSeverities.Ignore,
//				literal.sourceStart,
//				literal.sourceEnd);
//			return;
//		} catch (IndexOutOfBoundsException ex) {
//			// should never happen
//		}
//
//		// just in case .... use a predefined error..
//		// we should never come here...(except if the code changes !)
//		this.constantOutOfRange(literal, literal.literalType(null)); // numeric literals do not need scope to reach type
//	}
//}