    public RuleViolation(Rule rule, RuleContext ctx, SimpleNode node, String specificMsg) {
        this.rule = rule;
        this.filename = ctx.getSourceCodeFilename();
        this.description = specificMsg;
        if (node != null) {
	        if (node.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class) == null) {
	            className = "";
	        } else {
	            className = node.getScope().getEnclosingClassScope().getClassName() == null ? "" : node.getScope().getEnclosingClassScope().getClassName();
	        }
	        String qualifiedName = null;
	        List<ASTClassOrInterfaceDeclaration> parents = node.getParentsOfType(ASTClassOrInterfaceDeclaration.class);
	        for ( ASTClassOrInterfaceDeclaration parent : parents )
	        {
	        	if (qualifiedName == null) {
	        		qualifiedName = parent.getScope().getEnclosingClassScope().getClassName();
	            } else {
	            	qualifiedName = qualifiedName + "$" + parent.getScope().getEnclosingClassScope().getClassName();
	            }
	        }
	        if ( ! "net.sourceforge.pmd.symboltable.SourceFileScope".equals(node.getScope().getClass().getName() ) ) {
	        	className = node.getScope().getEnclosingClassScope().getClassName() == null ? "" : qualifiedName;
	        }
	        setVariableNameIfExists(node);
	        methodName = node.getFirstParentOfType(ASTMethodDeclaration.class) == null ? "" : node.getScope().getEnclosingMethodScope().getName();
	        packageName = node.getScope().getEnclosingSourceFileScope().getPackageName() == null ? "" : node.getScope().getEnclosingSourceFileScope().getPackageName();
	        beginLine = node.getBeginLine();
	        endLine = node.getEndLine();
	        beginColumn = node.getBeginColumn();
	        endColumn = node.getEndColumn();
	        List<SimpleNode> parentTypes = new ArrayList<SimpleNode>(node.getParentsOfType(ASTTypeDeclaration.class));
	        if (node instanceof ASTTypeDeclaration) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTClassOrInterfaceBodyDeclaration.class));
	        if (node instanceof ASTClassOrInterfaceBodyDeclaration) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTFormalParameter.class));
	        if (node instanceof ASTFormalParameter) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTLocalVariableDeclaration.class));
	        if (node instanceof ASTLocalVariableDeclaration) {
	            parentTypes.add(node);
	        }
	        for (SimpleNode parentType : parentTypes) {
	            CanSuppressWarnings t = (CanSuppressWarnings) parentType;
	            if (t.hasSuppressWarningsAnnotationFor(getRule())) {
	                isSuppressed = true;
	            }
	        }
        } else {
        	className = "";
        	methodName = "";
        	packageName = "";
        	filename = "";
        }
    }

    public RuleViolation(Rule rule, RuleContext ctx, SimpleNode node, String specificMsg) {
        this.rule = rule;
        this.filename = ctx.getSourceCodeFilename();
        this.description = specificMsg;
        if (node != null) {
	        if (node.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class) == null) {
	            className = "";
	        } else {
	            className = node.getScope().getEnclosingClassScope().getClassName() == null ? "" : node.getScope().getEnclosingClassScope().getClassName();
	        }
	        String qualifiedName = null;
	        List<ASTClassOrInterfaceDeclaration> parents = node.getParentsOfType(ASTClassOrInterfaceDeclaration.class);
	        for ( ASTClassOrInterfaceDeclaration parent : parents )
	        {
	        	if (qualifiedName == null) {
	        		qualifiedName = parent.getScope().getEnclosingClassScope().getClassName();
	            } else {
	            	qualifiedName = parent.getScope().getEnclosingClassScope().getClassName() + "$" + qualifiedName;
	            }
	        }
	        if ( ! "net.sourceforge.pmd.symboltable.SourceFileScope".equals(node.getScope().getClass().getName() ) ) {
	        	className = node.getScope().getEnclosingClassScope().getClassName() == null ? "" : qualifiedName;
	        }
	        setVariableNameIfExists(node);
	        methodName = node.getFirstParentOfType(ASTMethodDeclaration.class) == null ? "" : node.getScope().getEnclosingMethodScope().getName();
	        packageName = node.getScope().getEnclosingSourceFileScope().getPackageName() == null ? "" : node.getScope().getEnclosingSourceFileScope().getPackageName();
	        beginLine = node.getBeginLine();
	        endLine = node.getEndLine();
	        beginColumn = node.getBeginColumn();
	        endColumn = node.getEndColumn();
	        List<SimpleNode> parentTypes = new ArrayList<SimpleNode>(node.getParentsOfType(ASTTypeDeclaration.class));
	        if (node instanceof ASTTypeDeclaration) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTClassOrInterfaceBodyDeclaration.class));
	        if (node instanceof ASTClassOrInterfaceBodyDeclaration) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTFormalParameter.class));
	        if (node instanceof ASTFormalParameter) {
	            parentTypes.add(node);
	        }
	        parentTypes.addAll(node.getParentsOfType(ASTLocalVariableDeclaration.class));
	        if (node instanceof ASTLocalVariableDeclaration) {
	            parentTypes.add(node);
	        }
	        for (SimpleNode parentType : parentTypes) {
	            CanSuppressWarnings t = (CanSuppressWarnings) parentType;
	            if (t.hasSuppressWarningsAnnotationFor(getRule())) {
	                isSuppressed = true;
	            }
	        }
        } else {
        	className = "";
        	methodName = "";
        	packageName = "";
        	filename = "";
        }
    }
